OA comprehensive office document typesetting method
By building a template document library and using AI intelligent analysis, templates are automatically matched and filled, solving the cumbersome operation problem for insurance companies when generating comprehensive OA office documents and improving document generation efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA LIFE INSURANCE CO LTD HEBEI BRANCH
- Filing Date
- 2025-12-17
- Publication Date
- 2026-04-10
AI Technical Summary
When insurance companies generate OA (Office Automation) documents, they need to manually select templates and enter content for each column, which is cumbersome and inefficient.
Build a template document library, set matching rules, and use AI to intelligently analyze the original text and automatically match and fill in the templates, reducing manual operations and improving generation efficiency.
It automates the document generation process, reducing the time users spend on template selection and content copying and pasting, decreasing the workload of manual typesetting, and improving document generation efficiency.
Smart Images

Figure CN121835593A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of office document layout, and particularly relates to an OA comprehensive office document layout method. BACKGROUND
[0002] Insurance companies need to use various files in business, and the formats, word counts and contents of different files are different, and some may include pictures. Relying on manual input and layout is low in efficiency and prone to errors. With the development of information technology, the OA comprehensive office system has become an important part of the business processing system of insurance companies. The OA comprehensive office system realizes the automation of file generation, file circulation, transaction reporting and process approval through network communication technology, thereby significantly improving office efficiency and reducing operating costs.
[0003] Due to the large number of file types involved in the business of insurance companies, when generating files by using the OA comprehensive office document, a template file with preset layout needs to be selected manually in the OA comprehensive office system, and the corresponding information is filled in the blank template file through a text editor online. A template file usually contains multiple columns. Only by pasting or inputting the corresponding text content into the text editor corresponding column (such as title column, header column, content column, picture column, etc.) in the system, the required file can be generated according to the preset file template. The operation is relatively cumbersome. SUMMARY
[0004] Based on the above technical problems, the present application provides an OA comprehensive office document layout method to solve the technical problem that the existing technology needs manual input of text into different columns to generate a file meeting the layout requirements.
[0005] To achieve the above purpose, the technical solution adopted by the present application is to provide an OA comprehensive office document layout method, comprising the following steps: S1: establishing a template document library, the template document library having at least one template document required for office work, the template document defining the style, position and logical relationship of a plurality of content containers; S2: setting a matching element for each template document in the template document library; S3: establishing a text online editor, detecting and analyzing the content in the text online editor after a user inputs original text into the text online editor, extracting structured elements in the original text, the structured elements including title, paragraph, list, table and keyword; S4: automatically matching or selecting a template document by a user for the original text based on the structured elements, the matching element and the identification rule, and defining the template document as a target layout template; S5: The structured elements extracted in step S3 are automatically filled into the corresponding content containers of the target layout template by an AI intelligent matching algorithm.
[0006] In a possible implementation, the method further includes the following steps: S6: The filled content is automatically fine-tuned and laid out according to the global style rules preset for the content container and the content adaptive rules in the container, to generate an intermediate document conforming to the preset layout specification; S7: The intermediate document is rendered into a final office document, and preview, editing confirmation, and export functions are provided.
[0007] In a possible implementation, in step S6, the automatic fine-tuning and layout includes: uniformly adjusting the font, font size, line spacing, and first-line indentation of the text content to conform to the global style of the template; intelligently setting the wrapping mode of the picture and the surrounding text.
[0008] In a possible implementation, in step S3, the method further includes extracting unstructured elements in the original text, the unstructured elements including pictures, signatures, and seal images; and the unstructured elements are used to fill into the corresponding content containers of the target layout template.
[0009] In a possible implementation, in step S5, the AI intelligent matching algorithm performs the following operations: filling the extracted title elements into the content containers labeled as titles or names in the target layout template; merging the continuous paragraph elements and filling them into the content containers labeled as texts or contents in the target layout template, and automatically performing pagination or columnation according to the container size; identifying the table headers and data of the table elements and filling them into the content containers labeled as tables in the target layout template; positioning and filling the pictures, signatures, and seal images into the corresponding content containers labeled in the target layout template, and supporting equal proportion scaling or cropping according to the container size.
[0010] In a possible implementation, in step S5, the AI intelligent matching algorithm is based on element semantic features, container labels, and historical filling records for matching.
[0011] In a possible implementation, in step S3, the content in the text online editor is analyzed and includes: analyzing the hierarchical structure of the content in the text online editor by using a natural language processing method; The computer vision technology is used to detect the position and boundary of pictures, signatures and seals.
[0012] In a possible implementation, in step S4, the identification rule comprises: The extracted title key elements and document content characteristic words are analyzed to perform similarity calculation on the labels and description information of each template in the template document library. The templates are recommended according to the historical use frequency of the user and the preference of the department for commonly used templates.
[0013] Compared with the prior art, the OA comprehensive office document layout method provided in the application has the following beneficial effects: The OA comprehensive office document layout method provided in the application converts the operation of manually identifying the document type, searching for a template, and copying and pasting column by column into a process of automatically completing by the system after one-time input, reduces the time for manually searching and selecting in a large number of templates, avoids the tediousness of manually judging the text structure, reduces the workload of manual layout, and improves the initial efficiency of document generation. BRIEF DESCRIPTION OF DRAWINGS
[0014] In order to more clearly illustrate the technical solutions in the embodiments of the application, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description only some embodiments of the application, and for those skilled in the art, on the premise of not creating labor, can also obtain other drawings according to these drawings.
[0015] Figure 1 The method flowchart of the OA comprehensive office document layout method provided in the embodiments of the application; DETAILED DESCRIPTION
[0016] In order to make the technical problems, technical solutions and beneficial effects of the application more clearly understood, the following will further describe the application in detail with reference to the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the application, and are not used to limit the application.
[0017] It should be noted that when an element is referred to as being "fixed to" or "disposed on" another element, it can be directly on the other element or indirectly on the other element. When an element is referred to as being "connected to" another element, it can be directly connected to the other element or indirectly connected to the other element.
[0018] It should be understood that the terms "length", "width", "upper", "lower", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer" and the like indicate directions or positions based on the directions or positions shown in the drawings and are used for convenience in describing the present application and simplifying the description, and thus cannot be construed as indicating or implying that a device or element referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as limiting the present application.
[0019] In addition, the terms "first", "second", "third", etc. are used only for descriptive purposes and cannot be construed as indicating or implying relative importance or an implied indication of the number of technical features indicated. Therefore, the features defined as "first", "second", etc. can explicitly or implicitly include one or more of the features. In the description of the present application, the meaning of "a plurality of" or "several" is two or more, unless otherwise explicitly and specifically limited.
[0020] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which the present application belongs.
[0021] Please refer to Figure 1 , the following describes an OA comprehensive office document layout method provided by the embodiments of the present application.
[0022] An OA comprehensive office document layout method, comprising the following steps: S1: Establishing a template document library, the template document library having at least one template document required by office, the template document defining the style, position and logical relationship of a plurality of content containers; the template document library being stored in a server or cloud, each template document (such as "claim settlement report", "insurance contract", "internal notice" of an insurance company, etc.) being a structured electronic file (such as XML, HTML format or specific markup language definition). Each template defines a plurality of "content containers", which are logical areas in the document, having a unique identifier (ID) and a type label. The style (such as font, color, alignment), precise position (coordinates, placeholder) and logical relationship (such as order, nesting, association) of the container with other containers are pre-set in the template. For example, a "contract template" can contain containers such as "Party A information", "Party B information", "clause text", "signature area" arranged in order.
[0023] S2: Setting matching elements for each template document in the template document library; these elements are key features for identifying the template. The matching elements can be keywords / subject keywords, can also be title names, and can also be content structure features. For example, claim, compensation, accident determination, contract, report, notice word groups, etc.
[0024] S3: Establish a text online editor, when the user inputs or pastes the original text into the text online editor, the content in the text online editor is detected and analyzed by using a rule-based or machine learning model, and the structured elements in the original text are extracted, including title, paragraph, list, table, and keyword.
[0025] S4: Based on the structured elements, matching elements, and identification rules, the system provides 1-3 template documents with the highest matching degree for the user to confirm and select, and the user can also manually browse and select from the template document library. The selected template is defined as the "target typesetting template".
[0026] S5: The structured elements extracted in step S3 are automatically filled into the corresponding content containers of the target typesetting template through an AI intelligent matching algorithm.
[0027] Compared with the prior art, the OA comprehensive office document typesetting method provided by the present application has the following advantages: The OA comprehensive office document typesetting method provided by the present application converts the operation of manually identifying the document type, searching for a template, and copying and pasting column by column into a one-time input process automatically completed by the system, reduces the time for the user to manually search and select from numerous templates, avoids the tediousness of manual text structure judgment, reduces the workload of manual typesetting, and improves the initial efficiency of document generation.
[0028] In some possible embodiments, on the basis of the above steps, the following steps are further included: S6: According to the global style rules preset by the content container and the content adaptive rules in the container, the filled content is automatically fine-tuned and typeset (for example, the font of the entire document is Fanti Song_GB2312, the font size is three, the line spacing is 28 points, and the first line of the paragraph is indented by two characters), and the filled content is uniformly written. At the same time, according to the "content adaptive rules", local adjustment is generated, and finally an intermediate document that meets the preset typesetting specification is obtained.
[0029] If the content of the main text container is too much, the system automatically adjusts the font size or line spacing, or adds a continuation page. When there is a picture container, the text wrapping mode is intelligently adjusted (such as "four-around type" and "tight type"), and when the original text has a style (such as bold) that conflicts with the template style, the preset priority (usually the template style has a higher priority) is used for covering or fusing.
[0030] S7: The intermediate document is rendered into a final office document, and preview, editing confirmation, and export functions are provided, the final office document (such as PDF, OFD format) is converted, a download link is provided, and the user can save the final document to the local or directly send it to the next node of the OA process.
[0031] In some possible embodiments, in step S6, the automatic fine-tuning layout includes: uniformly adjusting the font, font size, line spacing, and first-line indentation of the text content to conform to the global style of the template; intelligently setting the wrapping mode of the picture and the surrounding text, such as the four-around type, the wrap-around type, the up-and-down type, and the like.
[0032] In some possible embodiments, in step S3, further includes extracting unstructured elements in the original text, the unstructured elements including pictures, signatures, and seal images; the unstructured elements are used to fill into the content container corresponding to the target layout template. Through image recognition technology, image regions with specific features (such as handwriting area, circular seal contour, and red seal color features) are detected, and their bounding box coordinates and image data are extracted and labeled as “signature” or “seal” types.
[0033] In some possible embodiments, in step S5, the AI intelligent matching algorithm performs the following operations: filling the extracted title elements into the content container labeled as title or name in the target layout template; merging the continuous paragraph elements and filling them into the content container labeled as text or content in the target layout template, and automatically paging or columnizing according to the container size; identifying the table header and data of the table elements and filling them into the content container labeled as table in the target layout template; positioning and filling the pictures, signatures, and seal images into the corresponding content container labeled in the target layout template, and supporting equal proportion scaling or cropping according to the container size.
[0034] In some possible embodiments, in step S5, the AI intelligent matching algorithm is matched based on element semantic features, container labels, and historical filling records. The AI intelligent matching algorithm is prior art, and its specific structure and working principle will not be described here.
[0035] In some possible embodiments, in step S3, the content in the text online editor is analyzed, including: using natural language processing methods to analyze the hierarchical structure of the content in the text online editor, analyzing sentence structure, identifying subject, predicate, and other components, identifying the hierarchical structure of the document, and constructing a tree outline of the document to clearly define the nesting and parallel relationship between parts. Computer vision technology is used to detect the position and boundary of pictures, signatures, and seals, so that the system has the ability to process image content and can accurately locate and classify key non-text elements such as signatures and seals.
[0036] In some possible embodiments, in step S4, the identification rule comprises: performing similarity calculation on the extracted title key elements and document content characteristic words, and the labels and description information of each template in the template document library, and recommending one or more templates with the highest similarity; and performing weighted recommendation according to the historical use frequency of the user and the preference of commonly used templates in the department, to realize personalized recommendation.
[0037] It can be understood that the parts in the above embodiments can be freely combined or deleted to form different combined embodiments, and the specific content of each combined embodiment will not be described herein. After the description herein, it can be considered that the present application has described each combined embodiment, and can support different combined embodiments.
[0038] The above only describes the preferred embodiments of the present application and is not intended to limit the present application. Any modification, equivalent replacement and improvement within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A method for formatting OA (Office Automation) documents, characterized in that, Includes the following steps: S1: Establish a template document library, which contains at least one template document required for office work. The template document defines the style, position, and logical relationship of multiple content containers. S2: Set a matching element for each template document in the template document library; S3: Establish an online text editor. When the user inputs the original text into the online text editor, the content in the online text editor is detected and analyzed to extract the structured elements in the original text. The structured elements include headings, paragraphs, lists, tables, and keywords. S4: Based on the structured elements, the matching elements, and the recognition rules, automatically match the original text or allow the user to select a template document, and define it as the target layout template; S5: The structured elements extracted in step S3 are automatically filled into the corresponding content container of the target layout template using an AI intelligent matching algorithm.
2. The OA integrated office document formatting method according to claim 1, characterized in that, It also includes the following steps: S6: Based on the preset global style rules of the content container and the content adaptive rules within the container, the filled content is automatically fine-tuned and formatted to generate an intermediate document that conforms to the preset formatting specifications. S7: Render the intermediate document into a final office document and provide preview, editing confirmation and export functions.
3. The OA integrated office document formatting method according to claim 2, characterized in that, In step S6, the automatic fine-tuning of the layout includes: Adjust the font, font size, line spacing, and first-line indent of the text content uniformly to conform to the global style of the template; It intelligently sets the wrapping method between images and surrounding text.
4. The OA integrated office document formatting method according to claim 1, characterized in that, Step S3 further includes extracting unstructured elements from the original text, including images, signatures, and seal images; the unstructured elements are used to fill the content container corresponding to the target layout template.
5. The OA integrated office document formatting method according to claim 4, characterized in that, In step S5, the AI intelligent matching algorithm performs the following operations: The extracted title elements are filled into the content containers labeled "title" and "name" in the target layout template; Merge consecutive paragraph elements and fill them into the content container labeled "body text" or "content" in the target layout template, and automatically paginate or divide into columns according to the container size; Identify the header and data of table-type elements and populate them into the content container labeled "table" in the target layout template; The images, signatures, and seals are positioned and filled into the content containers corresponding to the tags in the target layout template, and can be scaled or cropped proportionally according to the container size.
6. The OA integrated office document formatting method according to claim 1, characterized in that, In step S5, the AI intelligent matching algorithm performs matching based on element semantic features, container tags, and historical filling records.
7. The OA integrated office document formatting method according to claim 1, characterized in that, In step S3, the analysis of the content in the online text editor includes: Natural language processing methods are used to analyze the hierarchical structure of content in an online text editor; Computer vision technology is used to detect the position and boundaries of images, signatures, and seals.
8. The OA integrated office document formatting method according to claim 1, characterized in that, In step S4, the identification rules include: The extracted title key elements and document content feature words are analyzed and similarity is calculated with the tags and description information of each template in the template document library; Recommendations are weighted based on users' historical usage frequency and departmental preferences for commonly used templates.