Form generation method, device, electronic device and storage medium

By obtaining and rendering the hierarchical nesting relationship of form data structures, the limitations of the electronic form generation method in the prior art in multi-level structure management are solved, and the form generation effect is improved and the user interface is hierarchical display is achieved.

CN119783649BActive Publication Date: 2025-08-29SHENZHEN MINIPLAY TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510287672.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-12
Publication Date
2025-08-29
Estimated Expiration
2045-03-12

AI Technical Summary

Technical Problem

In the prior art, the electronic form generation method has limitations in dynamic hierarchical management, and cannot flexibly manage multi-level structures, and the display method is single, so the generation effect is poor.

Method used

By obtaining the infrastructure components in the form data structure, hierarchical nested relationships are obtained, and form rendering is performed based on these elements, target forms are generated, and hierarchical relationships of form data structures are dynamically managed.

Benefits of technology

It realizes flexible generation of multi-level structured forms, enriches the form expression and improves the generation effect, and users can intuitively understand the father-son relationship and structure of the data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119783649B_ABST
    Figure CN119783649B_ABST
Patent Text Reader

Abstract

The present application provides a form generation method, apparatus, electronic device, and storage medium. The form generation method includes: obtaining a form data structure, configuring corresponding component elements based on the infrastructure components contained in the form data structure; obtaining the hierarchical nesting relationship of the infrastructure components based on the form data structure; and performing form rendering processing based on the component elements corresponding to the infrastructure components and the hierarchical nesting relationship to generate a target form. The present application is used to improve the generation effect of electronic forms generated from multi-level form data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a form generation method, device, electronic device and storage medium. Background Art

[0002] An electronic form is an interface component used on digital devices to collect and process user input. It typically consists of a series of input fields, including text boxes, checkboxes, radio buttons, and so on. Existing technologies typically generate these forms through manual coding, the use of form generation libraries or frameworks, or automated generation via low-code / no-code tools. While these approaches support linked data, they are limited in dynamic hierarchical management, lacking the flexibility to manage multi-level structures, and employing a single presentation format, resulting in poor performance in generating electronic forms. Summary of the Invention

[0003] One purpose of the present application is to provide a form generation method, device, electronic device and storage medium for improving the generation effect of electronic forms when multi-level structured form data is generated.

[0004] According to one aspect of an embodiment of the present application, a form generation method is provided, comprising:

[0005] Obtaining a form data structure, and configuring corresponding component elements based on the infrastructure components contained in the form data structure;

[0006] Based on the form data structure, obtaining the hierarchical nesting relationship of the infrastructure components;

[0007] According to the component elements corresponding to the infrastructure components and the hierarchical nesting relationship, form rendering processing is performed to generate a target form.

[0008] According to one aspect of an embodiment of the present application, a form generating apparatus is provided, comprising:

[0009] A component element configuration module is used to obtain a form data structure and configure corresponding component elements based on the infrastructure components contained in the form data structure;

[0010] A nested relationship acquisition module, configured to acquire the hierarchical nested relationship of the infrastructure components based on the form data structure;

[0011] The form generation module is used to perform form rendering processing to generate a target form based on the component elements corresponding to the infrastructure components and the hierarchical nesting relationship.

[0012] According to one aspect of an embodiment of the present application, an electronic device is provided, including:

[0013] One or more processors; a storage device for storing one or more programs, which, when executed by the one or more processors, enables the electronic device to implement the methods provided in the various optional implementations described above.

[0014] According to one aspect of an embodiment of the present application, a computer program medium is provided, on which computer-readable instructions are stored. When the computer-readable instructions are executed by a processor of a computer, the computer executes the methods provided in the various optional implementations described above.

[0015] According to one aspect of an embodiment of the present application, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the methods provided in the various optional implementations described above.

[0016] In an embodiment of the present application, a form data structure is obtained, and component elements corresponding to the infrastructure component configuration contained in the form data structure are obtained based on the form data structure. Based on the form data structure, a hierarchical nesting relationship of the infrastructure component is obtained, and form rendering processing is performed according to the component elements corresponding to the infrastructure component and the hierarchical nesting relationship to generate a target form. The hierarchical nesting relationship can indicate the hierarchical relationship between the infrastructure components, and form item fields at different levels can be rendered according to the hierarchical nesting relationship, further enriching the expression form of the target form, and dynamically managing the form data structure with the help of the target form, thereby improving the generation effect of the form data structure with a dynamic hierarchical relationship after generating the target form to a certain extent.

[0017] Other features and advantages of the present application will become apparent from the following detailed description, or may be learned in part by practice of the present application.

[0018] It should be understood that the foregoing general description and the following detailed description are merely illustrative and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The above and other objects, features and advantages of the present application will become more apparent by describing in detail example embodiments thereof with reference to the attached drawings.

[0020] Figure 1 A flow chart of the form generation method provided in an embodiment of the present application is shown.

[0021] Figure 2 A schematic diagram showing the display of the target form provided in this embodiment is shown.

[0022] Figure 3 A schematic diagram of the structure of a form generating device provided in an embodiment of the present application is shown.

[0023] Figure 4 A schematic structural diagram of an electronic device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0024] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these example embodiments are provided so that the description of this application will be more comprehensive and complete and will fully convey the concepts of the example embodiments to those skilled in the art. The accompanying drawings are merely schematic illustrations of the present application and are not necessarily drawn to scale. Identical reference numerals in the figures indicate identical or similar parts, and thus repeated descriptions thereof will be omitted.

[0025] In addition, the described features, structures or characteristics can be combined in one or more example embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the example embodiments of the present application. However, those skilled in the art will appreciate that the technical solutions of the present application can be practiced while omitting one or more of the specific details, or other methods, components, steps, etc. can be adopted. In other cases, known structures, methods, implementations or operations are not shown or described in detail to avoid obscuring the main content and making various aspects of the present application vague.

[0026] Some of the blocks shown in the accompanying drawings are functional entities that do not necessarily correspond to physically or logically independent entities. These functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0027] In front-end form rendering mode, the Schema schema defines the format, type, and constraints of data. The tree structure is essentially composed of nested objects and arrays, with each node representing a data field. If the field is a complex object, sub-attributes can be nested within it to form a hierarchical structure.

[0028] Each field can be a basic type (such as a string or a number) or a complex type (such as an object structure or a data structure).

[0029] During the rendering process of the target form, the target form itself is an object structure, and the form items of the target form are array structures or object structures. Each form item corresponds to other child items or child nodes. The root node of the target form is the parent node of the tree structure, and the form items are the child nodes of the tree structure. At this time, the form items act as nested fields and form a hierarchical relationship with the target form.

[0030] Figure 1 FIG. 4 shows a flow chart of the form generation process provided by this embodiment. Figure 1 As shown, the method includes the following steps:

[0031] S100, obtaining a form data structure, and configuring corresponding component elements based on the infrastructure components contained in the form data structure.

[0032] The form data structure is used to represent the data organization mode of the structure and content of the form. In this embodiment, the form data structure is a tree structure, which is used to define the hierarchical nesting relationship between fields.

[0033] The form data structure defines the types of each form item field, and each type corresponds to an infrastructure component.

[0034] Form field types include basic types and complex types. Basic types refer to the most basic data types and are typically used to store single data values, rather than complex data structures or nested data. They are generally used to define the input format of a single form item, such as text boxes, numbers, checkboxes, etc. Complex types refer to complex structures or nested data with multiple sub-items or sub-nodes. They generally contain multiple basic types or other types of fields, the most common of which are object data or array data.

[0035] Among them, the object structure is used for a set of key-value pairs and is suitable for multi-field combinations; the array structure is used to store multiple elements of the same or different types and is suitable for dynamic lists, multiple options, etc.

[0036] The infrastructure component ensures that the form displays a reasonable structure on the user interface based on the layout of each type of form item fields on the target form.

[0037] Component elements refer to the form layout format set according to the type of form field, such as drop-down selection, number, input box, time, color, switch, etc.

[0038] When allocating component elements based on the type of the form item field, the component elements of the field can be hierarchically configured according to the hierarchical nesting relationship of the form data structure.

[0039] For example, all component elements of form item fields at the same level are placed at the first level, and component elements of other sub-items included in the form item field with nested attributes are placed at the second level.

[0040] By clicking or touching a component element of a nested form field in the first level, you can view the field values ​​of other sub-items in the second level. This setting can dynamically render hierarchical form data structures and display nested form fields hierarchically in the user interface, visually reflecting the hierarchical relationship of the target form.

[0041] S200, based on the form data structure, obtain the hierarchical nesting relationship of the infrastructure components.

[0042] Specifically, the form data structure defines the type of each form field, and the nesting relationship between the basic structure components based on the type of the form field. The hierarchical nesting relationship between the basic structure components depends on whether the form field has a nesting attribute.

[0043] Specifically, whether the form item field has a nested attribute is determined by the field type of the form item field. If the form item field has a nested attribute, a basic structure component with a hierarchical nested relationship is configured for the form item field.

[0044] Nested attributes can be derived based on the field type of the form item field. If the field type of the form item field is defined as Array or Object in the form data structure, it means that the form item field is a complex field and includes multiple sub-items or sub-nodes.

[0045] During the rendering of the target form, a hierarchical nesting relationship refers to the form data structure presenting a parent-child relationship in the data storage mechanism, that is, a tree structure. This nesting relationship can be extended to an infinite number of levels, also known as an infinite tree structure.

[0046] The target form is essentially a data structure of an object attribute, which includes a preset number of basic fields and a preset number of complex fields. These complex fields can be object attributes or array attributes. Furthermore, the form item fields of array attributes can include sub-fields of object attributes.

[0047] S300: Perform form rendering processing to generate a target form based on the component elements and hierarchical nesting relationships corresponding to the infrastructure components.

[0048] The form data structure is recursively rendered according to the component elements corresponding to the infrastructure components and the hierarchical nesting relationship to generate a target form.

[0049] The target form will be displayed hierarchically based on the hierarchical nesting relationship so that users can intuitively understand the parent-child relationship and structure of the data. When displaying such a form, appropriate layout can be made according to the depth and structure of the hierarchical nesting.

[0050] In addition, display interfaces with different layouts can be configured according to the types of sub-fields included in the form item field with hierarchical attributes.

[0051] In this embodiment, a form data structure is obtained, and component elements corresponding to the infrastructure component configuration contained in the form data structure are obtained based on the form data structure. Based on the form data structure, the hierarchical nesting relationship of the infrastructure component is obtained, and recursive rendering is performed according to the component elements corresponding to the infrastructure component and the hierarchical nesting relationship to obtain a target form. The hierarchical nesting relationship can indicate the hierarchical relationship between the infrastructure components, and form item fields at different levels can be rendered according to the hierarchical nesting relationship, further enriching the expression form of the target form. The tree-structured form data structure is managed in the form of the target form, which improves the generation effect of the target form after the form data structure with a dynamic hierarchical relationship is generated to a certain extent.

[0052] Furthermore, S100, a form data structure is obtained, and corresponding component elements are configured based on the infrastructure components contained in the form data structure, including:

[0053] S110, parsing the form data structure to obtain the structure type of the basic structure component.

[0054] S120: Configure corresponding component elements for the infrastructure component according to the structure type.

[0055] Specifically, the form data structure is parsed to obtain the field type of each form item field, and the structure type of the basic structure component is determined based on the field type. The structure type defines the attribute type of the basic structure component.

[0056] Specifically, the structure type is defined as the basic structure component belonging to the object type or array type.

[0057] Configure the corresponding component elements for the infrastructure components according to the structure type.

[0058] Furthermore, in S120, corresponding component elements are configured for the infrastructure component according to the structure type, including:

[0059] S1211, according to the data attributes of the structure type and the field type of the basic structure component, search for the corresponding component element in the basic component library.

[0060] S1213, configuring the component element as a form item component to each field type of the infrastructure component.

[0061] Specifically, the data attributes of the structure type are used to define the structural attributes of the structure type. The field type is used to define the data type of each field under the structure type and define the layout of the field on the target form.

[0062] For example, the subfields under an object type field are of array type, and data attributes refer to the attributes of each data item under the data type. The infrastructure component is the field type of each field.

[0063] [url] represents the url field under the object type, and string represents the field type of the field. That is, the field type of the [url] field is string.

[0064] Furthermore, S200 obtains the hierarchical nesting relationship of the infrastructure components based on the form data structure, including:

[0065] S210: Based on the form data structure, a meta-structure component is defined, where the meta-structure component is used to define a form item hierarchy when the form data structure forms a form.

[0066] S220: Under the meta-structure component, obtain the hierarchical nesting relationship of the basic structure component according to the hierarchical identifier carried by the basic structure component in the form data structure.

[0067] Specifically, the meta-structure component is used to inherit the nested relationship of each basic structure component to define the form item hierarchy when the form data structure forms a form.

[0068] Meta structure components can take over the rendering of any structure components, including array structure components and object structure components.

[0069] According to the hierarchical identifiers carried by each infrastructure component in the form data structure, the hierarchical nesting relationship of the infrastructure components is obtained.

[0070] Hierarchical identifiers are used to define the parent-child relationship between the fields corresponding to each infrastructure component. Hierarchical identifiers include parent node identifiers and child node identifiers. Hierarchical identifiers are used to obtain the hierarchical nesting relationship of infrastructure components.

[0071] Furthermore, in S220, after obtaining the hierarchical nesting relationship of the basic structure components according to the hierarchical identifiers carried by the basic structure components in the form data structure under the meta structure components, the method further includes:

[0072] S221, defining the hierarchical nesting relationship between the infrastructure components according to the hierarchical identifiers carried by the infrastructure components in the form data structure.

[0073] S223, under the meta-structure component, render various types of infrastructure components according to the hierarchical nesting relationship.

[0074] Specifically, under the meta-structure component, each level of the form data structure is rendered until the termination condition of no child nodes is reached.

[0075] That is, according to the hierarchical nesting relationship of the form data structure, recursive rendering is performed according to the hierarchical nesting relationship.

[0076] Furthermore, S300 performs form rendering processing to generate a target form based on the component elements and hierarchical nesting relationships corresponding to the infrastructure components, including:

[0077] S310, obtaining the field type of the infrastructure component and setting a dynamic update mechanism for the field type and field value.

[0078] Specifically, the dynamic update mechanism refers to dynamically changing the type or rendering method of form item fields based on some conditions or external events.

[0079] Furthermore, the validation rules for the form field can be dynamically adjusted based on the type of the form field. For example, changing the field type from a number field to a date field requires different validation rules.

[0080] S320: Set a recursive component and recursively render the basic structure component based on the hierarchical nesting relationship to generate a target form with form items having a hierarchical relationship.

[0081] Specifically, according to the hierarchical nesting relationship, the component corresponding to the structural type of the hierarchy is called to call the component itself to render its child nodes.

[0082] The form interfaces at different levels can be different, depending on the structure type corresponding to the field and the field type of the subfields contained in the field.

[0083] Specifically, the form item fields defined according to the first-level structural components may be used as the initial display form of the target form, and the target form may be controlled to be displayed in the second manner through the second operation manner.

[0084] For example, the target form displayed in the second manner presents the fields defined by the second-level structural component.

[0085] The second operation mode may be a touch operation or a click operation on the form item field of the first level.

[0086] Figure 2 FIG. 4 shows a schematic diagram of displaying the target form provided by this embodiment. Figure 2 As shown in the figure, the first level defines form items, action items, and field areas. Form items are used to display the form item fields of the target form, and field areas are used to display the field values ​​under the form item fields.

[0087] Operation items are used to edit fields or field values ​​in a form item. Specifically, operation items include edit, delete, copy, etc.

[0088] The second level defines the structural components corresponding to the [Image List] field under the target form.

[0089] It can be concluded that the first level and the second level are in a hierarchical nested relationship.

[0090] Furthermore, in S300, after performing form rendering processing to generate a target form according to the component elements and hierarchical nesting relationships corresponding to the infrastructure components, the process further includes:

[0091] S400: Setting a manipulation component, where the manipulation component is used to trigger an editing operation on a target form.

[0092] S410: In response to a trigger instruction of the editing operation component, perform an editing operation on the target form.

[0093] The control component is used to trigger edit operations on the target form. Editing instructions include adding, deleting, modifying, and querying. Based on the control component, the target data structure is configured. The form data structure is rendered in a table or form format; the array structure is rendered in a table format.

[0094] A field with the field attribute filter is set in the target data structure, and the field is used to filter the business data stored in the target form. Furthermore, a filtering function is set to complete the editing operation of the business data.

[0095] Figure 3 FIG. 1 shows a schematic diagram of the structure of the form generating device provided in this embodiment. Figure 3 As shown, the form generating device includes:

[0096] The component element configuration module 31 is used to obtain the form data structure and configure the corresponding component elements based on the basic structure components contained in the form data structure.

[0097] The nested relationship acquisition module 32 is used to acquire the hierarchical nested relationship of the basic structure components based on the form data structure.

[0098] The form generation module 33 is used to perform form rendering processing to generate a target form according to the component elements and hierarchical nesting relationships corresponding to the infrastructure components.

[0099] Furthermore, the component element configuration module 31 is configured to:

[0100] Parse the form data structure to obtain the structure type of the basic structure component.

[0101] Configure the corresponding component elements for the infrastructure components according to the structure type.

[0102] Furthermore, the component element configuration module 31 is configured to:

[0103] According to the field type of the structure type and the field type of the basic structure component, the corresponding component element is found in the basic component library.

[0104] Configure the component element as a form item component to each field type of the infrastructure component.

[0105] Furthermore, the nested relationship acquisition module 32 is configured to:

[0106] Based on the form data structure, a meta-structure component is defined. The meta-structure component is used to define the form item hierarchy when the form data structure forms a form.

[0107] Under the meta-structure component, the hierarchical nesting relationship of the infrastructure component is obtained according to the hierarchical identifier carried by the infrastructure component in the form data structure.

[0108] Furthermore, the form generating device is further configured to:

[0109] According to the hierarchical identifiers carried by the infrastructure components in the form data structure, the hierarchical nesting relationship between the infrastructure components is defined.

[0110] Under the meta-structure component, various types of infrastructure components are rendered according to the hierarchical nesting relationship.

[0111] Furthermore, the form generation module 33 is configured to:

[0112] Get the field type of the infrastructure component and set the dynamic update mechanism of the field type and field value.

[0113] Set up recursive components and recursively render infrastructure components based on hierarchical nesting relationships to generate a target form with hierarchical relationships between form items.

[0114] Furthermore, the form generating device is further configured to:

[0115] Set the manipulation component, which is used to trigger the editing operation on the target form.

[0116] In response to a trigger instruction of the edit operation component, an edit operation is performed on the target form.

[0117] Figure 4 The schematic diagram of the structure of the electronic device provided by this embodiment is shown below. Figure 4 The electronic device 50 provided in this embodiment is described. Figure 4The electronic device 50 shown is merely an example and should not limit the functions and scope of use of the embodiments of the present application.

[0118] like Figure 4 As shown, electronic device 50 is implemented as a general-purpose computing device. Components of electronic device 50 may include, but are not limited to, at least one processing unit 510, at least one storage unit 520, and a bus 530 connecting various system components (including storage unit 520 and processing unit 510).

[0119] The storage unit stores program codes, which can be executed by the processing unit 510, so that the processing unit 510 performs the steps of various exemplary embodiments of the present application described in the description of the exemplary method described above. For example, the processing unit 510 can perform the following steps: Figure 1 The steps shown in .

[0120] The storage unit 520 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 5201 and / or a cache memory unit 5202 , and may further include a read-only memory unit (ROM) 5203 .

[0121] The storage unit 520 may also include a program / utility 5204 having a set (at least one) of program modules 5205, such program modules 5205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.

[0122] Bus 530 may represent one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.

[0123] The electronic device 50 can also communicate with one or more external devices 600 (e.g., a keyboard, pointing device, Bluetooth device, etc.), one or more devices that enable a user to interact with the electronic device 50, and / or any device that enables the electronic device 50 to communicate with one or more other computing devices (e.g., a router, modem, etc.). This communication can occur via an input / output (I / O) interface 550. The I / O interface 550 is connected to the display unit 540. Furthermore, the electronic device 50 can communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network such as the Internet) via a network adapter 560. As shown, the network adapter 560 communicates with other modules of the electronic device 50 via the bus 530. It should be understood that, although not shown in the figure, other hardware and / or software modules can be used in conjunction with the electronic device 50, including but not limited to microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

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

[0125] In an exemplary embodiment of the present application, a computer-readable storage medium is further provided, on which computer-readable instructions are stored. When the computer-readable instructions are executed by a processor of a computer, the computer executes the form generation method described in the above method embodiment.

[0126] According to one embodiment of the present application, a program product for implementing the method in the above method embodiment is also provided. The program product may be a portable compact disc read-only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present application is not limited thereto. In this document, a readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0127] The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination thereof. More specific examples (a non-exhaustive list) of readable storage media include: an electrical connection having one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.

[0128] A computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium that can transmit, propagate, or transfer a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0129] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0130] The program code used to perform the operations of the present application can be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, and conventional procedural programming languages ​​such as C or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, as a standalone software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (e.g., via the Internet using an Internet service provider).

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

[0132] Furthermore, although the steps of the method of the present application are described in a particular order in the accompanying drawings, this does not require or imply that the steps must be performed in this particular order, or that all steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps.

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

[0134] Those skilled in the art will readily appreciate other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present invention that follow the general principles of the present invention and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered merely as exemplary, and the true scope and spirit of the present application are indicated by the appended claims.

Claims

1. A form generation method, characterized in that: include: Obtaining a form data structure, and configuring corresponding component elements based on the infrastructure components contained in the form data structure; Based on the form data structure, a meta-structure component is defined, wherein the meta-structure component is used to define a form item hierarchy when the form data structure forms a form, and to undertake rendering of different types of structure components; Under the meta-structure component, according to the hierarchical identifier carried by the basic structure component in the form data structure, obtaining the hierarchical nesting relationship of the basic structure component; Perform form rendering processing to generate a target form based on the component elements corresponding to the infrastructure components and the hierarchical nesting relationship; The performing form rendering processing to generate a target form according to the component elements corresponding to the infrastructure components and the hierarchical nesting relationship includes: Obtaining the field type of the infrastructure component and setting a dynamic update mechanism for the field type and field value; A recursive component is set and based on the hierarchical nesting relationship, the basic structure component is recursively rendered to generate a target form with a hierarchical relationship in form items. The structure type of each level is called for rendering according to the hierarchical nesting relationship. The target form has different form interfaces at different levels.

2. The form generation method according to claim 1, wherein: The obtaining of the form data structure and configuring corresponding component elements based on the infrastructure components contained in the form data structure include: Parsing the form data structure to obtain the structure type of the infrastructure component; The corresponding component elements are configured for the infrastructure component according to the structure type.

3. The form generation method according to claim 2, wherein: The configuring corresponding component elements for the infrastructure component according to the structure type includes: According to the field type of the structure type and the field type of the basic structure component, searching for a corresponding component element in the basic component library; The component element is configured as a form item component to each field type of the infrastructure component.

4. The form generation method according to claim 1, wherein: Under the meta-structure component, after obtaining the hierarchical nesting relationship of the basic structure component according to the hierarchical identifier carried by the basic structure component in the form data structure, the method further includes: Defining a hierarchical nesting relationship between the infrastructure components according to the hierarchical identifiers carried by the infrastructure components in the form data structure; Under the meta-structure component, multiple types of the basic structure components are rendered according to the hierarchical nesting relationship.

5. The form generation method according to claim 1, wherein: After performing form rendering processing to generate a target form based on the component elements corresponding to the infrastructure components and the hierarchical nesting relationship, the method further includes: Setting a manipulation component, wherein the manipulation component is used to trigger an editing operation on the target form; In response to the triggering instruction of the editing operation component, an editing operation is performed on the target form.

6. A form generating device, characterized in that: The device comprises: A component element configuration module is used to obtain a form data structure and configure corresponding component elements based on the infrastructure components contained in the form data structure; Nested relationship acquisition module, used for: Based on the form data structure, a meta-structure component is defined, wherein the meta-structure component is used to define a form item hierarchy when the form data structure forms a form, and to undertake rendering of different types of structure components; Under the meta-structure component, according to the hierarchical identifier carried by the basic structure component in the form data structure, obtaining the hierarchical nesting relationship of the basic structure component; A form generation module for performing form rendering processing to generate a target form based on the component elements corresponding to the infrastructure components and the hierarchical nesting relationship; The performing form rendering processing to generate a target form according to the component elements corresponding to the infrastructure components and the hierarchical nesting relationship includes: Obtaining the field type of the infrastructure component and setting a dynamic update mechanism for the field type and field value; A recursive component is set and based on the hierarchical nesting relationship, the basic structure component is recursively rendered to generate a target form with a hierarchical relationship in form items. The structure type of each level is called for rendering according to the hierarchical nesting relationship. The target form has different form interfaces at different levels.

7. An electronic device, characterized in that: include: one or more processors; The storage device is used to store one or more programs, and when the one or more programs are executed by the one or more processors, the electronic device implements the form generation method according to any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that Computer-readable instructions are stored thereon, and when the computer-readable instructions are executed by a processor of a computer, the computer is caused to execute the form generating method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Page form generation method and device, computer equipment and storage medium

    CN114968235A

  • Multi-level form interface visualization generation method and device based on recursive algorithm

    CN116627418A