CN110162301B - Form rendering method, form rendering device and storage medium - Google Patents
Form rendering method, form rendering device and storage medium Download PDFInfo
- Publication number
- CN110162301B CN110162301B CN201910257975.5A CN201910257975A CN110162301B CN 110162301 B CN110162301 B CN 110162301B CN 201910257975 A CN201910257975 A CN 201910257975A CN 110162301 B CN110162301 B CN 110162301B
- Authority
- CN
- China
- Prior art keywords
- rendering
- information
- terminal
- form information
- template
- 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.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/38—Creation or generation of source code for implementing user interfaces
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/958—Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
- G06F16/986—Document structures and storage, e.g. HTML extensions
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Abstract
The invention relates to a form rendering method, a form rendering device and a storage medium. The method comprises the following steps: acquiring form information based on HTML codes from a terminal; determining a rendering form based on a JSON data format according to the form information; and sending the rendering form to the terminal. The technical scheme of the invention can ensure the efficiency and the accuracy of form information network transmission.
Description
Technical Field
The present invention relates to the field of computer application technologies, and in particular, to a form rendering method, a form rendering device, and a storage medium.
Background
The current user-oriented interfaces are mainly presented by HTML (Hyper Text Markup Language ) when information is transmitted over a network. For the presentation interface of the survey class or interview class, a plurality of forms are typically included, and accordingly, various forms are also generated based on HTML code. However, because HTML code has a problem of large space occupation, particularly for larger forms that are not usually displayed by plain text, when a user views or edits the corresponding form through a terminal, the form information may be displayed missing, or after the user performs interactive editing, loading is slow, which affects the effective progress of investigation or interview.
Disclosure of Invention
Aiming at the defects of the prior art, the invention provides a form rendering method, a form rendering device and a storage medium.
In a first aspect, the present invention provides a form rendering method, including the steps of:
form information based on HTML code from the terminal is acquired.
And determining a rendering form based on the JSON data format according to the form information.
And sending the rendering form to the terminal.
In a second aspect, the present invention provides a form rendering apparatus, comprising:
and the acquisition module is used for acquiring the form information based on the HTML codes from the terminal.
And the processing module is used for determining a rendering form based on the JSON data format according to the form information.
And the sending module is used for sending the rendering form to the terminal.
In a third aspect, the present invention provides a form rendering apparatus comprising a memory and a processor; the memory is used for storing a computer program; the processor is configured to implement the form rendering method described above when executing the computer program.
In a fourth aspect, the present invention provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a form rendering method as described above.
The form rendering method, the form rendering device and the storage medium have the advantages that when a user views the form based on the HTML codes, such as investigation type or interview type, through the terminal, after the interactive operation is performed on the form, for example, after a certain item of information is input on a first page of the form, namely, a current interface, the information influences a second page of the form, namely, part of display content of a subsequent interface, the user needs to wait for the subsequent interface based on the form, for example, the display content of the second page generated based on the update of the information. The server at the background can acquire the form information based on the HTML codes sent by the terminal at the moment, or the server can actively acquire the form information meeting certain conditions, for example, the original form information is also sent to the terminal by the server, the original form information comprises a label which authorizes the server to actively grasp, and when the original form information is displayed on the terminal based on the HTML codes, the server can search the terminal on the network according to the label and grasp the form information based on the HTML codes. After the form information based on the HTML codes is obtained, the current form is converted into the form based on the JSON data format through the basic data information and the like of the form, rendering is completed, a rendering form is generated, and the graphical rendering form is directly sent to the user terminal, so that the display effect is better, and the loading time at the terminal side is reduced. Because the forms in the JSON data format are easier to read and write by people, are easy to analyze and generate by machines, occupy less resources, not only can the network transmission efficiency be effectively improved, but also the integrity and the accuracy of the form information can be ensured. Form information obtained again by the user through the terminal is rapidly loaded, and the information is complete, so that the effective proceeding of investigation or interview can be ensured.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions of the prior art, the drawings that are needed in the embodiments or the description of the prior art will be briefly described below, it will be obvious that the drawings in the following description are some embodiments of the present invention, and that other drawings can be obtained according to these drawings without inventive effort to a person skilled in the art.
FIG. 1 is a schematic flow chart of a form rendering method according to an embodiment of the present invention;
fig. 2 is a block diagram of a form rendering apparatus according to an embodiment of the present invention.
Detailed Description
The principles and features of the present invention are described below with reference to the drawings, the examples are illustrated for the purpose of illustrating the invention and are not to be construed as limiting the scope of the invention.
As shown in fig. 1, a form rendering method according to an embodiment of the present invention includes the following steps:
form information based on HTML code from the terminal is acquired.
And determining a rendering form based on the JSON data format according to the form information.
And sending the rendering form to the terminal.
In this embodiment, when a user views a form, such as a survey class or an interview class, based on HTML codes, through a terminal, after performing an interactive operation on the form, for example, after inputting a certain item of information on a first page of the form, that is, a current interface, the user needs to wait for a subsequent interface, such as updating the display content of a generated second page, based on the previous information, of the form, because the information affects part of the display content of a second page of the form, that is, a subsequent interface. The server at the background can acquire the form information based on the HTML codes sent by the terminal at the moment, or the server can actively acquire the form information meeting certain conditions, for example, the original form information is also sent to the terminal by the server, the original form information comprises a label which authorizes the server to actively grasp, and when the original form information is displayed on the terminal based on the HTML codes, the server can search the terminal on the network according to the label and grasp the form information based on the HTML codes. After the form information based on the HTML codes is obtained, the current form is converted into the form based on the JSON data format through the basic data information and the like of the form, rendering is completed, a rendering form is generated, and the graphical rendering form is directly sent to the user terminal, so that the display effect is better, and the loading time at the terminal side is reduced. Because the forms in the JSON data format are easier to read and write by people, are easy to analyze and generate by machines, occupy less resources, not only can the network transmission efficiency be effectively improved, but also the integrity and the accuracy of the form information can be ensured. Form information obtained again by the user through the terminal is rapidly loaded, and the information is complete, so that the effective proceeding of investigation or interview can be ensured.
The JSON is called JavaScript Object Notation, namely a JS object numbered musical notation. The data exchange format is a lightweight data exchange format and has a concise and clear hierarchical structure.
Preferably, the form information includes a form identifier, and the determining, according to the form information, a rendering form based on JSON data format specifically includes:
searching a preset database according to the form identifier.
And when a form template which is matched with the form identifier and is based on the JSON data format is searched, extracting form data in the form information, and generating the rendering form according to the form template and the form data rendering.
Since the form is usually preset in the background and the content is relatively fixed, the form will usually have a form identifier corresponding to the form, and the form format, frame and other information can be determined through the form identifier. The background preset database can contain a plurality of form templates based on JSON data format, and each form template corresponds to a corresponding form identifier. Since a process is required for upgrading the background preset database, the form information based on the HTML code from the terminal may not be entirely covered.
If the corresponding form template can be searched, after basic form data in the form information is extracted, a new form based on the JSON data format can be generated based on the form template and the form data, and is rendered, so that a rendering form which can be directly read by a user is generated. By replacing HTML data with JSON data, the data space is greatly compressed on the premise of ensuring the integrity of the information, and the transmission and loading rate of the form information can be improved.
Preferably, the specific implementation of generating the rendering form according to the form template and the form data rendering is as follows:
and generating the rendering form according to the form template and the form data rendering based on a virtual DOM technology.
The virtual DOM (Document Object Model ) is also called VDOM, which can greatly increase the rendering speed and further increase the data interaction rate of the form information.
Preferably, the method further comprises the steps of:
when the form template which is matched with the form identifier and is based on the JSON data format is not searched, the form information is marked, and the marked form information is used as reference information for generating the form template which is matched with the marked form information and is based on the JSON data format.
If the corresponding form template cannot be searched, the form information can be marked, and a form template which is matched with the form information and is based on the JSON data format can be manufactured by using background staff or automatically taking the marked form information as reference information and added into a preset database. So that when the HTML code based form information of the same identifier is encountered again, it can be quickly converted.
As shown in fig. 2, a form rendering apparatus according to an embodiment of the present invention includes:
and the acquisition module is used for acquiring the form information based on the HTML codes from the terminal.
And the processing module is used for determining a rendering form based on the JSON data format according to the form information.
And the sending module is used for sending the rendering form to the terminal.
Preferably, the form information includes a form identifier, and the processing module is specifically configured to:
searching a preset database according to the form identifier.
And when a form template which is matched with the form identifier and is based on the JSON data format is searched, extracting form data in the form information, and generating the rendering form according to the form template and the form data rendering.
Preferably, the processing module is specifically configured to:
and generating the rendering form according to the form template and the form data rendering based on a virtual DOM technology.
Preferably, the processing module is specifically further configured to:
when the form template which is matched with the form identifier and is based on the JSON data format is not searched, the form information is marked, and the marked form information is used as reference information for generating the form template which is matched with the marked form information and is based on the JSON data format.
In another embodiment of the present invention, a form rendering device includes a memory and a processor. The memory is used for storing a computer program. The processor is configured to implement the form rendering method described above when executing the computer program. The device may be a server or the like.
In another embodiment of the present invention, a computer program is stored on a computer readable storage medium, which when executed by a processor, implements a form rendering method as described above.
The reader will appreciate that in the description of this specification, a description of terms "one embodiment," "some embodiments," "examples," "specific examples," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, schematic representations of the above terms are not necessarily directed to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, the different embodiments or examples described in this specification and the features of the different embodiments or examples may be combined and combined by those skilled in the art without contradiction.
While embodiments of the present invention have been shown and described above, it will be understood that the above embodiments are illustrative and not to be construed as limiting the invention, and that variations, modifications, alternatives and variations may be made to the above embodiments by one of ordinary skill in the art within the scope of the invention.
Claims (6)
1. A form rendering method, the method comprising the steps of:
acquiring form information based on HTML codes from a terminal;
determining a rendering form based on a JSON data format according to the form information;
sending the rendering form to the terminal;
the form information comprises a form identifier, and the determining the rendering form based on the JSON data format according to the form information specifically comprises the following steps:
searching a preset database according to the form identifier;
when a form template which is matched with the form identifier and is based on a JSON data format is searched, form data in the form information is extracted, and the rendering form is generated according to the form template and the form data rendering;
the method further comprises the steps of:
when the form template which is matched with the form identifier and is based on the JSON data format is not searched, marking the form information, wherein the marked form information is used as reference information for generating the form template which is matched with the marked form information and is based on the JSON data format;
the form information includes: form information based on HTML codes received by the terminal or form information meeting preset conditions is actively obtained by the terminal;
the server can search the terminal in the network according to the label when the original form information is displayed on the terminal based on the HTML code, and grasp the form information of the HTML code on the terminal.
2. The form rendering method according to claim 1, wherein the generating the rendering form according to the form template and the form data rendering is specifically implemented as:
and generating the rendering form according to the form template and the form data rendering based on a virtual DOM technology.
3. A form rendering apparatus, comprising:
the acquisition module is used for acquiring form information based on HTML codes from the terminal;
the processing module is used for determining a rendering form based on a JSON data format according to the form information;
the sending module is used for sending the rendering form to the terminal;
the form information comprises a form identifier, and the processing module is specifically configured to:
searching a preset database according to the form identifier;
when a form template which is matched with the form identifier and is based on a JSON data format is searched, form data in the form information is extracted, and the rendering form is generated according to the form template and the form data rendering;
the processing module is specifically further configured to:
when the form template which is matched with the form identifier and is based on the JSON data format is not searched, marking the form information, wherein the marked form information is used as reference information for generating the form template which is matched with the marked form information and is based on the JSON data format;
the form information includes: form information based on HTML codes received by the terminal or form information meeting preset conditions is actively obtained by the terminal;
the server can search the terminal in the network according to the label when the original form information is displayed on the terminal based on the HTML code, and grasp the form information of the HTML code on the terminal.
4. The form rendering device of claim 3, wherein the processing module is specifically configured to:
and generating the rendering form according to the form template and the form data rendering based on a virtual DOM technology.
5. A form rendering device comprising a memory and a processor;
the memory is used for storing a computer program;
the processor being configured to implement the form rendering method of claim 1 or 2 when executing the computer program.
6. A computer readable storage medium, characterized in that the storage medium has stored thereon a computer program which, when executed by a processor, implements the form rendering method according to claim 1 or 2.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910257975.5A CN110162301B (en) | 2019-04-01 | 2019-04-01 | Form rendering method, form rendering device and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910257975.5A CN110162301B (en) | 2019-04-01 | 2019-04-01 | Form rendering method, form rendering device and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110162301A CN110162301A (en) | 2019-08-23 |
CN110162301B true CN110162301B (en) | 2023-07-04 |
Family
ID=67638957
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910257975.5A Active CN110162301B (en) | 2019-04-01 | 2019-04-01 | Form rendering method, form rendering device and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110162301B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111857712A (en) * | 2020-06-30 | 2020-10-30 | 深圳市中农易讯信息技术有限公司 | Form processing method, device, terminal and medium |
CN111796881A (en) * | 2020-06-30 | 2020-10-20 | 北京三快在线科技有限公司 | Method and device for loading form components |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105095449A (en) * | 2015-07-27 | 2015-11-25 | 福州盈展信息技术有限公司 | Method for converting HTML webpage to mobile terminal page |
CN105589918A (en) * | 2015-09-17 | 2016-05-18 | 广州市动景计算机科技有限公司 | Method and device for extracting page information |
CN105760440A (en) * | 2016-02-02 | 2016-07-13 | 广州市科南软件有限公司 | Achievement method and system of online form designer |
CN107943455A (en) * | 2017-08-11 | 2018-04-20 | 成都萌想科技有限责任公司 | A kind of list rendering system based on JSON data formats |
Family Cites Families (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130054284A1 (en) * | 2011-08-26 | 2013-02-28 | Robert James Burke | Templatized reporting engine |
US20130311875A1 (en) * | 2012-04-23 | 2013-11-21 | Derek Edwin Pappas | Web browser embedded button for structured data extraction and sharing via a social network |
US9959607B2 (en) * | 2015-07-07 | 2018-05-01 | Adp, Llc | Automatic verification of graphic rendition of JSON data |
AU2016302392B2 (en) * | 2015-07-31 | 2022-06-23 | WiseTech Global (Licensing) Pty Ltd | Methods and systems for creating configurable forms, configuring forms and for form flow and form correlation |
CN108153716B (en) * | 2017-12-26 | 2021-05-04 | 东软集团股份有限公司 | Form processing method and device, storage medium and electronic equipment |
CN108363573A (en) * | 2018-01-11 | 2018-08-03 | 山东浪潮通软信息科技有限公司 | A kind of efficient mobile form design and rendering intent |
CN109144647B (en) * | 2018-08-21 | 2021-11-16 | 深圳博沃智慧科技有限公司 | Form design method and device, terminal equipment and storage medium |
-
2019
- 2019-04-01 CN CN201910257975.5A patent/CN110162301B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105095449A (en) * | 2015-07-27 | 2015-11-25 | 福州盈展信息技术有限公司 | Method for converting HTML webpage to mobile terminal page |
CN105589918A (en) * | 2015-09-17 | 2016-05-18 | 广州市动景计算机科技有限公司 | Method and device for extracting page information |
CN105760440A (en) * | 2016-02-02 | 2016-07-13 | 广州市科南软件有限公司 | Achievement method and system of online form designer |
CN107943455A (en) * | 2017-08-11 | 2018-04-20 | 成都萌想科技有限责任公司 | A kind of list rendering system based on JSON data formats |
Also Published As
Publication number | Publication date |
---|---|
CN110162301A (en) | 2019-08-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9977765B2 (en) | Information processing device, information processing method, information processing program, display control device, and display control program | |
CN110781423A (en) | Webpage generation method and device and electronic equipment | |
CN102306174B (en) | Method and equipment for interacting with user based on web page elements | |
KR101494844B1 (en) | System for Transforming Chart Using Metadata and Method thereof | |
CN112100550A (en) | Page construction method and device | |
KR101950126B1 (en) | Mathematical formula processing method, device, apparatus and computer storage medium | |
CN105677927A (en) | Method and device for providing searching result | |
CN113158101A (en) | Visual page rendering method, device, equipment and storage medium | |
CN110162301B (en) | Form rendering method, form rendering device and storage medium | |
CN111651966A (en) | Data report file generation method and device and electronic equipment | |
CN106951495A (en) | Method and apparatus for information to be presented | |
CN107590288B (en) | Method and device for extracting webpage image-text blocks | |
CN112417338A (en) | Page adaptation method, system and equipment | |
CN112306594A (en) | Rendering method and device based on mobile terminal and storage medium | |
CN111552463A (en) | Page jump method and device, computer equipment and storage medium | |
CN111444171B (en) | Method, device and storage medium for generating value-added tax payment statement | |
Ballamudi et al. | Getting Started Modern Web Development with Next. js: An Indispensable React Framework | |
CN111562911A (en) | Webpage editing method and device and storage medium | |
CN112433995B (en) | File format conversion method, system, computer device and storage medium | |
CN113283228A (en) | Document generation method and device, electronic equipment and storage medium | |
CN112632425A (en) | Method, device, equipment and storage medium for generating offline resource file | |
CN112487883A (en) | Intelligent pen writing behavior characteristic analysis method and device and electronic equipment | |
CN116954450A (en) | Screenshot method and device for front-end webpage, storage medium and terminal | |
CN115170695A (en) | Method and device for generating chart picture, electronic equipment and storage medium | |
CN114004209A (en) | PDF format data export method and device, electronic equipment and readable 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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |