CN110837366A - Form generation method, electronic device and computer readable storage medium - Google Patents

Form generation method, electronic device and computer readable storage medium Download PDF

Info

Publication number
CN110837366A
CN110837366A CN201910970600.3A CN201910970600A CN110837366A CN 110837366 A CN110837366 A CN 110837366A CN 201910970600 A CN201910970600 A CN 201910970600A CN 110837366 A CN110837366 A CN 110837366A
Authority
CN
China
Prior art keywords
control
controls
user
preset
sequence
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
CN201910970600.3A
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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen 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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201910970600.3A priority Critical patent/CN110837366A/en
Publication of CN110837366A publication Critical patent/CN110837366A/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/34Graphical or visual programming
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The invention relates to the technical field of data processing, and discloses a form generation method, an electronic device and a computer readable storage medium. The method comprises the following steps: the method comprises the steps of sorting controls in a control library according to associated form types respectively according to a preset algorithm and a preset rule, displaying the sorted controls associated with the newly-built form types in a preset area of an initial form in a preset mode when a request of a user for newly building the form is received, and generating a new form for a position where the controls are configured through dragging operation according to the controls selected by the user and the user. The invention realizes the user-defined form creation and improves the operation flexibility and expansibility.

Description

Form generation method, electronic device and computer readable storage medium
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a form generation method, an electronic apparatus, and a computer-readable storage medium.
Background
With the rapid development of information technologies such as internet, big data and the like, more and more workflow applications appear in management systems of various industries, and forms such as purchase forms, sales forms, combination forms and the like are required for the workflow applications. At present, the method for generating the form in the industry is customized according to the requirements of users, the front end renders, the rear end defines the form and sets a corresponding interface, the development of professional software developers is needed, the users cannot create the form by themselves, the operability is poor, and the method is not beneficial to expanding the application.
Disclosure of Invention
In view of the above, there is a need to provide a form generation method, which aims to achieve user-defined form creation and improve operation flexibility and expansibility.
The form generation method provided by the invention comprises the following steps:
a sorting step: respectively sequencing the controls in the control library according to the associated form types according to a preset algorithm and a preset rule;
a creating step: responding to a request of a user for building a new form, building an initial form according to the request, and displaying the initial form in a first preset area of a display interface of the electronic device, wherein the request for building the new form comprises a form type;
a display step: acquiring a sorted control associated with the form type of the initial form from the control library, and displaying the associated sorted control in a second preset area of the display interface in a preset manner for a user to select a control from the second preset area;
a receiving step: receiving a control selected by a user, and configuring the control at a corresponding position of the initial form according to the dragging operation of the user on the selected control;
a generation step: and generating a new form according to the control selected by the user and the position of the control on the initial form, and storing the generated new form in a database.
Optionally, the preset algorithm is a merging algorithm, the preset rule is a sequence of sorting according to calling frequency from high to low, and sorting the controls in the control library according to the preset algorithm and the preset rule according to the associated form types includes:
a1, acquiring form types corresponding to all controls in a control library and the called times of all controls in a first preset time period;
a2, filling the name and calling times of each control into a sequence in a preset format according to the associated form type;
a3, averagely dividing the sequence into a plurality of subsequences each of which contains a preset number of controls;
a4, merging the adjacent subsequences into a sequence, comparing the calling times of all controls contained in the merged sequence, and sequencing the controls in each merged sequence according to the sequence of the calling times of the controls from high to low;
and A5, repeatedly executing the step A4 until all the controls in the merged sequence are sorted according to the calling times of the controls from high to low.
Optionally, before the generating step, the form generating method further includes:
responding to the operation of a user, and adjusting the attribute information of the control;
and responding to the operation of the user, and adjusting the display position of the control on the initial form.
Optionally, after the generating step, the form generating method further includes:
and responding to a request of a user for calling a new form, and sending the new form in the database to the user.
Optionally, the form generation method further includes:
and updating the control with the attribute information adjusted in each form in the database to the control library every second preset time.
To achieve the above object, the present invention also provides an electronic device, including: a memory, a processor, the memory having stored thereon a form generation program executable on the processor, the form generation program when executed by the processor implementing the steps of:
a sorting step: respectively sequencing the controls in the control library according to the associated form types according to a preset algorithm and a preset rule;
a creating step: responding to a request of a user for building a new form, building an initial form according to the request, and displaying the initial form in a first preset area of a display interface, wherein the request for building the new form comprises a form type;
a display step: acquiring a sorted control associated with the form type of the initial form from the control library, and displaying the associated sorted control in a second preset area of the display interface in a preset manner for a user to select a control from the second preset area;
a receiving step: receiving a control selected by a user, and configuring the control at a corresponding position of the initial form according to the dragging operation of the user on the selected control;
a generation step: and generating a new form according to the control selected by the user and the position of the control on the initial form, and storing the generated new form in a database.
Optionally, the preset algorithm is a merging algorithm, the preset rule is a sequence of sorting according to calling frequency from high to low, and sorting the controls in the control library according to the preset algorithm and the preset rule according to the associated form types includes:
a1, acquiring form types corresponding to all controls in a control library and the called times of all controls in a first preset time period;
a2, filling the name and calling times of each control into a sequence in a preset format according to the associated form type;
a3, averagely dividing the sequence into a plurality of subsequences each of which contains a preset number of controls;
a4, merging the adjacent subsequences into a sequence, comparing the calling times of all controls contained in the merged sequence, and sequencing the controls in each merged sequence according to the sequence of the calling times of the controls from high to low;
and A5, repeatedly executing the step A4 until all the controls in the merged sequence are sorted according to the calling times of the controls from high to low.
Optionally, when executed by the processor, the form generating program further implements, before the generating step, the steps of:
responding to the operation of a user, and adjusting the attribute information of the control;
and responding to the operation of the user, and adjusting the display position of the control on the initial form.
Optionally, when executed by the processor, the form generation program further implements the following steps after the generating step:
and responding to a request of a user for calling a new form, and sending the new form in the database to the user.
The present invention also provides a computer-readable storage medium having stored thereon a form generation program executable by one or more processors to implement any of the steps of the above-described form generation method.
Compared with the prior art, the method and the device have the advantages that the controls in the control library are respectively sorted according to the associated form types according to the preset algorithm and the preset rule, when a request of a user for building a new form is received, the sorted controls associated with the newly built form type are displayed in the preset area of the initial form in a preset mode, and the new form is generated according to the control selected by the user and the position configured for the control by the user through dragging operation. The invention realizes the user-defined form creation and improves the operation flexibility and expansibility.
Drawings
FIG. 1 is a diagram of an electronic device according to an embodiment of the invention;
FIG. 2 is a block diagram of one embodiment of the form generation program of FIG. 1;
FIG. 3 is a flowchart of a form generation method according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the description relating to "first", "second", etc. in the present invention is for descriptive purposes only and is not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In addition, technical solutions between various embodiments may be combined with each other, but must be realized by a person skilled in the art, and when the technical solutions are contradictory or cannot be realized, such a combination should not be considered to exist, and is not within the protection scope of the present invention.
The invention provides an electronic device 1. Fig. 1 is a schematic diagram of an electronic device 1 according to an embodiment of the invention. The electronic apparatus 1 is a device capable of automatically performing numerical calculation and/or information processing in accordance with a command set or stored in advance. The electronic device 1 may be a computer, or may be a single network server, a server group composed of a plurality of network servers, or a cloud composed of a large number of hosts or network servers based on cloud computing, where cloud computing is one of distributed computing and is a super virtual computer composed of a group of loosely coupled computers.
In the present embodiment, the electronic device 1 includes, but is not limited to, a memory 11, a processor 12, a network interface 13 and a display unit 14 which are communicatively connected to each other through a system bus, the memory 11 stores therein a form generation program 10, a control library 111 and a database 112, the form generation program 10 is executable by the processor 12, the control library 111 is used for storing various types of controls, and the database 112 is used for storing a user new form. While fig. 1 shows only the electronic device 1 with the components 11-14 and the form generation program 10, the control library 111, the database 112, it will be understood by those skilled in the art that the structure shown in fig. 1 does not constitute a limitation of the electronic device 1, and may include fewer or more components than shown, or combine certain components, or a different arrangement of components.
The storage 11 includes a memory and at least one type of readable storage medium. The memory provides cache for the operation of the electronic device 1; the readable storage medium may be a non-volatile storage medium such as flash memory, a hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Read Only Memory (ROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a Programmable Read Only Memory (PROM), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the readable storage medium may be an internal storage unit of the electronic apparatus 1, such as a hard disk of the electronic apparatus 1; in other embodiments, the non-volatile storage medium may also be an external storage device of the electronic apparatus 1, such as a plug-in hard disk provided on the electronic apparatus 1, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like. In this embodiment, the readable storage medium of the memory 11 is generally used for storing an operating system and various application software installed in the electronic device 1, such as code of the form generation program 10 in an embodiment of the present invention. Further, the memory 11 may also be used to temporarily store various types of data that have been output or are to be output.
Processor 12 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data Processing chip in some embodiments. The processor 12 is generally used for controlling the overall operation of the electronic apparatus 1, such as performing control and processing related to data interaction or communication with other devices. In this embodiment, the processor 12 is configured to run the program code stored in the memory 11 or process data, for example, run the form generation program 10.
The network interface 13 may comprise a wireless network interface or a wired network interface, and the network interface 13 is used for establishing a communication connection between the electronic device 1 and a client (not shown).
The display unit 14 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, or the like in some embodiments. The display unit 14 is used for displaying information processed in the electronic apparatus 1 and for displaying a visualized user interface.
In the embodiment of the apparatus shown in fig. 1, the memory 11 as a computer storage medium includes a form generation program 10, and the processor 12 implements the following sorting step, creating step, presenting step, receiving step, and generating step when executing the form generation program 10 stored in the memory 11.
A sorting step: and respectively sequencing the controls in the control library 111 according to the associated form types according to a preset algorithm and a preset rule.
In this embodiment, the control library 111 is used for storing control information, including the type of the control and the attribute information of the control. The types of the controls comprise radio box controls, multi-box controls, input box controls, drop-down box controls, slider controls, date selection controls, upload controls and the like; the attribute information of the control comprises the name of the control, the size of the control, the color of the control and the like.
The form types can comprise purchase type forms, sales type forms, close type forms and the like, and each type of form comprises a plurality of controls in the above multiple types of controls. The embodiment establishes the association relationship between each type of form and various controls in advance. For example, the purchase class form includes an input box control "named buyer & base color gray & size 3 × 2", a date selection control "named purchase date & base color light blue & size 4 × 3", an upload control "named purchase item photo & base color white & size 8 × 8", and the like, the reimbursement class form includes an input box control "named reimbursement applicant & base color white & size 3 × 2", an input box control "named reimbursement amount & base color gray & size 3 × 2", an upload control "named invoice picture & base color white & size 6 × 3", and the like, and the association relationship is prestored in the control library 111.
In this embodiment, the preset rules are sorted from high to low according to the calling frequency, and in other embodiments, the preset rules may be sorted from near to far according to the creation date.
The preset algorithm is a merging algorithm.
The sorting the controls in the control library 111 according to the associated form types according to the preset algorithm and the preset rule includes:
a1, acquiring form types corresponding to the controls in the control library 111 and the number of times of the calls of the controls in a first preset time period (for example, the last half year).
For example, taking the form type as the purchase type form as an example, the number of calls of the input box control with the name of reimbursement applicant & under color white & size 3 × 2 is 75852, the number of calls of the input box control with the name of buyer & under color white & size 3 × 2 is 29818, the number of calls of the date selection control with the name of purchase date & under color light blue & size 4 × 3 is 58756, and the number of calls of the upload control with the name of purchase item photo & under color white & size 8 × 8 is 38192.
And A2, filling the name of each control and the calling times thereof into a sequence in a preset format according to the associated form type.
In this embodiment, the sequence of the preset format is { a 1: b1, a 2: b2, A3: b3, … … Ai: bi, wherein Ai represents the ith control, and Bi represents the calling times of the ith control. For example, the sequence of the purchase class form is { "input box control entitled buyer & base gray & size 3 x 2": 75852 "input box control with name buyer & base color white & size 3 x 2": 29818, "date selection control named date of purchase & bottom color light blue & size 4 x 3": 58756, "upload control named purchase item photo & undertone white & size 8 x 8": 38192 times }.
A3, averagely dividing the sequence into a plurality of subsequences each containing a preset number (for example, 2) of controls.
For example, the divided subsequences are: { A1: b1, a 2: b2}, { A3: b3, a 4: b4}, … …, { An-1: bn-1, An: bn }. If the number of the remaining controls is less than the preset number after the sequence is divided into a plurality of subsequences containing the preset number of controls, the remaining controls are put into a new subsequence, and the subsequence containing the preset number of controls can also be filled with default values in a filling mode.
And A4, merging the adjacent subsequences into a sequence, comparing the calling times of all controls contained in the merged sequence, and sequencing the controls in each merged sequence according to the sequence of the calling times of the controls from high to low.
And A5, repeatedly executing the step A4 until all the controls in the merged sequence are sorted according to the calling times of the controls from high to low.
A creating step: responding to a request of a user for newly building a form, building an initial form according to the request, and displaying the initial form in a first preset area of a display interface, wherein the request for newly building the form comprises a form type.
The request of the user for creating the new form may be triggered by a physical key provided by a hardware operation interface of the electronic apparatus 1, or may be triggered by a virtual key displayed on a human-computer interaction interface provided by the electronic apparatus 1. The initial form is a blank form. The type of the form included in the request can be determined by providing an input box to be displayed on the display interface for a user to input text; or by providing a drop-down box displayed on the display interface for the user to determine in which form type to select from the drop-down box.
The first preset area may be a left position of the initial form, or a right or lower position of the initial form.
A display step: and acquiring the sorted control associated with the form type of the initial form from the control library 111, and displaying the associated sorted control in a second preset area of the display interface in a preset manner, so that a user can select the control from the second preset area.
A receiving step: and receiving a control selected by a user, and configuring the control at a corresponding position of the initial form according to the dragging operation of the user on the selected control.
In this embodiment, the preset mode may be a pull-down frame mode, or may be a scroll display mode at preset time intervals (for example, every 10 seconds), and the second preset area is an area on the initial form that does not overlap with the first preset area.
For example, the user may drag and place a selected input box control "name buyer & bottom color gray & size 3 x 2", a date selection control "name purchase date & bottom color light blue & size 4 x 3", and the like at a selected position in the initial form.
A generation step: and generating a new form according to the control selected by the user and the position of the control on the initial form, and storing the generated new form in the database 112.
In one embodiment of the present invention, the form generation program 10 when executed by the processor 12 further performs the following steps prior to the generating step:
responding to the operation of a user, and adjusting the attribute information of the control;
and responding to the operation of the user, and adjusting the display position of the control on the initial form.
For example, in the present embodiment, after the control is placed on the initial form, the electronic apparatus 1 may adjust the name of the control and/or the size of the control by providing an input box for the user to input text, and may also adjust the display color of the control by providing a drop-down box for the user to display alternative colors from the drop-down box. In other embodiments, the user may also resize the control by dragging.
Meanwhile, the initially configured position of the control may not meet the requirements of the user, the user may adjust the position of a single control through a dragging operation, and may also perform one-key typesetting on all selected controls through a layout function of the layout of the control library display interface (for example, the typesetting manner of the one-key typesetting includes basic layout, column separation, mixed layout, column separation offset, and the like).
In another embodiment of the present invention, the form generation program 10 when executed by the processor 12 further performs the following steps after the generating step:
the new form in database 112 is sent to the user in response to a request from the user to invoke the new form.
In another embodiment of the present invention, the form generation program 10 when executed by the processor 12 further implements the steps of:
and updating the control with the adjusted attribute information in each form in the database 112 to the control library 111 every second preset time (for example, 1 month).
As can be seen from the foregoing embodiment, in the electronic apparatus 1 provided in the present invention, firstly, the controls in the control library 111 are sorted according to the associated form types according to the preset algorithm and the preset rule, when a request of a new form is received from a user, the sorted controls associated with the new form type are displayed in the preset area of the initial form in a preset manner, and a new form is generated for the position configured for the control by the drag operation according to the control selected by the user and the user. The invention realizes the user-defined form creation and improves the operation flexibility and expansibility.
Alternatively, in other embodiments, the form generation program 10 may be divided into one or more modules, and the one or more modules are stored in the memory 11 and executed by the one or more processors 12 to implement the present invention. The modules referred to herein are referred to as a series of computer program instruction segments capable of performing specified functions. Referring to FIG. 2, a block diagram of an embodiment of the form generation program 10 of FIG. 1 is shown. In one embodiment of the present invention, the form generation program 10 is divided into: a ranking module 110, a creation module 120, a presentation module 130, a receiving module 140, and a generation module 150. The functions or operation steps implemented by the module 110-150 are similar to those described above, and will not be described in detail here, for example, where:
the sorting module 110 is configured to sort the controls in the control library 111 according to the associated form types according to a preset algorithm and a preset rule;
the creating module 120 is configured to respond to a request of a user for creating a new form, create an initial form according to the request, and display the initial form in a first preset area of a display interface, where the request for creating the new form includes a form type;
the display module 130 is configured to obtain a sorted control associated with the form type of the initial form from the control library 111, and display the associated sorted control in a second preset area of the display interface in a preset manner, so that a user can select a control from the second preset area;
the receiving module 140 is configured to receive a control selected by a user, and configure the control at a corresponding position of the initial form according to a dragging operation of the user on the selected control;
the generating module 150 is configured to generate a new form according to the control selected by the user and the position of the control on the initial form, and store the generated new form in the database 112.
In addition, the invention also provides a form generation method. Referring to fig. 3, a flowchart of a form generation method according to an embodiment of the present invention is shown. The method may be performed by an apparatus, which may be implemented by software and/or hardware.
In this embodiment, the form generation method includes: steps S1-S5.
And S1, respectively sequencing the controls in the control library 111 according to the associated form types according to a preset algorithm and a preset rule.
In this embodiment, the control library 111 is used for storing control information, including the type of the control and the attribute information of the control. The types of the controls comprise radio box controls, multi-box controls, input box controls, drop-down box controls, slider controls, date selection controls, upload controls and the like; the attribute information of the control comprises the name of the control, the size of the control, the color of the control and the like.
The form types can comprise purchase type forms, sales type forms, close type forms and the like, and each type of form comprises a plurality of controls in the above multiple types of controls. The embodiment establishes the association relationship between each type of form and various controls in advance. For example, the purchase class form includes an input box control "named buyer & base color gray & size 3 × 2", a date selection control "named purchase date & base color light blue & size 4 × 3", an upload control "named purchase item photo & base color white & size 8 × 8", and the like, the reimbursement class form includes an input box control "named reimbursement applicant & base color white & size 3 × 2", an input box control "named reimbursement amount & base color gray & size 3 × 2", an upload control "named invoice picture & base color white & size 6 × 3", and the like, and the association relationship is prestored in the control library 111.
In this embodiment, the preset rules are sorted from high to low according to the calling frequency, and in other embodiments, the preset rules may be sorted from near to far according to the creation date.
The preset algorithm is a merging algorithm.
The sorting the controls in the control library 111 according to the associated form types according to the preset algorithm and the preset rule includes:
a1, acquiring form types corresponding to the controls in the control library 111 and the number of times of the calls of the controls in a first preset time period (for example, the last half year).
For example, taking the form type as the purchase type form as an example, the number of calls of the input box control with the name of reimbursement applicant & under color white & size 3 × 2 is 75852, the number of calls of the input box control with the name of buyer & under color white & size 3 × 2 is 29818, the number of calls of the date selection control with the name of purchase date & under color light blue & size 4 × 3 is 58756, and the number of calls of the upload control with the name of purchase item photo & under color white & size 8 × 8 is 38192.
And A2, filling the name of each control and the calling times thereof into a sequence in a preset format according to the associated form type.
In this embodiment, the sequence of the preset format is { a 1: b1, a 2: b2, A3: b3, … … Ai: bi, wherein Ai represents the ith control, and Bi represents the calling times of the ith control. For example, the sequence of the purchase class form is { "input box control entitled buyer & base gray & size 3 x 2": 75852 "input box control with name buyer & base color white & size 3 x 2": 29818, "date selection control named date of purchase & bottom color light blue & size 4 x 3": 58756, "upload control named purchase item photo & undertone white & size 8 x 8": 38192 times }.
A3, averagely dividing the sequence into a plurality of subsequences each containing a preset number (for example, 2) of controls.
For example, the divided subsequences are: { A1: b1, a 2: b2}, { A3: b3, a 4: b4}, … …, { An-1: bn-1, An: bn }. If the number of the remaining controls is less than the preset number after the sequence is divided into a plurality of subsequences containing the preset number of controls, the remaining controls are put into a new subsequence, and the subsequence containing the preset number of controls can also be filled with default values in a filling mode.
And A4, merging the adjacent subsequences into a sequence, comparing the calling times of all controls contained in the merged sequence, and sequencing the controls in each merged sequence according to the sequence of the calling times of the controls from high to low.
And A5, repeatedly executing the step A4 until all the controls in the merged sequence are sorted according to the calling times of the controls from high to low.
S2, responding to a request of a user for newly building a form, creating an initial form according to the request, and displaying the initial form in a first preset area of a display interface of the electronic device 1, wherein the request for newly building the form comprises a form type.
The request of the user for creating the new form may be triggered by a physical key provided by a hardware operation interface of the electronic apparatus 1, or may be triggered by a virtual key displayed on a human-computer interaction interface provided by the electronic apparatus 1. The initial form is a blank form. The type of the form included in the request can be determined by providing an input box to be displayed on the display interface for a user to input text; or by providing a drop-down box displayed on the display interface for the user to determine in which form type to select from the drop-down box.
The first preset area may be a left position of the initial form, or a right or lower position of the initial form.
S3, obtaining the sorted control associated with the form type of the initial form from the control library 111, and displaying the associated sorted control in a second preset area of the display interface in a preset manner, so that the user can select the control from the second preset area.
And S4, receiving the control selected by the user, and configuring the control at the corresponding position of the initial form according to the dragging operation of the user on the selected control.
In this embodiment, the preset mode may be a pull-down frame mode, or may be a scroll display mode at preset time intervals (for example, every 10 seconds), and the second preset area is an area on the initial form that does not overlap with the first preset area.
For example, the user may drag and place a selected input box control "name buyer & bottom color gray & size 3 x 2", a date selection control "name purchase date & bottom color light blue & size 4 x 3", and the like at a selected position in the initial form.
And S5, generating a new form according to the control selected by the user and the position of the control on the initial form, and storing the generated new form in the database 112.
In an embodiment of the present invention, before the generating step, the form generating method further includes:
responding to the operation of a user, and adjusting the attribute information of the control;
and responding to the operation of the user, and adjusting the display position of the control on the initial form.
For example, in the present embodiment, after the control is placed on the initial form, the electronic apparatus 1 may adjust the name of the control and/or the size of the control by providing an input box for the user to input text, and may also adjust the display color of the control by providing a drop-down box for the user to display alternative colors from the drop-down box. In other embodiments, the user may also resize the control by dragging.
Meanwhile, the initially configured position of the control may not meet the requirements of the user, the user may adjust the position of a single control through a dragging operation, and may also perform one-key typesetting on all selected controls through a layout function of the layout of the control library display interface (for example, the typesetting manner of the one-key typesetting includes basic layout, column separation, mixed layout, column separation offset, and the like).
In another embodiment of the present invention, after the generating step, the form generating method further includes:
the new form in database 112 is sent to the user in response to a request from the user to invoke the new form.
In another embodiment of the present invention, the form generation method further includes:
and updating the control with the adjusted attribute information in each form in the database 112 to the control library 111 every second preset time (for example, 1 month).
It can be seen from the foregoing embodiment that, in the form generation method provided by the present invention, firstly, the controls in the control library 111 are respectively sorted according to the associated form types according to the preset algorithm and the preset rule, when a request of a user for newly creating a form is received, the sorted controls associated with the newly created form type are displayed in the preset area of the initial form in a preset manner, and a new form is generated according to the control selected by the user and the position configured for the control by the user through a drag operation. The invention realizes the user-defined form creation and improves the operation flexibility and expansibility.
In addition, the embodiment of the present invention further provides a computer-readable storage medium, which may be any one of or any combination of a hard disk, a multimedia card, an SD card, a flash memory card, an SMC, a Read Only Memory (ROM), an Erasable Programmable Read Only Memory (EPROM), a portable compact disc read only memory (CD-ROM), a USB memory, and the like. The computer-readable storage medium includes the form generation program 10, and the specific implementation of the computer-readable storage medium of the present invention is substantially the same as the specific implementation of the form generation method and the electronic apparatus described above, and is not described herein again.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A form generation method is applied to an electronic device, and is characterized by comprising the following steps:
a sorting step: respectively sequencing the controls in the control library according to the associated form types according to a preset algorithm and a preset rule;
a creating step: responding to a request of a user for building a new form, building an initial form according to the request, and displaying the initial form in a first preset area of a display interface of the electronic device, wherein the request for building the new form comprises a form type;
a display step: acquiring a sorted control associated with the form type of the initial form from the control library, and displaying the associated sorted control in a second preset area of the display interface in a preset manner for a user to select a control from the second preset area;
a receiving step: receiving a control selected by a user, and configuring the control at a corresponding position of the initial form according to the dragging operation of the user on the selected control;
a generation step: and generating a new form according to the control selected by the user and the position of the control on the initial form, and storing the generated new form in a database.
2. The form generation method of claim 1, wherein the preset algorithm is a merge algorithm, the preset rule is a sort order from high to low according to the calling frequency, and the sorting the controls in the control library according to the preset algorithm and the preset rule according to the associated form types comprises:
a1, acquiring form types corresponding to all controls in a control library and the called times of all controls in a first preset time period;
a2, filling the name and calling times of each control into a sequence in a preset format according to the associated form type;
a3, averagely dividing the sequence into a plurality of subsequences each of which contains a preset number of controls;
a4, merging the adjacent subsequences into a sequence, comparing the calling times of all controls contained in the merged sequence, and sequencing the controls in each merged sequence according to the sequence of the calling times of the controls from high to low;
and A5, repeatedly executing the step A4 until all the controls in the merged sequence are sorted according to the calling times of the controls from high to low.
3. The form generation method of claim 2, wherein the form generation method further comprises, prior to the generating step:
responding to the operation of a user, and adjusting the attribute information of the control;
and responding to the operation of the user, and adjusting the display position of the control on the initial form.
4. The form generation method of any of claims 1-3, wherein the form generation method further comprises, after the generating step:
and responding to a request of a user for calling a new form, and sending the new form in the database to the user.
5. The form generation method of claim 4, wherein the form generation method further comprises:
and updating the control with the attribute information adjusted in each form in the database to the control library every second preset time.
6. An electronic device, comprising: a memory, a processor, the memory having stored thereon a form generation program executable on the processor, the form generation program when executed by the processor implementing the steps of:
a sorting step: respectively sequencing the controls in the control library according to the associated form types according to a preset algorithm and a preset rule;
a creating step: responding to a request of a user for building a new form, building an initial form according to the request, and displaying the initial form in a first preset area of a display interface, wherein the request for building the new form comprises a form type;
a display step: acquiring a sorted control associated with the form type of the initial form from the control library, and displaying the associated sorted control in a second preset area of the display interface in a preset manner for a user to select a control from the second preset area;
a receiving step: receiving a control selected by a user, and configuring the control at a corresponding position of the initial form according to the dragging operation of the user on the selected control;
a generation step: and generating a new form according to the control selected by the user and the position of the control on the initial form, and storing the generated new form in a database.
7. The electronic device of claim 6, wherein the preset algorithm is a merging algorithm, the preset rule is a sorting order from high to low according to the calling frequency, and the sorting the controls in the control library according to the preset algorithm and the preset rule according to the associated form types comprises:
a1, acquiring form types corresponding to all controls in a control library and the called times of all controls in a first preset time period;
a2, filling the name and calling times of each control into a sequence in a preset format according to the associated form type;
a3, averagely dividing the sequence into a plurality of subsequences each of which contains a preset number of controls;
a4, merging the adjacent subsequences into a sequence, comparing the calling times of all controls contained in the merged sequence, and sequencing the controls in each merged sequence according to the sequence of the calling times of the controls from high to low;
and A5, repeatedly executing the step A4 until all the controls in the merged sequence are sorted according to the calling times of the controls from high to low.
8. The electronic device of claim 7, wherein the form generation program when executed by the processor further performs the following steps prior to the generating step:
responding to the operation of a user, and adjusting the attribute information of the control;
and responding to the operation of the user, and adjusting the display position of the control on the initial form.
9. The electronic device of any of claims 6-8, wherein the form generation program, when executed by the processor, further performs the following steps after the generating step:
and responding to a request of a user for calling a new form, and sending the new form in the database to the user.
10. A computer-readable storage medium having stored thereon a form generation program executable by one or more processors to perform the steps of the form generation method of any of claims 1 to 5.
CN201910970600.3A 2019-10-11 2019-10-11 Form generation method, electronic device and computer readable storage medium Pending CN110837366A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910970600.3A CN110837366A (en) 2019-10-11 2019-10-11 Form generation method, electronic device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910970600.3A CN110837366A (en) 2019-10-11 2019-10-11 Form generation method, electronic device and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN110837366A true CN110837366A (en) 2020-02-25

Family

ID=69575404

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910970600.3A Pending CN110837366A (en) 2019-10-11 2019-10-11 Form generation method, electronic device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN110837366A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112257005A (en) * 2020-11-10 2021-01-22 北京乐我无限科技有限责任公司 Form component generation method and device
CN112540759A (en) * 2020-12-08 2021-03-23 杭州讯酷科技有限公司 Basic element construction method for visual UI interface generation
CN112949268A (en) * 2021-03-25 2021-06-11 苍穹数码技术股份有限公司 Form management method, device, equipment and computer readable storage medium
CN113760148A (en) * 2021-09-08 2021-12-07 亿览在线网络技术(北京)有限公司 Method for generating editable list
CN114527969A (en) * 2022-01-25 2022-05-24 孚瑞肯电气(深圳)有限公司 Method for converting list cell into drop-down list form for input

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105740264A (en) * 2014-12-10 2016-07-06 北大方正集团有限公司 Distributed XML database sorting method and apparatus
CN106909358A (en) * 2015-12-23 2017-06-30 阿里巴巴集团控股有限公司 The methods of exhibiting and device of application controls
CN107817990A (en) * 2017-11-24 2018-03-20 北京恒华伟业科技股份有限公司 A kind of generation method of list, device and electronic equipment
CN107908714A (en) * 2017-11-10 2018-04-13 上海达梦数据库有限公司 A kind of aggregation of data sort method and device
CN109376344A (en) * 2018-09-03 2019-02-22 平安普惠企业管理有限公司 The generation method and terminal device of list
CN109725901A (en) * 2018-05-31 2019-05-07 中国平安人寿保险股份有限公司 Development approach, device, equipment and the computer storage medium of front-end code
CN109933760A (en) * 2019-01-28 2019-06-25 平安科技(深圳)有限公司 List generation method, device, computer equipment and computer readable storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105740264A (en) * 2014-12-10 2016-07-06 北大方正集团有限公司 Distributed XML database sorting method and apparatus
CN106909358A (en) * 2015-12-23 2017-06-30 阿里巴巴集团控股有限公司 The methods of exhibiting and device of application controls
CN107908714A (en) * 2017-11-10 2018-04-13 上海达梦数据库有限公司 A kind of aggregation of data sort method and device
CN107817990A (en) * 2017-11-24 2018-03-20 北京恒华伟业科技股份有限公司 A kind of generation method of list, device and electronic equipment
CN109725901A (en) * 2018-05-31 2019-05-07 中国平安人寿保险股份有限公司 Development approach, device, equipment and the computer storage medium of front-end code
CN109376344A (en) * 2018-09-03 2019-02-22 平安普惠企业管理有限公司 The generation method and terminal device of list
CN109933760A (en) * 2019-01-28 2019-06-25 平安科技(深圳)有限公司 List generation method, device, computer equipment and computer readable storage medium

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112257005A (en) * 2020-11-10 2021-01-22 北京乐我无限科技有限责任公司 Form component generation method and device
CN112257005B (en) * 2020-11-10 2024-04-19 北京乐我无限科技有限责任公司 Form component generation method and device
CN112540759A (en) * 2020-12-08 2021-03-23 杭州讯酷科技有限公司 Basic element construction method for visual UI interface generation
CN112540759B (en) * 2020-12-08 2024-03-26 杭州讯酷科技有限公司 Basic element construction method for visual UI interface generation
CN112949268A (en) * 2021-03-25 2021-06-11 苍穹数码技术股份有限公司 Form management method, device, equipment and computer readable storage medium
CN113760148A (en) * 2021-09-08 2021-12-07 亿览在线网络技术(北京)有限公司 Method for generating editable list
CN114527969A (en) * 2022-01-25 2022-05-24 孚瑞肯电气(深圳)有限公司 Method for converting list cell into drop-down list form for input
CN114527969B (en) * 2022-01-25 2023-08-18 孚瑞肯电气(深圳)有限公司 Method for converting list cell into drop-down list form input

Similar Documents

Publication Publication Date Title
CN110837366A (en) Form generation method, electronic device and computer readable storage medium
CN110377851B (en) Method and device for realizing multi-stage linkage drop-down frame and computer equipment
WO2020015166A1 (en) Charting component creation method and device and computer readable storage medium
US20170357487A1 (en) Generation of an application from data
CN110941614A (en) Form generation method and device, electronic equipment and computer readable storage medium
CN111736836B (en) Component configuration method and device based on relational graph and computer readable storage medium
CN111694565A (en) Data visualization application development method and system
WO2019071898A1 (en) Electronic device, database query script generation method and storage medium
CN106250110B (en) Method and device for establishing model
CN114385940A (en) Data visualization method, device, equipment and medium
CN113535165A (en) Interface generation method and device, electronic equipment and computer readable storage medium
CN110704143A (en) Page generation method and device
CN110837531B (en) Data source read-write separation method and device and computer readable storage medium
CN108763341B (en) Electronic device, automatic table building method and storage medium
CN115409008A (en) Chart generation method and device, electronic equipment and readable storage medium
CN112527280A (en) Interface display method and device, server and readable storage medium
CN114816389B (en) Management system building method, device, equipment and medium based on meta-model
CN113741953A (en) Form processing method and device, electronic equipment and computer storage medium
CN114169306A (en) Method, device and equipment for generating electronic receipt and readable storage medium
CN112685078A (en) Interface document generation and query method, device and computer readable storage medium
CN109766093B (en) Method and device for collaborative real-time editing, electronic equipment and storage medium
CN113687827A (en) Data list generation method, device and equipment based on widget and storage medium
CN116227452B (en) Method, apparatus, device and storage medium for analyzing templates using assembled cards
CN116204267B (en) Method and device for generating intellectual property flow form
CN116739612B (en) Method for displaying rights and interests information and electronic equipment

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