Dynamic form modification method and device, equipment and medium

By obtaining and modifying the JSON file corresponding to the dynamic form, the problem of low dynamic form modification efficiency is solved, and a more efficient and flexible dynamic form modification process is achieved.

CN120144108APending Publication Date: 2025-06-13CHINA UNITED NETWORK COMM GRP CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311694842.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-11
Publication Date
2025-06-13

AI Technical Summary

Technical Problem

In the prior art, dynamic form modification efficiency is not high and the front-end code needs to be frequently modified.

Method used

By obtaining the target dynamic form and its modification information, determine the corresponding JSON file, and modify the JSON file based on the modification information, and finally generate the modified dynamic form through rendering.

Benefits of technology

It reduces the difficulty of dynamic form modification and the need for front-end code modification, and improves the efficiency and flexibility of dynamic form modification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120144108A_ABST
    Figure CN120144108A_ABST
Patent Text Reader

Abstract

The invention provides a dynamic form modification method and device, equipment and a medium. The method comprises the steps of obtaining a target dynamic form and target dynamic form modification information in the target dynamic form; determining a target JSON file corresponding to the target dynamic form from a target database according to the target dynamic form; according to the target JSON file, the target dynamic form modification information and the corresponding relation between the field of the target dynamic form and the field of the target JSON file, modifying the field content in the target JSON file to obtain a modified target JSON file; and according to the modified target JSON file, rendering the modified target JSON file to obtain a modified target dynamic form. According to the method, the association relationship between the target dynamic form and the target JSON file is established, so that the target dynamic form is modified by modifying the target JSON file, and the dynamic form modification efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of dynamic forms, and particularly relates to a method, device, equipment and medium for modifying dynamic forms. Background Art

[0002] A dynamic form is a basic type of page document, which can provide the highest flexibility and is also a development template with the most code. It is the basic template for many other types of page documents. Dynamic forms are often used to create personalized display pages, and different dynamic form templates can be used according to different requirements. Typical dynamic forms include: pop-up windows, portal home pages, designers, property editing pages, etc.

[0003] In the prior art, dynamic form rendering is achieved by combining JSON returned by the background with existing front-end frameworks and writing a large amount of front-end code.

[0004] Currently, dynamic forms are updated relatively fast, resulting in the need to modify front-end code every time a dynamic form is modified, causing the problem of low efficiency in modifying dynamic forms. Summary of the Invention

[0005] The present application provides a method, device, equipment and medium for modifying dynamic forms to solve the problem of low efficiency in modifying dynamic forms in the prior art.

[0006] In a first aspect, the present application provides a method for modifying a dynamic form, including:

[0007] Obtaining a target dynamic form and target dynamic form modification information in the target dynamic form;

[0008] According to the target dynamic form, determining a target JSON file corresponding to the target dynamic form from a target database, where the target database is a pre-configured database used to store the correspondence between dynamic forms and JSON files, JSON files, and the correspondence between the fields of dynamic forms and the fields of JSON files;

[0009] According to the target JSON file, the target dynamic form modification information, and the correspondence between the fields of the target dynamic form and the fields of the target JSON file, modifying the field content in the target JSON file to obtain a modified target JSON file;

[0010] According to the modified target JSON file, rendering the modified target JSON file to obtain a modified target dynamic form.

[0011] In this application, according to the target JSON file, the target dynamic form modification information, and the correspondence between the fields of the target dynamic form and the fields of the target JSON file, modify the field content in the target JSON file to obtain the modified target JSON file, including:

[0012] According to the target dynamic form modification information and the correspondence between the fields of the target dynamic form and the fields of the target JSON file, determine the target JSON file modification information in the target JSON file;

[0013] According to the target JSON file modification information, modify the field content in the target JSON file to obtain the modified target JSON file.

[0014] In this application, according to the target JSON file modification information, modify the field content in the target JSON file to obtain the modified target JSON file, including:

[0015] According to the target JSON file modification information, determine the modification type of the target JSON file, and the modification type includes the addition type, the deletion type, and the modification type;

[0016] In response to the user's import operation, display the target JSON file in the editing interface of the JSON editor, and according to the modification type of the target JSON file and the target JSON file modification information, modify the field content in the target JSON file in the editing interface to obtain the first modified target JSON file;

[0017] According to the first modified target JSON file, display the preview target dynamic form in the preview interface of the JSON editor;

[0018] If the preview target dynamic form meets the preset dynamic form rendering requirements, determine the first modified target JSON file as the modified target JSON file.

[0019] In this application, when the modification type of the target JSON file is the addition type,

[0020] In response to the user's import operation, display the target JSON file in the editing interface of the JSON editor, and according to the modification type of the target JSON file and the target JSON file modification information, modify the field content in the target JSON file in the editing interface to obtain the first modified target JSON file, including:

[0021] In response to the user's import operation, display the target JSON file in the editing interface of the JSON editor, and according to the target JSON file modification information, determine the content of the fields to be added in the target JSON file;

[0022] Insert the content of the field to be added into the target JSON file to obtain the first modified target JSON file.

[0023] In this application, when the modification type of the target JSON file is the deletion type,

[0024] In response to the user's import operation, display the target JSON file in the editing interface of the JSON editor, and modify the field content in the target JSON file in the editing interface according to the modification type of the target JSON file and the modification information of the target JSON file to obtain the first modified target JSON file, including:

[0025] In response to the user's import operation, display the target JSON file in the editing interface of the JSON editor, and determine the content of the field to be deleted in the target JSON file according to the modification information of the target JSON file;

[0026] Delete the content of the field to be deleted from the target JSON file to obtain the first modified target JSON file.

[0027] In this application, when the modification type of the target JSON file is the addition type,

[0028] In response to the user's import operation, display the target JSON file in the editing interface of the JSON editor, and modify the field content in the target JSON file in the editing interface according to the modification type of the target JSON file and the modification information of the target JSON file to obtain the first modified target JSON file, including:

[0029] In response to the user's import operation, display the target JSON file in the editing interface of the JSON editor, and determine the content of the field to be modified in the target JSON file according to the modification information of the target JSON file;

[0030] Modify the target JSON file according to the content of the field to be modified to obtain the first modified target JSON file.

[0031] In this application, before determining the target JSON file corresponding to the target dynamic form from the target database according to the target dynamic form, it further includes:

[0032] Obtain the business information for generating the target dynamic form, where the business information includes the field information of the target dynamic form, the correspondence between the fields of the target dynamic form and the fields of the target JSON file, and the rendering requirements of the target dynamic form;

[0033] Generate an initial JSON file according to the field information of the target dynamic form and the correspondence between the fields of the target dynamic form and the fields of the target JSON file;

[0034] In response to the user's import operation, display the initial JSON file in the editing interface of the JSON editor, display the rendering effect corresponding to the initial JSON file in the preview interface of the JSON editor, and perform adjustment operations on the initial JSON file in the editing interface according to the rendering requirements of the target dynamic form to obtain a target JSON file that meets the rendering requirements of the target dynamic form.

[0035] In this application, the method further includes:

[0036] Establish the correspondence between the target dynamic form and the target JSON file;

[0037] Store the correspondence between the target dynamic form and the target JSON file, the target JSON file, and the correspondence between the fields of the target dynamic form and the fields of the target JSON file in the target database.

[0038] In a second aspect, this application provides a dynamic form modification device, including:

[0039] An acquisition module for acquiring the target dynamic form and the target dynamic form modification information in the target dynamic form;

[0040] A determination module for determining the target JSON file corresponding to the target dynamic form from the target database according to the target dynamic form, where the target database is a pre-configured database for storing the correspondence between the dynamic form and the JSON file, the JSON file, and the correspondence between the fields of the dynamic form and the fields of the JSON file;

[0041] A modification module for modifying the field content in the target JSON file according to the target JSON file, the target dynamic form modification information, and the correspondence between the fields of the target dynamic form and the fields of the target JSON file to obtain a modified target JSON file;

[0042] A rendering module for rendering the modified target JSON file according to the modified target JSON file to obtain a modified target dynamic form.

[0043] In a third aspect, this application provides an electronic device, including: a processor and a memory communicatively connected to the processor;

[0044] The memory stores computer execution instructions;

[0045] The processor executes the computer execution instructions stored in the memory to implement the method provided by this application.

[0046] In a fourth aspect, the present application provides a computer-readable storage medium storing computer-executable instructions that, when executed by a processor, are used to implement the method provided by the present application.

[0047] A method, apparatus, device, and medium for modifying a dynamic form provided by the present application obtain a target dynamic form and target dynamic form modification information in the target dynamic form; determine, according to the target dynamic form, a target JSON file corresponding to the target dynamic form from a target database, where the target database is a pre-configured database for storing the correspondence between dynamic forms and JSON files, JSON files, and the correspondence between the fields of the dynamic form and the fields of the JSON file; modify the field content in the target JSON file according to the target JSON file, the target dynamic form modification information, and the correspondence between the fields of the target dynamic form and the fields of the target JSON file to obtain a modified target JSON file; and render the modified target JSON file according to the modified target JSON file to obtain a modified target dynamic form. By presetting the JSON file in the target database, the target dynamic form and the target JSON file can be decoupled, facilitating flexible operation of the target JSON file, avoiding modifying front-end code, reducing the difficulty of modifying the dynamic form, establishing an association relationship between the target dynamic form and the target JSON file, enabling the purpose of modifying the target dynamic form by modifying the target JSON file, and additionally, the specific content in the target JSON file can be quickly located according to the target dynamic form modification information, facilitating the modification of the target JSON file, and ultimately, improving the efficiency of modifying the dynamic form. Description of the Drawings

[0048] The drawings here are incorporated into the specification and form a part of the specification, showing embodiments consistent with the present application and, together with the specification, are used to explain the principles of the present application.

[0049] Figure 1 It is a schematic diagram of a scenario for modifying a dynamic form provided by an embodiment of the present application;

[0050] Figure 2 It is a schematic flowchart of a method for modifying a dynamic form provided by an embodiment of the present application;

[0051] Figure 3 It is a schematic flowchart of another method for modifying a dynamic form provided by an embodiment of the present application;

[0052] Figure 4 It is a schematic structural diagram of a device for modifying a dynamic form provided by an embodiment of the present application;

[0053] Figure 5 The structural schematic diagram of the electronic device provided by the embodiment of the present application.

[0054] Through the above-mentioned drawings, the specific embodiments of the present application have been shown, and more detailed descriptions will be provided later. These drawings and textual descriptions are not intended to limit the scope of the concept of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. Specific Embodiments

[0055] Here, the exemplary embodiments will be described in detail, and the examples are shown in the drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0056] To clearly understand the technical solution of the present application, the solutions of the prior art will be introduced in detail first.

[0057] A dynamic form is a basic type of page document, which can provide the highest flexibility and is also a development template with the most code. It is the basic template for many other types of page documents. Dynamic forms are often used to create personalized display pages, and different dynamic form templates can be used according to different requirements. Typical dynamic forms include: pop-up windows, portal home pages, designers, property editing pages, etc.

[0058] In the prior art, the rendering of dynamic forms is achieved by combining JSON returned by the background with existing front-end frameworks and writing a large amount of code in the front end.

[0059] Currently, dynamic forms are updated relatively quickly, resulting in the need to modify the front-end code every time a dynamic form is modified, causing the problem of low modification efficiency of dynamic forms.

[0060] In view of the above problem of low modification efficiency of dynamic forms, the inventor found in the research that the JSON file corresponding to the dynamic form and the association relationship between the dynamic form content and the JSON file content can be stored in the database, and the JSON file can be modified through the association relationship between the dynamic form content and the JSON file content to achieve the purpose of modifying the dynamic form. Avoid modifying the code or reconfiguring the dynamic form, simplify the process of modifying the dynamic form, and improve the modification efficiency.

[0061] Next, the application scenarios of the dynamic form modification method provided by the embodiment of the present application will be introduced.

[0062] Figure 1A schematic diagram of a scenario for modifying a dynamic form provided by an embodiment of the present application. This scenario includes a dynamic form, a JSON file corresponding to the dynamic form, and a target database for storing the JSON file. When it is necessary to modify the dynamic form, the JSON file corresponding to the dynamic form is obtained from the target database. After modifying the JSON file according to the preset correspondence between the dynamic form and the JSON file and the content to be modified, the modified JSON file is then rendered to obtain the modified dynamic form.

[0063] Figure 2 A flowchart of a method for modifying a dynamic form provided by an embodiment of the present application, as Figure 2 shown. This method includes:

[0064] S201. Obtain a target dynamic form and target dynamic form modification information in the target dynamic form.

[0065] Among them, the target dynamic form may refer to the dynamic form that needs to be modified.

[0066] The target dynamic form modification information may refer to the specific content for modifying the target dynamic form, which may include adding field content, modifying field content, and deleting field content, etc. Specifically, the field content may include the type of the field, data acquisition, style, verification, linkage logic, etc. For example, for a dynamic form of name, age, and gender, name, age, and gender are all fields and are required fields. Age is a numeric input box, and the values that can be filled are between 0 and 100. Gender is a dropdown box, and the selected value is obtained through an interface. If the age is under 10 years old, the gender is not displayed.

[0067] The method for obtaining the target dynamic form and the target dynamic form modification information in the target dynamic form may include: determining according to the information provided by the user independently or according to the detection results of the detection tool. Specifically, determining according to the information provided by the user independently may include: the user discovers problems that need to be modified in the dynamic form during the use of the dynamic form. The situation of determining according to the detection results of the detection tool may include: a preset detection tool regularly detects the data writing response, linkage logic, display integrity, etc. of the dynamic form. If it is found that the dynamic form has problems that need to be modified, then obtain the dynamic form that needs to be modified, the problems of this dynamic form, modification suggestions, or modification methods, etc.

[0068] S202. Determine a target JSON file corresponding to the target dynamic form from the target database. The target database is a pre-configured database used to store the correspondence between the dynamic form and the JSON file, the JSON file, and the correspondence between the fields of the dynamic form and the fields of the JSON file.

[0069] Among them, the target JSON (JavaScript Object Notation) file can refer to the JSON file corresponding to the target dynamic form. The JSON file can refer to the configuration of the dynamic form generated from the backend according to the configuration of the dynamic form on the front-end dynamic form configuration page. Specifically, JSON is a lightweight data interchange format.

[0070] The target database can refer to a pre-configured database used to store the correspondence between the dynamic form and the JSON file, the JSON file, and the correspondence between the fields of the dynamic form and the fields of the JSON file.

[0071] The correspondence between the dynamic form and the JSON file can mean that the JSON file contains information about the dynamic form. Through this information, the JSON file can be associated. Specifically, a dynamic form identifier can be preset, and the correspondence between the dynamic form and the JSON file can be established by including the dynamic form identifier in the naming of the JSON file.

[0072] Since the file forms of the dynamic form and the JSON file are different, and the JSON file fields used for the field implementation methods in the dynamic form are also different, in order to determine the dynamic form content corresponding to each field in the JSON file, the correspondence between the fields of the dynamic form and the fields of the JSON file is established to facilitate quickly determining the fields of the JSON file according to the fields of the dynamic form. Specifically, each field of the dynamic form includes multiple attributes, and each attribute corresponds to a different field type in the JSON file. For example, the visibility attribute of the gender in the dynamic form is that the gender is not displayed if the age is under 10 years old. This attribute is represented by "visible" in the JSON file, so the visibility attribute of the gender field in the dynamic form corresponds to "visible" in the JSON file.

[0073] The method for determining the target JSON file corresponding to the target dynamic form from the target database can include: According to the correspondence between the dynamic form and the JSON file, the target JSON file can be quickly and accurately determined.

[0074] In the embodiments of the present application, by storing the JSON file in the target database, the target dynamic form is decoupled from the target JSON file, facilitating the modification of the target dynamic form by directly modifying the target JSON file, and avoiding modifying the target dynamic form by modifying the front-end code or reconfiguring the target dynamic form. Modifying in the JSON file reduces the difficulty of modifying the target dynamic form compared to modifying through the front-end code. Moreover, since the target JSON file is stored separately, modifying the target JSON file does not affect other content, enabling the modification to be withdrawn and different modified versions to be stored, with higher flexibility. Through the correspondence between the fields of the dynamic form and the fields of the JSON file, the association between the content of the dynamic form and the content of the JSON file can be established, enabling the modification of the dynamic form by modifying the JSON file. Additionally, it is also convenient to quickly locate the fields in the JSON file that need to be modified, improving the modification efficiency.

[0075] S203. Modify the field content in the target JSON file according to the target JSON file, the target dynamic form modification information, and the correspondence between the fields of the target dynamic form and the fields of the target JSON file to obtain the modified target JSON file.

[0076] Among them, the modified target JSON file may refer to the JSON file stored in the target database after the target JSON file is modified.

[0077] Among them, in the embodiments of the present application, modifying the field content in the target JSON file according to the target JSON file, the target dynamic form modification information, and the correspondence between the fields of the target dynamic form and the fields of the target JSON file to obtain the modified target JSON file includes:

[0078] Determine the target JSON file modification information in the target JSON file according to the target dynamic form modification information and the correspondence between the fields of the target dynamic form and the fields of the target JSON file;

[0079] Modify the field content in the target JSON file according to the target JSON file modification information to obtain the modified target JSON file.

[0080] Among them, in order to facilitate division of labor and cooperation in modifying the dynamic form, the information for modifying the target JSON file can be used to instruct JSON editors to perform JSON editing without their need to understand the entire modification process, which can improve the modification efficiency. The information for modifying the target JSON file can refer to the information indicating the specific content to be modified in the JSON file, corresponding to the information for modifying the target dynamic form. The information for modifying the target JSON file can include adding JSON field content, modifying JSON field content, and deleting JSON field content. Specifically, the JSON fields correspond to the target dynamic form fields, and the JSON fields can include name (name), visible (visible), type (type), children (sub-items), props (props), etc. For example, if the information for modifying the target JSON file is to change the visible attribute in the gender field from "do not display gender if the age is under 10 years old" to "do not display gender if the age is under 8 years old", then based on the corresponding relationship between the fields of the target dynamic form and the fields of the target JSON file, it is determined that the visible in the gender field in the target JSON file is the field to be modified, and the modification information can be to change "do not display gender if the age is under 10 years old" in the visible of the gender in the target JSON file to "do not display gender if the age is under 8 years old".

[0081] Among them, in the embodiment of the present application, according to the information for modifying the target JSON file, the field content in the target JSON file is modified to obtain the modified target JSON file, including:

[0082] According to the information for modifying the target JSON file, determine the modification type of the target JSON file, and the modification type includes an addition type, a deletion type, and a modification type;

[0083] In response to the user's import operation, display the target JSON file in the editing interface of the JSON editor, and modify the field content in the target JSON file in the editing interface according to the modification type of the target JSON file and the information for modifying the target JSON file to obtain the first modified target JSON file;

[0084] Display the preview target dynamic form in the preview interface of the JSON editor according to the first modified target JSON file;

[0085] If the preview target dynamic form meets the preset dynamic form rendering requirements, determine the first modified target JSON file as the modified target JSON file.

[0086] Among them, the first modified target JSON file can refer to the JSON file that has been modified according to the modification type of the target JSON file and the target JSON file modification information, but has not been previewed yet. Therefore, the first modified target JSON file can also refer to the JSON file to be previewed.

[0087] The preview target dynamic form can refer to the form for previewing and displaying the first modified target JSON file in the JSON editor. The JSON editor can refer to an editing tool for editing and previewing the effects of JSON files, which can visually view the effects after the JSON file is rendered, facilitating the editing of the JSON file according to the preview page.

[0088] The preset dynamic form rendering requirements can refer to the rendering effects of the dynamic form set in advance. The rendering effects include the layout size, color, style, text size, display method, position of the drop-down display method, etc. of the form display.

[0089] The method for determining the modification type of the target JSON file can include determining the modification type of the target JSON file according to the modification indication in the target JSON file modification information. For example, if the modification indication in the target JSON file modification information is to add a JSON field, the modification type of the target JSON file is the add type.

[0090] Among them, in the embodiments of the present application, when the modification type of the target JSON file is the add type,

[0091] In response to the user's import operation, the target JSON file is displayed in the editing interface of the JSON editor, and according to the modification type of the target JSON file and the target JSON file modification information, the field content in the target JSON file is modified in the editing interface to obtain the first modified target JSON file, including:

[0092] In response to the user's import operation, the target JSON file is displayed in the editing interface of the JSON editor, and according to the target JSON file modification information, the field content to be added in the target JSON file is determined;

[0093] The field content to be added is inserted into the target JSON file to obtain the first modified target JSON file.

[0094] Among them, the field content to be added in the target JSON file can refer to the field content that needs to be inserted into the target JSON file.

[0095] The method for determining the content of the fields to be newly added in the target JSON file may include: determining the content of the fields to be newly added according to the specific new content in the modification information of the target JSON file. For example, if the modification information of the target JSON file is to newly add a select item in the children of the field "gender", and the content is a drop-down selection of gender with options "male" or "female", then the content of the fields to be newly added is the select item in the children of the field "gender".

[0096] Among them, in the embodiment of the present application, when the modification type of the target JSON file is the deletion type,

[0097] In response to the user's import operation, display the target JSON file in the editing interface of the JSON editor, and modify the field content in the target JSON file in the editing interface according to the modification type of the target JSON file and the modification information of the target JSON file to obtain the first modified target JSON file, including:

[0098] In response to the user's import operation, display the target JSON file in the editing interface of the JSON editor, and determine the content of the fields to be deleted in the target JSON file according to the modification information of the target JSON file;

[0099] Delete the content of the fields to be deleted from the target JSON file to obtain the first modified target JSON file.

[0100] Among them, the content of the fields to be deleted may refer to the field content that needs to be deleted from the target JSON file.

[0101] The method for determining the content of the fields to be deleted in the target JSON file may include: determining the content of the fields to be deleted according to the specific deletion content in the modification information of the target JSON file. For example, if the modification information of the target JSON file is to delete the select item in the children of the field "gender", then the content of the fields to be deleted is the select item in the children of the field "gender".

[0102] Among them, in the embodiment of the present application, when the modification type of the target JSON file is the new addition type,

[0103] In response to the user's import operation, display the target JSON file in the editing interface of the JSON editor, and modify the field content in the target JSON file in the editing interface according to the modification type of the target JSON file and the modification information of the target JSON file to obtain the first modified target JSON file, including:

[0104] In response to the user's import operation, the target JSON file is displayed in the editing interface of the JSON editor, and the content of the fields to be modified in the target JSON file is determined according to the modification information of the target JSON file;

[0105] The target JSON file is modified according to the content of the fields to be modified to obtain the first modified target JSON file.

[0106] Among them, the content of the fields to be modified can refer to the fields in the target JSON file that specifically need to be modified.

[0107] The method for determining the content of the fields to be modified in the target JSON file may include: determining the content of the fields to be modified according to the specific modification content in the modification information of the target JSON file. For example, if the modification information of the target JSON file is to modify "do not display gender if the age is under 10 years old" in the visible of the gender in the target JSON file to "do not display gender if the age is under 8 years old", then the content of the fields to be modified is the item "display gender if the age is greater than 10 years old" in the visible of the field gender.

[0108] Among them, in the embodiment of the present application, before determining the target JSON file corresponding to the target dynamic form from the target database according to the target dynamic form, it further includes:

[0109] Obtain the business information for generating the target dynamic form, where the business information includes the field information of the target dynamic form, the correspondence between the fields of the target dynamic form and the fields of the target JSON file, and the rendering requirements of the target dynamic form;

[0110] Generate an initial JSON file according to the field information of the target dynamic form and the correspondence between the fields of the target dynamic form and the fields of the target JSON file;

[0111] In response to the user's import operation, the initial JSON file is displayed in the editing interface of the JSON editor, the rendering effect corresponding to the initial JSON file is displayed in the preview interface of the JSON editor, and the initial JSON file is adjusted in the editing interface according to the rendering requirements of the target dynamic form to obtain the target JSON file that meets the rendering requirements of the target dynamic form.

[0112] Among them, the business information may include the field information of the target dynamic form, the correspondence between the fields of the target dynamic form and the fields of the target JSON file, and the information on the rendering requirements of the target dynamic form.

[0113] The field information of the target dynamic form can refer to the fields included in the target dynamic form and the attributes of the fields.

[0114] The initial JSON file may refer to the JSON file generated by the backend after configuration on the dynamic form configuration page.

[0115] The method for obtaining the business information of the generated target dynamic form may include: obtaining the business information of the generated target dynamic form according to the dynamic form generation requirements submitted by the business system.

[0116] In this embodiment, the dynamic form is configured through the field information of the target dynamic form and the correspondence between the fields of the target dynamic form and the fields of the target JSON file, so as to generate an initial JSON file, making the initial JSON file correspond to the target dynamic form, thereby facilitating subsequent adjustment of the initial JSON file to achieve the purpose of adjusting the target dynamic form.

[0117] Among them, in the embodiments of the present application, it further includes:

[0118] Establish the correspondence between the target dynamic form and the target JSON file;

[0119] Store the correspondence between the target dynamic form and the target JSON file, the target JSON file, and the correspondence between the fields of the target dynamic form and the fields of the target JSON file in the target database.

[0120] S204. Render the modified target JSON file to obtain a modified target dynamic form.

[0121] Among them, rendering the modified target JSON file may refer to converting the modified target JSON file into a target dynamic form. When the user opens the dynamic form, the user can fill in the data of the form according to the options of the form to achieve the purpose of interaction. To better transmit the filled data, a dynamic form submission method may be preset to indicate the transmission method of the dynamic form data. The dynamic form submission method and the JSON file are used together during rendering, so that after the user submits the dynamic form, the data can be transmitted according to the dynamic form submission method.

[0122] A dynamic form modification method provided by an embodiment of the present application decouples the target dynamic form from the target JSON file by storing the JSON file in the target database, facilitating the modification of the target dynamic form directly by modifying the target JSON file, and avoiding modifying the target dynamic form by modifying the front-end code or reconfiguring the target dynamic form. Modifying in the JSON file reduces the difficulty of modifying the target dynamic form compared to modifying through the front-end code. Moreover, the target JSON file is stored separately, and modifying the target JSON file does not affect other content, enabling the modification to be retracted and different modified versions to be stored, with higher flexibility. Through the correspondence between the fields of the dynamic form and the fields of the JSON file, the association between the content of the dynamic form and the content of the JSON file can be established, enabling the modification of the dynamic form by modifying the JSON file. Additionally, it facilitates quickly locating the fields in the JSON file that need to be modified, improving the modification efficiency. Modifying information through the target JSON file facilitates task splitting and division of labor to improve the modification efficiency. By using the field information of the target dynamic form and the correspondence between the fields of the target dynamic form and the fields of the target JSON file, the dynamic form is configured to generate an initial JSON file, making the initial JSON file correspond to the target dynamic form, thus facilitating subsequent adjustment of the initial JSON file to achieve the purpose of adjusting the target dynamic form.

[0123] Figure 3 is a flowchart of another dynamic form modification method provided by an embodiment of the present application, as Figure 3 shown, the method includes:

[0124] S301. Determine the correspondence between JSON fields and each form attribute.

[0125] Among them, the correspondence between JSON fields and each form attribute includes type, style, visibility, etc.

[0126] S302. Generate a JSON file according to the correspondence between JSON fields and each form attribute and a form configuration tool.

[0127] Among them, in the embodiment of the present application, generating a JSON file according to the correspondence between JSON fields and each form attribute and a form configuration tool includes:

[0128] Generate a business ID according to the generated form business requirements;

[0129] Implement a configurable editing interface based on form attributes. The editing page can select input types, names, interaction logics, etc., and generate a corresponding JSON file for the configured form.

[0130] S303. Edit and preview the JSON file to obtain the target JSON file and store it in the database.

[0131] Among them, in the embodiment of the present application, editing and previewing the JSON file to obtain the target JSON file and storing it in the database includes:

[0132] The JSON editor can modify the JSON data, and the preview image changes with the change of the JSON to achieve the purpose of previewing, verifying, and modifying.

[0133] After verification, submit the JSON generated by the service ID to the database.

[0134] S304. Render the target JSON file to obtain the target dynamic form.

[0135] Among them, in the embodiment of the present application, rendering the target JSON file to obtain the target dynamic form includes:

[0136] Obtain the target JSON file according to the service ID.

[0137] Parse the target JSON file, and according to the corresponding relationship between the JSON fields and each form attribute, convert the JSON into the target dynamic form.

[0138] Another method for modifying a dynamic form provided by the embodiment of the present application determines the corresponding relationship between the JSON fields and each form attribute. According to the corresponding relationship between the JSON fields and each form attribute, and the form configuration tool, a JSON file is generated. Edit and preview the JSON file to obtain the target JSON file and store it in the database. Render the target JSON file to obtain the target dynamic form, which reduces the front-end code writing and improves the rendering efficiency of the dynamic form.

[0139] Figure 4 It is a schematic structural diagram of a device for modifying a dynamic form provided by the embodiment of the present application, as Figure 4 shown. The device includes an acquisition module 401, a determination module 402, a modification module 403, and a rendering module 404, where:

[0140] The acquisition module 401 is used to acquire the target dynamic form and the target dynamic form modification information in the target dynamic form;

[0141] The determination module 402 is used to determine the target JSON file corresponding to the target dynamic form from the target database according to the target dynamic form. The target database is a pre-configured database for storing the corresponding relationship between the dynamic form and the JSON file, the JSON file, and the corresponding relationship between the fields of the dynamic form and the fields of the JSON file;

[0142] A modification module 403, configured to modify the field content in the target JSON file according to the target JSON file, the modification information of the target dynamic form, and the correspondence between the fields of the target dynamic form and the fields of the target JSON file, so as to obtain a modified target JSON file;

[0143] A rendering module 404, configured to render the modified target JSON file according to the modified target JSON file to obtain a modified target dynamic form.

[0144] Wherein, in the embodiment of the present application, the modification module 403 is further configured to:

[0145] Determine the modification information of the target JSON file in the target JSON file according to the modification information of the target dynamic form and the correspondence between the fields of the target dynamic form and the fields of the target JSON file;

[0146] Modify the field content in the target JSON file according to the modification information of the target JSON file to obtain a modified target JSON file.

[0147] Wherein, in the embodiment of the present application, the modification module 403 is further configured to:

[0148] Determine the modification type of the target JSON file according to the modification information of the target JSON file, and the modification type includes an addition type, a deletion type, and a modification type;

[0149] In response to the user's import operation, display the target JSON file in the editing interface of the JSON editor, and modify the field content in the target JSON file in the editing interface according to the modification type of the target JSON file and the modification information of the target JSON file to obtain a first modified target JSON file;

[0150] Display a preview target dynamic form in the preview interface of the JSON editor according to the first modified target JSON file;

[0151] If the preview target dynamic form meets the preset dynamic form rendering requirements, determine the first modified target JSON file as the modified target JSON file.

[0152] Wherein, in the embodiment of the present application, the modification module 403 is further configured to:

[0153] In response to the user's import operation, display the target JSON file in the editing interface of the JSON editor, and determine the content of the fields to be added in the target JSON file according to the modification information of the target JSON file;

[0154] Insert the content of the field to be newly added into the target JSON file to obtain the first modified target JSON file.

[0155] Among them, in the embodiment of the present application, the modification module 403 is further configured to:

[0156] In response to the user's import operation, display the target JSON file in the editing interface of the JSON editor, and determine the content of the field to be deleted in the target JSON file according to the modification information of the target JSON file;

[0157] Delete the content of the field to be deleted from the target JSON file to obtain the first modified target JSON file.

[0158] Among them, in the embodiment of the present application, the modification module 403 is further configured to:

[0159] In response to the user's import operation, display the target JSON file in the editing interface of the JSON editor, and determine the content of the field to be modified in the target JSON file according to the modification information of the target JSON file;

[0160] Modify the target JSON file according to the content of the field to be modified to obtain the first modified target JSON file.

[0161] Figure 5 It is a schematic structural diagram of the electronic device provided by the embodiment of the present application. As Figure 5 shown, the electronic device 50 includes:

[0162] The electronic device 50 may include a processor 501 with one or more processing cores, a memory 502 with one or more computer-readable storage media, a communication component 503 and other components. Among them, the processor 501, the memory 502 and the communication component 503 are connected through a bus 504.

[0163] In the specific implementation process, at least one processor 501 executes the computer execution instructions stored in the memory 502, so that at least one processor 501 executes the above dynamic form modification method.

[0164] For the specific implementation process of the processor 501, reference can be made to the above method embodiment, and its implementation principle and technical effect are similar, which will not be elaborated here in this embodiment.

[0165] In the above Figure 5In the illustrated embodiment, it should be understood that the processor may be a central processing unit (CPU for short), or other general-purpose processors, digital signal processors (DSP for short), application specific integrated circuits (ASIC for short), etc. The general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the method disclosed in combination with the invention may be directly implemented by the execution of the hardware processor, or by the combination of hardware and software modules in the processor.

[0166] The memory may include a high-speed random access memory (RAM), and may also include non-volatile memory (NVM), such as at least one disk memory.

[0167] The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For the sake of representation, the bus in the drawings of this application is not limited to only one bus or one type of bus.

[0168] In some embodiments, a computer program product is also proposed, including a computer program or instruction, which, when executed by a processor, implements the steps in any of the above dynamic form modification methods.

[0169] For the specific implementation of each of the above operations, reference may be made to the previous embodiments and will not be elaborated here.

[0170] Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructions, or by controlling relevant hardware through instructions. The instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.

[0171] Therefore, an embodiment of the present application provides a computer-readable storage medium, in which multiple instructions are stored, and the instructions can be loaded by a processor to execute the steps in any of the dynamic form modification methods provided by the embodiments of the present application.

[0172] Among them, the storage medium may include: read-only memory (ROM, Read Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disc, etc.

[0173] According to one aspect of the present application, there is provided a computer program product or a computer program. The computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium.

[0174] Since the instructions stored in the storage medium can execute the steps in any of the dynamic form modification methods provided by the embodiments of the present application, the beneficial effects achievable by any of the dynamic form modification methods provided by the embodiments of the present application can be achieved. For details, see the foregoing embodiments and will not be elaborated herein.

[0175] Those skilled in the art will readily conceive of other implementations of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any variations, uses, or adaptations of the present application, which follow the general principles of the present application and include known common knowledge or conventional technical means in the technical field not disclosed in the present application. The specification and embodiments are only regarded as exemplary, and the true scope and spirit of the present application are pointed out by the following claims.

[0176] It should be understood that the present application is not limited to the exact structures already described and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of the present application is only limited by the appended claims.

Claims

1. A method for modifying a dynamic form, characterized in that, it includes: Obtaining a target dynamic form and target dynamic form modification information in the target dynamic form; According to the target dynamic form, determining a target JSON file corresponding to the target dynamic form from a target database, where the target database is a pre-configured database for storing the correspondence between dynamic forms and JSON files, the JSON files, and the correspondence between the fields of the dynamic forms and the fields of the JSON files; According to the target JSON file, the target dynamic form modification information, and the correspondence between the fields of the target dynamic form and the fields of the target JSON file, modifying the field content in the target JSON file to obtain a modified target JSON file; According to the modified target JSON file, rendering the modified target JSON file to obtain a modified target dynamic form.

2. The method according to claim 1, characterized in that, the step of modifying the field content in the target JSON file according to the target JSON file, the target dynamic form modification information, and the correspondence between the fields of the target dynamic form and the fields of the target JSON file to obtain a modified target JSON file includes: Determining target JSON file modification information in the target JSON file according to the target dynamic form modification information and the correspondence between the fields of the target dynamic form and the fields of the target JSON file; Modifying the field content in the target JSON file according to the target JSON file modification information to obtain a modified target JSON file.

3. The method according to claim 2, characterized in that, the step of modifying the field content in the target JSON file according to the target JSON file modification information to obtain a modified target JSON file includes: Determining the modification type of the target JSON file according to the target JSON file modification information, where the modification type includes an addition type, a deletion type, and a modification type; In response to a user's import operation, displaying the target JSON file in the editing interface of a JSON editor, and modifying the field content in the target JSON file in the editing interface according to the modification type of the target JSON file and the target JSON file modification information to obtain a first modified target JSON file; Displaying a preview target dynamic form in the preview interface of the JSON editor according to the first modified target JSON file; If the preview target dynamic form meets the preset dynamic form rendering requirements, determining the first modified target JSON file as the modified target JSON file.

4. The method according to claim 3, characterized in that, when the modification type of the target JSON file is the addition type, In response to the user's import operation, display the target JSON file in the editing interface of the JSON editor, and modify the field content in the target JSON file in the editing interface according to the modification type of the target JSON file and the target JSON file modification information to obtain a first modified target JSON file, including: In response to the user's import operation, display the target JSON file in the editing interface of the JSON editor, and determine the field content to be newly added in the target JSON file according to the target JSON file modification information; Insert the field content to be newly added into the target JSON file to obtain a first modified target JSON file.

5. The method according to claim 3, wherein, when the modification type of the target JSON file is the deletion type, In response to the user's import operation, display the target JSON file in the editing interface of the JSON editor, and modify the field content in the target JSON file in the editing interface according to the modification type of the target JSON file and the target JSON file modification information to obtain a first modified target JSON file, including: In response to the user's import operation, display the target JSON file in the editing interface of the JSON editor, and determine the field content to be deleted in the target JSON file according to the target JSON file modification information; Delete the field content to be deleted from the target JSON file to obtain a first modified target JSON file.

6. The method according to claim 3, wherein, when the modification type of the target JSON file is the new type, In response to the user's import operation, display the target JSON file in the editing interface of the JSON editor, and modify the field content in the target JSON file in the editing interface according to the modification type of the target JSON file and the target JSON file modification information to obtain a first modified target JSON file, including: In response to the user's import operation, display the target JSON file in the editing interface of the JSON editor, and determine the field content to be modified in the target JSON file according to the target JSON file modification information; Modify the target JSON file according to the field content to be modified to obtain a first modified target JSON file.

7. The method according to claim 1, wherein, before determining the target JSON file corresponding to the target dynamic form from the target database according to the target dynamic form, further include: Obtain the service information for generating the target dynamic form, where the service information includes the field information of the target dynamic form, the correspondence between the fields of the target dynamic form and the fields of the target JSON file, and the rendering requirements of the target dynamic form; Generate an initial JSON file according to the field information of the target dynamic form and the correspondence between the fields of the target dynamic form and the fields of the target JSON file; In response to the user's import operation, display the initial JSON file in the editing interface of the JSON editor, display the rendering effect corresponding to the initial JSON file in the preview interface of the JSON editor, and perform adjustment operations on the initial JSON file in the editing interface according to the rendering requirements of the target dynamic form to obtain a target JSON file that meets the rendering requirements of the target dynamic form.

8. The method according to claim 7, wherein, the method further includes: Establish the correspondence between the target dynamic form and the target JSON file; Store the correspondence between the target dynamic form and the target JSON file, the target JSON file, and the correspondence between the fields of the target dynamic form and the fields of the target JSON file in the target database.

9. A dynamic form modification device, wherein, includes: An acquisition module for acquiring a target dynamic form and target dynamic form modification information in the target dynamic form; A determination module for determining a target JSON file corresponding to the target dynamic form from the target database according to the target dynamic form, where the target database is a pre-configured database for storing the correspondence between the dynamic form and the JSON file, the JSON file, and the correspondence between the fields of the dynamic form and the fields of the JSON file; A modification module for modifying the field content in the target JSON file according to the target JSON file, the target dynamic form modification information, and the correspondence between the fields of the target dynamic form and the fields of the target JSON file to obtain a modified target JSON file; A rendering module for rendering the modified target JSON file according to the modified target JSON file to obtain a modified target dynamic form.

10. An electronic device, wherein, includes: A processor and a memory communicatively connected to the processor; The memory stores computer execution instructions; The processor executes the computer execution instructions stored in the memory to implement the method according to any one of claims 1-8.

11. A computer-readable storage medium, wherein, The computer-readable storage medium stores computer execution instructions, and when the computer execution instructions are executed by a processor, they are used to implement the method according to any one of claims 1-8.