CN113449498A - Method and device for generating form, storage medium and electronic equipment - Google Patents

Method and device for generating form, storage medium and electronic equipment Download PDF

Info

Publication number
CN113449498A
CN113449498A CN202110767659.XA CN202110767659A CN113449498A CN 113449498 A CN113449498 A CN 113449498A CN 202110767659 A CN202110767659 A CN 202110767659A CN 113449498 A CN113449498 A CN 113449498A
Authority
CN
China
Prior art keywords
attribute
target
information
data
item
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
CN202110767659.XA
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.)
Beijing Youzhuju Network Technology Co Ltd
Original Assignee
Beijing Youzhuju Network Technology 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 Beijing Youzhuju Network Technology Co Ltd filed Critical Beijing Youzhuju Network Technology Co Ltd
Priority to CN202110767659.XA priority Critical patent/CN113449498A/en
Publication of CN113449498A publication Critical patent/CN113449498A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/174Form filling; Merging

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The disclosure relates to a method, a device, a storage medium and an electronic device for generating a form, which are used for acquiring material attribute data respectively corresponding to at least one target material; acquiring preconfigured form description information, wherein the form description information is preconfigured form description information according to a plurality of candidate materials in the current service; determining form attribute information of a target form according to the material attribute data and the form description information, wherein the target form is a to-be-generated form corresponding to at least one target material, and the form attribute information comprises description information of each form item in the target form and layout information of each form item in the target form; and generating the target form according to the description information and the layout information of each form item.

Description

Method and device for generating form, storage medium and electronic equipment
Technical Field
The present disclosure relates to the field of computer application technologies, and in particular, to a method and an apparatus for generating a form, a storage medium, and an electronic device.
Background
At present, various interactive works can be manufactured through an interactive editor based on preset materials, for example, interactive games, and developers can perform attribute editing on selected target materials in an attribute form displayed on an interface attribute panel in the process of manufacturing the interactive works through the interactive editor, so that before manufacturing the interactive works, the attribute form corresponding to different preset materials needs to be generated.
In the prior art, there are many open source form schemes, such as: form-create, format, and ace-form, but the above-mentioned open-source form generation scheme uses codes to write forms separately for each attribute form corresponding to preset material, and the relationship between configuration and data in the above-mentioned existing form generation scheme is not mutually independent, but configuration decision data, but the interactive editor involves a lot of material types, and different interactive components can be generated based on different materials, and the component types are also many, and the structure is complex, and the configuration decision data in the existing scheme is the configuration decision data, and in order to support complex data as much as possible, the configuration thereof is also more and more complex, and the complex configuration increases maintenance cost and calculation difficulty.
Disclosure of Invention
This summary is provided to introduce a selection of concepts in a simplified form that are further described below in the detailed description. This summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
In a first aspect, the present disclosure provides a method of generating a form, the method comprising:
acquiring material attribute data corresponding to at least one target material;
acquiring preconfigured form description information, wherein the form description information is preconfigured form description information according to a plurality of candidate materials in the current service;
determining form attribute information of a target form according to the material attribute data and the form description information, wherein the target form is a to-be-generated form corresponding to at least one target material, and the form attribute information comprises description information of each form item in the target form and layout information of each form item in the target form;
and generating the target form according to the description information and the layout information of each form item.
In a second aspect, the present disclosure provides an apparatus for generating a form, the apparatus comprising:
the first acquisition module is used for acquiring material attribute data corresponding to at least one target material;
the second acquisition module is used for acquiring preconfigured form description information, wherein the form description information is preconfigured form description information according to a plurality of candidate materials in the current service;
the determining module is used for determining form attribute information of a target form according to the material attribute data and the form description information, wherein the target form is a form to be generated and corresponds to at least one target material, and the form attribute information comprises the description information of each form item in the target form and the layout information of each form item in the target form;
and the form generating module is used for generating the target form according to the description information and the layout information of each form item.
In a third aspect, the present disclosure provides a computer readable medium having stored thereon a computer program which, when executed by a processing apparatus, performs the steps of the method of the first aspect of the present disclosure.
In a fourth aspect, an electronic device is provided, comprising: a storage device having a computer program stored thereon; processing means for executing the computer program in the storage means to implement the steps of the method of the first aspect of the present disclosure.
Through the technical scheme, material attribute data corresponding to at least one target material is obtained; acquiring preconfigured form description information, wherein the form description information is preconfigured form description information according to a plurality of candidate materials in the current service; determining form attribute information of a target form according to the material attribute data and the form description information, wherein the target form is a to-be-generated form corresponding to at least one target material, and the form attribute information comprises description information of each form item in the target form and layout information of each form item in the target form; the target form is generated according to the description information and the layout information of each form item, so that the configuration can be dynamically searched in the form description information which is configured in advance according to the material attribute data of each form item corresponding to the target material, a form corresponding to the interactive component can be dynamically generated according to various material types including the interactive component, the form description rule in the form description information is simple, the calculation is easy, more dynamic form effects can be realized, and the maintenance cost and the calculation difficulty of the form configuration are reduced.
Additional features and advantages of the disclosure will be set forth in the detailed description which follows.
Drawings
The above and other features, advantages and aspects of various embodiments of the present disclosure will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numbers refer to the same or similar elements. It should be understood that the drawings are schematic and that elements and features are not necessarily drawn to scale. In the drawings:
FIG. 1 is a flow diagram illustrating a method of generating a form in accordance with an exemplary embodiment;
FIG. 2 is an interface diagram illustrating an interactive editor, according to an illustrative embodiment;
FIG. 3 is a diagram of a form illustrating a text node in accordance with an exemplary embodiment;
FIG. 4 is a diagram illustrating a form layout of a text node, according to an illustrative embodiment;
FIG. 5 is a diagram illustrating a form layout, according to an exemplary embodiment;
FIG. 6 is a flow diagram illustrating a method of generating a form in accordance with an exemplary embodiment;
FIGS. 7 a-7 b are diagrams illustrating extensions inheritance structure configuration information according to an exemplary embodiment;
FIG. 8 is a diagram illustrating a form layout for a picture node, according to an illustrative embodiment;
FIGS. 9 a-9 b are schematic diagrams of forms of physical attributes;
FIG. 10 is a diagram illustrating a form layout of text nodes in accordance with an illustrative embodiment;
FIG. 11 is a diagram illustrating a sort merge of form entries, according to an exemplary embodiment;
FIG. 12 is a block diagram illustrating an apparatus for generating forms in accordance with an exemplary embodiment;
FIG. 13 is a block diagram illustrating an apparatus for generating forms in accordance with an exemplary embodiment;
fig. 14 is a block diagram illustrating a structure of an electronic device according to an example embodiment.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order, and/or performed in parallel. Moreover, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "include" and variations thereof as used herein are open-ended, i.e., "including but not limited to". The term "based on" is "based, at least in part, on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions for other terms will be given in the following description.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
The method is mainly applied to a scene that an attribute form corresponding to a preset material is generated aiming at the preset material or an interactive component formed by combining different preset materials before an interactive editor makes an interactive work based on the preset material, in the related technology, a form is independently written by codes aiming at each preset material through an open source form scheme such as form-create, format, ace-form and the like, and the relation between configuration and data in the existing form generation scheme is not independent, but the data is determined by configuration, but the interactive editor relates to various material types (such as scenes, characters, pictures, videos, audios, particle animation, Lottie animation, sequence frames, graphics, animation and events), different interactive components can be generated based on different materials, the component types are more, the structure is complex, the data is determined by configuration in the existing scheme, in order to support complex data as much as possible, the configuration thereof is also more and more complex, and the complex configuration increases maintenance cost and computational difficulty.
In order to solve the existing problems, the present disclosure provides a method, an apparatus, a storage medium, and an electronic device for generating a form, which can dynamically search and configure in pre-configured form description information according to material attribute data of each form item corresponding to a target material, so that a form corresponding to various material types including an interactive component can be dynamically generated, and form description rules in the form description information are simple and easy to calculate, and a more dynamic form effect can be achieved, thereby reducing maintenance cost and calculation difficulty of form configuration.
Specific embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings.
FIG. 1 is a flow diagram illustrating a method of generating a form, as shown in FIG. 1, according to an exemplary embodiment, the method including the steps of:
in step S101, material attribute data corresponding to at least one target material is acquired.
The target material refers to a material selected by a user from a plurality of preset materials in an interactive editor (such as an editor like rubexes, ink knives, and the like) for making an interactive work, and the preset materials at least include one or more of the following materials: the system comprises a scene, an interactive component, characters, pictures, videos, audios, particle animations, Lottie animations, sequence frames, graphics, animations and events, wherein the interactive component is generally formed by combining various other materials, for example, character nodes and picture nodes in preset materials can form the interactive component.
The material attribute data refers to preset default attribute data corresponding to the target material.
For example, fig. 2 is an interface schematic diagram of an interactive editor shown according to an exemplary embodiment, as shown in fig. 2, a user selects a text node in the interactive editor, and the material attribute data corresponding to the text node is shown in a box in fig. 2, and includes attribute data such as center coordinates (anchor X, anchor Y), color (color), font size (fontSize), width (width), height (height), name (name: "text node"), text information (text: "text content") and the like of the text node, and the above example is only an illustration, and the disclosure does not limit this.
In addition, in this step, the material attribute data corresponding to each target material may be acquired in any one of the following two manners:
and responding to the material selection operation of a user in a preset content editing area, and acquiring material attribute data corresponding to at least one target material selected by the user.
As shown in fig. 2, the preset content editing area refers to an operation area of a material node, based on the first mode, a user may select one or more target materials from a plurality of preset materials according to actual work requirements, after obtaining a material selection trigger operation of the user, the terminal may display the target material selected by the user in the preset content editing area, and obtain the material attribute data corresponding to the target material from a preset path corresponding to the target material.
And secondly, responding to the attribute input operation of a user on at least one target material in a preset attribute editing area (or referred to as an attribute panel), and acquiring material attribute data corresponding to at least one target material respectively.
In another possible application scenario, after the user selects the target material, the attribute panel may perform a real-time change operation on one or more attributes in the target material (for example, for a text node, information such as text content and font size in the "base" attribute may be modified), and after the attribute input operation of the user in the attribute panel is obtained, the material attribute data may be obtained once.
In step S102, preconfigured form description information is obtained, where the form description information is preconfigured form description information according to multiple candidate materials in the current service.
The current service refers to generating a corresponding attribute form for a material in a designated interactive editor, the selected interactive editors are different, the current service is different, types of the candidate material (or referred to as preset material) corresponding to different services may be different, the form description information may include structure configuration information and attribute configuration information, and the structure configuration information includes structure configuration information and attribute configuration information. . . The attribute configuration information includes attribute information (such as data attribute name, data attribute type, form name, form default value, form prompt, etc. information of each form item) of each form item component (i.e. the form in which the form item is presented in the form).
In the process of configuring the form description information, the material attribute data may be configured first, and then the structure configuration information may be configured, specifically, the material attribute data may be configured in advance in the following manner:
acquiring at least one candidate material corresponding to the current service; and configuring description information of each form item through a JS object numbered notation JSON aiming at each candidate material to obtain material attribute data.
Illustratively, taking the candidate material as a text node as an example, fig. 3 is a schematic diagram of a form corresponding to the text node shown according to an exemplary embodiment, and description information of a form item "name" in the form shown in fig. 3 may be configured by using JSON configuration in the following manner:
Figure BDA0003152486770000071
Figure BDA0003152486770000081
the key represents a data attribute name, the type represents a data attribute type, different input components can be used for different attribute types, for example, a string type is an input box, the name represents a form item name, the default represents a form item default value, and the tooltip represents a form item prompt;
assuming that the form corresponding to the text node includes three form items of "name", "text" and "font size", based on the same manner, the description information of each form item can be configured through JSON, and the material attribute data located under the PropertyList field is obtained:
Figure BDA0003152486770000082
Figure BDA0003152486770000091
the foregoing examples are illustrative only, and the disclosure is not limited thereto.
After the description information describing the form item component is obtained, the structural configuration information of the form can be continuously configured for at least one candidate material corresponding to the current service:
first, the structure information of each form item may be defined using a grid layout.
For example, fig. 4 is a schematic diagram of a form layout corresponding to a text node according to an exemplary embodiment, and in order to implement the form layout shown in fig. 4, assuming that the total grid number of each line is 12, the following structural configuration may be performed:
Figure BDA0003152486770000092
Figure BDA0003152486770000101
as shown in fig. 4, the form item "name" is exclusive to one line in the form, and "column":12 is configured correspondingly, and the form item "text" and "font size" are distributed in the same line in the form, and for both form items, "column":6 is configured, and based on the above structural configuration, the form layout as shown in fig. 4 can be generated, and the above example is only an example, and the present disclosure does not limit this.
Considering the practical application scenario, the problem of repeated configuration may occur based on the above configuration method, for example, the text node has a name attribute, the picture node also has a name attribute, the text node and the picture node have a problem of repeated configuration, the system configuration resources are wasted, in order to solve the problem of repeated configuration, in one possible implementation manner of the present disclosure, the structure information of the form entry may be split from the description information of each form entry, but after the splitting, the column field is not split, since the layout information described by the column field is related to the structure, and it is often encountered in the actual development process that the layout information of the same attribute in different data is different, in this case, the column field needs to be reconfigured, therefore, the configuration structure information described above is less readable, and maintenance costs for layout modification are also increased.
In another possible implementation manner of the present disclosure, to solve the problems of poor readability of configuration structure information and high cost of layout modification, a table structure may be used for initialization based on the following configuration manner:
Figure BDA0003152486770000111
Figure BDA0003152486770000121
in the above configuration, the column field in each form item information may be deleted, and the structure information of each form item is configured in a structure configuration list ConfigList, where a row of 12 columns (i.e. 12 grids) is provided, and a square bracket in which a data attribute keyword (or referred to as a data attribute name) of each form item under the ConfigList field is located represents a row, so that, based on the above configuration, it may be determined that the form item "name" in the form occupies an entire row, the form items "", "text" and "fontSize" in the form are located in the same row, and occupy 6 columns of a row, respectively, to obtain the form layout shown in fig. 4, which is merely an example, and this disclosure does not limit this.
Considering that in an actual application scenario, different data have the same attribute, which often means that they are likely to inherit from a common base class, but the current configuration does not embody this point; in addition, when there are many data attributes, classification is also required, and in the present disclosure, an individual attribute of each form item may be declared through a second preset field (e.g., extensions field) in a structure configuration list (i.e., ConfigList), a common attribute of each form item may be declared through a third preset field (e.g., className field), and classification may be performed through adding a fourth preset field (e.g., groups field), where the third preset field represents a base class (or referred to as a parent class), and the second preset field represents a subclass.
As an example of this, the following is given,
Figure BDA0003152486770000122
Figure BDA0003152486770000123
Figure BDA0003152486770000131
Figure BDA0003152486770000141
Figure BDA0003152486770000151
thus, the individual attribute of each form item "base", "font" and "style" can be declared through the extensions field, and the common attribute of the form item "base", "size & position" and "transformation" can be declared through the className.
In view of the new addition of inheritance and classification characteristics in configuration, there are two problems, one is a layout sorting problem of different data categories after a subclass inherits a parent class (the data category refers to a preset data category corresponding to one or more form items in a current service), and for this problem, the present disclosure may set, for each data category, a display sorting identifier corresponding to the data category according to a preset rule, where the display sorting identifier is used to indicate a display position corresponding to the data category.
In one possible implementation, the sortIndex field may be used to indicate the display sort identifier, which may be in the form of numbers such as 0, 1, 2, etc., so that the larger the display sort identifier, the higher the corresponding data category is sorted in the form layout.
Fig. 5 is a schematic diagram of a form layout according to an exemplary embodiment, as shown in fig. 5, the sortIndex fields are used to respectively identify display sort identifiers of different data categories, where the sortIndex corresponding to the data category "attribute setting panel" is 2, the sortIndex corresponding to the data category "position alignment" is 1, the sortIndex corresponding to the data category "base" is 0, and the sortIndex corresponding to the data category "font" is 0, so that, based on a form layout rule that the display sort identifier is larger, the corresponding data category is sorted farther in the form layout, the form layout shown in fig. 5 may be obtained, and the above example is merely an example, and the present disclosure does not limit this.
After inheritance and classification characteristics are newly added in the configuration, the following problems also exist: in the process of dynamically generating the form, the same classifications of the parent class and the child class need to be merged, for example, the classname field contains a form item "base", the extensions field also contains a form item "base", attribute information of the parent class and the child class needs to be merged, but in consideration of the fact that sortIndex sorting fields possibly set when the same classifications are merged are not the same, in order to solve the problem, as shown in the above example, the order of all classifications can be declared in the common parent class classname field, and a null classification set for a classification that does not actually exist in the parent class plays a role in occupying, so that the use of the sortIndex field in configuration can be greatly reduced, and the structural configuration rule of the form is more concise.
In the process of configuring the structure configuration information in advance, in order to support the function of embedding the form into the form and realize dynamic searching configuration according to the data of the form item, the present disclosure may declare a preset matching condition through a first preset field according to the current service, where the preset matching condition is used to indicate a form configuration entry corresponding to the current service.
The first preset field may include a match field, and the preset matching condition may include one or more matching conditions, for example, the following three preset matching conditions are configured in the match field:
Figure BDA0003152486770000161
the foregoing examples are illustrative only, and the disclosure is not limited thereto.
At this point, form description information is obtained by pre-configuring a plurality of candidate materials in the current service.
In step S103, form attribute information of a target form is determined according to the material attribute data and the form description information, where the target form is a to-be-generated form corresponding to at least one target material, and the form attribute information includes description information of each form item in the target form and layout information of each form item in the target form.
The description information of each form item comprises one or more items of a data attribute name, a data attribute type, a form item name, a form item default value and a form item prompt, and the layout information at least comprises one or more items of the following items: the data category comprises displayable attributes of each form item, the number of grids of each form item and the display ordering of each data category, wherein the displayable attributes are used for indicating whether the form item is displayed or not, and the data category comprises at least one form item.
In this step, the form attribute information of the target form to be generated may be determined through the following sub-steps as shown in fig. 6:
in step S1031, the material attribute data is matched with a preset matching condition in a first preset field of the structure configuration information, where the first preset field is used to locate a structure configuration entry of the target form.
Wherein the first predetermined field includes a match field.
After the material attribute data shown in fig. 2 is obtained, match is first performed, the material attribute data is matched with a match field in the structure configuration information ConfigList, and if the condition is satisfied, the matching is successful, that is, the structure configuration entry of the current dynamic form is found, for example, the preset matching condition in the match field is match { '- } [ { var:' }, 'type' }, 'Text' ], and if the material attribute data includes data of data type Text, the matching is determined to be successful.
In step S1032, if the material attribute data is successfully matched with the preset matching condition, sequentially traversing the structural configuration information from the first preset field, and determining the description information of each form item in the target form according to a traversal result and the attribute configuration information.
In this step, if traversing to a second preset field is determined according to a traversing result, at least one target keyword corresponding to the second preset field is obtained, matching is performed according to the at least one target keyword and a keyword corresponding to a third preset field in the structural configuration information, if matching is successful, at least one data attribute name is determined from the configuration information corresponding to the third preset field, and different data attribute names correspond to different form items; and acquiring the description information of each form item from the attribute configuration information according to at least one data attribute name.
Here, the second preset field includes an extensions field, and the third preset field includes a className field.
Exemplarily, as shown in fig. 7a and 7b, the obtained material attribute data is successfully matched with the preset matching condition in the match field in the structure configuration information shown in fig. 7a, traversal is continued, an extensions field is obtained by traversal, at this time, the extensions are inherited, a target keyword 'Base' in the extensions field is matched with a target keyword 'Base' in the className field in the structure configuration information shown in fig. 7b, the two are consistent, it indicates that a text form corresponding to a text node to be generated currently contains the structure configuration, and at least one data attribute name is determined from configuration information corresponding to the className field, and different data attribute names shown in fig. 7b correspond to different form items; for example, the following data attribute names "name", "text", "fontSize" are obtained, the obtained form item information only contains the data attribute name (or called as data attribute key), but there is no detailed form item description information, so key matching may be performed next, that is, the description information of each form item is obtained from the attribute configuration information property list according to at least one data attribute name, for example, the description information corresponding to the form item "word number" may be obtained based on the data attribute key "fontSize":
Figure BDA0003152486770000181
the foregoing examples are illustrative only, and the disclosure is not limited thereto.
After the complete description information of each form item is acquired, runtime data calculation including extended data filling and visibility calculation can be performed, and how to perform extended data filling is introduced first.
In the form generation process of the current service, in order to improve the use experience of the user, some service components need to be filled with extension data, fig. 8 is a form layout diagram corresponding to a picture node shown according to an exemplary embodiment, as shown in fig. 8, a node picture needs to support replacement, and in order to improve the experience, the user needs to be prompted about the suggested size of the picture, at this time, the replacement picture component needs the width and height of the picture.
As an example, it is assumed that the material data corresponding to the acquired picture node is:
Figure BDA0003152486770000191
the suggested size data may be filled in a preset field template field in the description information of the form item "picture material" corresponding to the picture node, and the specific configuration is as follows:
Figure BDA0003152486770000192
Figure BDA0003152486770000201
in the extension data, the definitions [0] refers to a picture object, that is, the definitions [0] and [ height ] indicate the width attribute and the height attribute of the picture object, respectively, so that the filling of the extension data is completed for the preset list item "picture material" of the picture node, and the above example is only an example, and the present disclosure does not limit the present disclosure.
In step S1033, a dynamic form calculation is performed according to the material attribute data and the structure configuration information, so as to determine the layout information of each form item in the target form.
The dynamic form calculation described below includes visibility calculation, initialized form layout, sort merging, sort sorting, public attribute calculation, and layout calculation, so that a form is dynamically generated by matching preconfigured form description information according to material attribute data of target materials.
In the step, when performing visibility calculation, a preset visible configuration condition corresponding to each form item can be determined from the structural configuration information for each form item; and matching the material attribute data with the preset visible configuration conditions, and determining the displayable attribute corresponding to the form item according to the matching result.
Illustratively, as shown in fig. 9a and 9b, a static rigid body type is selected among the physical properties, and properties such as linear damping, rotational damping, gravity coefficient, angular velocity, etc. are not displayed, but a dynamic rigid body type is displayed when selected, and the corresponding configuration is as follows: rigidBodyType represents a rigid body type, and attributes such as linearDamping and angularDamping set a visible attribute as {'! In contrast, the attributes of linear, angular, etc. set the visible attribute to { '═ va:' rigidnodytype '}, dynamic' ], i.e., the attributes are all displayed when the rigid body type is dynamic, thereby achieving the effect shown in fig. 9a and 9 b.
Thereafter, an initial layout calculation may be performed, i.e., the grid number of each form item is determined according to the structural configuration information and the displayable attributes.
Taking a text node as an example, fig. 10 is a schematic diagram of a form layout corresponding to the text node according to an exemplary embodiment, as shown in fig. 10, the data category "text" includes four lines, where wordWrap automatically wraps: one row and one column; leading row spacing, padding inner edge spacing: one row and two columns; align horizontally, align vertically: one row and two columns; overflow mode: one row and one column, the corresponding layout configuration information is as follows:
name: 'text',
props:{[‘wordWrap’],[‘leading’,’padding’],[‘align’,’valign’],[‘overflow’]}
only the columns that are not explicitly set are initialized when the layout is initialized, and the influence of the column visibility is also considered, for example, the configuration information becomes:
name: 'text',
props:{[‘wordWrap’],[‘leading’,{key:’padding’,visible:false}],[{key:’align’,column:8},’valign’],[‘overflow’]}
the padding inner edge distance is invisible, and the second row is a row-by-row line distance; the column grid number is set to be 8 explicitly in the third row align horizontal alignment, and then the align vertical alignment is the total grid number 12 minus the occupied grid number 8 to be 4, which is only an example and is not limited by the present disclosure.
Then, the data types of the second preset field and the third preset field in the structural configuration information are combined according to the common classification combination and classification ordering; and determining a display sorting identifier of each data category from the structural configuration information, and performing display sorting on each data category according to the display sorting identifier.
For example, assuming that the form item of the data category "base" in the second preset field is "text", and the form item in the third preset field is "name" and "type", the form layout as shown in fig. 11 may be generated after the two items are merged.
The specific implementation manner of sorting and sorting may refer to the specific description in the embodiment of pre-configured form description information, and is not described herein again.
After the above matching and form calculation processes are completed, the common attributes can be calculated for a plurality of target materials selected by the user in the following manner:
for each target material, sequentially matching the description information of the form item included in the target material with the description information of the form item included in other materials, wherein the other materials are any one of the target materials except the target material; and taking the same form items corresponding to the target materials as a public attribute according to the matching result.
Specifically, for each row among the same type of attributes, whether the row has a hidden column after calculation is determined, if yes, the number of grids of the row is not full, and the subsequent rows carry in turn, that is, the position of the modified hidden column can be filled by the adjacent form item of the subsequent row.
In step S104, the target form is generated according to the description information and the layout information of each form item.
After the matching and the form calculation are based on the above, the target form can be dynamically generated according to the description information and the layout information of each form item.
By adopting the method, the configuration can be dynamically searched in the form description information which is configured in advance according to the material attribute data of each form item corresponding to the target material, so that forms corresponding to the target material can be dynamically generated aiming at various material types including interactive components, for example, forms are embedded, a plurality of material nodes are simultaneously selected, the simultaneous editing, the multi-selection mixed editing and the setting of editable attributes of common attributes can be realized based on the form generation scheme, and the form description rule in the form description information is simple and easy to calculate, so that more dynamic form effects can be realized, and the maintenance cost and the calculation difficulty of form configuration are reduced.
FIG. 12 is a block diagram illustrating an apparatus for generating forms, as shown in FIG. 12, in accordance with an example embodiment, the apparatus comprising:
a first obtaining module 1201, configured to obtain material attribute data corresponding to at least one target material;
a second obtaining module 1202, configured to obtain preconfigured form description information, where the form description information is preconfigured form description information according to multiple candidate materials in a current service;
a determining module 1203, configured to determine form attribute information of a target form according to the material attribute data and the form description information, where the target form is a to-be-generated form corresponding to at least one target material, and the form attribute information includes description information of each form item in the target form and layout information of each form item in the target form;
a form generating module 1204, configured to generate the target form according to the description information and the layout information of each form item.
Optionally, the form description information includes structure configuration information and attribute configuration information, and the determining module 1203 is configured to match the material attribute data with a preset matching condition in a first preset field of the structure configuration information, where the first preset field is used to locate a structure configuration entry of the target form; if the material attribute data is successfully matched with the preset matching condition, sequentially traversing the structural configuration information from the first preset field, and determining the description information of each form item in the target form according to a traversal result and the attribute configuration information; and performing dynamic form calculation according to the material attribute data and the structure configuration information so as to determine the layout information of each form item in the target form.
Optionally, the determining module 1203 is configured to, if the structure configuration information is traversed to a second preset field, obtain at least one target keyword corresponding to the second preset field, and perform matching according to the at least one target keyword and a keyword corresponding to a third preset field in the structure configuration information; if the matching is successful, determining at least one data attribute name from the configuration information corresponding to the third preset field, wherein different data attribute names correspond to different form items; and acquiring the description information of each form item from the attribute configuration information according to at least one data attribute name.
Optionally, the apparatus further comprises:
and the data filling module is used for filling data in the preset form item in the structure configuration information according to the material attribute data.
Optionally, the layout information includes at least one or more of: the displayable attribute of each form item, the number of grids of each form item and the display ordering of each data category, wherein the displayable attribute is used for indicating whether the form item is displayed or not, and the data category comprises at least one form item;
the determining module 1203 is configured to determine, for each form item, a preset visible configuration condition corresponding to the form item from the structure configuration information; matching the material attribute data with the preset visible configuration conditions, and determining the displayable attribute corresponding to the form item according to the matching result; determining the grid number of each form item according to the structural configuration information and the displayable attributes; merging the form items of the same data type corresponding to the second preset field and the third preset field in the structural configuration information; and determining a display sorting identifier of each data category from the structural configuration information, and performing display sorting on each data category according to the display sorting identifier.
Optionally, fig. 13 is a block diagram of an apparatus for generating a form according to the embodiment shown in fig. 12, where the target material includes a plurality of target materials, and as shown in fig. 13, the apparatus further includes:
a public attribute calculation module 1205, configured to match, for each target material, description information of the form item included in the target material with description information of form items included in other materials in sequence, where the other materials are any one of the target materials except the target material; and taking the same form items corresponding to the target materials as a public attribute according to the matching result.
Optionally, the material attribute data is preconfigured by:
acquiring at least one candidate material corresponding to the current service; for each candidate material, configuring description information of each form item through a JS object numbered notation JSON to obtain material attribute data;
the configuration information is configured by:
adopting a grid layout to define the structure information of each form item; the individual attribute of each form item is declared through a second preset field, and the public attribute of each form item is declared through a third preset field; setting a display sorting identifier corresponding to each data category according to a preset rule, wherein the display sorting identifier is used for indicating a display position corresponding to the data category; and declaring a preset matching condition through a first preset field according to the current service, wherein the preset matching condition is used for indicating a form configuration entry corresponding to the current service.
Optionally, the description information of each form item includes one or more of a data attribute name, a data attribute type, a form item name, a form item default value, and a form item hint.
Optionally, the first obtaining module 1201 is configured to, in response to a material selection operation of a user in a preset content editing area, obtain material attribute data corresponding to at least one target material selected by the user; or responding to the attribute input operation of a user on at least one target material in a preset attribute editing area, and acquiring material attribute data corresponding to at least one target material respectively.
By adopting the device, the configuration can be dynamically searched in the form description information which is configured in advance according to the material attribute data of each form item corresponding to the target material, so that forms corresponding to various material types including interactive components can be dynamically generated, the form description rule in the form description information is simple and easy to calculate, more dynamic form effects can be realized, and the maintenance cost and the calculation difficulty of form configuration are reduced.
Referring now to fig. 14, a schematic diagram of an electronic device (e.g., the terminal device of fig. 1) 1400 suitable for implementing embodiments of the present disclosure is shown. The terminal device in the embodiments of the present disclosure may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle terminal (e.g., a car navigation terminal), and the like, and a stationary terminal such as a digital TV, a desktop computer, and the like. The electronic device shown in fig. 14 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 14, electronic device 1400 may include a processing means (e.g., central processing unit, graphics processor, etc.) 1401 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)1402 or a program loaded from storage device 1408 into a Random Access Memory (RAM) 1403. In the RAM 1403, various programs and data necessary for the operation of the electronic device 1400 are also stored. The processing device 1401, the ROM 1402, and the RAM 1403 are connected to each other by a bus 1404. An input/output (I/O) interface 1405 is also connected to bus 1404.
Generally, the following devices may be connected to the I/O interface 1405: input devices 1406 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 1407 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, or the like; storage devices 1408 including, for example, magnetic tape, hard disk, etc.; and a communication device 1409. The communication means 1409 may allow the electronic device 1400 to communicate wirelessly or by wire with other devices to exchange data. While fig. 14 illustrates an electronic device 1400 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication device 1409, or installed from the storage device 1408, or installed from the ROM 1402. The computer program, when executed by the processing apparatus 1401, performs the functions defined in the methods of the embodiments of the present disclosure.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some implementations, the clients may communicate using any currently known or future developed network Protocol, such as HTTP (HyperText Transfer Protocol), and may interconnect with any form or medium of digital data communication (e.g., a communications network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: acquiring material attribute data corresponding to at least one target material; acquiring preconfigured form description information, wherein the form description information is preconfigured form description information according to a plurality of candidate materials in the current service; determining form attribute information of a target form according to the material attribute data and the form description information, wherein the target form is a to-be-generated form corresponding to at least one target material, and the form attribute information comprises description information of each form item in the target form and layout information of each form item in the target form; and generating the target form according to the description information and the layout information of each form item.
Computer program code for carrying out operations for the present disclosure may be written in any combination of one or more programming languages, including but not limited to an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present disclosure may be implemented by software or hardware. The name of the module does not in some cases constitute a limitation of the module itself, and for example, the first obtaining module may also be described as a "module that obtains material attribute data".
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
Example 1 provides, in accordance with one or more embodiments of the present disclosure, a method of generating a form, comprising: acquiring material attribute data corresponding to at least one target material; acquiring preconfigured form description information, wherein the form description information is preconfigured form description information according to a plurality of candidate materials in the current service; determining form attribute information of a target form according to the material attribute data and the form description information, wherein the target form is a to-be-generated form corresponding to at least one target material, and the form attribute information comprises description information of each form item in the target form and layout information of each form item in the target form; and generating the target form according to the description information and the layout information of each form item.
Example 2 provides the method of example 1, the form description information including structural configuration information and attribute configuration information, and the determining form attribute information for the target form from the material attribute data and the form description information including:
matching the material attribute data with a preset matching condition under a first preset field in the structure configuration information, wherein the first preset field is used for positioning a structure configuration inlet of the target form;
if the material attribute data is successfully matched with the preset matching condition, sequentially traversing the structural configuration information from the first preset field, and determining the description information of each form item in the target form according to a traversal result and the attribute configuration information;
and performing dynamic form calculation according to the material attribute data and the structure configuration information so as to determine the layout information of each form item in the target form.
Example 3 provides the method of example 2, wherein determining the descriptive information for each form item in the target form based on the traversal results and the attribute configuration information comprises:
if the structure configuration information is traversed to a second preset field, acquiring at least one target keyword corresponding to the second preset field, and matching the target keyword with a keyword corresponding to a third preset field in the structure configuration information according to the at least one target keyword;
if the matching is successful, determining at least one data attribute name from the configuration information corresponding to the third preset field, wherein different data attribute names correspond to different form items;
and acquiring the description information of each form item from the attribute configuration information according to at least one data attribute name.
Example 4 provides the method of example 2, after determining the description information for each form item in the target form according to the traversal results and the attribute configuration information, the method further comprising:
and filling data in a preset form item in the structure configuration information according to the material attribute data.
Example 5 provides the method of example 2, the layout information including at least one or more of: the displayable attribute of each form item, the number of grids of each form item and the display ordering of each data category, wherein the displayable attribute is used for indicating whether the form item is displayed or not, and the data category comprises at least one form item;
the performing dynamic form calculations based on the material attribute data and the structural configuration information to determine the layout information for each form item in the target form comprises:
for each form item, determining a preset visible configuration condition corresponding to the form item from the structure configuration information;
matching the material attribute data with the preset visible configuration conditions, and determining the displayable attribute corresponding to the form item according to the matching result;
determining the grid number of each form item according to the structural configuration information and the displayable attributes;
merging the form items of the same data type corresponding to the second preset field and the third preset field in the structural configuration information;
and determining a display sorting identifier of each data category from the structural configuration information, and performing display sorting on each data category according to the display sorting identifier.
Example 6 provides the method of example 2, the target material comprising a plurality, the method further comprising:
for each target material, sequentially matching the description information of the form item included in the target material with the description information of the form item included in other materials, wherein the other materials are any one of the target materials except the target material;
and taking the same form items corresponding to the target materials as a public attribute according to the matching result.
Example 7 provides the method of example 2, the material attribute data being preconfigured by:
acquiring at least one candidate material corresponding to the current service; for each candidate material, configuring description information of each form item through a JS object numbered notation JSON to obtain material attribute data;
the configuration information is configured by:
adopting a grid layout to define the structure information of each form item; the individual attribute of each form item is declared through a second preset field, and the public attribute of each form item is declared through a third preset field; setting a display sorting identifier corresponding to each data category according to a preset rule, wherein the display sorting identifier is used for indicating a display position corresponding to the data category; and declaring a preset matching condition through a first preset field according to the current service, wherein the preset matching condition is used for indicating a form configuration entry corresponding to the current service.
Example 8 provides the method of example 7, the description information of each form item including one or more of a data attribute name, a data attribute type, a form item name, a form item default value, a form item hint.
Example 9 provides the method of any one of examples 1 to 8, wherein the obtaining material attribute data corresponding to each of the at least one target material includes:
responding to material selection operation of a user in a preset content editing area, and acquiring material attribute data corresponding to at least one target material selected by the user; or,
and responding to the attribute input operation of a user on at least one target material in a preset attribute editing area, and acquiring material attribute data corresponding to at least one target material respectively.
Example 10 provides, in accordance with one or more embodiments of the present disclosure, an apparatus to generate a form, comprising:
the first acquisition module is used for acquiring material attribute data corresponding to at least one target material;
the second acquisition module is used for acquiring preconfigured form description information, wherein the form description information is preconfigured form description information according to a plurality of candidate materials in the current service;
the determining module is used for determining form attribute information of a target form according to the material attribute data and the form description information, wherein the target form is a form to be generated and corresponds to at least one target material, and the form attribute information comprises the description information of each form item in the target form and the layout information of each form item in the target form;
and the form generating module is used for generating the target form according to the description information and the layout information of each form item.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other embodiments in which any combination of the features described above or their equivalents does not depart from the spirit of the disclosure. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.
Further, while operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims. With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.

Claims (12)

1. A method of generating a form, the method comprising:
acquiring material attribute data corresponding to at least one target material;
acquiring preconfigured form description information, wherein the form description information is preconfigured form description information according to a plurality of candidate materials in the current service;
determining form attribute information of a target form according to the material attribute data and the form description information, wherein the target form is a to-be-generated form corresponding to at least one target material, and the form attribute information comprises description information of each form item in the target form and layout information of each form item in the target form;
and generating the target form according to the description information and the layout information of each form item.
2. The method of claim 1, wherein the form description information includes structural configuration information and attribute configuration information, and wherein determining form attribute information for the target form based on the material attribute data and the form description information comprises:
matching the material attribute data with a preset matching condition under a first preset field in the structure configuration information, wherein the first preset field is used for positioning a structure configuration inlet of the target form;
if the material attribute data is successfully matched with the preset matching condition, sequentially traversing the structural configuration information from the first preset field, and determining the description information of each form item in the target form according to a traversal result and the attribute configuration information;
and performing dynamic form calculation according to the material attribute data and the structure configuration information so as to determine the layout information of each form item in the target form.
3. The method of claim 2, wherein the determining the description information for each form item in the target form based on the traversal results and the attribute configuration information comprises:
if the structure configuration information is traversed to a second preset field, acquiring at least one target keyword corresponding to the second preset field, and matching the target keyword with a keyword corresponding to a third preset field in the structure configuration information according to the at least one target keyword;
if the matching is successful, determining at least one data attribute name from the configuration information corresponding to the third preset field, wherein different data attribute names correspond to different form items;
and acquiring the description information of each form item from the attribute configuration information according to at least one data attribute name.
4. The method of claim 2, wherein after determining the description information for each form item in the target form based on the traversal results and the attribute configuration information, the method further comprises:
and filling data in a preset form item in the structure configuration information according to the material attribute data.
5. The method of claim 2, wherein the layout information comprises at least one or more of: the displayable attribute of each form item, the number of grids of each form item and the display ordering of each data category, wherein the displayable attribute is used for indicating whether the form item is displayed or not, and the data category comprises at least one form item;
the performing dynamic form calculations based on the material attribute data and the structural configuration information to determine the layout information for each form item in the target form comprises:
for each form item, determining a preset visible configuration condition corresponding to the form item from the structure configuration information;
matching the material attribute data with the preset visible configuration conditions, and determining the displayable attribute corresponding to the form item according to the matching result;
determining the grid number of each form item according to the structural configuration information and the displayable attributes;
merging the form items of the same data type corresponding to the second preset field and the third preset field in the structural configuration information;
and determining a display sorting identifier of each data category from the structural configuration information, and performing display sorting on each data category according to the display sorting identifier.
6. The method of claim 2, wherein the target material comprises a plurality of, the method further comprising:
for each target material, sequentially matching the description information of the form item included in the target material with the description information of the form item included in other materials, wherein the other materials are any one of the target materials except the target material;
and taking the same form items corresponding to the target materials as a public attribute according to the matching result.
7. The method of claim 2, wherein the material attribute data is preconfigured by:
acquiring at least one candidate material corresponding to the current service; for each candidate material, configuring description information of each form item through a JS object numbered notation JSON to obtain material attribute data;
the configuration information is configured by:
adopting a grid layout to define the structure information of each form item; the individual attribute of each form item is declared through a second preset field, and the public attribute of each form item is declared through a third preset field; setting a display sorting identifier corresponding to each data category according to a preset rule, wherein the display sorting identifier is used for indicating a display position corresponding to the data category; and declaring a preset matching condition through a first preset field according to the current service, wherein the preset matching condition is used for indicating a form configuration entry corresponding to the current service.
8. The method of claim 7, wherein the description information of each form item comprises one or more of a data attribute name, a data attribute type, a form item name, a form item default value, and a form item hint.
9. The method according to any one of claims 1-8, wherein the obtaining material attribute data corresponding to each of the at least one target material comprises:
responding to material selection operation of a user in a preset content editing area, and acquiring material attribute data corresponding to at least one target material selected by the user; or,
and responding to the attribute input operation of a user on at least one target material in a preset attribute editing area, and acquiring material attribute data corresponding to at least one target material respectively.
10. An apparatus for generating a form, the apparatus comprising:
the first acquisition module is used for acquiring material attribute data corresponding to at least one target material;
the second acquisition module is used for acquiring preconfigured form description information, wherein the form description information is preconfigured form description information according to a plurality of candidate materials in the current service;
the determining module is used for determining form attribute information of a target form according to the material attribute data and the form description information, wherein the target form is a form to be generated and corresponds to at least one target material, and the form attribute information comprises the description information of each form item in the target form and the layout information of each form item in the target form;
and the form generating module is used for generating the target form according to the description information and the layout information of each form item.
11. A computer-readable medium, on which a computer program is stored, characterized in that the program, when being executed by processing means, carries out the steps of the method of any one of claims 1-9.
12. An electronic device, comprising:
a storage device having a computer program stored thereon;
processing means for executing the computer program in the storage means to carry out the steps of the method according to any one of claims 1 to 9.
CN202110767659.XA 2021-07-07 2021-07-07 Method and device for generating form, storage medium and electronic equipment Pending CN113449498A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110767659.XA CN113449498A (en) 2021-07-07 2021-07-07 Method and device for generating form, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110767659.XA CN113449498A (en) 2021-07-07 2021-07-07 Method and device for generating form, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN113449498A true CN113449498A (en) 2021-09-28

Family

ID=77815395

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110767659.XA Pending CN113449498A (en) 2021-07-07 2021-07-07 Method and device for generating form, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN113449498A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114047855A (en) * 2021-11-18 2022-02-15 北京字跳网络技术有限公司 Form editing method and device and terminal equipment
CN114282752A (en) * 2021-11-15 2022-04-05 煤炭科学研究总院 Method and device for generating flow task, electronic equipment and storage medium
CN114327188A (en) * 2021-12-30 2022-04-12 北京字跳网络技术有限公司 Form layout method and device, electronic equipment and computer readable medium
CN114385741A (en) * 2021-12-14 2022-04-22 广东三维家信息科技有限公司 Data processing method and device, electronic equipment and storage medium

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101118515A (en) * 2007-09-11 2008-02-06 腾讯科技(深圳)有限公司 Automatically testing method and apparatus for list
CN103605640A (en) * 2013-12-03 2014-02-26 中国联合网络通信集团有限公司 Form adaption method and device
CN103927353A (en) * 2014-04-10 2014-07-16 北京网秦天下科技有限公司 Method and device for generating service tables
US20150046791A1 (en) * 2013-08-08 2015-02-12 Palantir Technologies, Inc. Template system for custom document generation
CN104683883A (en) * 2013-11-29 2015-06-03 乐视网信息技术(北京)股份有限公司 Method and device for generating playing strategy
US20160217119A1 (en) * 2015-01-26 2016-07-28 Adobe Systems Incorporated Recognition and population of form fields in an electronic document
CN109460544A (en) * 2018-10-26 2019-03-12 长沙通诺信息科技有限责任公司 Electronic spreadsheet generation method and device, computer equipment and storage medium
CN109460546A (en) * 2018-11-09 2019-03-12 腾讯科技(深圳)有限公司 List generation method, device and electronic equipment
US10395313B1 (en) * 2018-03-08 2019-08-27 Capital One Services, Llc Image analysis and identification using machine learning with output personalization
CN110618813A (en) * 2019-09-02 2019-12-27 恩亿科(北京)数据科技有限公司 Method, device and equipment for quickly generating docking media interface and storage medium
WO2020019630A1 (en) * 2018-07-25 2020-01-30 星环信息科技(上海)有限公司 Storage volume creation method and apparatus, server, and storage medium
US20200142955A1 (en) * 2018-11-02 2020-05-07 Dell Products L.P. Intelligent reporting platform

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101118515A (en) * 2007-09-11 2008-02-06 腾讯科技(深圳)有限公司 Automatically testing method and apparatus for list
US20150046791A1 (en) * 2013-08-08 2015-02-12 Palantir Technologies, Inc. Template system for custom document generation
CN104683883A (en) * 2013-11-29 2015-06-03 乐视网信息技术(北京)股份有限公司 Method and device for generating playing strategy
CN103605640A (en) * 2013-12-03 2014-02-26 中国联合网络通信集团有限公司 Form adaption method and device
CN103927353A (en) * 2014-04-10 2014-07-16 北京网秦天下科技有限公司 Method and device for generating service tables
US20160217119A1 (en) * 2015-01-26 2016-07-28 Adobe Systems Incorporated Recognition and population of form fields in an electronic document
US10395313B1 (en) * 2018-03-08 2019-08-27 Capital One Services, Llc Image analysis and identification using machine learning with output personalization
WO2020019630A1 (en) * 2018-07-25 2020-01-30 星环信息科技(上海)有限公司 Storage volume creation method and apparatus, server, and storage medium
CN109460544A (en) * 2018-10-26 2019-03-12 长沙通诺信息科技有限责任公司 Electronic spreadsheet generation method and device, computer equipment and storage medium
US20200142955A1 (en) * 2018-11-02 2020-05-07 Dell Products L.P. Intelligent reporting platform
CN109460546A (en) * 2018-11-09 2019-03-12 腾讯科技(深圳)有限公司 List generation method, device and electronic equipment
CN110618813A (en) * 2019-09-02 2019-12-27 恩亿科(北京)数据科技有限公司 Method, device and equipment for quickly generating docking media interface and storage medium

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114282752A (en) * 2021-11-15 2022-04-05 煤炭科学研究总院 Method and device for generating flow task, electronic equipment and storage medium
CN114047855A (en) * 2021-11-18 2022-02-15 北京字跳网络技术有限公司 Form editing method and device and terminal equipment
CN114047855B (en) * 2021-11-18 2023-11-07 北京字跳网络技术有限公司 Form editing method and device and terminal equipment
CN114385741A (en) * 2021-12-14 2022-04-22 广东三维家信息科技有限公司 Data processing method and device, electronic equipment and storage medium
CN114327188A (en) * 2021-12-30 2022-04-12 北京字跳网络技术有限公司 Form layout method and device, electronic equipment and computer readable medium
CN114327188B (en) * 2021-12-30 2023-10-24 北京字跳网络技术有限公司 Form layout method, form layout device, electronic equipment and computer readable medium

Similar Documents

Publication Publication Date Title
CN110795195B (en) Webpage rendering method and device, electronic equipment and storage medium
CN113449498A (en) Method and device for generating form, storage medium and electronic equipment
CN111045653B (en) System generation method and device, computer readable medium and electronic equipment
CN112433730B (en) Code detection rule generation method and device and electronic equipment
CN115379136B (en) Special effect prop processing method and device, electronic equipment and storage medium
CN113220752A (en) Display method and device and electronic equipment
CN114625469B (en) Information display method, device, equipment and medium based on virtual resource
CN114186527A (en) Method and device for realizing automatic wiring of integrated circuit independent of grid point
CN117576388A (en) Image processing method and device, storage medium and electronic equipment
CN111666100A (en) Software framework generation method and device, electronic equipment and storage medium
US20240265194A1 (en) Page interaction method, device, apparatus and storage medium
US20210303773A1 (en) Automatic layout of elements in a process flow on a 2-d canvas based on representations of flow logic
CN114997117A (en) Document editing method, device, terminal and non-transitory storage medium
CN115756452A (en) Target page code generation method, device, storage medium and program product
CN117555459A (en) Application group processing method and device, storage medium and electronic equipment
CN110618811B (en) Information presentation method and device
CN116931895A (en) Processing method, device and equipment of composite component
CN111459597A (en) User guide generation method and device, electronic equipment and computer readable medium
CN116755665A (en) General page template development method and system based on database table structure
CN111753238A (en) Data mapping method and device and electronic equipment
CN116775174A (en) Processing method, device, equipment and medium based on user interface frame
CN109600558B (en) Method and apparatus for generating information
CN114510309B (en) Animation effect setting method, device, equipment and medium
CN112380821B (en) Graphic display method and device and electronic equipment
US20230396621A1 (en) Method and system for creating social media content collections

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