Implementation method for automatically generating item form

By using optical character recognition model OCR and form designer, the automatic generation of item forms is solved, and the complex and time-consuming problem of manually drawing forms in the prior art is solved, and efficient item creation and online paperless office are achieved.

CN120146014APending Publication Date: 2025-06-13INSPUR SOFTWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510266058.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-07
Publication Date
2025-06-13

AI Technical Summary

Technical Problem

When generating and exporting event forms, the operation process is complicated, and manually drawing forms is time-consuming and laborious, making it difficult to adapt to the application scenarios where a large number of offline events are converted to online.

Method used

The optical character recognition model OCR is used to identify paper forms, draw electronic forms, and render and adjust them through the form designer. Finally, the rendered electronic forms are converted into PDF documents.

Benefits of technology

It greatly simplifies the process of manually drawing forms, improves the efficiency of event creation, is suitable for complex business scenarios generated by the entry and entry of a large number of event form, and promotes the development of online paperless office.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120146014A_ABST
    Figure CN120146014A_ABST
Patent Text Reader

Abstract

The invention discloses an implementation method for automatically generating an item form, and relates to the technical field of data conversion. Comprising the following steps: 1, identifying text and image information of a paper form by adopting an optical character recognition (OCR) model to obtain information on the paper form, and drawing an electronic form according to the information on the paper form; 2, according to the drawn electronic form, rendering is carried out based on the form style of a form designer, the difference between the form displayed by the form designer and the actual paper form in style is compared, and the electronic form is adjusted according to the difference; and 3, converting the rendered electronic form into a PDF (Portable Document Format) document for online electronic signing and sealing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention discloses an implementation method for automatically generating item forms, which relates to the technical field of data conversion. Background Art

[0002] Form generation refers to converting the form designed by the form designer into a document, realizing the online export of the form filled with content online, and is applicable to paperless office. Existing methods often require manually designing the form using the form designer, and additionally require manually drawing a word template document corresponding to the form fields, and using the unique identification attribute of the data for field mapping to achieve form generation. However, this process has a complex operation flow, and the process of manually drawing the form is time-consuming and laborious, and it is difficult to adapt to the application scenario of converting a large number of offline items into online items. Summary of the Invention

[0003] In view of the problems of the existing technology, the present invention provides an implementation method for automatically generating item forms, which optimizes and innovates in the aspects of form drawing entry, generation and export, greatly simplifies the cumbersome process of manually drawing forms, and is applicable to complex business scenarios of a large number of item form entries and generations, bringing a better user experience.

[0004] The specific solution proposed by the present invention is as follows:

[0005] The present invention provides an implementation method for automatically generating item forms, including:

[0006] Step 1: Use the optical character recognition model OCR to recognize the text and image information of the paper form, obtain the information on the paper form, and draw an electronic form according to the information on the paper form;

[0007] Step 2: Based on the form style of the form designer, render the drawn electronic form, where compare the differences in style between the form shown by the form designer and the actual paper form, and adjust the electronic form according to the differences;

[0008] Step 3: Convert the rendered electronic form into a PDF document for online electronic approval and signature.

[0009] Further, in step 1 of the implementation method for automatically generating item forms, it includes:

[0010] First, upload the paper form image;

[0011] Secondly, send the paper form image into the optical character recognition model OCR to extract the form field content;

[0012] Then configure the form for the extracted field content;

[0013] Finally, use the form designer to load the form configuration, and then perform editing adjustments and draw the electronic form.

[0014] Furthermore, in step 2 of the method for implementing an automatically generated matter form, by configuring the common page and separately deploying the browser for unified form page rendering, the same form file can be rendered on both the mobile end and the PC end.

[0015] Furthermore, in step 3 of the method for implementing an automatically generated matter form, it includes:

[0016] First, determine the paper parameters for generating the electronic form, where the paper parameters include orientation, size, and margin;

[0017] Secondly, convert the entire electronic form page into an image;

[0018] Then, to ensure that the text size and page layout are the same when the image is generated in both portrait and landscape orientations, use a unified file size unit and perform scale conversion;

[0019] Finally, crop the converted image to generate a multi-page PDF file.

[0020] The present invention also provides an implementation device for automatically generating a matter form, including an identification module, a drawing module, a rendering module, and a conversion module.

[0021] The identification module uses the optical character recognition model OCR to identify the text and image information of the paper form. The drawing module obtains the information on the paper form and draws the electronic form according to the information on the paper form;

[0022] The rendering module renders based on the form style of the form designer according to the drawn electronic form. Among them, the rendering module compares the differences in style between the form shown in the form designer and the actual paper form, and adjusts the electronic form according to the differences;

[0023] The conversion module converts the rendered electronic form into a PDF document for online electronic approval and signature.

[0024] Furthermore, in the implementation device for automatically generating a matter form, the identification module first uploads the paper form image; secondly, the identification module sends the paper form image into the optical character recognition model OCR to extract the form field content;

[0025] Then, the drawing module configures the form with the extracted field content;

[0026] Finally, the drawing module uses the form designer to load the form configuration, and then performs editing adjustments and draws the electronic form.

[0027] Further, the rendering module of the device for implementing the automatic generation of matter forms renders the unified form page by configuring the common page and separately deploying the browser, so that the same form file is rendered on the mobile end and the PC end.

[0028] Further, the conversion module of the device for implementing the automatic generation of matter forms first determines the paper parameters for generating the electronic form, and the paper parameters include the orientation, size, and margin;

[0029] Secondly, the entire electronic form page is converted into an image;

[0030] Then, in order to make the text size and page layout generated in both the vertical and horizontal cases of the image the same, a unified file size unit is adopted and a scale conversion is performed;

[0031] Finally, the converted image is cropped to generate a multi-page PDF file.

[0032] The beneficial effects of the present invention are as follows:

[0033] Integrating the OCR form recognition technology, it can realize the conversion of paper forms into electronic forms, greatly simplifying the operation of inputting offline forms into the online system and improving the efficiency of matter creation;

[0034] Without the need to configure additional form template files, it can realize the generation and export of electronic forms after filling in the content;

[0035] The generated files are used for online electronic approval and signature, promoting the development of online paperless office;

[0036] It can also be applied to other business scenarios and has a certain universality. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 It is a schematic flowchart of the method of the present invention.

[0038] Figure 2 It is a schematic flowchart of the form style rendering based on the form designer.

[0039] Figure 3 It is a schematic flowchart of the document generation based on the image.

[0040] Figure 4 It is a schematic diagram of the overall application framework of the method of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0041] The present invention will be further described below in conjunction with the drawings and specific embodiments, so that those skilled in the art can better understand the present invention and be able to implement it, but the embodiments cited are not intended to limit the present invention.

[0042] Embodiment 1

[0043] The present invention provides an implementation method for automatically generating an item form, including:

[0044] Step 1: Use an optical character recognition model OCR to recognize the text and image information of a paper form, obtain the information on the paper form, and draw an electronic form based on the information on the paper form.

[0045] Among them, in Step 1, it may include:

[0046] First, upload the image of the paper form;

[0047] Secondly, send the image of the paper form into the optical character recognition model OCR to extract the form field content;

[0048] Then, perform form configuration on the extracted field content;

[0049] Finally, use a form designer to load the form configuration, and perform editing adjustment and draw the electronic form.

[0050] Step 2: Based on the drawn electronic form, render it according to the form style of the form designer. Among them, compare the differences in style between the form shown by the form designer and the actual paper form, and adjust the electronic form according to the differences. It is possible to perform unified form page rendering by configuring a common page and separately deploying a browser, so that the same form file can be rendered on the mobile side and the PC side.

[0051] Step 3: Convert the rendered electronic form into a PDF document for online electronic approval and signature.

[0052] Among them, in Step 3, it may include:

[0053] First, determine the paper parameters for generating the electronic form. The paper parameters include orientation, size, and margin;

[0054] Secondly, convert the entire electronic form page into an image;

[0055] Then, to ensure that the text size and page layout generated in both vertical and horizontal cases of the image are the same, use a unified file size unit and perform ratio conversion;

[0056] Finally, crop the converted image to generate a multi-page PDF file.

[0057] The normal operation of the specific overall application depends on the support of underlying service software, such as the Nginx server for access proxy, the docker container for OCR model deployment, the Chrome browser for form rendering, the JAVA service for overall logic processing, and MINIO for file object storage, etc. The deployment of the overall application can be used in actual scenarios such as the conversion and generation of electronic documents, the electronic signature and seal of electronic files in a paperless office scenario, and the generation of inspection rectification notice forms in an inspection scenario. The multi-terminal deployment method also avoids the spatial limitations of the application. For reference, see Figure 4 。

[0058] Embodiment 2

[0059] The present invention also provides an implementation device for automatically generating an item form, including an identification module, a drawing module, a rendering module, and a conversion module.

[0060] The identification module uses an optical character recognition model OCR to identify the text and image information of a paper form. The drawing module obtains the information on the paper form and draws an electronic form according to the information on the paper form.

[0061] The rendering module renders based on the form style of the form designer according to the drawn electronic form. Among them, the rendering module compares the differences in style between the form shown by the form designer and the actual paper form, and adjusts the electronic form according to the differences.

[0062] The conversion module converts the rendered electronic form into a PDF document for online electronic signature and seal.

[0063] Regarding the information interaction, execution process, etc. among the above-mentioned modules in the device, since they are based on the same concept as the method embodiment of the present invention, the specific content can be referred to the description in the method embodiment of the present invention, and will not be elaborated here.

[0064] Similarly, the device of the present invention integrates OCR form recognition technology, which can realize the conversion of paper forms into electronic forms, greatly simplifies the operation of offline form entry into online, and improves the efficiency of item creation; it is not necessary to configure additional form template files, and can realize the generation and export of electronic forms after filling in the content; the generated files are used for online electronic signature and seal, promoting the development of online paperless office; it can also be applied to other business scenarios, having a certain universality.

[0065] It should be noted that not all steps and modules in the above-mentioned processes and device structures are necessary, and some steps or modules can be ignored according to actual needs. The execution order of each step is not fixed and can be adjusted as required. The system structures described in the above-mentioned embodiments can be physical structures or logical structures, that is, some modules may be implemented by the same physical entity, or some modules may be implemented separately by multiple physical entities, or they can be jointly implemented by some components in multiple independent devices.

[0066] The above-mentioned embodiments are only preferred embodiments given to fully illustrate the present invention, and the protection scope of the present invention is not limited thereto. Equivalent substitutions or transformations made by those skilled in the art on the basis of the present invention are all within the protection scope of the present invention. The protection scope of the present invention shall be subject to the claims.

Claims

1. A method for automatically generating a form of matters, characterized in that include: Step 1: Use the optical character recognition model OCR to recognize the text and image information of the paper form, obtain the information on the paper form, and draw the electronic form according to the information on the paper form; Step 2: Render the drawn electronic form based on the form style of the form designer, compare the differences in style between the form displayed by the form designer and the actual paper form, and adjust the electronic form according to the differences; Step 3: Convert the rendered electronic form into a PDF document for online electronic signature and stamping.

2. A method for automatically generating a matter form according to claim 1, The method is characterized in that step 1 includes: First, upload the paper form image; Secondly, the paper form image is fed into the optical character recognition model OCR to extract the form field content; Then configure the extracted field content into the form; Finally, use the form designer to load the form configuration and edit, adjust, and draw the electronic form.

3. The method for automatically generating a form of items according to claim 1, characterized in that In step 2, a common page is configured and a browser is deployed separately to render the form page in a unified manner, so that the same form file is rendered on the mobile terminal and the PC terminal.

4. The method for automatically generating a form of items according to claim 1, characterized in that Step 3 includes: First, determine the paper parameters for generating the electronic form, which include orientation, size, and page margins; Secondly, convert the entire electronic form page into an image; Then, in order to achieve the same text size and page layout generated by the image in both vertical and horizontal situations, a unified file size unit is used and proportional conversion is performed; Finally, the converted image is cropped to generate a multi-page PDF file.

5. A device for automatically generating a form of items, characterized in that Including recognition module, drawing module, rendering module and conversion module, The recognition module uses the optical character recognition model OCR to recognize the text and image information of the paper form. The drawing module obtains the information on the paper form and draws the electronic form according to the information on the paper form. The rendering module renders the drawn electronic form based on the form style of the form designer, wherein the rendering module compares the difference in style between the form displayed by the form designer and the actual paper form, and adjusts the electronic form according to the difference; The conversion module converts the rendered electronic form into a PDF document for online electronic signing and stamping.

6. The device for automatically generating a form of items according to claim 5, characterized in that First, the recognition module uploads the paper form image; second, the recognition module sends the paper form image to the optical character recognition model OCR to extract the form field content; Then the drawing module configures the form with the extracted field contents; Finally, the drawing module uses the form designer to load the form configuration and edit, adjust and draw the electronic form.

7. The device for automatically generating a form of items according to claim 5, characterized in that The rendering module performs unified form page rendering by configuring public pages and separately deploying browsers, so that the same form file is rendered on the mobile terminal and PC terminal.

8. The device for automatically generating a form of items according to claim 5, characterized in that The conversion module first determines the paper parameters of the generated electronic form, the paper parameters including orientation, size and page margins; Secondly, convert the entire electronic form page into an image; Then, in order to achieve the same text size and page layout generated by the image in both vertical and horizontal situations, a unified file size unit is used and proportional conversion is performed; Finally, the converted image is cropped to generate a multi-page PDF file.