CN111178012A - Form rendering method, device and equipment and storage medium - Google Patents

Form rendering method, device and equipment and storage medium Download PDF

Info

Publication number
CN111178012A
CN111178012A CN201911220270.2A CN201911220270A CN111178012A CN 111178012 A CN111178012 A CN 111178012A CN 201911220270 A CN201911220270 A CN 201911220270A CN 111178012 A CN111178012 A CN 111178012A
Authority
CN
China
Prior art keywords
component
configuration information
target
rendering
configuration
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
CN201911220270.2A
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.)
Tencent Cloud Computing Beijing Co Ltd
Original Assignee
Tencent Cloud Computing Beijing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Cloud Computing Beijing Co Ltd filed Critical Tencent Cloud Computing Beijing Co Ltd
Priority to CN201911220270.2A priority Critical patent/CN111178012A/en
Publication of CN111178012A publication Critical patent/CN111178012A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/80Information retrieval; Database structures therefor; File system structures therefor of semi-structured data, e.g. markup language structured data such as SGML, XML or HTML
    • G06F16/84Mapping; Conversion

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The application discloses a form rendering method, a form rendering device, equipment and a storage medium, wherein the method is applied to a terminal provided with a form engine, the form engine is provided with a component library, the component library is matched with the terminal, the terminal utilizes the form engine to execute form rendering, and the method comprises the following steps: sending a form rendering request of a target form to a form configuration end; receiving form configuration information in a JSON data format sent by a form configuration end; analyzing the form configuration information in the JSON data format to obtain form configuration information of the target form, wherein the form configuration information represents the layout style and the data configuration information of the target form; and rendering the form component of the target form from the component library according to the form configuration information to generate the target form. The technical scheme provided by the application can realize multi-end form rendering through unified form configuration information, greatly improves the processing efficiency of form rendering, and can ensure the expansibility and flexibility of the form configuration information.

Description

Form rendering method, device and equipment and storage medium
Technical Field
The present application relates to the field of computer application technologies, and in particular, to a form rendering method, apparatus, device, and storage medium.
Background
When information is transmitted through a network, the current user-oriented interface is mainly displayed through HTML (hypertext markup Language). For scenes of a survey class or an interview class, forms are often used to display information, and the content of the forms is not the same as the representation but is different from the representation.
In the prior art, the display of the form at the rendering end is mainly implemented by a form engine based on XML (Extensible Markup Language) and a form engine based on JSON (JSON object notation) data format. Specifically, the former describes the sequence of the form fields, the type of the fields and other information through XML, then analyzes the corresponding components through a parser, and finally arranges the analyzed components on the page according to the sequence, and the method has the defects of limited description information of the form, poor flexibility and poor expansibility; the latter mainly generates configuration information in a JSON data format, analyzes the configuration information, and finally renders at a rendering end. However, although flexibility and expansibility of configuration information of the existing JSON data format are improved to a certain extent, functions are not perfect, and the configuration information of the form needs to be repeatedly developed for many times during multi-end display so as to adapt to form content and adapt to multi-end display, and manpower and material resources are consumed. Therefore, there is a need to provide a more reliable or efficient solution.
Disclosure of Invention
The application provides a form rendering method, a form rendering device and a storage medium, which can realize multi-end form rendering through unified form configuration information, greatly improve the processing efficiency of form rendering and ensure the expansibility and flexibility of the form configuration information.
In one aspect, the present application provides a form rendering method applied to a terminal provided with a form engine, where the form engine is provided with a component library, the component library is adapted to the terminal, and the terminal performs form rendering by using the form engine, where the method includes:
sending a form rendering request of a target form to a form configuration end;
receiving form configuration information in a JSON data format sent by a form configuration end;
analyzing the form configuration information in the JSON data format to obtain the form configuration information of the target form, wherein the form configuration information represents the layout style and the data configuration information of the target form;
and rendering the form component of the target form from a component library according to the form configuration information to generate the target form.
In another aspect, there is provided a form rendering apparatus, the apparatus is provided with a form engine, the form engine is provided with a component library, the component library is adapted to the apparatus, and when the apparatus performs form rendering by using the form engine, the apparatus includes:
the form rendering request sending module is used for sending a form rendering request of a target form to the form configuration end;
the form configuration information receiving module is used for receiving form configuration information in a JSON data format sent by a form configuration end;
the form configuration information analysis module is used for analyzing the form configuration information in the JSON data format to obtain the form configuration information of the target form, and the form configuration information represents the layout style and the data configuration information of the target form;
and the target form generation module is used for rendering the form component of the target form from a component library according to the form configuration information to generate the target form.
Another aspect provides a form rendering apparatus, which includes a processor and a memory, where at least one instruction or at least one program is stored in the memory, and the at least one instruction or the at least one program is loaded by the processor and executed to implement the form rendering method as described above.
Another aspect provides a computer-readable storage medium, in which at least one instruction or at least one program is stored, and the at least one instruction or the at least one program is loaded and executed by a processor to implement the form rendering method as described above.
The form rendering method, the form rendering device, the form rendering equipment and the storage medium have the following technical effects:
the component library matched with the form rendering end is arranged in the form engine arranged at the form rendering end, so that the form rendering at different types of form rendering ends can be ensured, the multi-end form rendering can be realized through unified form configuration information, and the processing efficiency of the form rendering is greatly improved; meanwhile, the form configuration information is stored and transmitted in a JSON data format, so that the universality of the transmitted form configuration information can be ensured on the basis of ensuring the expansibility and flexibility of the form configuration information, and the analysis of different terminals is facilitated.
Drawings
In order to more clearly illustrate the technical solutions and advantages of the embodiments of the present application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative efforts.
FIG. 1 is a schematic diagram of an application environment provided by an embodiment of the present application;
FIG. 2 is a flowchart illustrating a form rendering method according to an embodiment of the present disclosure;
FIG. 3 is a diagram of a form configuration page provided by an embodiment of the present application;
FIG. 4 is a schematic diagram illustrating an effect of a global configuration provided in an embodiment of the present application;
FIG. 5 is a flowchart illustrating a process of rendering a form component of the target form from a component library according to the form configuration information to generate the target form according to the form configuration information provided by the embodiment of the present application;
fig. 6 is a schematic flowchart of performing attribute configuration on a form component of the target form according to static configuration information of the form component, so as to obtain a configured form component according to the embodiment of the present application;
fig. 7 is another schematic flowchart of performing attribute configuration on the form component of the target form according to the static configuration information of the form component, so as to obtain a configured form component according to the embodiment of the present application;
FIG. 8 is a diagram illustrating a target form rendered by a PC according to an embodiment of the present disclosure;
FIG. 9 is a diagram illustrating a target form rendered by a mobile terminal according to an embodiment of the present application;
FIG. 10 is a schematic structural diagram of a form rendering apparatus according to an embodiment of the present application;
fig. 11 is a schematic structural diagram of a client according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. 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 application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or server that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Referring to fig. 1, fig. 1 is a schematic diagram of an application environment according to an embodiment of the present disclosure, and as shown in fig. 1, the application environment may include a form configuration end 100 and a form rendering end 200.
In this embodiment, the form configuration end 100 may include a terminal 101 for providing a user-oriented form configuration interface, and a server 102 for performing form configuration management. Specifically, the user may configure the form configuration information in a form configuration interface provided by the terminal 101. Accordingly, the terminal 101 may send the form configuration information to the server 102; the server 102 may store the configured form configuration information and provide a background service for subsequent form rendering based on the form configuration information.
Specifically, the terminal 101 may include a smart phone, a desktop computer, a tablet computer, a notebook computer, a smart speaker, a digital assistant, an Augmented Reality (AR)/Virtual Reality (VR) device, a smart wearable device, and other types of entity devices. It may also include software running in a physical device, such as a virtual machine. The operating system running on the terminal 101 in this embodiment of the present application may include, but is not limited to, an android system, an IOS system, linux, windows, and the like. Specifically, the server 102 may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a Network service, cloud communication, a middleware service, a domain name service, a security service, a CDN (Content Delivery Network), a big data and artificial intelligence platform, and the like.
In this embodiment, the form rendering end 200 may be configured to perform form rendering based on form configuration information, and specifically, the form rendering end 200 is provided with a form engine, the form engine is provided with a component library for implementing form rendering, the component library is adapted to the form rendering end 200, and the form rendering end 200 utilizes the form engine to perform form rendering. The form rendering end 200 may include a smart phone, a desktop computer, a tablet computer, a notebook computer, a smart speaker, a digital assistant, an Augmented Reality (AR)/Virtual Reality (VR) device, a smart wearable device, and other types of entity devices. It may also include software running in a physical device, such as a virtual machine. The operating system running on the form rendering end 200 in the embodiment of the present application may include, but is not limited to, an android system, an IOS system, linux, windows, and the like.
In this embodiment of the present disclosure, the terminal 101 and the server 102, and the form rendering end 200 and the server 102 may be directly or indirectly connected through a wired or wireless communication manner, and the present application is not limited herein.
In addition, it should be noted that fig. 1 is only an application environment provided by the embodiment of the present application, and in practical applications, the server 102 may include two servers, where the two servers are respectively used for performing form configuration management and providing a background service for form rendering.
The embodiment of a form rendering method according to the present application is described below with a form rendering end as an execution subject, fig. 2 is a flowchart of a form rendering method according to the embodiment of the present application, and the present specification provides the method operation steps described in the embodiment or the flowchart, but may include more or less operation steps based on conventional or non-inventive labor. The order of steps recited in the embodiments is merely one manner of performing the steps in a multitude of orders and does not represent the only order of execution. In actual system or end product execution, sequential execution or parallel execution (e.g., parallel processor or multi-threaded environment) may be possible according to the embodiments or methods shown in the figures. Specifically, as shown in fig. 2, the method may include:
s201: and sending a form rendering request of the target form to a form configuration end.
In this embodiment of the present specification, when the target form needs to be rendered, a form rendering request of the target form may be sent to the form configuration end. In practical application, the form rendering request may carry identification information of the target form, and accordingly, the form configuration end may find the form configuration information of the target form based on the identification information. Specifically, the identification information of the form component may include a unique identifier of the form component set according to a preset rule, and in a specific embodiment, the identification information of the form component may include a name and a random code of the form component.
In practical application, a form configuration page can be provided on the terminal side of the form configuration end facing the user. As shown in fig. 3, fig. 3 is a schematic diagram of a form configuration page provided in the embodiment of the present application. Specifically, in the form configuration page, various types of form components are arranged; a form component may be component configured after a user selects the form component. In the embodiments of the present description, form components may be sequentially selected to perform corresponding configuration, or the selected form components may be configured in batch. Taking fig. 3 as an example, after component configuration, global configuration may also be performed.
Specifically, in the embodiments of the present specification, the form component may include a layout component, a base component, and a business component. The Layout components may be configured for a Layout structure of the whole form, and specifically, the Layout components may include, but are not limited to, a grid component, a card Layout component, and a Layout component Layout. Wherein the grid layout can divide the forms into at least two columns, and the card layout component can display the combination of forms as a card style. The Layout component may set up a separate style configuration.
In particular, the base component may include components that implement common functions for forms. In embodiments of the present description, the base component may include both nestable and non-nestable components. In particular, the nestable component may include a component that may enable nesting of other form components; non-nested components are components that are not nestable with other form components. In particular, the nestable components may include, but are not limited to, array components and object components. Non-nested components may include, but are not limited to: a single line entry component, a multiple line entry component, a title text component, a number box component, a switch component, a radio box component, a pair box component, a radio drop-down box component, a date component, a month component, a date range component, a time component, a slider component, a table component, and the like.
Specifically, the service component may include a component that performs a custom setting in combination with actual service requirements. In a particular embodiment, the business components may include, but are not limited to, password components, scoring components, ethnic components.
In this embodiment, the list of the form components is merely an example, and in an actual application, the form components may be continuously updated in combination with an actual application scenario.
In this embodiment of the present specification, the component configuration may include configuring static configuration information of the component; specifically, the static configuration information may represent inherent attributes characterizing form components configured locally at the form configuration side; such as attributes of presentation style, presentation location, function, etc. In the embodiment of the present specification, in order to better improve the extensibility of the component, the static configuration information may further include a field linkage attribute and an event association attribute. Specifically, the field linkage attribute may be an association relationship with one or more different fields of the form. For example, form a is written with name, and form B is automatically filled with name. For example, in the form of the questionnaire, a radio box form component corresponds to both gender fields of a male and a female, and accordingly, when a male or a female is selected, different subsequent questionnaire data (where the subsequent questionnaire data also corresponds to the corresponding form component) appear.
In this specification embodiment, the global configuration may include global configuration information for each form component in the entire form. Specifically, the global configuration information represents information for configuring a form component included in the target form through a remote configuration interface. The specific configuration information may include configuration of the overall presentation style and function of the form component included in the target form; for example, in connection with the input including name information in the target form as shown in fig. 4, correspondingly, the component topic "name" is set before the single-line input component, and in some embodiments, may be added after the name in a global configuration manner: "(colon).
After the component configuration and the global configuration of various types of form components in the target form are carried out, form configuration information representing the layout style and the data configuration of the target form can be generated, and the local static configuration and the remote configuration of the form components in the form are realized.
S203: and receiving the form configuration information in the JSON data format sent by the form configuration end.
In practical application, after a user performs form configuration on a terminal side in a form configuration end, the terminal may send form configuration information to a server side in the form configuration end, and correspondingly, the server side may store the form configuration information in a JSON data format. After receiving a form rendering request of a certain target form, the form configuration information of the target form can be sent to a corresponding form rendering end in a JSON data format.
In the embodiment of the present specification, when the form configuration information is represented in the JSON data format, the configuration information of the form component of the target form is mainly characterized by type (i.e., the type of the form component is recorded by type) and characteristics. In particular, the properties may include identification information of form components, component configuration (i.e., static configuration information), and global configuration.
Specifically, the static configuration information of different types of form components is different. Wherein, the component configuration in the characteristics of the basic component includes common component configuration characteristics and specific component configuration characteristics, wherein the common component configuration characteristics mainly include: title (a component topic, e.g., a single line entry component for entering a name, and correspondingly, a component topic may be a name); x-components (component tags, which can represent data types corresponding to form components, for example, the component name of a single-row input box component is input, and the x-components thereof may be a string or a password, that is, the data input by the single-row input box component may be a string or a password set by the component tags); x-tips (component styles), x-index (order of form components in the form); x-linkid (association identification, namely when association is needed among different form components, setting the field as the identification information of the associated form component); x-linkages (field linkage, i.e., association of different fields with one or more forms), and the like. In addition, different basic components have respective unique component configuration characteristics, such as an array component has items (static configuration information of a form component nested by the array components) characteristic; the object component has properties (static configuration information of the form component nested by the object component); the multiple box component, the radio box component, and the drop-down box component have enum properties (enumerated option information).
Specifically, the component configuration characteristics of the layout component may mainly include: identification information of the form component; title (component topic); x-fieldid (component name); x-component (component tag); x-tips (component styles); properties (information of contained components, i.e. static configuration information of other form components loaded in layout component)
Specifically, the component configuration characteristics of the service component mainly include: identification information of the form component; title (component topic); x-component (component tag); x-tips (component styles); x-index (order of form components in the form).
Further, the global configuration is a configuration that works for the whole form, and the characteristics may include labelAlign (location information of component tag), labelTextAlign (location of content in component tag), autoAddColon (whether component tag is colon-labeled), needformbutterbutton group (no submit button is required to be set in the form), labelCol (width of component tag), wrapperCol (width of content in component tag), editable (whether form component is editable), initialRequests (remote configuration information, which may include request name, request URL, request type, and field mapping relationship, where the field mapping relationship mainly refers to what configuration is performed on that field, for example, obtaining a piece of remote configuration information is data: { name: Joe }, and accordingly, filling Joe in the input component whose rendering end component is a single line of name.
In the embodiment of the present specification, the form configuration information is stored and transmitted in a JSON data format, so that the universality of the transmitted form configuration information can be ensured on the basis of ensuring the expansibility and flexibility of the form configuration information, and the analysis of different terminals is facilitated.
S205: and analyzing the form configuration information in the JSON data format to obtain the form configuration information of the target form.
In this embodiment of the present specification, after receiving the form configuration information in the JSON data format, the form configuration information may be analyzed to obtain the form configuration information of the target form. In this embodiment of the present specification, the parsed form configuration information may include: the identification information of the form components, the static configuration information of the form components and the global configuration information of the target form contained in the target page.
S207: and rendering the form component of the target form from a component library according to the form configuration information to generate the target form.
In the embodiment of the specification, the component library matched with the form rendering end is preset in the form engine of the form rendering end, so that the form rendering of different form rendering ends can be realized through unified form configuration information for different types of form rendering ends subsequently. In this embodiment of the present specification, the form rendering end may include a PC (personal computer) end and a mobile end, specifically, the PC end may include a physical PC device, and may also include software running in the physical PC device, such as a website and the like; specifically, the mobile terminal may include a physical mobile device, and may also include software running on and in the physical mobile device, such as h5 (web page of the mobile terminal) page, public number, applet, and application program. When the form rendering end is a PC end, the component library may include a PC end component library that sets a corresponding style (including display attributes such as style, theme color, and the like) in combination with a display requirement of the PC end; when the form rendering end is a mobile end, the component library may include a mobile end component library in which a corresponding style is set in accordance with a display requirement of the mobile end.
In a specific embodiment, as shown in fig. 5, the rendering the form component of the target form from the component library according to the form configuration information, and the generating the target form may include:
s2071: acquiring the form component of the target form from a component library according to the identification information of the form component;
s2073: configuring the form component of the target form based on the static configuration information of the form component to obtain a configured form component;
s2075: and performing form rendering based on the global configuration information and the configured form components to generate the target form.
In this embodiment, when the form component includes a nestable base component, the static configuration information of the form component may include: the static configuration information of the nestable base component and the static configuration information of the nested form component corresponding to the nestable base component (the nested form component can comprise a form component nested in the nestable base component); correspondingly, as shown in fig. 6, performing attribute configuration on the form component of the target form according to the static configuration information of the form component, and obtaining the configured form component may include:
s601: setting attribute configuration of the base component according to the static configuration information of the nestable base component;
s603: setting attribute configuration of the nested list component according to the static configuration information of the nested list component;
s605: adapting a nested form component with the set attribute configuration in the basic component with the set attribute configuration to obtain the configured form component;
in an embodiment of the present specification, the layout style of the nested form component after nesting is not changed, and the layout style of the base component after nesting is adaptively adjusted along with the nested form component.
In the embodiment of the description, the nestable basic components can realize component nesting of other form components except for the layout component, so that the expandability and flexibility of the rendered form can be better improved, and configuration of more style layouts can be realized.
In other embodiments, when the form component includes a layout component, the static configuration information for the form component may include: static configuration information of the layout component and static configuration information of a nested form component corresponding to the layout component (the nested form component herein may include a form component nested in the layout component); correspondingly, as shown in fig. 7, performing attribute configuration on the form component of the target form according to the static configuration information of the form component, and obtaining the configured form component may include:
s701: setting attribute configuration of the layout component according to the static configuration information of the layout component;
s703: setting attribute configuration of the nested list component according to the static configuration information of the nested list component;
s705: adapting nested form components with set attribute configuration in the layout components with set attribute configuration to obtain the set form components;
the layout style of the layout component after nesting is unchanged, and the layout style of the nested list component after nesting is adaptively adjusted along with the layout component.
In the embodiment of the description, two different ways of nesting table components, namely a layout component and a nestable base component, can better improve the expandability and flexibility of a rendered form and realize the configuration of more style layouts.
In a specific embodiment, as shown in fig. 8 and fig. 9, the target form is rendered at the PC side and the mobile side based on the same form configuration information of the target form, respectively.
As can be seen from the technical solutions provided by the embodiments of the present specification, in the embodiments of the present specification, by setting the component library adapted to the form rendering end in the form engine set at the form rendering end, it can be ensured that form rendering is performed at different types of form rendering ends subsequently, and multi-end form rendering can be realized through unified form configuration information, thereby greatly improving the processing efficiency of form rendering; meanwhile, the form configuration information is stored and transmitted in a JSON data format, so that the universality of the transmitted form configuration information can be ensured on the basis of ensuring the expansibility and flexibility of the form configuration information, and the analysis of different terminals is facilitated.
In other embodiments, the form component may include a form component having a verification function, and the method further includes:
responding to an editing instruction or a submitting instruction of the target form, and performing local verification processing on information in the form component with the verification function;
or the like, or, alternatively,
and responding to an editing instruction or a submitting instruction of the target form, and performing remote verification processing on the information in the form component with the verification function.
In the embodiment of the specification, data can be submitted and checked after a data value is input in a form component of the form, and local checking and remote checking can be realized in the embodiment of the specification. Specifically, in a local verification scenario, a corresponding verification rule may be set in the form configuration information in advance, for example, a single-row input component is a required item. The remote verification may be performed by combining with a corresponding remote interface, sending the input data to a corresponding verification terminal, and performing verification by the verification terminal, for example, in a scene of logging in an account, verifying the input account information. Correspondingly, if the verification fails, prompt information that the verification fails can be generated.
The embodiment of the application further provides a form rendering device, the device is provided with the form engine, the form engine is provided with a component library, the component library and the device adaptation, the device utilizes when the form engine carries out the form rendering, the device includes:
the form rendering request sending module 1010 may be configured to send a form rendering request of a target form to a form configuration end;
the form configuration information receiving module 1020 may be configured to receive form configuration information in a JSON data format sent by a form configuration end;
the form configuration information analyzing module 1030 may be configured to analyze the form configuration information in the JSON data format to obtain form configuration information of the target form, where the form configuration information represents a layout style and data configuration information of the target form;
the target form generation module 1040 may be configured to render the form component of the target form from the component library according to the form configuration information, and generate the target form.
In some embodiments, the form configuration information includes: global configuration information of a target form, identification information of form components contained in the target form and static configuration information of the form components;
the global configuration information represents information for configuring form components contained in the target form through a remote configuration interface;
the static configuration information characterizes the inherent properties of the form components configured locally at the form configuration side.
In some embodiments, the target form generation module 1040 may include:
the form component acquisition unit is used for acquiring the form component of the target form from a component library according to the identification information of the form component;
the form component configuration unit is used for configuring the form component of the target form based on the static configuration information of the form component to obtain a configured form component;
and the form rendering unit is used for performing form rendering based on the global configuration information and the configured form components to generate the target form.
In some embodiments, the form components can include a nestable base component, a non-nested base component, a custom business component, and a layout component.
In some embodiments, when the form component comprises a nestable base component, the static configuration information for the form component comprises: the static configuration information of the nestable base component and the static configuration information of the nested table component corresponding to the nestable base component;
accordingly, the form component configuration unit may include:
the first attribute configuration unit is used for setting the attribute configuration of the foundation component according to the static configuration information of the nestable foundation component;
the second attribute configuration unit is used for setting the attribute configuration of the nested table component according to the static configuration information of the nested table component;
the first form component adapting unit is used for adapting nested form components with set attribute configuration in the basic components with set attribute configuration to obtain the configured form components;
the layout style of the nested list component after nesting is unchanged, and the layout style of the base component after nesting is adaptively adjusted along with the nested list component.
In some embodiments, when the form component comprises a layout component, the static configuration information for the form component comprises: static configuration information of the layout component and static configuration information of the nested list component corresponding to the layout component;
accordingly, the form component configuration unit may include:
the third attribute configuration unit is used for setting the attribute configuration of the layout component according to the static configuration information of the layout component;
the fourth attribute configuration unit is used for setting the attribute configuration of the nested table component according to the static configuration information of the nested table component;
the second form component adapting unit is used for adapting nested form components with set attribute configuration in the layout components with set attribute configuration to obtain the set form components;
the layout style of the layout component after nesting is unchanged, and the layout style of the nested list component after nesting is adaptively adjusted along with the layout component.
In some embodiments, the form component comprises a form component with verification functionality, the apparatus further comprising:
the local verification processing module is used for responding to an editing instruction or a submitting instruction of the target form and performing local verification processing on information in the form component with the verification function;
or the like, or, alternatively,
and the remote verification processing module is used for responding to the editing instruction or the submitting instruction of the target form and remotely verifying the information in the form component with the verification function.
The device and method embodiments in the device embodiment are based on the same application concept.
The embodiment of the application provides a form rendering device, which includes a processor and a memory, where the memory stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor to implement the form rendering method provided by the above method embodiment.
The memory may be used to store software programs and modules, and the processor may execute various functional applications and data processing by operating the software programs and modules stored in the memory. The memory can mainly comprise a program storage area and a data storage area, wherein the program storage area can store an operating system, application programs needed by functions and the like; the storage data area may store data created according to use of the apparatus, and the like. Further, the memory may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, the memory may also include a memory controller to provide the processor access to the memory.
The method embodiments provided by the embodiments of the present application may be executed in a client (mobile terminal, PC terminal), a server, or a similar computing device. Taking the operation on the client as an example, fig. 11 is a schematic structural diagram of a client provided in the embodiment of the present application, and as shown in fig. 11, the client may be used to implement the information interaction method provided in the foregoing embodiment. Specifically, the method comprises the following steps:
the client may include components such as RF (Radio Frequency) circuitry 1110, memory 1120 including one or more computer-readable storage media, input unit 1130, display unit 1140, sensors 1150, audio circuitry 1160, WiFi (wireless fidelity) module 1170, processor 1180 including one or more processing cores, and power supply 1190. Those skilled in the art will appreciate that the client architecture shown in fig. 11 does not constitute a limitation on the client, and may include more or fewer components than shown, or some components in combination, or a different arrangement of components. Wherein:
RF circuit 1110 may be used for receiving and transmitting signals during a message transmission or communication process, and in particular, for receiving downlink messages from a base station and then processing the received downlink messages by one or more processors 1180; in addition, data relating to uplink is transmitted to the base station. In general, RF circuitry 1110 includes, but is not limited to, an antenna, at least one amplifier, a tuner, one or more oscillators, a Subscriber Identity Module (SIM) card, a transceiver, a coupler, an LNA (Low noise amplifier), a duplexer, and the like. In addition, RF circuitry 1110 may also communicate with networks and other clients via wireless communications. The wireless communication may use any communication standard or protocol, including but not limited to GSM (Global System for Mobile communications), GPRS (General Packet Radio Service), CDMA (Code Division Multiple Access), WCDMA (Wideband Code Division Multiple Access), LTE (Long Term Evolution), e-mail, SMS (Short Messaging Service), and the like.
The memory 1120 may be used to store software programs and modules, and the processor 1180 may execute various functional applications and data processing by operating the software programs and modules stored in the memory 1120. The memory 1120 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, application programs required for functions, and the like; the storage data area may store data created according to the use of the client, and the like. Further, the memory 1120 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, the memory 1120 may also include a memory controller to provide the processor 1180 and the input unit 1130 access to the memory 1120.
The input unit 1130 may be used to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control. In particular, input unit 1130 may include a touch-sensitive surface 1131 as well as other input devices 1132. Touch-sensitive surface 1131, also referred to as a touch display screen or a touch pad, may collect touch operations by a user on or near the touch-sensitive surface 1131 (e.g., operations by a user on or near the touch-sensitive surface 1131 using a finger, a stylus, or any other suitable object or attachment), and drive the corresponding connection device according to a preset program. Alternatively, touch-sensitive surface 1131 may include two portions, a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 1180, and can receive and execute commands sent by the processor 1180. Additionally, touch-sensitive surface 1131 may be implemented using various types of resistive, capacitive, infrared, and surface acoustic waves. The input unit 1130 may include other input devices 1132 in addition to the touch-sensitive surface 1131. In particular, other input devices 1132 may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The display unit 1140 may be used to display information input by or provided to the user as well as various graphical user interfaces of the client, which may be made up of graphics, text, icons, video, and any combination thereof. The display unit 1140 may include a display panel 1141, and optionally, the display panel 1141 may be configured in the form of an LCD (Liquid crystal display), an OLED (Organic Light-Emitting Diode), or the like. Further, touch-sensitive surface 1131 may cover display panel 1141, and when touch operation is detected on or near touch-sensitive surface 1131, the touch operation is transmitted to processor 1180 to determine the type of touch event, and processor 1180 then provides corresponding visual output on display panel 1141 according to the type of touch event. Touch-sensitive surface 1131 and display panel 1141 may be implemented as two separate components for input and output functions, although touch-sensitive surface 1131 and display panel 1141 may be integrated for input and output functions in some embodiments.
The client may also include at least one sensor 1150, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor that adjusts the brightness of the display panel 1141 according to the brightness of ambient light, and a proximity sensor that turns off the display panel 1141 and/or the backlight when the client moves to the ear. As one of the motion sensors, the gravity acceleration sensor can detect the magnitude of acceleration in each direction (generally, three axes), can detect the magnitude and direction of gravity when the device is stationary, and can be used for applications (such as horizontal and vertical screen switching, related games, magnetometer attitude calibration) for identifying client gestures, and related functions (such as pedometer and tapping) for vibration identification; as for other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which may be further configured at the client, detailed description is omitted here.
Audio circuitry 1160, speakers 1161, and microphone 1162 may provide an audio interface between a user and the client. The audio circuit 1160 may transmit the electrical signal converted from the received audio data to the speaker 1161, and convert the electrical signal into a sound signal for output by the speaker 1161; on the other hand, the microphone 1162 converts the collected sound signals into electrical signals, converts the electrical signals into audio data after being received by the audio circuit 1160, and then processes the audio data output processor 1180, and then sends the audio data to, for example, another client via the RF circuit 1110, or outputs the audio data to the memory 1120 for further processing. Audio circuitry 1160 may also include an earbud jack to provide communication of peripheral headphones with the client.
WiFi belongs to short distance wireless transmission technology, and the client can help the user send and receive e-mail, browse web page and access streaming media, etc. through WiFi module 1170, which provides wireless broadband internet access for the user. Although fig. 11 shows the WiFi module 1170, it is understood that it does not belong to the essential constitution of the client and can be omitted entirely as needed within the scope not changing the essence of the invention.
The processor 1180 is a control center of the client, connects various parts of the whole client by using various interfaces and lines, and executes various functions and processes data of the client by running or executing software programs and/or modules stored in the memory 1120 and calling data stored in the memory 1120, thereby performing overall monitoring of the client. Optionally, processor 1180 may include one or more processing cores; preferably, the processor 1180 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated within processor 1180.
The client further includes a power supply 1190 (such as a battery) for supplying power to various components, and preferably, the power supply may be logically connected to the processor 1180 through a power management system, so that functions of managing charging, discharging, power consumption management, and the like are implemented through the power management system. Power supply 1190 may also include one or more dc or ac power supplies, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, or any other component.
Although not shown, the client may further include a camera, a bluetooth module, and the like, which are not described herein again. Specifically, in this embodiment, the display unit of the client is a touch screen display, the client further includes a memory and one or more programs, where the one or more programs are stored in the memory and configured to be executed by the one or more processors according to the instructions of the method embodiments of the present invention.
Embodiments of the present application further provide a storage medium, where the storage medium may be disposed in a device to store at least one instruction related to implementing a form rendering method in the method embodiments, or at least one program, where the at least one instruction or the at least one program is loaded and executed by the processor to implement the form rendering method provided in the method embodiments.
Alternatively, in this embodiment, the storage medium may be located in at least one network server of a plurality of network servers of a computer network. Optionally, in this embodiment, the storage medium may include, but is not limited to: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk, which can store program codes.
As can be seen from the embodiments of the form rendering method, device, server or storage medium provided by the present application, by setting the component library adapted to the form rendering end in the form engine set at the form rendering end in the present application, it can be ensured that forms are subsequently rendered at different types of form rendering ends, and multi-end form rendering can be realized through unified form configuration information, so that the processing efficiency of form rendering is greatly improved, and development manpower and material resources are reduced; meanwhile, the form configuration information is stored and transmitted in a JSON data format, so that the universality of the transmitted form configuration information can be ensured on the basis of ensuring the expansibility and flexibility of the form configuration information, and the analysis of different terminals is facilitated. And the form component is used for realizing a checking function, and the layout component and the nestable basic component are used for two different ways of nesting the form component, so that the expandability and flexibility of the rendered form can be better improved, and the configuration of more style layouts can be realized.
It should be noted that: the sequence of the embodiments of the present application is only for description, and does not represent the advantages and disadvantages of the embodiments. And specific embodiments thereof have been described above. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the apparatus, device and storage medium embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and reference may be made to some descriptions of the method embodiments for relevant points.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware to implement the above embodiments, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk, an optical disk, or the like.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims (10)

1. A form rendering method is applied to a terminal provided with a form engine, the form engine is provided with a component library, the component library is matched with the terminal, and the terminal performs form rendering by using the form engine, and the method comprises the following steps:
sending a form rendering request of a target form to a form configuration end;
receiving form configuration information in a JSON data format sent by a form configuration end;
analyzing the form configuration information in the JSON data format to obtain the form configuration information of the target form, wherein the form configuration information represents the layout style and the data configuration information of the target form;
and rendering the form component of the target form from a component library according to the form configuration information to generate the target form.
2. The method of claim 1, wherein the form configuration information comprises: global configuration information of a target form, identification information of form components contained in the target form and static configuration information of the form components;
the global configuration information represents information for configuring form components contained in the target form through a remote configuration interface;
the static configuration information characterizes the inherent properties of the form components configured locally at the form configuration side.
3. The method of claim 2, wherein the rendering the form component of the target form from a component library according to the form configuration information, the generating the target form comprising:
acquiring the form component of the target form from a component library according to the identification information of the form component;
configuring the form component of the target form based on the static configuration information of the form component to obtain a configured form component;
and performing form rendering based on the global configuration information and the configured form components to generate the target form.
4. The method of claim 1, wherein the form components include a nestable base component, a non-nested base component, a custom business component, and a layout component.
5. The method of claim 1, wherein when the form component comprises a nestable base component, the static configuration information for the form component comprises: the static configuration information of the nestable base component and the static configuration information of the nested table component corresponding to the nestable base component;
correspondingly, performing attribute configuration on the form component of the target form according to the static configuration information of the form component to obtain a configured form component includes:
setting attribute configuration of the base component according to the static configuration information of the nestable base component;
setting attribute configuration of the nested list component according to the static configuration information of the nested list component;
adapting a nested form component with the set attribute configuration in the basic component with the set attribute configuration to obtain the configured form component;
the layout style of the nested list component after nesting is unchanged, and the layout style of the base component after nesting is adaptively adjusted along with the nested list component.
6. The method of claim 1, wherein when the form component comprises a layout component, the static configuration information for the form component comprises: static configuration information of the layout component and static configuration information of the nested list component corresponding to the layout component;
correspondingly, performing attribute configuration on the form component of the target form according to the static configuration information of the form component to obtain a configured form component includes:
setting attribute configuration of the layout component according to the static configuration information of the layout component;
setting attribute configuration of the nested list component according to the static configuration information of the nested list component;
adapting nested form components with set attribute configuration in the layout components with set attribute configuration to obtain the set form components;
the layout style of the layout component after nesting is unchanged, and the layout style of the nested list component after nesting is adaptively adjusted along with the layout component.
7. The method of claim 1, wherein the form component comprises a form component having a verification function, the method further comprising:
responding to an editing instruction or a submitting instruction of the target form, and performing local verification processing on information in the form component with the verification function;
or the like, or, alternatively,
and responding to an editing instruction or a submitting instruction of the target form, and performing remote verification processing on the information in the form component with the verification function.
8. A form rendering apparatus, wherein the apparatus is provided with a form engine, the form engine is provided with a component library, the component library is adapted to the apparatus, and when the apparatus performs form rendering by using the form engine, the apparatus comprises:
the form rendering request sending module is used for sending a form rendering request of a target form to the form configuration end;
the form configuration information receiving module is used for receiving form configuration information in a JSON data format sent by a form configuration end;
the form configuration information analysis module is used for analyzing the form configuration information in the JSON data format to obtain the form configuration information of the target form, and the form configuration information represents the layout style and the data configuration information of the target form;
and the target form generation module is used for rendering the form component of the target form from a component library according to the form configuration information to generate the target form.
9. A form rendering apparatus, comprising a processor and a memory, wherein at least one instruction or at least one program is stored in the memory, and wherein the at least one instruction or the at least one program is loaded and executed by the processor to implement the form rendering method of any of claims 1 to 7.
10. A computer-readable storage medium, having stored therein at least one instruction or at least one program, the at least one instruction or the at least one program being loaded and executed by a processor to implement the form rendering method of any of claims 1 to 7.
CN201911220270.2A 2019-12-03 2019-12-03 Form rendering method, device and equipment and storage medium Pending CN111178012A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911220270.2A CN111178012A (en) 2019-12-03 2019-12-03 Form rendering method, device and equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911220270.2A CN111178012A (en) 2019-12-03 2019-12-03 Form rendering method, device and equipment and storage medium

Publications (1)

Publication Number Publication Date
CN111178012A true CN111178012A (en) 2020-05-19

Family

ID=70656358

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911220270.2A Pending CN111178012A (en) 2019-12-03 2019-12-03 Form rendering method, device and equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111178012A (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111563226A (en) * 2020-07-14 2020-08-21 嘉兴太美医疗科技有限公司 User-defined layout online form page data storage method and device
CN111736831A (en) * 2020-06-23 2020-10-02 山东浪潮商用系统有限公司 Custom menu component development method based on HTML page of mobile terminal
CN112527260A (en) * 2020-12-21 2021-03-19 杭州趣链科技有限公司 Method and device for generating JSON data of form and storage medium
CN112540803A (en) * 2020-12-18 2021-03-23 深圳赛安特技术服务有限公司 Form design adaptation method, device, equipment and storage medium
CN112905943A (en) * 2020-12-09 2021-06-04 广州市玄武无线科技股份有限公司 Dynamic chart display method and system based on mobile terminal
CN113296757A (en) * 2020-06-12 2021-08-24 阿里巴巴集团控股有限公司 Processing method and system for layout of integrated development environment
CN113407877A (en) * 2021-06-21 2021-09-17 杭州卓健信息科技股份有限公司 Configurable web form implementation method
CN113419801A (en) * 2021-06-16 2021-09-21 中移(杭州)信息技术有限公司 Form rendering method, terminal, device and computer-readable storage medium
CN113741898A (en) * 2021-11-08 2021-12-03 深圳市明源云采购科技有限公司 Form generation method, device and equipment
CN114296833A (en) * 2021-12-31 2022-04-08 广州方硅信息技术有限公司 Business interface component configuration method and device, equipment and medium thereof
CN114780196A (en) * 2022-04-29 2022-07-22 北京百度网讯科技有限公司 User interface form rendering method and device, electronic equipment and storage medium

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113296757A (en) * 2020-06-12 2021-08-24 阿里巴巴集团控股有限公司 Processing method and system for layout of integrated development environment
CN111736831A (en) * 2020-06-23 2020-10-02 山东浪潮商用系统有限公司 Custom menu component development method based on HTML page of mobile terminal
CN111563226B (en) * 2020-07-14 2020-11-06 嘉兴太美医疗科技有限公司 User-defined layout online form page data storage method and device
CN111563226A (en) * 2020-07-14 2020-08-21 嘉兴太美医疗科技有限公司 User-defined layout online form page data storage method and device
CN112905943A (en) * 2020-12-09 2021-06-04 广州市玄武无线科技股份有限公司 Dynamic chart display method and system based on mobile terminal
CN112540803B (en) * 2020-12-18 2023-08-11 深圳赛安特技术服务有限公司 Form design adaptation method, device, equipment and storage medium
CN112540803A (en) * 2020-12-18 2021-03-23 深圳赛安特技术服务有限公司 Form design adaptation method, device, equipment and storage medium
CN112527260A (en) * 2020-12-21 2021-03-19 杭州趣链科技有限公司 Method and device for generating JSON data of form and storage medium
CN113419801A (en) * 2021-06-16 2021-09-21 中移(杭州)信息技术有限公司 Form rendering method, terminal, device and computer-readable storage medium
CN113407877A (en) * 2021-06-21 2021-09-17 杭州卓健信息科技股份有限公司 Configurable web form implementation method
CN113741898A (en) * 2021-11-08 2021-12-03 深圳市明源云采购科技有限公司 Form generation method, device and equipment
CN113741898B (en) * 2021-11-08 2022-02-25 深圳市明源云采购科技有限公司 Form generation method, device and equipment
CN114296833A (en) * 2021-12-31 2022-04-08 广州方硅信息技术有限公司 Business interface component configuration method and device, equipment and medium thereof
CN114780196A (en) * 2022-04-29 2022-07-22 北京百度网讯科技有限公司 User interface form rendering method and device, electronic equipment and storage medium
CN114780196B (en) * 2022-04-29 2023-07-28 北京百度网讯科技有限公司 User interface form rendering method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN111178012A (en) Form rendering method, device and equipment and storage medium
CN110795666B (en) Webpage generation method, device, terminal and storage medium
US9241242B2 (en) Information recommendation method and apparatus
CN105867751B (en) Operation information processing method and device
CN108039963B (en) Container configuration method and device and storage medium
CN109857403B (en) Page updating method and device, page processing method and device
CN108156508B (en) Barrage information processing method and device, mobile terminal, server and system
CN110399583B (en) Page display method and device, electronic equipment and storage medium
CN111124412B (en) Game page drawing method, device, equipment and storage medium
CN106780684B (en) Animation effect realization method and device
CN107666406B (en) Intelligent card display method and device
WO2015003636A1 (en) Method and device for interception of page elements
CN110035181A (en) It is a kind of to apply card theme setting method and terminal fastly
CN112749074B (en) Test case recommending method and device
CN108429668B (en) Message processing method, device, terminal and system
CN108182090B (en) Flash plug-in loading method and device based on blink kernel
CN108763544A (en) A kind of display methods and terminal
CN110300047B (en) Animation playing method and device and storage medium
CN111359210B (en) Data processing method and device, electronic equipment and storage medium
CN105631059B (en) Data processing method, data processing device and data processing system
CN105320532B (en) Method, device and terminal for displaying interactive interface
CN109145182B (en) Data acquisition method and device, computer equipment and system
CN115017340A (en) Multimedia resource generation method and device, electronic equipment and storage medium
CN106230919B (en) File uploading method and device
CN114510417A (en) Image rendering effect testing method and device, electronic equipment and storage medium

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