Intelligent document generation system and control method thereof
Through the dynamic template engine, intelligent content generation and adaptive format optimization module, the dynamic adjustment and format optimization problems of document generation in the existing technology are solved, and the automation and efficient output of the intelligent document generation system are realized.
Patent Information
- Application Number
- CN202511272802.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-08
- Publication Date
- 2025-10-14
- Estimated Expiration
- 2045-09-08
AI Technical Summary
Existing document generation technology cannot dynamically adjust document content. It has problems such as a single format, an inability to generate natural language descriptions and dynamic charts, and requires manual adjustment.
The dynamic template engine module is used to parse the input data, combined with the intelligent content generation module to generate coherent natural language text and embed charts, the adaptive format optimization module is used to dynamically adjust the document content and order, and the automatic detection module is used to repair format errors.
It realizes the dynamic adjustment of document content and format optimization, reduces manual intervention, generates text and charts that conform to the context, and outputs documents in standard format.
Smart Images

Figure CN120781990A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of intelligent document generation, and in particular to an intelligent document generation system and a control method thereof. Background Art
[0002] With the development of natural language and AI technologies, the original document export method based on fixed templates can no longer meet the business needs of multiple scenarios.
[0003] The existing document generation technology mainly relies on the following two methods, but both have significant defects: One is a filling technology based on static templates, such as Apache POI and Docx4j, where: Apache POI is a free, open-source, cross-platform Java application programming interface written in Java. It provides an application programming interface for Java programs to read and write Microsoft Office format documents.
[0004] Docx4j is an open source class library developed based on Java language. It is used to create and operate Microsoft Open XML format files. It supports programmatic operations and template-based dynamic data editing, and can realize document processing without the need for Microsoft Office environment.
[0005] These templates use fixed placeholders (e.g., ${name}) to replace data, making it impossible to dynamically adjust document content (e.g., table column count and chapter order) based on the structure of the input data. When the data contains variable-length items, the maximum number of columns must be pre-defined in the template, which can easily lead to blank spaces or data truncation. Furthermore, they only support static data filling, failing to address dynamic content expansion and format adaptation.
[0006] The other is to use rule-driven automatic generation technology, which relies on predefined rules to generate content, lacks semantic understanding capabilities, and cannot generate natural language descriptions or dynamic charts. Problems such as abnormal paging after inserting pictures and discontinuous multi-level title numbering may occur, requiring manual secondary adjustments.
[0007] In addition, the document generation technology in the existing technology also has the defect of a single format. It only focuses on text generation and does not involve the processing of dynamic table and chart rendering and typesetting optimization.
[0008] Therefore, a new solution is urgently needed to solve the defects and shortcomings in the above-mentioned prior art. Summary of the Invention
[0009] In order to solve the defects and deficiencies in the prior art, the present invention provides an intelligent document generation system and a control method thereof.
[0010] The specific solution provided by the present invention is: An intelligent document generation system, characterized in that the system comprises: A dynamic template engine module, which parses input data, determines and identifies dynamically variable blocks and irrelevant content blocks of the input data based on logical branches, and processes the block contents accordingly; An intelligent content generation module, which generates coherent natural language text from input data based on a pre-trained language model and context, automatically selects the corresponding chart type based on the numerical type in the input data, generates a vector map from the selected chart, and then embeds the generated vector map into the text to form a document; An adaptive format optimization module, which uses a priority weight algorithm to calculate document content weights and dynamically adjusts document content and order based on the document content weights; The automatic detection module uses computer vision to detect and determine whether there are any errors in the document format. After determining that the document format is correct, the module outputs the final document.
[0011] Furthermore, the present invention also provides a control method for an intelligent document generation system, characterized in that it comprises the following steps: S100: The dynamic template engine module parses the input data, determines and identifies the dynamically variable blocks and irrelevant content blocks of the input data based on the logical branches, and processes the block contents accordingly according to the differences in the blocks; S200: The intelligent content generation module generates coherent natural language text from input data based on a pre-trained language model and context. It also automatically selects the corresponding chart type based on the numerical type in the input data and generates a vector map from the selected chart. The generated vector map is then embedded into the text to form a document. S300: The adaptive format optimization module uses a priority weight algorithm to calculate the document content weight and dynamically adjusts the document content and order based on the document content weight; S400: The automatic detection module detects and determines whether there are any errors in the document format through computer vision, and outputs the final document after confirming that the document format is correct.
[0012] As a further preferred embodiment of the present invention, step S100 includes the following steps: S101: Verify input data; S102: Parsing field parameters of input data; S103: traverse the logic nodes of the dynamic language template, determine and activate the logic branch of the adaptation field parameter; S104: judging and determining the dynamically variable blocks and irrelevant content blocks of the input data according to the logic branch; S105: Process the block contents accordingly according to the different blocks.
[0013] As a further preferred embodiment of the present invention, in step S101, verifying the input data using JSON Schema includes the following steps: S1011: Predefined JSON Schema rule file; S1012: Parse input data and traverse all fields; S1013: Verify the existence, integrity, data type, value range, and structure of the input data using JSON Schema. If all verifications are successful, proceed to the next step. If any verification fails, an error message is displayed and the process is terminated. In step S103, determining and activating the logic branch of the adaptation field parameter through the XML tag in the dynamic language template includes the following steps: S1031: Parse the fixed characters contained in the XML tag and determine whether the fixed characters exist in the adaptation field parameter. If so, select the logic branch corresponding to the fixed characters and proceed to the next step. S1032: Analyze the fixed character determination condition and determine whether the attribute value of the adaptation field parameter meets the fixed character determination condition. If so, select the logic branch corresponding to the determination condition and proceed to the next step. S1033: Parse the fixed value of the dynamic table and obtain the data value type benefit object that matches the field parameter; S1034: Parse the fixed column and obtain the data value of the adaptation field parameter.
[0014] As a further preferred embodiment of the present invention, in step S105, Dynamically adjust the format parameters of the dynamically variable block content; Hide the contents of irrelevant content blocks.
[0015] As a further preferred embodiment of the present invention, in step S200, The intelligent content generation module generates coherent natural language text based on the pre-trained language model and context-sensitive input data. The following steps are involved: S201: Construct input data prompt words; S202: Calling a pre-trained language model; S203: Parsing the input data, generating a coherent natural language text from the input data according to the input data and the context; The numerical value types include at least time series data, classification comparison data and proportional distribution data, and correspondingly, the chart types include at least line charts, bar charts and pie charts.
[0016] As a further preferred embodiment of the present invention, in step S200, when the generated vector image is embedded in text to form a document, the following steps are included: S204: Convert the vector image format: convert the SVG string in the vector image into a PNG byte array; S205: Determine the vector graphics insertion position: Automatically match and determine the vector graphics insertion position and image size based on the natural language text generated by the pre-trained language model; S206: Inserting the vector graph at the determined insertion position and with the determined image size.
[0017] As a further preferred embodiment of the present invention, in step S300, the weight W of the document content is calculated according to the following formula: W=α×Q1+β×Q2+γ×Q3 in, Q1 is the content type weight value, which is set to different values according to the content of the document; Q2 is the association weight value, which indicates the strength of association between elements; Q3 is the page adaptation weight value, which indicates the matching degree of the remaining space of the current page; α represents the weight coefficient of the content type weight value; β represents the weight coefficient of the correlation weight value; γ represents the weight coefficient of the page adaptation weight value.
[0018] As a further preferred embodiment of the present invention, in step S300, dynamically adjusting the document content and order includes the following steps: S301: Traverse all the contents of the document, dynamically calculate the weight of the document content based on a formula, calculate the document content weight, and determine the document content priority according to the weight; S302: Dynamically adjust document order and paging according to the following principles: A1) High-authority content is placed first on the current page; A2) Place the diagram and the descriptive text on the same page; A3) Check the remaining space on the current page and automatically split the page if it is insufficient; S303: Optimize the document format, including: B1) Smart paging correction: When a chart has high weight but insufficient remaining space, page breaks are inserted and the order of subsequent content is adjusted; B2) Heading hierarchy fix: Renumber headings based on document content weight. As a further preferred embodiment of the present invention, in step S400, after determining that there is an error in the document format, the following steps are included: S401: Determine the document format error type; S402: Matching the determined document format error type with a pre-stored error pattern; S403: Automatically repair and adjust the document format errors using pre-stored error style repair rules according to the matching results; S404: Computer vision is used to detect and determine whether there are any errors in the document format again. If there are still errors in the document format, return to step S401. If it is determined that the document format is correct, the final document is output.
[0019] Compared with the existing technology, the present invention can achieve the following technical effects: 1) The present invention provides an intelligent document generation system and a control method thereof, which is provided with a dynamic template engine module. The system determines logical branches through XML tags in the dynamic template language, which can break through the limitations of traditional placeholder replacement. While achieving the decoupling of document structure and data, different logical branches can be adapted according to different data, effectively improving the dimension of adapted data.
[0020] 2) The present invention provides an intelligent document generation system and its control method, which is equipped with an intelligent content generation module. It can generate a coherent natural language text description in combination with a pre-trained model, and dynamically render charts based on this. It embeds icons into the text in the form of vector graphics to achieve the collaborative generation of text and charts. By collaboratively generating text and charts that conform to the context, the cost of manual writing, drawing, and typesetting is reduced.
[0021] 3) The present invention provides an intelligent document generation system and its control method, which is equipped with an adaptive format optimization module that can dynamically adjust the content and order of documents. On this basis, it can realize intelligent paging and title style correction (such as title hierarchy repair), solving the pain points of manual adjustment in traditional technologies, realizing full process automation from content generation to final typesetting, and outputting standard format documents that can be directly used. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 The figure shows a comparison of the effects of the generation system provided by the present invention and the prior art.
[0023] Figure 2 Shown is a logical structure diagram of the generation system provided by the present invention.
[0024] Figure 3 Shown is a flow chart of the steps of the control method provided by the present invention. DETAILED DESCRIPTION
[0025] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0026] In the description of the present invention, it should be noted that the terms "upper," "lower," "inner," "outer," "front end," "rear end," "both ends," "one end," "the other end," and the like, indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings and are intended solely to facilitate and simplify the description of the present invention. They are not intended to indicate or imply that the devices or components referred to must have, be constructed, or operate in a specific orientation, and therefore should not be construed as limiting the present invention. Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0027] In the description of the present invention, it should be noted that, unless otherwise expressly specified or limited, the terms "installed," "provided with," "connected," etc., should be understood in a broad sense. For example, "connected" may refer to a fixed connection, a detachable connection, or an integral connection; it may refer to a mechanical connection or an electrical connection; it may refer to a direct connection or an indirect connection through an intermediate medium; it may refer to internal communication between two components. Those skilled in the art will be able to understand the specific meanings of the above terms in the present invention based on the specific circumstances.
[0028] [First embodiment] like Figure 2 The first embodiment of the present invention provides an intelligent document generation system, the system comprising: The dynamic template engine module parses the input data, determines the dynamic variable blocks and irrelevant content blocks of the input data based on the logical branches, and processes the block contents accordingly. By setting up the dynamic template engine module, the logical branches can be determined through the XML tags in the dynamic template language, which can break through the limitations of traditional placeholder replacement. While achieving the decoupling of document structure and data, different logical branches can be adapted according to different data, effectively improving the dimension of adapted data. Intelligent content generation module: Based on the pre-trained language model and in combination with the context, the intelligent content generation module generates coherent natural language text from the input data. At the same time, it automatically selects the corresponding chart type according to the numerical type in the input data, generates a vector diagram from the selected chart, and then embeds the generated vector diagram into the text to form a document. By setting up the intelligent content generation module, it can generate a coherent natural language text description in combination with the pre-trained model, and dynamically render the chart on this basis, and embed the icon into the text in the form of a vector diagram to achieve the collaborative generation of text and charts. By collaboratively generating text and charts that conform to the context, the cost of manual writing, drawing and typesetting is reduced. Adaptive format optimization module: This module uses a priority weight algorithm to calculate the document content weight and dynamically adjusts the document content and order based on the document content weight. By setting up the adaptive format optimization module, the document content and order can be dynamically adjusted. On this basis, intelligent paging and title style correction (such as title hierarchy repair) can be achieved, solving the pain points of manual adjustment in traditional technologies. It realizes full automation of the process from content generation to final typesetting, and outputs standard format documents that can be directly used. Automatic detection module, the automatic detection module uses computer vision to detect and determine whether there are any errors in the document format. After determining that the document format is correct, it outputs the final document. By setting up an automatic detection module, the automatic detection and automatic repair process of the document format can be realized to further ensure that the format of the final output document meets the preset requirements.
[0029] like Figure 1 The figure shows a comparison of the effects of the generation system provided by the present invention and the prior art.
[0030] [Second embodiment] like Figure 3 A control method for the intelligent document generation system mentioned in the first embodiment provided by the second embodiment of the present invention is shown, comprising the following steps: S100: The dynamic template engine module parses the input data, determines and identifies the dynamically variable blocks and irrelevant content blocks of the input data based on the logical branches, and processes the block contents accordingly according to the differences in the blocks; The step S100 includes the following steps: S101: Verify the input data using JSON Schema to ensure the integrity and accuracy of the input data. This includes the following steps: S1011: Predefine a JSON Schema rule file. For example, the rule file may require the data field to be an object type:object, and predefine mandatory attributes including "required", "user", "vip_benefits", etc. S1012: Analyze the input data and traverse all fields; S1013: Check the existence of fields in the input data, field integrity, data type (such as string, number, array, etc.), value range (such as numerical range, enumeration value, etc.), and structure (such as nested object level, etc.) in sequence through JSON Schema, and enter the next step when all checks are successful; when any check fails, prompt an error (such as "error: field 'value' must be number") and terminate the process; S102: Analyze the field parameters of the input data; the field parameters in this embodiment at least include the hierarchical structure and type of the fields, etc., in order to improve the accuracy and effectiveness of the subsequent determined logical branches of the adapted field parameters; S103: Traverse the logical nodes of the dynamic language template, determine and activate the logical branches of the adapted field parameters; in this embodiment, the logical branches are determined through xml tags in the dynamic language template, in order to break through the limitations of traditional placeholder replacement, while achieving decoupling of document structure and data, different logical branches can be adapted according to different data, effectively improving the data dimension adaptation; including the following steps: S1031: Analyze the fixed characters contained in the xml tags, and determine whether the fixed characters exist in the adapted field parameters; if they exist, select the logical branch corresponding to the fixed characters and enter the next step; for example, if the fixed characters contained in the xml tags are Section, then for the adapted field parameters <section if=""user.type" =="‘VIP’”">If there is a fixed character Section, select the logical branch corresponding to the fixed character (if="user.type =='VIP'", that is, determine whether the user attribute is a VIP user) and proceed to the next step; S1032: Parse the fixed character determination condition (if="user.type == 'VIP'", i.e., determine whether the user attribute is a VIP user), determine whether the attribute value of the adaptation field parameter meets the fixed character determination condition, and if so, select the logic branch corresponding to the determination condition (e.g., return a true result) and proceed to the next step; S1033: Parse the dynamic table fixed value DynamicTable to obtain the data value of the adaptation field parameter, data type benefit object vip_benefits; S1034: Parse the fixed column Column to obtain the data value of the adaptation field parameter.
[0031] The code example is as follows: xml tag: <section if="user.type == 'VIP'"> <title> VIP Benefits< / title> <dynamictable data="vip_benefits" columns="auto"> <column name="权益名称" bind="benefit.name" / > <column name="有效期" bind="benefit.expiry_date" format="date:yyyy-MM-dd" / > < / dynamictable> < / section> Adaptation field parameters: { "user": { "name": "Zhang San", "type": "VIP" }, "total_price": 12000, "vip_benefits": [ {"name": "Free Shipping", "expiry_date": "2024-12-31"}, {"name": "Dedicated Customer Service", "expiry_date": "2024-12-31"} ] } S104: judging and determining the dynamically variable blocks and irrelevant content blocks of the input data according to the logic branch; S105: Perform corresponding processing on the block content according to the different blocks; the corresponding processing includes: dynamically adjusting the format parameters of the dynamically variable block content, hiding the irrelevant content block content, and the dynamically adjusted parameters may include the number of table columns, the number of list items, etc., so as to adapt to the actual dimensions of the data as much as possible. Hiding the irrelevant content block content can avoid generating redundant information and interfering with the readability of the content.
[0032] S200: The intelligent content generation module generates coherent natural language text based on the pre-trained language model and in combination with the context, and automatically selects the corresponding chart type according to the numerical type in the input data, generates a vector chart after selecting the chart, embeds the generated vector chart in the text and forms a document; In this step, The pre-trained language model can be GPT-3.5, for example. The intelligent content generation module generates coherent natural language text based on the pre-trained language model and in combination with the context, which includes the following steps: S201: Build input data prompts; for example, "User ${user.name} bought ${user.count} items on ${user.date} for a total of ${total_price} yuan." S202: Call the pre-trained language model; S203: Analyze the input data and generate coherent natural language text based on the input data and in combination with the context; the final coherent natural language text may be, for example: User Zhang San bought 8 items on 2025-08-01 for a total of 100 yuan.
[0033] The numerical types mentioned in this embodiment include at least time series data, classification comparison data, and proportion distribution data, and the chart types correspondingly include at least line charts, column charts, and pie charts. That is, according to the time series data, the line chart is selected, according to the classification comparison data, the column chart is selected, and according to the proportion distribution data, the pie chart is selected.
[0034] It is worth noting that when embedding the generated vector chart in the text and forming a document, the following steps are included: S204: Convert the vector chart format: use Apache Batik library to convert SVG string in the vector chart to PNG byte array; Apache Batik is a Java-based toolkit for processing SVG format images, and its main functions include: reading SVG files and converting them into Java object models, and also generating SVG files from Java objects; SVG strings can also be converted into JPEG, PNG, PDF, etc.; or Provide a Swing visualization component that includes SVG viewing and interaction; S205: Determine the vector chart insertion position: according to the natural language text generated by the pre-trained language model, automatically match and determine the vector chart insertion position and picture size; S206: Insert the vector graphics at the determined insertion position with the determined picture size by using the XWPFDocument API of Apache POI, which is a widely used Java library for manipulating Microsoft Office documents such as Word, Excel, etc. S300: The adaptive format optimization module calculates the document content weight by using the priority weight algorithm, and dynamically adjusts the document content and order according to the document content weight; in this step, the weight W of the document content is calculated according to the following formula: W = a x Q1 + b x Q2 + g x Q3 wherein, Q1 is the content type weight value, which is set to different values according to different document content, for example, the title type Q1 takes 1.0, the chart type Q1 takes 0.8, and the text type Q1 takes 0.5; Q2 is the relevance weight value, representing the correlation strength between elements, wherein the Q2 of the chart and the description text is 1.0, and the Q2 of the same level title is 0.7; Q3 is the page adaptation weight value, representing the matching degree of the remaining space of the current page, when fully adapted, Q3 takes 1.0, when partially adapted, Q3 takes 0.5; a, b, g are the weight coefficients of the corresponding weight values, wherein, a represents the weight coefficient of the content type weight value, which is used to represent the importance of the content type, and its value is usually 0.6; b represents the weight coefficient of the relevance weight value, which is used to represent the correlation requirement, and its value is usually 0.3; g represents the weight coefficient of the page adaptation weight value, which is used to represent the typesetting optimization requirement, and its value is usually 0.1; When dynamically adjusting the document content and order, the following steps are included: S301: Traverse all the contents of the document (including titles, charts, texts, etc.), dynamically calculate the weight of the document content based on the formula, calculate the weight of the document content, and determine the priority of the document content according to the weight; for example, the weight calculation process of the title content is 0.6 x 1.0 + 0.3 x 1.0 + 0.1 x 1.0 = 1.0 (assuming the relevance Q2 takes the relevance weight value 1.0 of the chart and the description text, and the page adaptation weight value Q3 takes the weight value 1.0 when fully adapted); S302: Dynamically adjust the document order and pagination according to the following principles: A1) High weight content is placed on the current page first to ensure that titles and charts can be located at the top of the page, avoiding page breaks; A2) Relevance Grouping: Place the chart and description text (with higher relevance weights) on the same page to avoid problems such as pagination errors and discontinuous multi-level heading numbering, thereby reducing manual intervention; A3) Space Adaptation: Detects the remaining space on the current page and automatically splits the page if it is insufficient. The adaptation logic is controlled by the weight coefficient γ of the page adaptation weight value. S303: Optimize the document format, including: B1) Smart paging correction: When a chart has high weight but insufficient remaining space, page breaks are inserted and the order of subsequent content is adjusted; B2) Heading hierarchy repair: Renumber headings based on document content weight (for example, when the main heading weight is higher than the subheading weight) to ensure the continuity of document content. S400: The automatic detection module detects and determines whether there are errors in the document format through computer vision. After determining that the document format is correct, the final document is output. When it is determined that there are errors in the document format, the following steps are included: S401: Determine the document format error type; S402: Matching the determined document format error type with a pre-stored error pattern; S403: Automatically repair and adjust the document format errors using pre-stored error style repair rules according to the matching results; S404: Computer vision is used to detect and determine whether there are any errors in the document format again. If there are still errors in the document format, return to step S401. If it is determined that the document format is correct, the final document is output.
[0035] Through the automatic detection process, the automatic detection and automatic repair process of the document format can be realized to further ensure that the format of the final output document meets the preset requirements.
[0036] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above and that the invention can be embodied in other specific forms without departing from the spirit or essential characteristics of the invention. Therefore, the embodiments should be considered in all respects as illustrative and non-restrictive, and the scope of the invention is defined by the appended claims, not the foregoing description, and all variations within the meaning and range of equivalents of the claims are intended to be included therein. Any reference sign in a claim should not be construed as limiting the claim to which it relates.< / section>
Claims
1. An intelligent document generation system, characterized by: The system comprises: A dynamic template engine module, which parses input data, determines and identifies dynamically variable blocks and irrelevant content blocks of the input data based on logical branches, and processes the block contents accordingly; An intelligent content generation module, which generates coherent natural language text from input data based on a pre-trained language model and context, automatically selects the corresponding chart type based on the numerical type in the input data, generates a vector map from the selected chart, and then embeds the generated vector map into the text to form a document; An adaptive format optimization module, which uses a priority weight algorithm to calculate document content weights and dynamically adjusts document content and order based on the document content weights; The automatic detection module uses computer vision to detect and determine whether there are any errors in the document format. After determining that the document format is correct, the module outputs the final document.
2. The control method of the intelligent document generation system according to claim 1, characterized in that: The following steps are involved: S100: The dynamic template engine module parses the input data, determines and identifies the dynamically variable blocks and irrelevant content blocks of the input data based on the logical branches, and processes the block contents accordingly according to the differences in the blocks; S200: The intelligent content generation module generates coherent natural language text from input data based on a pre-trained language model and context. It also automatically selects the corresponding chart type based on the numerical type in the input data and generates a vector map from the selected chart. The generated vector map is then embedded into the text to form a document. S300: The adaptive format optimization module uses a priority weight algorithm to calculate the document content weight and dynamically adjusts the document content and order based on the document content weight; S400: The automatic detection module detects and determines whether there are any errors in the document format through computer vision, and outputs the final document after confirming that the document format is correct.
3. The control method of the intelligent document generation system according to claim 2, characterized in that: The step S100 includes the following steps: S101: Verify input data; S102: Parsing field parameters of input data; S103: traverse the logic nodes of the dynamic language template, determine and activate the logic branch of the adaptation field parameter; S104: judging and determining the dynamically variable blocks and irrelevant content blocks of the input data according to the logic branch; S105: Process the block contents accordingly according to the different blocks.
4. The control method of the intelligent document generation system according to claim 3, characterized in that: In step S101, the input data is verified using JSON Schema, including the following steps: S1011: Predefined JSON Schema rule file; S1012: Parse input data and traverse all fields; S1013: Verify the existence, integrity, data type, value range, and structure of the input data using JSON Schema. If all verifications are successful, proceed to the next step. If any verification fails, an error message is displayed and the process is terminated. In step S103, determining and activating the logic branch of the adaptation field parameter through the XML tag in the dynamic language template includes the following steps: S1031: Parse the fixed characters contained in the XML tag and determine whether the fixed characters exist in the adaptation field parameter. If so, select the logic branch corresponding to the fixed characters and proceed to the next step. S1032: Analyze the fixed character determination condition and determine whether the attribute value of the adaptation field parameter meets the fixed character determination condition. If so, select the logic branch corresponding to the determination condition and proceed to the next step. S1033: Parse the fixed value of the dynamic table and obtain the data value type benefit object that matches the field parameter; S1034: Parse the fixed column and obtain the data value of the adaptation field parameter.
5. The control method of the intelligent document generation system according to claim 2, characterized in that: In step S105, Dynamically adjust the format parameters of the dynamically variable block content; Hide the contents of irrelevant content blocks.
6. The control method of the intelligent document generation system according to claim 2, characterized in that: In the step S200, The intelligent content generation module generates coherent natural language text based on the pre-trained language model and context-sensitive input data. The following steps are involved: S201: Construct input data prompt words; S202: Calling a pre-trained language model; S203: Parsing the input data, generating a coherent natural language text from the input data according to the input data and the context; The numerical value types include at least time series data, classification comparison data and proportional distribution data, and correspondingly, the chart types include at least line charts, bar charts and pie charts.
7. The control method of the intelligent document generation system according to claim 6, characterized in that: In step S200, when the generated vector image is embedded in the text to form a document, the following steps are included: S204: Convert the vector image format: convert the SVG string in the vector image into a PNG byte array; S205: Determine the vector graphics insertion position: Automatically match and determine the vector graphics insertion position and image size based on the natural language text generated by the pre-trained language model; S206: Inserting the vector graph at the determined insertion position and with the determined image size.
8. The control method of the intelligent document generation system according to claim 2, characterized in that: In step S300, the weight W of the document content is calculated according to the following formula: W=α×Q1+β×Q2+γ×Q3 in, Q1 is the content type weight value, which is set to different values according to the content of the document; Q2 is the association weight value, which indicates the strength of association between elements; Q3 is the page adaptation weight value, which indicates the matching degree of the remaining space of the current page; α represents the weight coefficient of the content type weight value; β represents the weight coefficient of the correlation weight value; γ represents the weight coefficient of the page adaptation weight value.
9. The control method of the intelligent document generation system according to claim 8, characterized in that: In step S300, dynamically adjusting the document content and order includes the following steps: S301: Traverse all the contents of the document, dynamically calculate the weight of the document content based on a formula, calculate the document content weight, and determine the document content priority according to the weight; S302: Dynamically adjust document order and paging according to the following principles: A1) High-authority content is placed first on the current page; A2) Place the diagram and the descriptive text on the same page; A3) Check the remaining space on the current page and automatically split the page if it is insufficient; S303: Optimize the document format, including: B1) Smart paging correction: When a chart has high weight but insufficient remaining space, page breaks are inserted and the order of subsequent content is adjusted; B2) Heading hierarchy repair: Renumber headings based on document content weight.
10. The control method of the intelligent document generation system according to claim 2, characterized in that: In step S400, after determining that there is an error in the document format, the following steps are included: S401: Determine the document format error type; S402: Matching the determined document format error type with a pre-stored error pattern; S403: Automatically repair and adjust the document format errors using pre-stored error style repair rules according to the matching results; S404: Computer vision is used to detect and determine whether there are any errors in the document format again. If there are still errors in the document format, return to step S401. If it is determined that the document format is correct, the final document is output.
Citation Information
Patent Citations
Generation method and device of presentation file
CN118821749A
Method and device for automatically generating PPT (Power Point) from existing document based on multi-modal large model
CN119807452A
System, method and device for realizing PPT intelligent generation processing based on large model, processor and readable storage medium
CN120086393A
Data exchange system of nested tag structure
CN120162466A
Education courseware generation method based on deep learning
CN120541246A