Form generation method and device, electronic equipment and storage medium

By acquiring the target data model and determining the target semantic model, generating corresponding semantic instances, the problem of not being able to generate complex forms in existing technologies is solved. This enables the generation of matching forms with business data objects, improving the applicability and efficiency of form generation.

CN116108820BActive Publication Date: 2026-05-19BEIJING PERCENT INFORMATION TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING PERCENT INFORMATION TECH CO LTD
Filing Date
2022-12-29
Publication Date
2026-05-19

AI Technical Summary

Technical Problem

Existing technologies are unable to generate electronic forms that match the complex and diverse forms in terms of business type, format, and content.

Method used

By acquiring the target data model, determining the target semantic model, generating semantic instances corresponding to the target data model, and rendering them as user-visible forms, the data model is enriched using semantic analysis and machine learning to determine the target semantic model.

Benefits of technology

It enables the generation of forms that match complex business data objects, improving the applicability and efficiency of form generation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116108820B_ABST
    Figure CN116108820B_ABST
Patent Text Reader

Abstract

The application discloses a form generation method and device, electronic equipment and a storage medium. The method comprises the following steps: obtaining a target data model, wherein the target data model comprises a target data object, attributes of the target data object, and attribute configurations of the target data object; determining a target semantic model corresponding to the target data model, wherein the target semantic model is obtained by performing semantic analysis on multiple types of form controls; generating a semantic instance corresponding to the target data model according to the target semantic model, wherein the semantic instance comprises the target data object and the attributes of the target data object; and rendering the semantic instance into a form visible to a user.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of computer data processing technology, and specifically relates to a form generation method, apparatus, electronic device and storage medium. Background Technology

[0002] In data collection, forms are an important tool. Using electronic forms reduces costs while improving efficiency. Related technologies either automatically generate electronic forms by scanning paper forms using certain applications, or construct electronic forms based on data types by parsing databases. These technologies are suitable for simple forms in terms of type, format, and content; however, they cannot generate complex forms that adequately match the business requirements, given the diverse nature of the business. Summary of the Invention

[0003] This application provides a form generation method, apparatus, electronic device, and storage medium that can solve the problem of being unable to build complex forms that are sufficiently matched to business needs.

[0004] In a first aspect, embodiments of this application provide a form generation method, the method comprising: obtaining a target data model, wherein the target data model includes a target data object, attributes of the target data object, and attribute configurations of the target data object; determining a target semantic model corresponding to the target data model, wherein the target semantic model is obtained by performing semantic analysis on various types of form controls; generating a semantic instance corresponding to the target data model based on the target semantic model, wherein the semantic instance includes the target data object and attributes of the target data object; and rendering the semantic instance as a user-visible form.

[0005] Secondly, embodiments of this application provide a form generation apparatus, comprising: an acquisition module for acquiring a target data model, wherein the target data model includes a target data object, attributes of the target data object, and attribute configurations of the target data object; a determination module for determining a target semantic model corresponding to the target data model, wherein the target semantic model is obtained by semantic analysis of various types of form controls; a generation module for generating a semantic instance corresponding to the target data model based on the target semantic model, wherein the semantic instance includes the target data object and attributes of the target data object; and a rendering module for rendering the semantic instance into a user-visible form.

[0006] Thirdly, embodiments of this application provide an electronic device including a processor, a memory, and a program or instructions stored in the memory and executable on the processor, wherein the program or instructions, when executed by the processor, implement the steps of the method described in the first aspect.

[0007] Fourthly, embodiments of this application provide a readable storage medium on which a program or instructions are stored, which, when executed by a processor, implement the steps of the method described in the first aspect.

[0008] Fifthly, embodiments of this application provide a chip, the chip including a processor and a communication interface, the communication interface being coupled to the processor, the processor being used to run programs or instructions to implement the method as described in the first aspect.

[0009] In this embodiment, by acquiring a target data model, which includes a target data object, attributes of the target data object, and attribute configurations of the target data object; determining a target semantic model corresponding to the target data model, wherein the target semantic model is obtained through semantic analysis of various types of form controls; generating a semantic instance corresponding to the target data model based on the target semantic model, wherein the semantic instance includes the target data object and attributes of the target data object; and rendering the semantic instance as a user-visible form, a correspondence exists between the target data model and the target semantic model. This allows for the determination of the target semantic model based on the acquired target data model, the generation of a semantic instance corresponding to the target data model through the target semantic model, and the rendering of the semantic instance as a user-visible form. This achieves the goal of generating a form matching the target data object from a complex target data object to be generated. Attached Figure Description

[0010] Figure 1 This is a flowchart illustrating a form generation method provided in an embodiment of this application;

[0011] Figure 2 This is a flowchart illustrating another form generation method provided in an embodiment of this application;

[0012] Figure 3 This is a schematic diagram of the structure of a form generation device provided in an embodiment of this application;

[0013] Figure 4 This is a schematic diagram of another form generation device provided in an embodiment of this application;

[0014] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0015] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

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

[0017] The form generation method, apparatus, electronic device, and storage medium provided in this application will be described in detail below with reference to the accompanying drawings and through specific embodiments and application scenarios.

[0018] Figure 1 This diagram illustrates a flowchart of a form generation method according to an embodiment of this application. The method can be executed by an electronic device, which may include a server and / or a terminal device, such as an in-vehicle terminal or a mobile terminal. (Refer to...) Figure 1 The method may include the following steps:

[0019] Step 101: Obtain the target data model, wherein the target data model includes a target data object, the attributes of the target data object, and the attribute configuration of the target data object;

[0020] In this target data model, there can be one or more target data objects; there can be one or more attributes of the target data objects; an exemplary target data model is as follows: the target data object corresponds to the student object, the attribute of the target data object corresponds to the student's age, and the attribute configuration of the target data object corresponds to the range of values ​​for the student's age. The target data model is: student, age, range of values ​​for age.

[0021] The acquisition of the target data model can be controlled manually by selecting the target data model from which the form needs to be generated.

[0022] Step 102: Determine the target semantic model corresponding to the target data model, wherein the target semantic model is obtained by performing semantic analysis on various types of form controls;

[0023] Step 103: Generate a semantic instance corresponding to the target data model based on the target semantic model, wherein the semantic instance includes the target data object and the attributes of the target data object;

[0024] Step 104: Render the semantic instance as a user-visible form.

[0025] In this embodiment, the target semantic model corresponding to the target data model is determined based on the correspondence between the target data model and the target semantic model. Then, the target data model generates a semantic instance corresponding to the target data model through the target semantic model, and the semantic instance is rendered as a form visible to the user. This realizes the generation of a form that matches the target data object from a complex target data object to be generated.

[0026] In one implementation, before obtaining the target data model, the method may further include performing semantic analysis on the various types of form controls to create a semantic library; wherein the semantic library includes a semantic model corresponding to each type of form control.

[0027] This involves performing semantic analysis on form controls to create semantic models that can express the various attributes and configurations of the form controls. Semantic analysis on multiple types of form controls can yield multiple semantic models, which together form a semantic library.

[0028] In one implementation, the semantic model includes the public and unique attributes of the form control.

[0029] Common properties are those that all form controls have; unique properties are those that are unique to a particular form control.

[0030] Optionally, public attributes may include name, title, description, and default value; unique attributes, such as drop-down radio controls including drop-down enumeration values ​​and the linkage between options and other controls; numeric controls including decimal places, numerical range, and whether duplicates are allowed; and time controls including time format.

[0031] In one implementation, before obtaining the target data model, the method may further include performing semantic analysis on data tables in the database to create at least one data model; wherein the data model includes data objects, attributes of the data objects, and attribute configurations of the data objects.

[0032] The database includes multiple data tables for storing data information. Semantic analysis is performed on the data tables to create a data model that can express each data object, the attributes of the data objects, and the attribute configurations of the data objects.

[0033] In one implementation, the attribute configuration of the target data object includes basic configuration, constraint configuration, and other configurations; wherein, the other configurations are attribute configurations other than the basic configuration and constraint configuration.

[0034] Optionally, the basic configuration may include the name, data type, data format of the target data object, and whether null values ​​are allowed; the constraint configuration may include the range of values, whether to enumerate, and the relationship with other attributes.

[0035] In one implementation, step 102 above: determining the target semantic model corresponding to the target data model may include: determining a first semantic model set based on the semantic library and the basic configuration of the target data object; determining a second semantic model set based on the first semantic model set and the constraint configuration of the target data object; and determining the target semantic model based on the second semantic model set and other configurations of the target data object.

[0036] In this embodiment, firstly, based on the basic configuration of the target data object, a semantic model matching the basic configuration is searched in the created semantic library, and multiple possible semantic models constitute a first semantic model set; then, based on the constraint configuration of the target data object, a semantic model matching the constraint configuration is searched in the first semantic model set after one filtering, and multiple possible semantic models constitute a second semantic model set; then, based on other configurations of the target data object, a target semantic model matching the other configurations is searched in the second semantic model set after two filterings; the semantic model set is gradually narrowed down through the basic configuration, constraint configuration, and other configurations of the target data object, and finally, a target semantic model matching the target data object is determined.

[0037] As an example, firstly, based on the data type of the target data object, such as a time type, it can correspond to a date and time or moment time control; for example, a string type can correspond to a single-line text box or a multi-line text box control; secondly, based on the attribute configuration of the target data object, such as an attribute value being an enumeration value, it can correspond to a single-select or multiple-select control; and then based on other configurations of the target data object, such as an attribute being required, it corresponds to a required field control.

[0038] In one implementation, the above method may further include: when the target semantic model corresponding to the target data model cannot be determined, using a machine learning algorithm to predict the missing attribute configuration of the target data object; wherein the missing attribute configuration is used to determine the target semantic model of the target data object.

[0039] The situation where the target semantic model corresponding to the target data model cannot be determined may include situations where the basic configuration of the target data object is known, but the constraint configuration or other configurations of the target data object are unknown, making it impossible to further narrow down the semantic model set, and thus impossible to determine the target semantic model. For example, the data type of the target data object is known to be a string, and the corresponding controls may include single-line text boxes, multi-line text boxes, radio buttons, checkboxes, etc., but there is no other information to further determine the target control. In this case, the target data model is used to predict the missing attribute configurations of the target data object through machine learning algorithms to enrich the target data model, and then the target semantic model is determined based on the target data model after predicting the missing attribute configurations. For example, predicting whether the attributes of the target data object have special business meanings, such as mobile phone number, email, administrative region, location address, rating, etc.; predicting the value range of the attribute values ​​of the target data object, whether it includes enumerated values, whether multiple selections are possible, etc.; predicting the data format of the attribute values ​​of the target data object, such as the number of decimal places, time format, etc.

[0040] Figure 2 This illustration shows a flowchart of another form generation method provided by an embodiment of this application. See also: Figure 2 The method may include the following steps:

[0041] Step 201: Analyze the data tables in the database and create a data model;

[0042] Step 202: Determine whether the target semantic model corresponding to the data model can be determined in the semantic library; if yes, proceed to step 204; if no, proceed to step 203.

[0043] Step 203: Enrich the data model using machine learning; and return to step 202;

[0044] Step 204: Generate semantic instances corresponding to the data model;

[0045] Step 205: Render the semantic instance as a form.

[0046] This embodiment determines the target semantic model corresponding to the target data model based on the correspondence between the target data model and the target semantic model. When the target semantic model cannot be determined by the target data model, the target data model is enriched through machine learning. The system then determines again whether the target semantic model corresponding to the target data model can be determined. Finally, the target data model generates a semantic instance corresponding to the target data model through the target semantic model, and renders the semantic instance as a form visible to the user. This realizes the generation of a form that matches the target data object from a complex target data object to be generated.

[0047] It should be noted that the form generation method provided in this application embodiment can be executed by a form generation device or a control module within that form generation device for executing the form generation method. This application embodiment uses the execution of the form generation method by a form generation device as an example to illustrate the form generation device provided in this application embodiment.

[0048] Figure 3 This is a schematic diagram of the structure of a form generation apparatus according to an embodiment of this application. Figure 3 As shown, the form generation device 30 includes: an acquisition module 31, a determination module 32, a generation module 33, and a rendering module 34.

[0049] The acquisition module 31 can be used to acquire a target data model, wherein the target data model includes a target data object, the attributes of the target data object, and the attribute configuration of the target data object;

[0050] The determining module 32 can be used to determine the target semantic model corresponding to the target data model, wherein the target semantic model is obtained by performing semantic analysis on various types of form controls;

[0051] The generation module 33 can be used to generate a semantic instance corresponding to the target data model based on the target semantic model, wherein the semantic instance includes the target data object and the attributes of the target data object;

[0052] The rendering module 34 can be used to render the semantic instance into a user-visible form.

[0053] In one implementation, the device 30 further includes a first creation module 35, which can be used to perform semantic analysis on the various types of form controls and create a semantic library; wherein the semantic library includes a semantic model corresponding to each type of form control.

[0054] In one implementation, the device 30 further includes a second creation module 36, which can be used to perform semantic analysis on data tables in the database and create at least one data model; wherein the data model includes data objects, attributes of the data objects, and attribute configurations of the data objects.

[0055] In one implementation, the determining module 32 may be used to determine a first semantic model set based on the semantic library and the basic configuration of the target data object; determine a second semantic model set based on the first semantic model set and the constraint configuration of the target data object; and determine a target semantic model based on the second semantic model set and other configurations of the target data object.

[0056] In one implementation, the device 30 further includes a prediction module 37, which can be used to predict the missing attribute configuration of the target data object by using a machine learning algorithm when the target semantic model corresponding to the target data model cannot be determined; wherein the missing attribute configuration is used to determine the target semantic model of the target data object.

[0057] In one implementation, the semantic model includes the public and unique attributes of the form control.

[0058] In one embodiment, Figure 4 This application illustrates another form generation apparatus provided in an embodiment of the present application. See also: Figure 4 The device includes a form semantic module 41, a data model module 42, and a form generation module 43.

[0059] The form semantic module 41 can be used to define the public and private properties of form controls;

[0060] Data model module 42 can be used to analyze data tables in the database and build data models;

[0061] The form generation module 43 can be used to map the data model established by the data model module 42 according to predetermined rules, map the attributes of data objects in the data model to the semantic description of a form control, generate a semantic instance of the control, and render the instance into a form visible to the user.

[0062] The form generation device in this application embodiment can be a device, or a component, integrated circuit, or chip in a terminal. The device can be a mobile electronic device or a non-mobile electronic device. For example, mobile electronic devices can be mobile phones, tablets, laptops, PDAs, in-vehicle electronic devices, wearable devices, ultra-mobile personal computers (UMPCs), netbooks, or personal digital assistants (PDAs), etc., while non-mobile electronic devices can be servers, network-attached storage (NAS), personal computers (PCs), televisions (TVs), ATMs, or self-service machines, etc. This application embodiment does not impose specific limitations.

[0063] The form generation device in this application embodiment can be a device with an operating system. This operating system can be Android, iOS, or other possible operating systems; this application embodiment does not specifically limit it.

[0064] The form generation device provided in this application embodiment can achieve... Figures 1 to 2 The various processes implemented in the method embodiments are not described in detail here to avoid repetition.

[0065] Based on the same technical concept, embodiments of this application also provide an electronic device for performing the above-described form generation method. Figure 5This is a schematic diagram of the structure of an electronic device to implement various embodiments of this application. The electronic device can vary significantly due to differences in configuration or performance, and may include a processor 501, a communications interface 502, a memory 503, and a communication bus 504. The processor 501, communications interface 502, and memory 503 communicate with each other via the communication bus 504. The processor 501 can invoke a computer program stored in the memory 503 and running on the processor 501 to perform the following steps: obtaining a target data model, wherein the target data model includes a target data object, attributes of the target data object, and attribute configurations of the target data object; determining a target semantic model corresponding to the target data model, wherein the target semantic model is obtained through semantic analysis of various types of form controls; generating a semantic instance corresponding to the target data model based on the target semantic model, wherein the semantic instance includes the target data object and its attributes; and rendering the semantic instance as a user-visible form.

[0066] The specific execution steps can be found in the various steps of the above form generation method embodiment, and can achieve the same technical effect. To avoid repetition, they will not be repeated here.

[0067] It should be noted that the electronic devices in the embodiments of this application include: servers, terminals, or other devices besides terminals.

[0068] The above electronic device structure does not constitute a limitation on the electronic device. An electronic device may include more or fewer components than illustrated, or combine certain components, or arrange them differently. For example, an input unit may include a Graphics Processing Unit (GPU) and a microphone, and a display unit may use a liquid crystal display (LCD), organic light-emitting diode (OLED), or other similar display panels. User input units include at least one of a touch panel and other input devices. A touch panel is also called a touchscreen. Other input devices may include, but are not limited to, physical keyboards, function keys (such as volume control buttons, power buttons, etc.), trackballs, mice, and joysticks, which will not be elaborated further here.

[0069] Memory can be used to store software programs and various data. Memory can primarily include a first storage area for storing programs or instructions and a second storage area for storing data. The first storage area can store the operating system, application programs or instructions required for at least one function (such as sound playback, image playback, etc.). Furthermore, memory can include volatile memory or non-volatile memory, or both. Non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous linked dynamic random access memory (Synchlink DRAM, SLDRAM), and direct memory bus RAM (DRRAM).

[0070] The processor may include one or more processing units; optionally, the processor integrates an application processor and a modem processor, wherein the application processor mainly handles operations related to the operating system, user interface, and applications, while the modem processor mainly handles wireless communication signals, such as a baseband processor. It is understood that the aforementioned modem processor may also not be integrated into the processor.

[0071] This application also provides a readable storage medium storing a program or instructions. When the program or instructions are executed by a processor, they implement the various processes of the above-described form generation method embodiments and achieve the same technical effect. To avoid repetition, they will not be described again here.

[0072] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.

[0073] This application embodiment also provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement the various processes of the above-described form generation method embodiment and can achieve the same technical effect. To avoid repetition, it will not be described again here.

[0074] It should be understood that the chip mentioned in the embodiments of this application may also be referred to as a system-on-a-chip, system chip, chip system, or system-on-a-chip, etc.

[0075] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.

[0076] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0077] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.

Claims

1. A form generation method, characterized in that, include: Perform semantic analysis on the data tables in the database to create at least one data model, the data model including data objects, attributes of the data objects, and attribute configurations of the data objects; Obtain a target data model, wherein the target data model includes at least one target data object, attributes of the target data object, and attribute configuration of the target data object; Determine the target semantic model corresponding to the target data model, wherein the target semantic model is obtained by performing semantic analysis on various types of form controls; Based on the target semantic model, a semantic instance corresponding to the target data model is generated, wherein the semantic instance includes the target data object and the attributes of the target data object; Render the semantic instance into a user-visible form; The method further includes: In the absence of a target semantic model corresponding to the target data model, the target data model is used to predict the missing attribute configuration of the target data object through a machine learning algorithm. The missing attribute configuration is used to determine the target semantic model of the target data object.

2. The method according to claim 1, characterized in that, Before obtaining the target data model, the following is also included: Perform semantic analysis on the various types of form controls and create a semantic library; The semantic library includes a semantic model for each type of form control.

3. The method according to claim 2, characterized in that, The attribute configuration of the target data object includes basic configuration, constraint configuration, and other configurations; wherein, the other configurations are attribute configurations other than the basic configuration and constraint configuration. The determination of the target semantic model corresponding to the target data model includes: Based on the semantic library, and according to the basic configuration of the target data object, a first set of semantic models is determined; Based on the first set of semantic models, a second set of semantic models is determined according to the constraint configuration of the target data object; Based on the second set of semantic models, the target semantic model is determined according to other configurations of the target data object.

4. The method according to claim 2, characterized in that, The semantic model includes the public and unique properties of the form controls.

5. A form generation device, characterized in that, include: The second creation module is used to perform semantic analysis on the data tables in the database and create at least one data model, wherein the data model includes a data object, the attributes of the data object, and the attribute configuration of the data object. An acquisition module is used to acquire a target data model, wherein the target data model includes at least one target data object, attributes of the target data object, and attribute configuration of the target data object; The determination module is used to determine the target semantic model corresponding to the target data model, wherein the target semantic model is obtained by performing semantic analysis on various types of form controls; A generation module is used to generate a semantic instance corresponding to the target data model based on the target semantic model, wherein the semantic instance includes the target data object and the attributes of the target data object; The rendering module is used to render the semantic instance into a form visible to the user; It also includes a prediction module, used to predict the missing attribute configuration of the target data object by using a machine learning algorithm when the target semantic model corresponding to the target data model cannot be determined; wherein the missing attribute configuration is used to determine the target semantic model of the target data object.

6. An electronic device, characterized in that, It includes a processor, a memory, and a program or instructions stored in the memory and executable on the processor, wherein the program or instructions, when executed by the processor, implement the steps of the form generation method as described in any one of claims 1 to 4.

7. A readable storage medium, characterized in that, The readable storage medium stores a program or instructions that, when executed by a processor, implement the steps of the form generation method as described in any one of claims 1 to 4.