General method for realizing data filling by using JSON configuration dynamic form

CN115904376BActive Publication Date: 2026-08-11GRG BANKING IT
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-30
Publication Date
2026-08-11

AI Technical Summary

Technical Problem

在现有的数据填报过程中,在有数据变动的情况下,需要后端开发人员修改代码以实现数据的同时调整、联调、测试以及上线等操作,导致数据填报开发周期长,需求变动困难且操作门槛高,从而增加了人工工作量,降低数据填报效率

Benefits of technology

[0054]第四方面,本申请提供了一种非暂态计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现如上述第一方面所述的使用JSON配置动态表单实现数据填报的通用方法。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115904376B_ABST
    Figure CN115904376B_ABST
Patent Text Reader

Abstract

This application discloses a general method for implementing data entry using dynamic forms configured with JSON, belonging to the field of data processing technology. The general method for implementing data entry using dynamic forms configured with JSON in this application includes: setting the target form element of the form to be configured; configuring the encoding of the sub-form and the corresponding sub-form configuration when the form to be configured includes sub-forms; generating a target form configuration based on the target form element, and specifying the encoding associated with the sub-form in the target form configuration. This general method for implementing data entry using dynamic forms configured with JSON in this application allows users to configure the main form and corresponding sub-forms simultaneously when configuring the current form, realizing the function of synchronous configuration of multi-level main and sub-forms, facilitating user configuration, reducing manual workload, and thus improving the efficiency of report generation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of data processing technology, and in particular relates to a general method for implementing data entry using JSON configuration of dynamic forms. Background Technology

[0002] With the rapid development of information technology, the amount of data that needs to be filled in daily work has also increased. In the current data entry process, when there are changes in the data, backend developers need to modify the code to achieve simultaneous data adjustment, integration testing, and deployment. This results in a long data entry development cycle, difficulty in handling changes in requirements, and high operational barriers, thereby increasing the workload and reducing the efficiency of data entry. Summary of the Invention

[0003] This application aims to address at least one of the technical problems existing in the prior art. To this end, this application proposes a general method for implementing data entry using dynamic forms configured with JSON, which realizes the retention of historical data and the function of simultaneous entry of multi-level main and supplementary tables.

[0004] Firstly, this application provides a general method for implementing data entry using JSON configuration of dynamic forms, the method comprising:

[0005] Set the target form element of the form to be configured;

[0006] If the form to be configured includes sub-forms, configure the encoding of the sub-forms and the sub-form configuration corresponding to the sub-forms;

[0007] A target form configuration is generated based on the target form element, and the encoding associated with the sub-form is specified in the target form configuration.

[0008] According to the general method of using JSON to configure dynamic forms for data entry in this application, the target form configuration is generated by setting the target form element of the form to be configured, as well as configuring the encoding of the corresponding subform and the subform configuration of the corresponding subform. The encoding of the associated subform is specified in the target form configuration. When configuring the current form, the user can configure the configuration in the main form and the corresponding subform at the same time, realizing the function of multi-level main and auxiliary table synchronous configuration, which is convenient for users to configure, reduces manual workload, and thus improves the efficiency of report generation.

[0009] One embodiment of this application provides a general method for implementing data entry using JSON configuration of dynamic forms. When the form to be configured includes a subform, before configuring the encoding of the subform and the subform element corresponding to the subform, the method further includes: when the form to be configured corresponds to a main form, configuring the main form encoding and the main table field corresponding to the main form.

[0010] The step of generating a target form configuration based on the target form element includes: specifying the associated main table field in the target form configuration.

[0011] According to one embodiment of this application, a general method for implementing data entry using dynamic forms configured with JSON is provided. By configuring the main form code and the corresponding main table fields of the main form, and specifying the associated main table fields in the target form configuration, the user can configure the associated main form and sub-forms simultaneously when configuring the current form according to the code. This achieves the function of synchronous configuration of multi-level main and sub-tables, reduces manual workload, and thus improves the efficiency of report generation.

[0012] One embodiment of this application provides a general method for implementing data entry using JSON-configured dynamic forms. After generating the target form configuration based on the target form element, the method includes:

[0013] Obtain the data to be updated, which corresponds to the target form configuration;

[0014] If the data to be updated is different from the historical data corresponding to the target form configuration, the data to be updated is added to the historical data, and the status corresponding to the historical data and the update time of the target data are modified.

[0015] If the target form configuration includes a subform, the data to be processed in the subform is obtained based on the subform configuration.

[0016] Based on the data to be processed, process the sub-historical data corresponding to the sub-form.

[0017] According to one embodiment of this application, a general method for data entry using JSON-configured dynamic forms is provided. By updating historical data, the method retains the historical data while ensuring the timeliness and accuracy of data updates, thereby achieving linked updates of the main and supplementary tables and improving the efficiency of data updates.

[0018] One embodiment of this application provides a general method for implementing data entry using JSON-configured dynamic forms. After generating the target form configuration based on the target form element, the method includes:

[0019] Obtain the first business data from the target data table, wherein the target data table corresponds to the target form configuration;

[0020] If the target form configuration corresponds to a sub-form, obtain the sub-table data of the sub-form based on the sub-form configuration;

[0021] Insert the sub-table data into the first business data to generate the second business data;

[0022] Output the second business data.

[0023] According to one embodiment of this application, a general method for implementing data entry using dynamic forms configured with JSON is described. This method obtains sub-table data of a sub-form based on the sub-form configuration, inserts the sub-table data into the first business data, and then generates the second business data. When a user queries the current form according to the code, they can simultaneously query the associated main form and sub-form, thus realizing the function of synchronous querying of multi-level main and auxiliary tables and improving data query efficiency.

[0024] One embodiment of this application provides a general method for implementing data entry using JSON-configured dynamic forms. After generating the target form configuration based on the target form element, the method includes:

[0025] Obtain the data to be saved, which corresponds to the target form configuration;

[0026] Based on the target form configuration, validate the data to be saved;

[0027] If the verification passes, the data to be saved is stored.

[0028] According to one embodiment of this application, a general method for data entry using JSON-configured dynamic forms is provided. By performing data validation logic on the data to be saved before saving the data, the consistency between the data to be saved and the configuration of the target form is ensured. Furthermore, by synchronously saving the sub-table data when the target form is configured with corresponding sub-tables, the function of synchronously saving multi-level main and sub-tables is realized, which improves the accuracy of the target business data and thus improves the efficiency of data saving.

[0029] One embodiment of this application provides a general method for implementing data entry using JSON-configured dynamic forms. After generating the target form configuration based on the target form element, the method includes:

[0030] Delete the data to be deleted, which corresponds to the target form configuration;

[0031] If the target form configuration corresponds to a sub-form, obtain the sub-table data of the sub-form based on the sub-form configuration;

[0032] Delete the sub-table data of the sub-form.

[0033] According to one embodiment of this application, a general method for data entry using dynamic forms configured with JSON is provided. By determining whether the target form configuration corresponds to a sub-form, data in the corresponding form is deleted, ensuring the consistency between business data and the target form configuration, as well as the accuracy of the target form. This method also enables the simultaneous deletion of data from multiple levels of main and subsidiary tables, thereby improving the efficiency of data deletion.

[0034] Secondly, this application provides a general apparatus for implementing data entry using JSON-configured dynamic forms, the apparatus comprising:

[0035] The first processing module is used to set the target form element of the form to be configured.

[0036] The second processing module is used to configure the encoding of the sub-form and the sub-form configuration corresponding to the sub-form when the form to be configured includes a sub-form.

[0037] The third processing module is used to generate a target form configuration based on the target form element, and to specify the encoding associated with the sub-form in the target form configuration.

[0038] According to one embodiment of this application, a general apparatus for data entry using JSON configuration of dynamic forms generates a target form configuration by setting the target form element of the form to be configured, and configures the encoding of the corresponding subform and the subform configuration corresponding to the subform. The encoding of the associated subform is specified in the target form configuration. When configuring the current form, the user can configure the configuration in the main form and the corresponding subform at the same time, realizing the function of multi-level main and auxiliary table synchronous configuration, which is convenient for users to configure, reduces manual workload, and improves the efficiency of report generation.

[0039] One embodiment of this application provides a general apparatus for implementing data entry using dynamic forms configured with JSON. The apparatus further includes a fourth processing module for setting the front end via JSON configuration.

[0040] According to one embodiment of this application, a general apparatus for implementing data entry using dynamic forms configured with JSON is provided. By configuring the front end with JSON, personalized forms can be customized, making it convenient for users.

[0041] One embodiment of this application provides a general apparatus for data entry using JSON configuration of dynamic forms. The apparatus further includes a fifth processing module, used to configure the main form code and the main table fields corresponding to the main form when the form to be configured corresponds to a main form.

[0042] According to one embodiment of this application, a general apparatus for data entry using JSON configuration of dynamic forms is provided. By configuring the main form code and the corresponding main table fields when the form to be configured corresponds to a main table, a multi-level main and auxiliary table synchronous configuration function is realized, which improves the user experience and thus improves the efficiency of report generation.

[0043] One embodiment of this application provides a general apparatus for implementing data entry using JSON-configured dynamic forms. The apparatus further includes a sixth processing module for specifying associated main table fields in the target form configuration.

[0044] According to one embodiment of this application, a general apparatus for data entry using JSON configuration of dynamic forms is provided. By specifying the associated main table field in the target form configuration, the user can configure the associated main form and sub-form simultaneously when configuring the current form according to the code. This realizes the function of synchronous configuration of multi-level main and sub-tables, reduces manual workload, and thus improves the efficiency of report generation.

[0045] One embodiment of this application provides a general apparatus for data entry using a dynamic form configured with JSON. The apparatus further includes a seventh processing module, configured to: acquire data to be updated, which corresponds to a target form configuration; add the data to be updated to the historical data if the data to be updated differs from the historical data corresponding to the target form configuration, and update the status of the historical data and the update time of the target data; acquire data to be processed from the sub-forms based on the sub-form configuration if the target form configuration includes sub-forms; and process the corresponding sub-historical data based on the data to be processed.

[0046] According to one embodiment of this application, a general apparatus for data entry using JSON-configured dynamic forms is provided. By updating historical data, the apparatus retains the historical data while ensuring the timeliness and accuracy of data updates, thereby achieving linked updates of the main and supplementary tables and improving the efficiency of data updates.

[0047] One embodiment of this application provides a general apparatus for data entry using a dynamic form configured with JSON. The apparatus further includes an eighth processing module, which is used to obtain first business data from a target data table, wherein the target data table corresponds to a target form configuration; if the target form configuration corresponds to a sub-form, it obtains sub-table data of the sub-form based on the sub-form configuration; inserts the sub-table data into the first business data to generate second business data; and outputs the second business data.

[0048] According to one embodiment of this application, a general apparatus for data entry using JSON-configured dynamic forms is provided. By obtaining sub-table data of sub-forms based on sub-form configuration, inserting the sub-table data into first business data, and then generating second business data, users can simultaneously query the associated main form and sub-forms when querying the current form according to the code. This realizes the function of synchronous querying of multi-level main and auxiliary tables, thereby improving data query efficiency.

[0049] One embodiment of this application provides a general apparatus for data entry using a dynamic form configured with JSON. The apparatus further includes a ninth processing module for obtaining data to be saved, the data to be saved corresponding to a target form configuration; validating the data to be saved based on the target form configuration; and storing the data to be saved if the validation passes.

[0050] According to one embodiment of this application, a general apparatus for data entry using JSON-configured dynamic forms ensures consistency between the data to be saved and the configuration of the target form by performing data validation logic on the data to be saved before saving the data. Furthermore, by synchronously saving the sub-table data when the target form is configured with corresponding sub-tables, the function of synchronously saving multi-level main and sub-tables is realized, which improves the accuracy of the target business data and thus improves the efficiency of data saving.

[0051] One embodiment of this application provides a general apparatus for data entry using a dynamic form configured with JSON. The apparatus further includes a tenth processing module for deleting data to be deleted, the data to be deleted corresponding to a target form configuration; if the target form configuration corresponds to a subform, obtaining sub-table data of the subform based on the subform configuration; and deleting the sub-table data of the subform.

[0052] According to one embodiment of this application, a general apparatus for data entry using dynamic forms configured with JSON is provided. By determining whether the target form configuration corresponds to a sub-form, data in the corresponding form is deleted, ensuring the consistency between business data and the target form configuration, as well as the accuracy of the target form. This implements the function of deleting data from multiple levels of main and auxiliary tables simultaneously, thereby improving the efficiency of data deletion.

[0053] Thirdly, this application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the general method for data entry using JSON-configured dynamic forms as described in the first aspect above.

[0054] Fourthly, this application provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the general method for data entry using JSON-configured dynamic forms as described in the first aspect above.

[0055] Fifthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the general method for data entry using JSON-configured dynamic forms as described in the first aspect above. Attached Figure Description

[0056] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, in which:

[0057] Figure 1 This is one of the flowcharts illustrating a general method for implementing data entry using JSON-configured dynamic forms, as provided in the embodiments of this application.

[0058] Figure 2 This is the second flowchart illustrating a general method for data entry using JSON-configured dynamic forms, as provided in this application embodiment.

[0059] Figure 3 This is the third flowchart illustrating a general method for data entry using JSON-configured dynamic forms, as provided in this application embodiment.

[0060] Figure 4 This is the fourth flowchart illustrating a general method for data entry using JSON-configured dynamic forms, as provided in this application embodiment.

[0061] Figure 5 This is the fifth flowchart illustrating a general method for data entry using JSON-configured dynamic forms, as provided in this application embodiment.

[0062] Figure 6 This is the sixth flowchart illustrating a general method for data entry using JSON-configured dynamic forms, as provided in this application embodiment.

[0063] Figure 7 This is the seventh flowchart illustrating a general method for data entry using JSON-configured dynamic forms, as provided in this application embodiment.

[0064] Figure 8 This is the eighth flowchart illustrating a general method for data entry using JSON-configured dynamic forms, as provided in this application embodiment.

[0065] Figure 9 This is the ninth flowchart illustrating a general method for data entry using JSON-configured dynamic forms, as provided in the embodiments of this application.

[0066] Figure 10This is the tenth flowchart illustrating a general method for data entry using JSON-configured dynamic forms, as provided in the embodiments of this application.

[0067] Figure 11 This is a schematic diagram of the structure of a general device for implementing data entry using JSON-configured dynamic forms, as provided in an embodiment of this application.

[0068] Figure 12 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation

[0069] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.

[0070] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.

[0071] The following is combined Figures 1 to 10 This application describes a general method for implementing data entry using JSON-configured dynamic forms, as exemplified in this application.

[0072] It should be noted that the execution entity of the general method of using JSON to configure dynamic forms to implement data entry can be a server, a general device that uses JSON to configure dynamic forms to implement data entry, or a user's terminal, including but not limited to mobile terminals and non-mobile terminals.

[0073] For example, mobile terminals include, but are not limited to, mobile phones, PDA smart terminals, tablets, and in-vehicle smart terminals; non-mobile terminals include, but are not limited to, PCs.

[0074] like Figure 1 and Figure 2 As shown, this general method for implementing data entry using JSON configuration of dynamic forms includes steps 110, 120, and 130.

[0075] Step 110: Set the target form element of the form to be configured;

[0076] In this step, the form to be configured is the form used for front-end output. The form to be configured can include business data, which is updated in real time.

[0077] The form to be configured can be a standalone form or a related form.

[0078] When the form to be configured is a related form, the form to be configured can be a child form associated with the parent form at the next level; the form to be configured can also be a parent form associated with the child form at the next level.

[0079] Of course, the parent form mentioned above can also be a child form, associated with the parent form at the previous level; correspondingly, the child form mentioned above can also be a parent form, associated with the child form at the next level.

[0080] The target form element is the element used for form configuration.

[0081] For example, target form elements can include text boxes (input), text areas (textarea), dropdown lists (select), radio buttons (radio), checkboxes (checkbox), file upload controls (file), time / date controls (date), field names and data types, support for default values, data binding (setting dictionary keys), specifying preset validation rules, primary key generation rules, specifying value ranges, whether to display in a list, whether to use as a query condition, and sorting methods, etc.

[0082] Understandably, target form elements can be user-defined, such as setting them as input boxes, textareas, select boxes, radio buttons, and checkboxes.

[0083] In actual execution, the target form element can be configured using JSON.

[0084] This step facilitates user access and enables personalized form customization by setting the target form elements to be configured, thereby improving data entry efficiency.

[0085] Step 120: If the form to be configured includes subforms, configure the encoding of the subforms and the corresponding subform configurations;

[0086] In this step, the code of the subform is a unique identifier corresponding to the subform and is used to associate the subform's table name.

[0087] It should be noted that in this application, each form corresponds to a unique code, and different forms have different codes.

[0088] The code of a subform can be represented as text, numbers, or symbols to facilitate user queries.

[0089] It should be noted that in some embodiments, a sub-form can also serve as the parent form of the next-level sub-form, and the configuration method is similar to that described above, so it will not be repeated here.

[0090] In this step, the subform name is associated with the subform encoding and the corresponding subform configuration, making it easier for users to query and thus improving data entry efficiency.

[0091] Step 130: Generate the target form configuration based on the target form element, and specify the encoding of the associated subforms in the target form configuration;

[0092] In this step, the target form is configured as the form to be configured.

[0093] Different form configurations can be generated based on different form elements, and in actual execution, the configuration can be adjusted according to actual needs.

[0094] In the target form configuration, the codes of the main form and the corresponding sub-form are associated so that when users query data, they can retrieve the data from both the main form and the corresponding sub-form at the same time, thereby realizing the function of filling in the main and supplementary forms together.

[0095] In practical applications, the front-end can be configured using JSON.

[0096] The front-end uses configured JSON to render form interfaces, load dictionary values, validate data, and handle lists and queries. It uses a unified interface for adding, detailing, updating, deleting, and querying lists to implement CRUD functions for all forms, while also supporting batch import and export from Excel.

[0097] Of course, other methods can be used to set the front end in other embodiments, and this application does not limit it.

[0098] According to the embodiments of this application, a general method for data entry using dynamic forms configured with JSON is provided. By setting the target form element of the form to be configured, the target form configuration is generated, as well as the encoding of the corresponding subform and the subform configuration corresponding to the subform are configured. The encoding of the associated subform is specified in the target form configuration. When configuring the current form, the user can configure the configuration in the main form and the corresponding subform at the same time, realizing the function of multi-level main and auxiliary table synchronous configuration, which is convenient for users to configure, reduces manual workload, and thus improves the efficiency of report generation.

[0099] The following is for reference. Figure 2 In some embodiments, when the form to be configured includes subforms, before configuring the encoding of the subforms and the corresponding subform elements, this general method for configuring dynamic forms using JSON to implement data entry further includes:

[0100] If the form to be configured corresponds to a main form, configure the main form code and the corresponding main table fields;

[0101] Generate a target form configuration based on the target form elements, and specify the associated main table fields in the target form configuration.

[0102] In this embodiment, the main table field is a column name that stores the main form data.

[0103] It should be noted that in some embodiments, the main form can also be a child form of the parent form, and the configuration method is similar to that described above, so it will not be repeated here.

[0104] For example, in actual execution, if the database corresponding to the current form is the main table, it is also necessary to configure the corresponding sub-form code, and specify the associated sub-form code and the associated main table field in the form configuration.

[0105] According to the general method for data entry using dynamic forms configured with JSON provided in the embodiments of this application, by configuring the main form code and the corresponding main table fields, and specifying the associated main table fields in the target form configuration, users can configure the associated main form and sub-forms simultaneously when configuring the current form according to the code, realizing the multi-level main and sub-table synchronous configuration function, reducing manual workload, and thus improving report generation efficiency.

[0106] The following is for reference. Figure 3 and Figure 4 In some embodiments, this general method for implementing data entry using JSON-configured dynamic forms further includes, after step 130:

[0107] Step 310: Obtain the data to be updated, which corresponds to the target form configuration;

[0108] Step 320: If the data to be updated is different from the historical data corresponding to the target form configuration, add the data to be updated to the historical data, and modify the status of the historical data and the update time of the target data.

[0109] Step 330: If the target form configuration includes subforms, obtain the data to be processed from the subforms based on the subform configuration;

[0110] Step 340: Based on the data to be processed, process the sub-historical data corresponding to the sub-form.

[0111] In this embodiment, the data to be updated refers to the business data in JSON format in the form submitted by the front end with a specified encoding, and the corresponding target form configuration is obtained according to the encoding of the target form.

[0112] After adding the data to be updated to the historical data, mark the status of the historical data as updated and change the update time of the target data to the current system time.

[0113] In step 340, the processing includes deletion, addition, or updating.

[0114] For example, the front end submits a target form with a specified encoding and data to be updated in JSON format, obtains the target form configuration based on the target form encoding, and validates the data to be updated based on the target form configuration;

[0115] If the verification passes, compare the historical data with the data to be updated;

[0116] If the data to be updated is inconsistent with the historical data corresponding to the target form configuration, mark the status of the historical data as updated, modify the update time of the target data to the current system time, and then add the data to be updated to the historical data; generate the third business data.

[0117] The third type of business data is the business data that has been updated.

[0118] In some embodiments, the method further includes marking the status corresponding to the third business data as a new status.

[0119] In other embodiments, if the target form configuration corresponds to a sub-table, the sub-table data submitted from the front end is obtained based on the sub-form configuration.

[0120] Based on the comparison between sub-historical data and sub-table data, redundant sub-historical data is deleted.

[0121] In other embodiments, after comparing the sub-historical data with the sub-table data and deleting redundant sub-historical data, the sub-table data is added to the historical data if the sub-table data is newly added.

[0122] When the data in the sub-table is being updated, it is also necessary to validate the updated data based on the target form configuration. The subsequent implementation method is similar to the update method described above, and will not be repeated here.

[0123] In other embodiments, if the data to be updated passes the verification, a comparison is made between the data to be updated and historical data.

[0124] If the data to be updated matches the historical data corresponding to the target form configuration, then determine whether the target form configuration corresponds to a sub-table;

[0125] If the target form configuration does not have a corresponding sub-table, the update operation will end.

[0126] According to the general method for data entry using JSON configuration dynamic forms provided in the embodiments of this application, by updating historical data, the historical data is retained while ensuring the timeliness and accuracy of data updates, realizing the linkage update of main and auxiliary tables, thereby improving the efficiency of data updates.

[0127] The following is for reference. Figure 5 and Figure 6 In some embodiments, this general method for implementing data entry using JSON-configured dynamic forms further includes, after step 130:

[0128] Step 510: Obtain the first business data from the target data table, which corresponds to the target form configuration;

[0129] Step 520: If the target form configuration corresponds to a sub-form, obtain the sub-table data of the sub-form based on the sub-form configuration;

[0130] Step 530: Insert the sub-table data into the first business data to generate the second business data;

[0131] Step 540: Output the second business data.

[0132] In step 510, the target data table is the data table specified by the user.

[0133] The first business data is the business sequence number (ID) data in the data table specified by the user.

[0134] The target data table is a form generated based on the target form configuration.

[0135] In step 540, the output second business data includes sub-table data and first business data.

[0136] In some embodiments, form configuration information is queried based on form code, data in a data table with a specified sequence number is queried, and if there is a sub-table corresponding to the target form configuration, the sub-form configuration is obtained, and data in the sub-data table is queried based on the associated main form code and field name configured in the sub-form. Then, the sub-form code is used as the key, and the key value is used as a list of sub-table data and returned in the main table data JSON.

[0137] According to the general method for data entry using dynamic forms configured with JSON provided in the embodiments of this application, the sub-table data of the sub-form is obtained based on the sub-form configuration, and the sub-table data is inserted into the first business data, and then the second business data is generated. When the user queries the current form according to the code, the associated main form and sub-form can be queried at the same time, realizing the multi-level main and auxiliary table synchronous query function, thereby improving the data query efficiency.

[0138] The following is for reference. Figure 7 and Figure 8 In some embodiments, this general method for implementing data entry using JSON-configured dynamic forms further includes, after step 130:

[0139] Step 710: Obtain the data to be saved, which corresponds to the target form configuration;

[0140] Step 720: Validate the data to be saved based on the target form configuration;

[0141] Step 730: If the verification passes, store the data to be saved.

[0142] In step 710, the data to be saved refers to the target form business data obtained based on the specified code submitted by the front end, and the corresponding target form configuration is obtained according to the code of the target form.

[0143] In step 720, the validation includes whether the field is required, character length, regular expression validation, data size range, and specific data format, etc., which are not limited in this application.

[0144] In some embodiments, it is determined whether the target form configuration corresponds to a main form. If the target form configuration corresponds to a main form, the code of the target form is bound to the primary key value of the main table, and then data validation is performed.

[0145] In some embodiments, an error message is output if data validation fails.

[0146] In other embodiments, if the data validation passes, the data to be saved is stored, and then it is determined whether the target form configuration corresponds to a sub-form.

[0147] If the target form has a corresponding subform, obtain the subform's code, and then obtain the sub-table data from the subform submitted by the front end based on the subform's code;

[0148] Determine whether the target form configuration corresponds to a main form. The subsequent implementation method is similar to that described above and will not be repeated here.

[0149] In other embodiments, after storing the data to be saved, the data is saved if there is no corresponding sub-form in the target form configuration.

[0150] According to the general method for data entry using JSON configuration dynamic forms provided in the embodiments of this application, by performing data validation logic on the data to be saved before saving the data to be saved, the consistency between the data to be saved and the configuration of the target form is ensured. Furthermore, by synchronously saving the sub-table data when the target form is configured with corresponding sub-tables, the function of synchronously saving multi-level main and sub-tables is realized, which improves the accuracy of the target business data and thus improves the efficiency of data saving.

[0151] The following is for reference. Figure 9 and Figure 10 In some embodiments, this general method for implementing data entry using JSON-configured dynamic forms further includes, after step 130:

[0152] Step 910: Delete the data to be deleted, which corresponds to the target form configuration;

[0153] Step 920: If the target form configuration corresponds to a sub-form, obtain the sub-table data of the sub-form based on the sub-form configuration;

[0154] Step 930: Delete the sub-table data of the sub-form;

[0155] In step 910, the data to be deleted is the data with the specified business sequence number in the corresponding target form obtained according to the specified code.

[0156] In some embodiments, data for a specified business ID in the data table corresponding to a specified code is deleted. If the target form configuration corresponds to a sub-form, the sub-table data of the sub-form is obtained based on the sub-form configuration.

[0157] Delete the sub-table data containing the business ID from the sub-form.

[0158] In some embodiments, data for a specified business ID in the data table corresponding to a specified code is deleted, and the specified data is deleted from the form if there is no sub-form corresponding to the target form configuration.

[0159] In some embodiments, the target form configuration is obtained through the target form encoding, and it is determined whether the target form is a single table. If the target form is a single table, the data in the target form is deleted.

[0160] If the target form is not a single table, retrieve all sub-forms corresponding to the target form, and delete the sub-table data in the sub-forms based on the related fields of the main table.

[0161] According to the general method for data entry using dynamic forms configured with JSON provided in the embodiments of this application, by determining whether the target form configuration corresponds to a sub-form, the data in the corresponding form is deleted, which ensures the consistency between business data and target form configuration, as well as the accuracy of the target form, and realizes the function of deleting data from multiple levels of main and auxiliary tables at the same time, thereby improving the efficiency of data deletion.

[0162] The general method for data entry using dynamic forms configured with JSON provided in this application can be executed by a general device for data entry using dynamic forms configured with JSON. This application uses the execution of the general method for data entry using dynamic forms configured with JSON by a general device as an example to illustrate the general device for data entry using dynamic forms configured with JSON provided in this application.

[0163] This application also provides a general apparatus for implementing data entry using JSON-configured dynamic forms.

[0164] like Figure 11 As shown, the general-purpose device for data entry using JSON-configured dynamic forms includes: a first processing module 1110, a second processing module 1120, and a third processing module 1130.

[0165] In this embodiment, the first processing module 1110 is used to set the target form element of the form to be configured;

[0166] The second processing module 1120 is used to configure the encoding of the sub-form and the corresponding sub-form configuration when the form to be configured includes sub-forms;

[0167] The third processing module 1130 is used to generate a target form configuration based on the target form elements, and to specify the encoding of the associated sub-forms in the target form configuration;

[0168] According to the embodiments of this application, a general device for data entry using dynamic forms configured with JSON is provided. By setting the target form element of the form to be configured, a target form configuration is generated, as well as the encoding of the corresponding subform and the subform configuration corresponding to the subform are configured. The encoding of the associated subform is specified in the target form configuration. When configuring the current form, the user can configure the configuration in the main form and the corresponding subform at the same time, realizing the function of synchronous configuration of multi-level main and auxiliary tables, which is convenient for users to configure, reduces the amount of manual work, and thus improves the efficiency of report generation.

[0169] In some embodiments, the device may further include a fourth processing module for configuring the front end via JSON.

[0170] In this embodiment, the front end uses configured JSON to render the form interface, load dictionary values, validate data, and perform list and query operations. It uses a unified interface for adding, detailing, updating, deleting, and querying all forms, and also supports batch importing and exporting from Excel.

[0171] The general apparatus for data entry using dynamic forms configured with JSON provided in the embodiments of this application enables the customization of personalized forms by configuring the front end with JSON, which facilitates user use.

[0172] In some embodiments, the apparatus may further include a fifth processing module, configured to configure the main form code and the main table fields corresponding to the main form when the form to be configured corresponds to a main form.

[0173] According to the embodiments of this application, a general device for data entry using JSON configuration of dynamic forms is provided. By configuring the main form code and the corresponding main table fields when the form to be configured corresponds to a main table, the multi-level main and auxiliary table synchronous configuration function is realized, which improves the user experience and thus improves the efficiency of report generation.

[0174] In some embodiments, the apparatus may further include a sixth processing module for specifying associated master table fields in the target form configuration.

[0175] According to the embodiments of this application, a general device for data entry using JSON configuration of dynamic forms is provided. By specifying the associated main table fields in the target form configuration, the user can configure the associated main form and sub-form simultaneously when configuring the current form according to the code. This realizes the function of synchronous configuration of multi-level main and auxiliary tables, reduces manual workload, and thus improves the efficiency of report generation.

[0176] In some embodiments, the device may further include a seventh processing module for acquiring data to be updated, the data to be updated corresponding to the target form configuration;

[0177] If the data to be updated is different from the historical data corresponding to the target form configuration, add the data to be updated to the historical data, and update the status corresponding to the historical data and the update time of the target data.

[0178] If the target form configuration includes subforms, retrieve the data to be processed from the subforms based on their configurations.

[0179] Based on the data to be processed, process the sub-historical data corresponding to the sub-form.

[0180] According to the embodiments of this application, a general device for data entry using JSON configuration of dynamic forms is provided. By updating historical data, the device retains the historical data while ensuring the timeliness and accuracy of data updates, realizing the linkage update of main and auxiliary tables, thereby improving the efficiency of data updates.

[0181] In some embodiments, the apparatus may further include an eighth processing module for acquiring first business data in a target data table, wherein the target data table corresponds to a target form configuration;

[0182] If the target form configuration corresponds to a subform, retrieve the sub-table data of the subform based on the subform configuration;

[0183] Insert the data from the sub-table into the first business data to generate the second business data;

[0184] Output the second business data.

[0185] According to the embodiments of this application, a general device for data entry using dynamic forms configured with JSON is provided. It obtains sub-table data of sub-forms based on sub-form configuration, inserts the sub-table data into first business data, and then generates second business data. When users query the current form according to the code, they can query the associated main form and sub-forms at the same time, realizing the multi-level main and auxiliary table synchronous query function, thereby improving data query efficiency.

[0186] In some embodiments, the device may further include a ninth processing module for acquiring data to be saved, the data to be saved corresponding to a target form configuration;

[0187] Validate the data to be saved based on the target form configuration;

[0188] If the verification passes, store the data to be saved.

[0189] According to the embodiments of this application, a general device for data entry using dynamic forms configured with JSON is provided. By performing data validation logic on the data to be saved before saving the data, the consistency between the data to be saved and the configuration of the target form is ensured. Furthermore, by synchronously saving the sub-table data when the target form is configured with corresponding sub-tables, the function of synchronously saving multi-level main and auxiliary tables is realized, which improves the accuracy of the target business data and thus improves the efficiency of data saving.

[0190] In some embodiments, the apparatus may further include a tenth processing module for deleting data to be deleted, the data to be deleted corresponding to a target form configuration;

[0191] If the target form configuration corresponds to a subform, retrieve the sub-table data of the subform based on the subform configuration;

[0192] Delete data from a sub-table within a sub-form.

[0193] According to the embodiments of this application, a general device for data entry using dynamic forms configured with JSON is provided. By determining whether the target form configuration corresponds to a sub-form, the data in the corresponding form is deleted, ensuring the consistency between business data and target form configuration, as well as ensuring the accuracy of the target form. It also realizes the function of deleting data from multiple levels of main and auxiliary tables at the same time, thereby improving the efficiency of data deletion.

[0194] The general device for data entry using JSON-configured dynamic forms in this application embodiment can be an electronic device or a component within an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal or any other device besides a terminal. For example, the electronic device can be a mobile phone, tablet computer, laptop computer, PDA, in-vehicle electronic device, mobile internet device (MID), augmented reality (AR) / virtual reality (VR) device, robot, wearable device, ultra-mobile personal computer (UMPC), netbook, or personal digital assistant (PDA), etc. It can also be a server, network attached storage (NAS), personal computer (PC), television (TV), ATM, or self-service machine, etc. This application embodiment does not impose specific limitations.

[0195] The general device for data entry using JSON-configured dynamic forms in this application embodiment can be a device with an operating system. This operating system can be Android, iOS, or other possible operating systems; this application embodiment does not specifically limit it.

[0196] The general-purpose device for data entry using JSON-configured dynamic forms provided in this application embodiment can achieve... Figures 1 to 10 The various processes implemented in the method implementation examples will not be described again here to avoid repetition.

[0197] Figure 12 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 12As shown, the electronic device may include a processor 1210, a communications interface 1220, a memory 1230, and a communication bus 1240. The processor 1210, communications interface 1220, and memory 1230 communicate with each other via the communication bus 1240. The processor 1210 can call logical instructions in the memory 1230 to execute a general method for data entry using JSON-configured dynamic forms. This method includes: setting the target form element of the form to be configured; configuring the encoding of the subforms and the corresponding subform configurations if the form to be configured includes subforms; generating a target form configuration based on the target form element, and specifying the encoding of the associated subforms in the target form configuration.

[0198] Furthermore, the logical instructions in the aforementioned memory 1230 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0199] On the other hand, this application also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions, and when the program instructions are executed by a computer, the computer is able to execute the general method for implementing data entry using JSON configuration of dynamic forms provided by the above methods. The method includes: setting the target form element of the form to be configured; configuring the encoding of the subform and the subform configuration corresponding to the subform when the form to be configured includes subforms; generating the target form configuration based on the target form element, and specifying the encoding of the associated subform in the target form configuration.

[0200] In another aspect, this application also provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements a general method for data entry using JSON-configured dynamic forms provided by the methods described above. The method includes: setting a target form element of the form to be configured; configuring the encoding of the subform and the corresponding subform configuration when the form to be configured includes subforms; generating a target form configuration based on the target form element, and specifying the encoding of the associated subform in the target form configuration.

[0201] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0202] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0203] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.

Claims

1. A general method for implementing data entry using dynamic forms configured with JSON, characterized in that, include: Set the target form element of the form to be configured; If the form to be configured includes sub-forms, configure the encoding of the sub-forms and the sub-form configuration corresponding to the sub-forms; A target form configuration is generated based on the target form element, and the encoding associated with the sub-form is specified in the target form configuration; After generating the target form configuration based on the target form element, the method includes: Obtain the data to be updated, which corresponds to the target form configuration; If the data to be updated is different from the historical data corresponding to the target form configuration, the data to be updated is added to the historical data, and the status corresponding to the historical data and the update time of the target data are modified. If the target form configuration includes a subform, the data to be processed in the subform is obtained based on the subform configuration. Based on the data to be processed, process the sub-historical data corresponding to the sub-form.

2. The general method for implementing data entry using JSON-configured dynamic forms according to claim 1, characterized in that, If the form to be configured includes a subform, before configuring the code of the subform and the subform element corresponding to the subform, the method further includes: if the form to be configured corresponds to a main form, configuring the code of the main form and the main table field corresponding to the main form; The step of generating a target form configuration based on the target form element includes: specifying the associated main table field in the target form configuration.

3. The general method for implementing data entry using JSON-configured dynamic forms according to any one of claims 1-2, characterized in that, After generating the target form configuration based on the target form element, the method includes: Obtain the first business data from the target data table, wherein the target data table corresponds to the target form configuration; If the target form configuration corresponds to a sub-form, obtain the sub-table data of the sub-form based on the sub-form configuration; Insert the sub-table data into the first business data to generate the second business data; Output the second business data.

4. The general method for implementing data entry using JSON-configured dynamic forms according to any one of claims 1-2, characterized in that, After generating the target form configuration based on the target form element, the method includes: Obtain the data to be saved, which corresponds to the target form configuration; Based on the target form configuration, validate the data to be saved; If the verification passes, the data to be saved is stored.

5. The general method for implementing data entry using JSON-configured dynamic forms according to any one of claims 1-2, characterized in that, After generating the target form configuration based on the target form element, the method includes: Delete the data to be deleted, which corresponds to the target form configuration; If the target form configuration corresponds to a sub-form, obtain the sub-table data of the sub-form based on the sub-form configuration; Delete the sub-table data of the sub-form.

6. A general-purpose device for data entry using JSON-configured dynamic forms, characterized in that, For implementing the method as described in any one of claims 1-5, comprising: The first processing module is used to set the target form element of the form to be configured. The second processing module is used to configure the encoding of the sub-form and the sub-form configuration corresponding to the sub-form when the form to be configured includes a sub-form. The third processing module is used to generate a target form configuration based on the target form element, and to specify the encoding associated with the sub-form in the target form configuration.

7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the general method for data entry using JSON configuration of dynamic forms as described in any one of claims 1-5.

8. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the general method for data entry using JSON-configured dynamic forms as described in any one of claims 1-5.

9. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the general method for data entry using JSON-configured dynamic forms as described in any one of claims 1-5.

Citation Information

Patent Citations

  • Method and device for configuring flow form

    CN113515283A

  • Form generation method and device and electronic equipment

    CN114595664A