CN116048499A - Dynamic form generation method, device, electronic equipment and medium - Google Patents

Dynamic form generation method, device, electronic equipment and medium Download PDF

Info

Publication number
CN116048499A
CN116048499A CN202211190837.8A CN202211190837A CN116048499A CN 116048499 A CN116048499 A CN 116048499A CN 202211190837 A CN202211190837 A CN 202211190837A CN 116048499 A CN116048499 A CN 116048499A
Authority
CN
China
Prior art keywords
target
field
optional
content
dynamic form
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211190837.8A
Other languages
Chinese (zh)
Inventor
孙倩倩
杜宗良
宋淑姣
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Qingdao Haier Technology Co Ltd
Haier Smart Home Co Ltd
Haier Uplus Intelligent Technology Beijing Co Ltd
Original Assignee
Qingdao Haier Technology Co Ltd
Haier Smart Home Co Ltd
Haier Uplus Intelligent Technology Beijing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Qingdao Haier Technology Co Ltd, Haier Smart Home Co Ltd, Haier Uplus Intelligent Technology Beijing Co Ltd filed Critical Qingdao Haier Technology Co Ltd
Priority to CN202211190837.8A priority Critical patent/CN116048499A/en
Publication of CN116048499A publication Critical patent/CN116048499A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/0485Scrolling or panning

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The application provides a dynamic form generation method, a dynamic form generation device, electronic equipment and a medium. The method comprises the following steps: displaying a field source set selected by a user from a form database, wherein the field source set comprises different selectable fields contained in a form of the same form type generated in a history manner; acquiring a target field fed back by a user based on the optional field; determining a dynamic form format based on the target field, and displaying the dynamic form content based on the target field and the dynamic form format; and generating a dynamic form based on the target field, the dynamic form format and target content determined by the user based on the displayed dynamic form content. According to the method provided by the application, the user can generate the specific form based on different business flow demands only by operating the front-end interface, and the form fields can be deleted and changed based on will without repeated development of developers, so that the user experience is improved, and the workload of the developers is effectively reduced.

Description

Dynamic form generation method, device, electronic equipment and medium
Technical Field
The present disclosure relates to computer technologies, and in particular, to a dynamic form generating method, an apparatus, an electronic device, and a medium.
Background
The dynamic form is used for flexibly designing a display page according to a certain type or similar type of business flow, flexibly configuring and expanding business, avoiding hard-coded data acquisition and processing form in the system and improving maintainability of the system.
At present, corresponding dynamic forms are generally developed according to the business process requirements of the demander, namely, different forms are developed for different business processes.
In the above process, if a form needs to be deleted, added or field format adjusted, a developer is required to repeatedly develop the form based on new requirements, so that the workload of the developer is increased, and the user experience is not improved.
Disclosure of Invention
The application provides a dynamic form generation method, a device, electronic equipment and a medium, which are used for enabling operators to directly modify and adjust a front-end interface when the format, the fields and the like of a certain form are required to be adjusted, so that the time for repeated development of developers is saved, and the form development efficiency is improved.
In one aspect, the present application provides a dynamic form generation method, including:
Displaying a field source set selected by a user from a form database, wherein the field source set comprises different selectable fields contained in a form of the same form type generated in a history manner;
acquiring a target field fed back by the user based on the optional field;
determining a dynamic form format based on the target field, and displaying dynamic form contents based on the target field and the dynamic form format, wherein the dynamic form contents comprise selectable contents and default contents;
and generating a dynamic form based on the target field, the dynamic form format and target content determined by the user based on the displayed dynamic form content.
In another possible implementation manner, the displaying the field source set selected by the user from the form database includes:
sorting each optional field based on the historical usage times of each optional field; the more the historical use times of the optional fields are, the earlier the ordering is;
based on the ordering of the optional fields, optional fields included in the field source set are displayed; wherein the top-ranked optional fields are preferentially presented.
In another possible implementation, the dynamic form format includes a target component type and a target attribute, the determining a dynamic form format based on the target field and displaying dynamic form content based on the target field and the dynamic form format includes:
Determining a target component type and a target attribute corresponding to each target field, wherein the target component type comprises a text box and a drop-down box, and the target attribute is used for representing the layout and the format of the text box or the drop-down box;
if the target component type of the target field is a text box, displaying default content based on the target field, wherein the default content is a filling instruction or target content corresponding to the target field;
and if the target component type of the target field is a drop-down box, displaying optional content based on the target field, and determining the target content by the user based on the optional content, wherein the more the historical use times of the optional content are, the earlier the display sequence is.
In another possible implementation manner, the determining the target attribute corresponding to each target field includes
If the target field corresponds to an optional attribute, automatically determining that the optional attribute is the target attribute of the target field;
and if the target field corresponds to at least two optional attributes, displaying the at least two optional attributes, and determining the target attribute based on the feedback of the user, wherein the more the historical use times of the optional attributes are, the more the display sequence is.
In another possible implementation, the method further includes:
acquiring a statistical instruction fed back by the user, wherein the statistical instruction is used for indicating to count the historical use times of the optional fields, the optional attributes or the optional contents in any time period;
and determining the historical use times of the optional fields, or the historical use times of the optional attributes, or the historical use times of the optional contents based on the statistical instruction.
In another possible implementation manner, when at least one linkage field exists in the target field, the method further includes:
when the target content corresponding to the target field is changed, acquiring the target content before and the target content after the change corresponding to the target field;
and determining an update target field based on the pre-change target content and the post-change target content, and determining a linkage field of the update target field and target content of the linkage field according to the update target field.
In another possible implementation manner, before the displaying the field source set selected by the user from the form database, the method further includes:
Acquiring a form generated by history;
and storing different optional fields contained in the forms belonging to the same form type into the same field source set to obtain a form database containing at least one field source set.
On the other hand, the application provides a dynamic form generating device, which comprises a display module, a first acquisition module, a first determination module and a generating module, wherein,
the display module is used for displaying a field source set selected by a user from the form database, wherein the field source set comprises different selectable fields contained in a form of the same form type generated in a history manner;
the first acquisition module is used for acquiring a target field fed back by the user based on the optional field;
the first determining module is used for determining a dynamic form format based on the target field and displaying dynamic form contents based on the target field and the dynamic form format, wherein the dynamic form contents comprise selectable contents and default contents;
and the generation module is used for generating a dynamic form based on the target field, the dynamic form format and the dynamic form content.
In another possible implementation manner, the display module is specifically configured to:
Sorting each optional field based on the historical usage times of each optional field; the more the historical use times of the optional fields are, the earlier the ordering is;
based on the ordering of the optional fields, optional fields included in the field source set are displayed; wherein the top-ranked optional fields are preferentially presented.
In another possible implementation manner, the first determining module is specifically configured to:
determining a target component type and a target attribute corresponding to each target field, wherein the target component type comprises a text box and a drop-down box, and the target attribute is used for representing the layout and the format of the text box or the drop-down box;
if the target component type of the target field is a text box, displaying default content based on the target field, wherein the default content is a filling instruction or target content corresponding to the target field;
and if the target component type of the target field is a drop-down box, displaying optional content based on the target field, and determining the target content by the user based on the optional content, wherein the more the historical use times of the optional content are, the earlier the display sequence is.
In another possible implementation manner, the determining the target attribute corresponding to each target field includes:
if the target field corresponds to an optional attribute, automatically determining that the optional attribute is the target attribute of the target field;
and if the target field corresponds to at least two optional attributes, displaying the at least two optional attributes, and determining the target attribute based on the feedback of the user, wherein the more the historical use times of the optional attributes are, the more the display sequence is.
In another possible implementation manner, the apparatus further includes a second acquisition module and a second determination module, where,
the second acquisition module is used for acquiring a statistical instruction fed back by the user, wherein the statistical instruction is used for indicating to count the historical use times of the optional fields, the optional attributes or the optional contents in any time period;
and the second determining module is used for determining the historical use times of the optional fields, or the historical use times of the optional attributes, or the historical use times of the optional contents based on the statistical instruction.
In another possible implementation manner, the apparatus further includes a third acquisition module and a third determination module, where,
The third acquisition module is used for acquiring the target content before and after the change corresponding to the target field when the target content corresponding to the target field is changed;
and the third determining module is used for determining an updating target field based on the pre-change target content and the post-change target content, and determining a linkage field of the updating target field and target content of the linkage field according to the updating target field.
In another possible implementation manner, the apparatus further includes a fourth acquisition module and a storage module, where,
a fourth obtaining module, configured to obtain a form generated by history;
and the storage module is used for storing different optional fields contained in the forms belonging to the same form type into the same field source set to obtain a form database containing at least one field source set.
In a third aspect, the present invention provides an electronic device comprising:
at least one processor and memory;
the memory stores computer-executable instructions;
the at least one processor executing computer-executable instructions stored in the memory causes the at least one processor to perform the dynamic form generation method of any of the first aspects above.
In a fourth aspect, the present invention provides a computer-readable storage medium having stored therein computer-executable instructions which, when executed by a processor, implement the dynamic form generating method according to any one of the first aspects above.
The application provides a method, a device, electronic equipment and a medium based on dynamic form generation, and the method provided by the application enables a user to select a field source set in a form database according to the form type when designing the form. At this time, the front-end interface displays each optional field according to the historical usage times of each optional field in the field source set, the user selects a target field based on the displayed optional field, determines the target component type and the target attribute of the target field, and displays the default content or the optional content corresponding to each target field. Finally, the user determines the target content based on the default content or the optional content, thereby completing the design of the form.
Through the method, when a certain type of form is generated, the user can autonomously add or delete the form field based on the requirement, and simultaneously, the field content, the field attribute and the form format can be autonomously set to generate the required form, so that the time for a developer to repeatedly develop a certain form is effectively saved, the workload of the developer is reduced, and the user experience is improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application.
FIG. 1a is a schematic flow chart of a dynamic form generating method according to an embodiment of the present application;
FIG. 1b is a schematic diagram of a front end interface for generating a dynamic form according to an embodiment of the present disclosure;
FIG. 2 is a second flow chart of a dynamic form generating method according to an embodiment of the present application;
FIG. 3 is a flowchart illustrating a dynamic form generating method according to an embodiment of the present application;
fig. 4 is a flow chart diagram of a dynamic form generating method according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a dynamic form generating device according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Specific embodiments thereof have been shown by way of example in the drawings and will herein be described in more detail. These drawings and the written description are not intended to limit the scope of the inventive concepts in any way, but to illustrate the concepts of the present application to those skilled in the art by reference to specific embodiments.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present application as detailed in the accompanying claims.
Forms are very important contents in webpage production, and input functions are realized in Web development. The user can enter data and edit data in the webpage through the form. Such as logging in, registering, modifying passwords, editing material, etc. Currently, there are two common approaches to developing forms: one by way of configuration code and one by way of component assembly. Specifically, a form generated by configuring a code is called a dynamic form; the form generated by the combination of the components is called a general form.
Wherein dynamic forms are generally only suitable for forms having relatively fixed business requirements and UIs, e.g., types of input controls are relatively fixed, UIs and layouts are relatively uniform. In some projects, list field dynamization is often needed, and a plurality of problems exist when the existing dynamic forms are adopted, and the following exemplary common situations are listed:
1. The cascading problem in dynamic forms often relies on front-end driving. For example: the third level of the province district links downwards, the province is selected, and the urban district is inquired and filtered by the triggering event; the city is selected and the triggering event queries the region for filtering. Linkage is performed in the same way, and the region is selected, so that the query and filtration belongs to the city and province. If the dynamic form is added with other linkages, the front end code needs to be modified, the drive is triggered, and query filtering is performed. And the linkage of the fields modifies the configuration, the front end needs to continuously modify codes to adapt, and the development and operation cost is high.
2. Drop down option interface problem. Existing dynamic form drop-down values are often queried from databases based on field names or other unique identifiers, and corresponding background interface addresses are unique. If the drop-down option of a "region" field is changed to the drop-down value of "country", the front end is often required to change the query interface corresponding to the background, the front end is required to modify the code, and the workload of front end operation and maintenance is very great.
3. The field problem, the field of the existing dynamic form has no standardization according to the service requirement. For example: a dynamic form field table is created, what service data each field corresponds to, the corresponding association of the fields and the corresponding relation of the services are required to be developed and combed by the services, and a certain workload is consumed.
4. The layout is heavy and inflexible, almost every field on the page needs to be configured, and the operation of a user is complex and unfriendly to the user.
In summary, the existing dynamic forms have insufficient flexibility, so for different business process requirements, developers are sometimes required to perform repeated development, the workload is increased, thereby being unfavorable for improving the efficiency of form development, and meanwhile, users cannot interact with a front-end interface in a friendly way, thereby being unfavorable for improving the user experience.
Fig. 1a is a schematic flow chart of a dynamic form generating method according to an embodiment of the present application. Some embodiments of the present application are described in detail below in conjunction with fig. 1 a. In the case where the embodiments do not conflict, the following embodiments and features in the embodiments may be combined with each other.
As shown in fig. 1a, the method in the present embodiment may include step S101, step S102, step S103, and step S104, wherein,
step S101, a field source set selected by a user from a form database is displayed.
The field source set comprises different optional fields contained in each form of the same form type generated in a history mode, and the field source set corresponds to the form type one by one.
Exemplary, fig. 1b is a schematic diagram of a front-end interface for dynamic form generation according to an embodiment of the present application. As shown in fig. 1b, when the user needs to build the item table, a field source set corresponding to the item table is selected from the form database as a field source of the item table. After the user selects the field source set, the front-end interface presents the optional fields included in the field source set. Alternatively, the various optional fields may be presented on the left side of the front-end interface.
Step S102, a target field fed back by a user based on the optional field is acquired.
Wherein the target field belongs to the optional field proposed in step S101. The user selects the target field based on the selectable fields included in the source set of fields presented by the front-end interface. Specifically, the optional field selected by the user is taken as the target field.
Alternatively, in fig. 1b, the user selecting a certain optional field as the target field may be implemented by: the user double clicks on a certain optional field, and a certain optional field is automatically added to the form page on the right side of the presentation page where the optional field is located as shown in fig. 1 b. It can also be realized by the following ways: the user drags a certain selectable field to the form page on the right side of the presentation page where the selectable field is located as shown in fig. 1 b.
Step S103, determining a dynamic form format based on the target field, and displaying the dynamic form content based on the target field and the dynamic form format.
Wherein the dynamic form content includes selectable content and default content.
Specifically, a dynamic form format is first determined based on the target fields of the user feedback, wherein the dynamic form format includes a layout format of each target field and also includes an overall layout format of all target fields. And displaying optional content or default content on the front-end interface based on the layout format of each target field and the target fields.
Step S104, generating a dynamic form based on the target field, the dynamic form format and target content determined by the user based on the displayed dynamic form content.
Specifically, after the target field, the dynamic form format and the dynamic form content are determined, the dynamic form is generated.
Through the method provided by the embodiment, when a user needs to design a form, firstly, a corresponding field source set is selected in the form database according to the form type, and at this time, selectable fields included in the field source set are displayed on a front-end interface for the user to select. The user generates the target field in the form page by double clicking or dragging the selectable field of the target selection. And secondly, determining the layout format of each target field and the layout formats of all the target fields through the target fields by a user, and displaying default contents or optional contents of the target fields according to the target fields and the formats thereof in the form page. Finally, the user determines the contents of the form according to the default contents or the optional contents, thereby completing the design of the form.
In the process, the user can add fields to the form page automatically according to the type of the required form, and the format of the form and the layout of the form are designed automatically, so that the time for repeatedly developing a form of a certain type to obtain a target form is saved, the workload of developers is further reduced, and the user experience is improved.
Fig. 2 is a second flowchart of a dynamic form generating method according to an embodiment of the present application. Some embodiments of the present application are described in detail below in conjunction with fig. 2. Specifically, the embodiment further describes in detail the manner of determining the field source set of the form field, the target field of the form, and the corresponding target attribute and target content.
As shown in fig. 2, the method provided in this embodiment includes step S201, step S202, step S203, step S204, step S205, step S206, step S207, and step S208, wherein,
step S201, a form generated by history is acquired.
Step S202, different optional fields contained in the form belonging to the same form type are stored in the same field source set, so as to obtain a form database containing at least one field source set.
Specifically, the forms created by the history are acquired, and each form is firstly classified according to the form type, and each type of form is used for obtaining a field source set. When determining the optional fields in each field source set, firstly, storing the fields included in one form in a certain type of forms as optional fields in the field source set, and secondly, searching the fields which are different from the stored optional fields in other forms in the type of forms as optional fields in the field source set until all forms in the type are searched. And carrying out the operation on each type of form to finally obtain a form database.
In step S203, each of the optional fields is ordered based on the historical number of uses of each of the optional fields included in the field source set selected by the user.
Specifically, the number of times each optional field is used by the user history is counted, and after the user selects the field source set, each optional field in the field source set is ordered based on the historical number of times each optional field is used.
Step S204, based on the ordering of the optional fields, optional fields included in the field source set are displayed.
Specifically, the top-ranked optional fields are preferentially presented. Illustratively, in FIG. 1b, the number of historical uses of the optional field "name" is greater than the number of historical uses of the optional field "creation time", and the optional field "name" is ranked before the optional field "creation time" when the optional fields are ranked, so that the optional field "name" is preferentially presented when presenting the optional fields of the item table.
In step S205, a target field fed back by the user based on the optional field is acquired.
Specifically, the mode of the user feeding back the target field is as defined in step S102 in the foregoing embodiment, and may be double-click selection of the optional field or dragging of the optional field, which is not described in detail in this embodiment.
Step S206, determining the type of the target component and the target attribute corresponding to each target field.
The target component type comprises a text box and a drop-down box, and the target attribute is used for representing the layout and format of the text box or the drop-down box.
Specifically, after determining the target field, the component type is configured for the target field, for example, the component type configuring the target field 'name' is a text box, and the component type configuring the target field 'item initiator' is a drop-down box, wherein the drop-down box can be a selection input or a keyboard input.
Optionally, if the target field corresponds to one optional attribute, automatically determining that the optional attribute is the target attribute of the target field, if the target field corresponds to at least two optional attributes, displaying the at least two optional attributes, and determining the target attribute based on feedback of a user, wherein the more the historical use times of the optional attributes are, the more the display sequence is.
As shown in fig. 1b, after the user double-clicks or drags the target field to the form page, a configuration panel is displayed on the right side of the form page in the front-end interface, where the upper half of the configuration panel is used for the user to select a component type, and the lower half of the configuration panel is used for the user to configure the layout of the target field.
After the electronic equipment acquires the target component type of the target field selected by the user, determining the next execution step according to the target component type of the target field.
In step S207, if the target component type of the target field is a text box, the default content is displayed based on the target field.
The default content is a filling instruction or a target content corresponding to a target field, optionally, for the target field "company name", the default content may be "not simply called" or may be "XXX finite company", when the user clicks the text box, a pop-up prompt is "whether to directly input the XXX finite company", if the user selects yes, the "XXX finite company" is automatically filled, if the user selects no, the "XXX finite company" is automatically cleared, and the "not simply called" is displayed by default.
In step S208, if the target component type of the target field is a drop-down box, the selectable content is displayed based on the target field, and the user determines the target content based on the selectable content.
Wherein, the more the historical use times of the selectable content, the earlier the display order.
Specifically, for each field, when storing the field, the historical use times of each piece of optional content corresponding to each field are counted, and for a target field with a component type of a drop-down frame, when a user clicks a drop-down arrow, the optional content ordered according to the historical use times can be seen, and the optional content with the highest historical use times is ranked first.
The user selects the target content based on the displayed selectable content, wherein the mode of selecting the target content by the user can be clicking the corresponding selectable content. When the target content is not seen in the displayed selectable content, the user can input the corresponding target content in the drop-down box.
According to the method provided by the embodiment, the historically generated forms are obtained, the fields included in each form are stored according to the different form types, at least one field source set corresponding to the form types one by one is obtained, and at least one field source set forms a form database. Wherein, different fields contained in the same type of form are optional fields in the field source set corresponding to the type of form.
Based on this, when designing the form, the user can autonomously select the field source set according to the form type, i.e. the service requirement. After the user selects the field source set, the front-end interface displays each optional field according to the historical use times of each optional field in the field source set, namely, the optional field with the highest historical use times is preferentially displayed. After the user selects the target field, the front-end interface displays a configuration panel on the right side of the form page, and the user configures the target component type of the target field and the attribute of the target field through the configuration panel. Finally, for a target field with a text box as a target component type, determining target content according to default content by a user; and for the target field with the target component type of the drop-down frame, selecting target content according to selectable content displayed by the form page according to the historical use times by a user, thereby completing the design of the form.
Through the method, when a user designs the form, the user can autonomously select the required target field, the required target component type and the required target content, and the form does not need to be repeatedly opened according to different service requirements, so that the workload of a developer is effectively reduced, and meanwhile, the flexibility of the dynamic form is enhanced.
Fig. 3 is a flowchart illustrating a dynamic form generating method according to an embodiment of the present application. Some embodiments of the present application are described in detail below in conjunction with fig. 3. Specifically, the present embodiment focuses on the manner in which the optional fields, optional attributes, and the historical number of uses of optional content are determined.
As shown in fig. 3, the method provided in this embodiment includes step S301 and step S302, wherein,
in step S301, a statistics instruction fed back by the user is obtained, where the statistics instruction is used to instruct statistics of the historical usage times of the optional fields, or the optional attributes, or the optional contents in any time period.
Step S302, based on the statistical instruction, the historical use times of the optional fields, or the historical use times of the optional attributes, or the historical use times of the optional contents are determined.
Specifically, the user may autonomously select a time period, and after the selection, the electronic device will count the historical number of uses of the optional fields in the source set of each field, the historical number of uses of the optional attribute of the target field, and the historical number of uses of the optional content based on the selected time period.
For example, if any user wants to treat the last month as a statistics period, the electronic device will count the historical number of uses of the optional fields, optional components, or optional content in the last month. If another user considers recent statistics to be more valuable as a reference, the electronic device will count the historical number of uses of each optional field, optional component, or optional content in the last week.
According to the method provided by the embodiment, the user can set the statistical time independently, the statistical instruction is issued to the electronic equipment based on the statistical time, and the electronic equipment performs data statistics according to the statistical instruction. By the method, the data with high reference value can be counted according to the user demand, so that the content which the user wants to see is firstly shown to the user, and the user experience is improved.
Fig. 4 is a flowchart of a dynamic form generating method according to an embodiment of the present application. Some embodiments of the present application are described in detail below in conjunction with fig. 4. Specifically, the present embodiment focuses on the case where the current field is changed.
As shown in fig. 4, the method provided in this embodiment includes step S401 and step S402, wherein,
In step S401, when the target content corresponding to the target field is changed, the target content before the change and the target content after the change corresponding to the target field are obtained.
Step S402, based on the target content before and after the change, determining an update target field, and determining a linkage field of the update target field and the target content of the linkage field according to the update target field.
Specifically, the change of the target content corresponding to the target field may be that the user selects other optional contents in the drop-down frame corresponding to the target field, where the other optional contents at this time all correspond to the current target field. Other optional content may also be entered by the user in the drop-down box corresponding to the target field, where the optional content includes, but is not limited to, the optional content corresponding to the current target field.
Based on the above discussion, when the target content corresponding to the target field is changed, the pre-change target content and the post-change target content corresponding to the target field need to be acquired. If the target field corresponding to the target content before the change is consistent with the target field corresponding to the target content after the change, the target field is not required to be changed. At this time, the lower level operation field of the target field and/or the optional content corresponding to the lower level operation field need to be determined. If the target field corresponding to the target content before and after the change is inconsistent, the linkage field associated with the target field needs to be determined based on the target content before the change, and the update target field and the linkage field of the update target field need to be determined based on the target content after the change. Finally, the electronic device determines optional contents corresponding to the linkage field of the update target field, and displays the optional contents according to the rules of the foregoing embodiment.
For example, if the current target field is "province", and the corresponding current target content is "province a", when the current target content is changed from "province a" to "province B", the electronic device first obtains the pre-change target content of the target field, which is "province a", and obtains the post-change target content, which is "province B", and it is known that the pre-change target content is consistent with the target field corresponding to the post-change target content, so the electronic device may determine that the post-update target field is still "province" without changing the target field. Correspondingly, the downlink dynamic field of the target field is still "city", and only the optional content corresponding to the "region" of the downlink dynamic field needs to be updated.
If the current target field is "province", and the corresponding current target content is "a province", when the current target content is changed from "a province" to "A1 city", the electronic device first obtains the pre-change target content of the target field as "a province", and the obtained post-change target content is "A1 city", and the electronic device may determine that the current target field is "province" based on the pre-change target content, and determine that the updated target field of the current target field is "city" based on the post-change target content, where it is known that the pre-change target content is inconsistent with the target field corresponding to the post-change target content. The electronic device determines a linkage field associated with the current target field, that is, an upper linkage field "country", a lower linkage field "city", "region", "town", and the like, based on the pre-change target content. And determining that the update target field is 'city' based on the changed target content, wherein the upper-level dynamic field of the update target field is 'country', 'province', and the lower-level dynamic field is 'region', 'village and town'. The electronic device displays corresponding optional content or default content based on the upper-layer linkage field and the lower-layer linkage field of the determined updating target, wherein the corresponding default content of the upper-layer linkage field is 'country', 'province' respectively.
According to the method provided by the embodiment, when the user adjusts the target field or the target content in the form page, the electronic equipment can automatically adjust the linkage field related to the target field and the optional content or the default content thereof, so that the time for the user to adjust one by one is saved, and the user experience is improved.
The above embodiments describe a dynamic form generating method from the viewpoint of a method flow, and the following embodiments describe a dynamic form generating device from the viewpoint of a virtual module or a virtual unit, which are specifically described in the following embodiments.
The embodiment of the application provides a dynamic form generating device, as shown in fig. 5, which includes a display module 51, a first obtaining module 52, a first determining module 53, and a generating module 54, wherein,
the display module 51 is configured to display a field source set selected by a user from the form database, where the field source set includes different optional fields included in a form of the same form type generated in a history; the method comprises the steps of carrying out a first treatment on the surface of the
A first obtaining module 52, configured to obtain a target field that is fed back by a user based on an optional field;
a first determining module 53, configured to determine a dynamic form format based on the target field, and display dynamic form contents based on the target field and the dynamic form format, where the dynamic form contents include optional contents and default contents;
The generating module 54 is configured to generate a dynamic form based on the target field, the dynamic form format, and the dynamic form content.
In another possible implementation manner of the embodiment of the present application, the display module 51 is specifically configured to:
sorting each of the selectable fields based on the historical number of uses of each of the selectable fields; the more the historical use times of the optional fields, the earlier the ranking;
based on the ordering of the optional fields, optional fields included in the field source set are presented; wherein the top-ranked optional fields are preferentially presented.
In another possible implementation manner of the embodiment of the present application, the first determining module is specifically configured to:
determining a target component type and a target attribute corresponding to each target field, wherein the target component type comprises a text box and a drop-down box, and the target attribute is used for representing the layout and the format of the text box or the drop-down box;
if the target component type of the target field is a text box, displaying default content based on the target field, wherein the default content is filling instruction or target content corresponding to the target field;
and if the target component type of the target field is a drop-down box, displaying the optional content based on the target field, and determining the target content by the user based on the optional content, wherein the more the historical use times of the optional content are, the more the display sequence is.
In another possible implementation manner of the embodiment of the present application, determining a target attribute corresponding to each target field includes:
if the target field corresponds to one optional attribute, automatically determining that the optional attribute is the target attribute of the target field;
and if the target field corresponds to at least two optional attributes, displaying the at least two optional attributes, and determining the target attribute based on feedback of a user, wherein the more the historical use times of the optional attributes are, the more the display sequence is.
In another possible implementation manner of the embodiment of the present application, the apparatus further includes a second acquisition module and a second determination module, where,
the second acquisition module is used for acquiring a statistical instruction fed back by a user, wherein the statistical instruction is used for indicating to count the historical use times of optional fields, optional attributes or optional contents in any time period;
and the second determining module is used for determining the historical use times of the optional fields, the historical use times of the optional attributes or the historical use times of the optional contents based on the statistical instruction.
In another possible implementation manner of the embodiment of the present application, the apparatus further includes a third obtaining module and a third determining module, where,
The third acquisition module is used for acquiring the target content before the change and the target content after the change, which correspond to the target field, when the target content corresponding to the target field is changed;
and the third determining module is used for determining an updating target field based on the pre-change target content and the post-change target content and determining a linkage field of the updating target field and target content of the linkage field according to the updating target field.
In another possible implementation manner of the embodiment of the present application, the apparatus further includes a fourth obtaining module and a storage module, where,
a fourth obtaining module, configured to obtain a form generated by history;
and the storage module is used for storing different optional fields contained in the forms belonging to the same form type into the same field source set to obtain a form database containing at least one field source set.
In this embodiment of the present application, the first acquiring module 52, the second acquiring module, and the third acquiring module may be the same first acquiring module, may also be different first acquiring modules, or may also be partially identical first acquiring modules. The first determining module 53, the second determining and taking module, and the third determining module may be the same first determining module, may be different first determining modules, or may be partially the same first determining module, which is not limited in this embodiment of the present application.
The dynamic form generating device provided in the embodiment of the present application is applicable to the above method embodiment, and is not described herein again.
In an embodiment of the present application, as shown in fig. 6, an electronic device shown in fig. 6 includes: a processor 61 and a memory 62. Wherein the processor 61 is coupled to the memory 62, such as via a bus 63. Optionally, the electronic device may also include a transceiver 64. It should be noted that, in practical applications, the transceiver 64 is not limited to one, and the structure of the electronic device is not limited to the embodiment of the present application.
The processor 61 may be a central processor 61 (Central Processing Unit, CPU), general purpose processor 61, data signal processor 61 (Digital Signal Processor, DSP), application specific integrated circuit (Application Specific Integrated Circuit, ASIC), field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic device, transistor logic device, hardware components, or any combination thereof. Which may implement or perform the various exemplary logic blocks, modules, and circuits described in connection with this disclosure. The processor 61 may also be a combination that implements computing functionality, such as a combination comprising one or more microprocessors 61, a combination of a DSP and a microprocessor 61, or the like.
Bus 63 may include a path to transfer information between the aforementioned components. The bus 63 may be a peripheral component interconnect standard (Peripheral Component Interconnect, PCI) bus 63, or an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus 63, among others. The bus 63 may be divided into an address bus 63, a data bus 63, a control bus 63, and the like. For ease of illustration, only one thick line is shown in fig. 6, but not only one bus 63 or one type of bus 63.
The Memory 62 may be, but is not limited to, a Read Only Memory 62 (ROM) or other type of static storage device that can store static information and instructions, a random access Memory 62 (Random Access Memory, RAM) or other type of dynamic storage device that can store information and instructions, or an electrically erasable programmable Read Only Memory 62 (Electrically Erasable Programmable Read Only Memory, EEPROM), a compact disc Read Only Memory (Compact Disc Read Only Memory, CD-ROM) or other optical disk storage, optical disk storage (including compact discs, laser discs, optical discs, digital versatile discs, blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer.
The memory 62 is used for storing application program codes for executing the present application and is controlled to be executed by the processor 61. The processor 61 is arranged to execute application code stored in the memory 62 for implementing what is shown in the previous method embodiments.
Among them, electronic devices include, but are not limited to: mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, personal Digital Assistants (PDAs), tablet computers (PADs), portable Multimedia Players (PMPs), in-vehicle terminals (e.g., in-vehicle navigation terminals), and the like, and stationary terminals such as digital TVs, desktop computers, and the like. But may also be a server or the like. The electronic device shown in fig. 6 is merely an example and should not be construed to limit the functionality and scope of use of the disclosed embodiments.
The present application provides a computer readable storage medium having a computer program stored thereon, which when run on a computer, causes the computer to perform the corresponding method embodiments described above.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the application following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the application pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
It is to be understood that the present application is not limited to the precise arrangements and instrumentalities shown in the drawings, which have been described above, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the application is limited only by the appended claims.

Claims (10)

1. A method for generating a dynamic form, comprising:
displaying a field source set selected by a user from a form database, wherein the field source set comprises different selectable fields contained in a form of the same form type generated in a history manner;
acquiring a target field fed back by the user based on the optional field;
determining a dynamic form format based on the target field, and displaying dynamic form contents based on the target field and the dynamic form format, wherein the dynamic form contents comprise selectable contents and default contents;
and generating a dynamic form based on the target field, the dynamic form format and target content determined by the user based on the displayed dynamic form content.
2. The method of claim 1, wherein the presenting the user selected field source set from the form database comprises:
sorting each optional field based on the historical usage times of each optional field; the more the historical use times of the optional fields are, the earlier the ordering is;
Based on the ordering of the optional fields, optional fields included in the field source set are displayed; wherein the top-ranked optional fields are preferentially presented.
3. The method of claim 2, wherein the dynamic form format includes a target component type and a target attribute, wherein the determining the dynamic form format based on the target field and displaying dynamic form content based on the target field and the dynamic form format comprises:
determining a target component type and a target attribute corresponding to each target field, wherein the target component type comprises a text box and a drop-down box, and the target attribute is used for representing the layout and the format of the text box or the drop-down box;
if the target component type of the target field is a text box, displaying default content based on the target field, wherein the default content is a filling instruction or target content corresponding to the target field;
and if the target component type of the target field is a drop-down box, displaying optional content based on the target field, and determining the target content by the user based on the optional content, wherein the more the historical use times of the optional content are, the earlier the display sequence is.
4. The method of claim 3, wherein determining the target attribute corresponding to each of the target fields comprises:
if the target field corresponds to an optional attribute, automatically determining that the optional attribute is the target attribute of the target field;
and if the target field corresponds to at least two optional attributes, displaying the at least two optional attributes, and determining the target attribute based on the feedback of the user, wherein the more the historical use times of the optional attributes are, the more the display sequence is.
5. The method according to claim 4, wherein the method further comprises:
acquiring a statistical instruction fed back by the user, wherein the statistical instruction is used for indicating to count the historical use times of the optional fields, the optional attributes or the optional contents in any time period;
and determining the historical use times of the optional fields, or the historical use times of the optional attributes, or the historical use times of the optional contents based on the statistical instruction.
6. The method of claim 3, wherein when at least one linkage field exists for the target field, the method further comprises:
When the target content corresponding to the target field is changed, acquiring the target content before and the target content after the change corresponding to the target field;
and determining an update target field based on the pre-change target content and the post-change target content, and determining a linkage field of the update target field and target content of the linkage field according to the update target field.
7. The method of claim 1, wherein prior to the presenting the user selected field source set from the form database, the method further comprises:
acquiring a form generated by history;
and storing different optional fields contained in the forms belonging to the same form type into the same field source set to obtain a form database containing at least one field source set.
8. A dynamic form generating apparatus, comprising:
the display module is used for displaying a field source set selected by a user from the form database, wherein the field source set comprises different selectable fields contained in a form of the same form type generated in a history manner;
the first acquisition module is used for acquiring a target field fed back by the user based on the optional field;
The first determining module is used for determining a dynamic form format based on the target field and displaying dynamic form contents based on the target field and the dynamic form format, wherein the dynamic form contents comprise selectable contents and default contents;
and the generation module is used for generating a dynamic form based on the target field, the dynamic form format and the dynamic form content.
9. An electronic device, comprising: at least one processor and memory;
the memory stores computer-executable instructions;
the at least one processor executing computer-executable instructions stored in the memory causes the at least one processor to perform the dynamic form generation method of any of claims 1-7.
10. A computer readable storage medium having stored therein computer executable instructions which when executed by a processor are for implementing the dynamic form generating method of any of claims 1-7.
CN202211190837.8A 2022-09-28 2022-09-28 Dynamic form generation method, device, electronic equipment and medium Pending CN116048499A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211190837.8A CN116048499A (en) 2022-09-28 2022-09-28 Dynamic form generation method, device, electronic equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211190837.8A CN116048499A (en) 2022-09-28 2022-09-28 Dynamic form generation method, device, electronic equipment and medium

Publications (1)

Publication Number Publication Date
CN116048499A true CN116048499A (en) 2023-05-02

Family

ID=86116967

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211190837.8A Pending CN116048499A (en) 2022-09-28 2022-09-28 Dynamic form generation method, device, electronic equipment and medium

Country Status (1)

Country Link
CN (1) CN116048499A (en)

Similar Documents

Publication Publication Date Title
JP7420861B2 (en) System and method for website building system server
US7895179B2 (en) Asynchronous updating of web page data views
US20120109951A1 (en) Providing Search Results For Mobile Computing Devices
CN110727431A (en) Applet generation method and apparatus
US9280327B2 (en) Simplifying development of user interfaces of applications
US10387003B2 (en) User interface with runtime selection of views
JP2009037602A (en) Method and system for providing navigable search result
US20170177706A1 (en) Category-Based Search System and Method for Providing Application Related Search Results
US20170177385A1 (en) Interactive Hotspot Highlighting User Interface Element
CN114741079B (en) Software development method, platform, electronic device and computer readable storage medium
CN114282129A (en) Information system page generation method, system, electronic equipment and storage medium
CN116719457A (en) Information display method, device and equipment
CN115617338A (en) Method and device for quickly generating service page and readable storage medium
CN116048499A (en) Dynamic form generation method, device, electronic equipment and medium
CN110968311B (en) Front-end page construction method and device and electronic equipment
CN111740850A (en) Group chat creating method and device, electronic equipment and readable storage medium
CN113626032A (en) List page configuration method and device and storage medium
CN112905178A (en) Method, device, equipment and medium for generating business function page
US20160306513A1 (en) Relevancy-Based Smart Page Navigation Within Application Interface
CN116739612B (en) Method for displaying rights and interests information and electronic equipment
CN114741064B (en) Page generation method, device and system and storage medium
CN117573090A (en) Construction method, system and storage medium of application system
CN116661765A (en) Interface generation system and interface generation method
CN115408422A (en) Data template generation method and device
CN112597266A (en) Editor generation method and processing method for processing game template data

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination