Method and system for generating multi-modal report based on large language model and FreeMarker

By combining the large language model and FreeMarker technology, the problem of single report form and poor display form and information level of large language model generation is solved, and high-quality generation and intelligent display of multimodal reports are achieved.

CN119783650AInactive Publication Date: 2025-04-08SHANDONG LANGCHAO YUNTOU INFORMATION TECH CO LTD

Patent Information

Application Number
CN202411722491.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-28
Publication Date
2025-04-08
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

When generating professional field reports, the large language model has problems such as unfixed report outlines, strong randomness, and poor reporting form and information level.

Method used

Combining large language model and FreeMarker technology, through professional data preprocessing, data analysis and text generation, content analysis and multimodal content construction, report templates are designed and filled with generated content, realizing the generation of multimodal reports.

Benefits of technology

It has improved the recognition of the professional fields of the report, met the needs of various industries for high-quality and diversified reports, and achieved multi-modalization and intelligent generation of report content.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119783650A_ABST
    Figure CN119783650A_ABST
Patent Text Reader

Abstract

The invention discloses a method and system for generating a multi-modal report based on a large language model and a FreeMarker, and belongs to the technical field of natural language processing, and the method comprises the following steps: step 1, professional data preprocessing; 2, splicing the preprocessed data and prompt, and performing data analysis and text generation by using a large language model; 3, analyzing a model output result to obtain a corresponding analysis conclusion, data statistics and a reference document, and constructing a plurality of representation forms of the content by means of object storage; step 4, designing a report template in the FreeMarker; and step 5, filling the content generated by the large language model into the FreeMarker template. According to the method, the problems of single report generation form and poor display form and information hierarchy of a traditional large language model can be solved, so that the professional field recognition degree of the generated report is improved, and the requirements of various industries for high-quality and diversified reports are met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of natural language processing, and in particular to a method and system for generating multimodal reports based on a large language model and FreeMarker. Background Art

[0002] Today, large language models have become a new technological frontier in the field of artificial intelligence and a leading technology in the digital economy. They play an important role in promoting generational changes in the development of artificial intelligence and triggering the next wave of artificial intelligence development.

[0003] Large Language Model (LLM) is a type of artificial intelligence model based on deep learning. The model contains hundreds of billions (or more) parameters and is trained with a large amount of text data. It can not only generate natural language text or understand the meaning of language text. It can also perform a variety of natural language processing tasks such as translation and sentiment analysis. It is widely used in a variety of application scenarios such as text writing, question and answer, and dialogue, and has shown its strong practicality and potential from automated customer service to advanced research.

[0004] Similarly, large language models also have some shortcomings and limitations in generating reports in professional fields:

[0005] 1. The report outline is not fixed and is highly random: Due to the lack of a unified structure and standard, large language models often obtain different content structures after analyzing and processing the same professional data, which greatly reduces the standardization and professionalism of the report.

[0006] 2. The presentation format and information level of the report content are poor: The output content of the large language model is often text analysis, which is difficult to be enriched with pictures, videos, tables, hyperlinks and other content forms. This makes it difficult for the report to clearly convey key information and data, affecting the overall quality and readability of the report.

[0007] FreeMarker is a template engine technology, that is, a general tool based on templates and data to be changed, which is used to generate output text containing pictures, videos, tables, hyperlinks and other content forms. As a powerful text generation tool, FreeMarker provides template design functions, but it is insufficient in intelligent content analysis.

[0008] Therefore, there is an urgent need for a new method that can combine the advantages of large language models and FreeMarker to generate intelligent reports containing multi-modal content. Summary of the invention

[0009] The technical task of the present invention is to address the above shortcomings and provide a method and system for generating multimodal reports based on a large language model and FreeMarker, which can solve the problems of single report format, poor presentation format and information hierarchy of traditional large language model-generated reports, thereby improving the professional field recognition of the generated reports and meeting the needs of various industries for high-quality and diversified reports.

[0010] The technical solution adopted by the present invention to solve its technical problem is:

[0011] A method for generating a multimodal report based on a large language model and FreeMarker, the implementation of the method comprising the following steps:

[0012] Step 1: Professional data preprocessing, including collecting, cleaning, and formatting the data to be analyzed;

[0013] Step 2: The preprocessed data is concatenated with prompt and the large language model is used for data analysis and text generation;

[0014] Step 3: Analyze the output of the model to obtain the corresponding analysis conclusions, data statistics, reference documents, etc., and use object storage to construct various forms of content, including tables, pictures, videos, hyperlinks, etc.;

[0015] Step 4: Design the report template in FreeMarker, including preset dynamic directories, table placeholders, image and video embedding areas, and hyperlink locations;

[0016] Step 5: Fill the content generated by the large language model into the FreeMarker template, format it, and output and display the report content.

[0017] This method uses a large language model for data analysis and text generation, and uses FreeMarker's template function to achieve multimodal content organization and presentation of the report.

[0018] Further, the method for preprocessing professional data includes:

[0019] Data preprocessing: Clean and localize the original professional data to reduce the understanding bias of the large language model and convert the data collection into a form that can be processed by computers;

[0020] Keyword identification: Use natural language processing (NLP) technology to identify key values / keywords in the data collection, including name, category, degree, area, etc., identify the corresponding meaning of the data, and form a data dictionary;

[0021] Data conversion: Convert the formatted data collection into a computer-processable form, such as JSON, and construct a prompt project to input it into the LLM model for analysis and processing.

[0022] Furthermore, the FreeMarker template design allows users to customize the layout and style of the report to meet the needs of different industries and application scenarios.

[0023] Furthermore, the FreeMarker template design further includes:

[0024] Design template layouts, including defining page size, margins, font style and size, etc., and setting report titles, subtitles, and footers;

[0025] Set up a dynamic table of contents, including links to chapter titles and subtitles, so that users can quickly jump to the corresponding report section by clicking on a table of contents item;

[0026] Configure multimodal content placeholders such as tables, images, videos, hyperlinks, etc.

[0027] Furthermore, the method of presetting the module dynamic directory is as follows:

[0028] Dynamic table of contents algorithm can automatically identify chapters and sub-chapter in the report and generate a structured table of contents, which makes it easy for users to quickly navigate to different parts of the report;

[0029] WIN32 implements updating the directory field of the generated report to ensure that the directory page number is consistent with the dynamic report content page number.

[0030] Further, the dynamic directory is set, in the FreeMarker template, using specific FreeMarker syntax including Servlet context loading or Spring Boot integration to load the dynamic directory; the directory will be automatically generated based on the content in the report, including links to section titles and subtitles, so that users can quickly jump to the corresponding report section by clicking on the directory item;

[0031] Configure table placeholders: reserve a place for a table in the report template, use FreeMarker's list and loop instructions to dynamically generate a table; automatically fill in table data based on the data analysis results generated by the large language model;

[0032] Embed images and videos: reserve placeholders for images and videos in the template; store the link addresses of the relevant images and videos output by the model in the object storage, obtain their remote URLs, and embed them into the report through FreeMarker's URL processing instructions;

[0033] Add hyperlinks: In the report text, use FreeMarker's link directive to add hyperlinks.

[0034] Furthermore, the text content generated by the large language model is filled in according to the specified position of the FreeMarker template; the FreeMarker template engine will parse the template file, replace the placeholders with the actual content, and apply the preset formatting rules to generate the final report document;

[0035] The method to output and display the report content is as follows:

[0036] Object storage such as Minio is used to store images, videos, reference documents, etc. in reports, which is highly scalable and reliable, ensuring remote and fast access and efficient storage of reports.

[0037] The present invention also claims a system for generating multimodal reports based on a large language model and FreeMarker, comprising:

[0038] Professional data preprocessing module, used to collect, clean and format the data to be analyzed;

[0039] The large language model processing module combines the preprocessed data with prompts to perform data analysis and text generation using the large language model.

[0040] Content parsing module: The output of the parsing model obtains the corresponding analysis conclusions, data statistics, reference documents, etc., and constructs various forms of content including tables, pictures, videos, hyperlinks, etc. with the help of object storage;

[0041] FreeMarker template customization module, design report templates in FreeMarker, including preset dynamic directories, table placeholders, image and video embedding areas, and hyperlink locations;

[0042] The output and display module fills the content generated by the large language model into the FreeMarker template, formats it, and outputs and displays the report content;

[0043] The system realizes multimodal report generation through the above-mentioned method of generating multimodal reports based on a large language model and FreeMarker.

[0044] The present invention also claims a device for generating a multimodal report based on a large language model and FreeMarker, comprising: at least one memory and at least one processor;

[0045] The at least one memory is used to store a machine-readable program;

[0046] The at least one processor is used to call the machine-readable program to implement the above method.

[0047] The present invention also claims protection for a computer-readable medium having computer instructions stored thereon, which, when executed by a processor, causes the processor to perform the above method.

[0048] Compared with the prior art, the method and system for generating multimodal reports based on a large language model and FreeMarker of the present invention have the following beneficial effects:

[0049] The present invention proposes an innovative report generation method, which combines an advanced large language model with flexible FreeMarker template technology to achieve multimodal report content. Compared with the previous method of generating reports with the help of a large language model, the present invention enables the generated report to contain not only text information, but also embed multiple modal contents such as dynamic directories, tables, pictures, videos, and hyperlinks, greatly enriching the presentation form and information hierarchy of the report. Compared with manual writing, the working time is greatly shortened. Through the dynamic analysis capability of the large language model and the fixed template structure of FreeMarker, the present invention realizes the intelligent generation and customized display of report content, which is suitable for a variety of industries and application scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] Figure 1 It is a flowchart of a method for generating a multimodal report based on a large language model and FreeMarker provided by an embodiment of the present invention;

[0051] Figure 2 It is a flowchart of constructing a FreeMarker template provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0052] The present invention will be further described below in conjunction with the accompanying drawings and specific embodiments.

[0053] The embodiment of the present invention provides a method for generating a multimodal report based on a large language model and FreeMarker, and the implementation of the method includes the following steps:

[0054] Step 1: Professional data preprocessing, including collecting, cleaning, and formatting the data to be analyzed;

[0055] Step 2: Use the preprocessed data to splice prompts and use the large language model to perform data analysis and text generation;

[0056] Step 3: Analyze the model output results to obtain corresponding analysis conclusions, data statistics, reference documents, etc., and use object storage to construct various forms of content including tables, pictures, videos, hyperlinks, etc.;

[0057] Step 4: Design the report template in FreeMarker, including preset dynamic directories, table placeholders, image and video embedding areas, and hyperlink locations;

[0058] Step 5: Fill the content generated by the large language model into the FreeMarker template, format it, and output and display the report content.

[0059] The report template is designed in FreeMarker, and the FreeMarker template design allows users to customize the layout and style of the report to meet the needs of different industries and application scenarios. The FreeMarker template design further includes:

[0060] Design template layouts, including defining page size, margins, font style and size, etc., and setting report titles, subtitles, and footers;

[0061] Set up a dynamic table of contents, including links to chapter titles and subtitles, so that users can quickly jump to the corresponding report section by clicking on a table of contents item;

[0062] Configure multimodal content placeholders such as tables, images, videos, hyperlinks, etc.

[0063] Dynamic table of contents algorithm can automatically identify chapters and sub-chapter in the report and generate a structured table of contents, which makes it easy for users to quickly navigate to different parts of the report;

[0064] WIN32 implements updating the directory field of the generated report to ensure that the directory page number is consistent with the dynamic report content page number.

[0065] The output and display of report content utilizes object storage such as Minio to store pictures, videos, reference documents, etc. in the report, which is highly scalable and reliable, ensuring remote and fast access and efficient storage of reports.

[0066] This method uses a large language model for data analysis and text generation, and uses FreeMarker's template function to achieve multimodal content organization and presentation of reports. Figure 1-2 This method is described in further detail.

[0067] As attached Figure 1 As shown in the figure, it is a report generation flow chart for generating multimodal reports based on a large language model and FreeMarker:

[0068] S1, collect professional data to be analyzed, format the data, and ensure that the data is suitable for the input requirements of the large language model.

[0069] S2, constructs the prompt project and uses the large language model to perform data analysis and text generation on the preprocessed data.

[0070] S3, parses the model output results to obtain corresponding analysis conclusions, data statistics, reference documents, etc., and uses object storage to construct various forms of content including tables, pictures, videos, hyperlinks, etc.

[0071] S4, user-defined report outline template, FreeMarker template engine parses and generates report template, preset dynamic directory, table placeholders, image and video embedding areas, and hyperlink locations, etc., to ensure the logical structure and layout of the content.

[0072] S5 fills the content generated by the large language model according to the structure of the FreeMarker template, automatically generates report content containing multiple modalities, and displays the final generated multimodal report.

[0073] Among them, the methods for formatting professional data are:

[0074] Data preprocessing: Clean and localize the original professional data to reduce the understanding bias of the large language model and convert the data collection into a form that can be processed by computers.

[0075] Keyword identification: Use natural language processing (NLP) technology to identify key values / keywords in the data collection, such as name, category, degree, area, etc., identify the corresponding meaning of the data, and form a data dictionary.

[0076] Data conversion: Convert the formatted data collection into a computer-processable form, such as JSON, and construct a prompt project to input it into the LLM model for analysis and processing.

[0077] Prompt is a technology based on artificial intelligence (AI) instructions, which guides the output of the language model in a clear and specific way. In the prompt word project, the definition of Prompt covers three main elements: tasks, instructions, and roles, to ensure that the model generates text that meets user needs. Taking the professional data of road damage as an example, the following Prompt is spliced: "There are the following road damage data for each section of the road (role), the corresponding relationship of the data dictionary is: data field name: Chinese meaning of the data field, now you need to analyze the following content based on the following data, and describe it in a natural language (task) + data collection + what are all the types of damage in the entire section of the data, what is the total area of ​​all damages, and what is the typical type of structural damage (instructions)" is used to standardize the output of the large language model so that it can generate relevant, accurate and high-quality text.

[0078] The above-mentioned large language model can be a model deployed in the public cloud, such as Wenxinyiyan and GPT series, or a professional model deployed and trained locally.

[0079] As a detailed implementation method for constructing a FreeMarker template, the steps are as follows Figure 2 As shown:

[0080] S41, Design FreeMarker template layout: Users use the FreeMarker template engine to design the layout and structure of the report according to the report requirements. This includes defining the page size, margins, font style and size, etc., as well as setting the report title, subtitle and footer.

[0081] S42, Set dynamic table of contents: In the FreeMarker template, use specific FreeMarker syntax such as Servlet context loading or Spring Boot integration to load the dynamic table of contents. The table of contents will be automatically generated based on the content in the report, including links to section titles and subtitles, so that users can quickly jump to the corresponding report section by clicking on the table of contents item.

[0082] S43, configure table placeholders: reserve a table position in the report template, and use FreeMarker's list and loop instructions to dynamically generate tables. Automatically fill in table data, such as disease type, area, frequency and other statistical information, based on the data analysis results generated by the large language model.

[0083] S44, Embed images and videos: Reserve placeholders for images and videos in the template. Store the link addresses of the relevant images and videos output by the model in the object storage, obtain their remote URLs, and embed them into the report through FreeMarker URL processing instructions. These media contents can be on-site photos of the disease, video records, or other relevant visual materials.

[0084] S45, Add hyperlinks: In the text of the report, use FreeMarker's link directive to add hyperlinks. These hyperlinks can be reference documents for some generated content provided by the large model, or point to external reference documents, related research or further resources to provide users with more information and background.

[0085] As an optimized implementation method, after the report content is generated, the page number of the dynamic directory is automatically updated with the help of WIN32. The algorithm code is as follows:

[0086] doc=word.Documents.Open(file_path)

[0087] doc.Fields.Update()

[0088] The text content generated by the large language model is filled in the specified position of the FreeMarker template. The FreeMarker template engine will parse the template file, replace the placeholders with the actual content, and apply the preset formatting rules to generate the final report document.

[0089] This method implements:

[0090] Multimodal fusion: For the first time, the text generation capability of a large language model is combined with the template design function of FreeMarker to achieve multimodal reporting.

[0091] Dynamic content generation: Utilize the data analysis capabilities of large language models to dynamically generate report content, greatly reducing manual intervention, lowering subjectivity, and saving labor costs.

[0092] An embodiment of the present invention further provides a system for generating multimodal reports based on a large language model and FreeMarker. The system realizes multimodal report generation through the method of generating multimodal reports based on a large language model and FreeMarker described in the above embodiment.

[0093] The system includes:

[0094] Professional data preprocessing module, used to collect, clean and format the data to be analyzed;

[0095] The large language model processing module combines the preprocessed data with prompts to perform data analysis and text generation using the large language model.

[0096] Content parsing module: The output of the parsing model obtains the corresponding analysis conclusions, data statistics, reference documents, etc., and constructs various forms of content including tables, pictures, videos, hyperlinks, etc. with the help of object storage;

[0097] FreeMarker template customization module, design report templates in FreeMarker, including preset dynamic directories, table placeholders, image and video embedding areas, and hyperlink locations;

[0098] The output and display module fills the content generated by the large language model into the FreeMarker template, formats it, and outputs and displays the report content.

[0099] The method for preprocessing professional data by the professional data preprocessing module includes:

[0100] Data preprocessing: Clean and localize the original professional data to reduce the understanding bias of the large language model and convert the data collection into a form that can be processed by computers;

[0101] Keyword identification: Use natural language processing (NLP) technology to identify key values / keywords in the data collection, including name, category, degree, area, etc., identify the corresponding meaning of the data, and form a data dictionary;

[0102] Data conversion: Convert the formatted data collection into a computer-processable form, such as JSON, and construct a prompt project to input it into the LLM model for analysis and processing.

[0103] The FreeMarker template customization module allows users to customize the layout and style of reports to meet the needs of different industries and application scenarios. FreeMarker template design further includes:

[0104] Design template layouts, including defining page size, margins, font style and size, etc., and setting report titles, subtitles, and footers;

[0105] Set up a dynamic table of contents, including links to chapter titles and subtitles, so that users can quickly jump to the corresponding report section by clicking on a table of contents item;

[0106] Configure multimodal content placeholders such as tables, images, videos, hyperlinks, etc.

[0107] Dynamic table of contents algorithm can automatically identify chapters and sub-chapter in the report and generate a structured table of contents, which makes it easy for users to quickly navigate to different parts of the report;

[0108] WIN32 implements updating the directory field of the generated report to ensure that the directory page number is consistent with the dynamic report content page number.

[0109] The dynamic directory is set up in the FreeMarker template using specific FreeMarker syntax including Servlet context loading or Spring Boot integration to load the dynamic directory; the directory will be automatically generated based on the content in the report, including links to section titles and subtitles, so that users can quickly jump to the corresponding report section by clicking on the directory item;

[0110] Configure table placeholders: reserve a place for a table in the report template, use FreeMarker's list and loop instructions to dynamically generate a table; automatically fill in table data based on the data analysis results generated by the large language model;

[0111] Embed images and videos: reserve placeholders for images and videos in the template; store the link addresses of the relevant images and videos output by the model in the object storage, obtain their remote URLs, and embed them into the report through FreeMarker's URL processing instructions;

[0112] Add hyperlinks: In the report text, use FreeMarker's link directive to add hyperlinks.

[0113] The text content generated by the large language model is filled in according to the specified position of the FreeMarker template; the FreeMarker template engine will parse the template file, replace the placeholders with the actual content, and apply the preset formatting rules to generate the final report document;

[0114] The output and display module uses object storage such as Minio to store pictures, videos, reference documents, etc. in the report, which is highly scalable and reliable, ensuring remote and fast access and efficient storage of the report.

[0115] An embodiment of the present invention also provides a device for generating a multimodal report based on a large language model and FreeMarker, comprising: at least one memory and at least one processor;

[0116] The at least one memory is used to store a machine-readable program;

[0117] The at least one processor is used to call the machine-readable program to implement the method for generating a multimodal report based on a large language model and FreeMarker as described in the above embodiment.

[0118] The embodiment of the present invention also provides a computer-readable medium, on which computer instructions are stored, and when the computer instructions are executed by a processor, the processor executes the method for generating a multimodal report based on a large language model and FreeMarker as described in the above embodiment. Specifically, a system or device equipped with a storage medium can be provided, on which a software program code for implementing the functions of any of the above embodiments is stored, and a computer (or CPU or MPU) of the system or device reads and executes the program code stored in the storage medium.

[0119] In this case, the program code itself read from the storage medium can realize the function of any one of the above-mentioned embodiments, and thus the program code and the storage medium storing the program code constitute a part of the present invention.

[0120] The storage medium embodiments for providing the program code include a floppy disk, a hard disk, a magneto-optical disk, an optical disk (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD+RW), a magnetic tape, a non-volatile memory card, and a ROM. Alternatively, the program code can be downloaded from a server computer by a communication network.

[0121] In addition, it should be clear that the functions of any of the above embodiments can be implemented not only by executing the program code read by the computer, but also by enabling an operating system operating on the computer to complete part or all of the actual operations based on instructions from the program code.

[0122] In addition, it can be understood that the program code read from the storage medium is written to a memory provided in an expansion board inserted into the computer or written to a memory provided in an expansion unit connected to the computer, and then based on the instructions of the program code, a CPU installed on the expansion board or the expansion unit is enabled to perform part or all of the actual operations, thereby realizing the functions of any of the above-mentioned embodiments.

[0123] The present invention is shown and described in detail above through the accompanying drawings and preferred embodiments. However, the present invention is not limited to these disclosed embodiments. Based on the above multiple embodiments, those skilled in the art can know that the code review methods in the above different embodiments can be combined to obtain more embodiments of the present invention, and these embodiments are also within the protection scope of the present invention.

Claims

1. A method for generating multimodal reports based on a large language model and FreeMarker, characterized in that: The implementation of this method includes the following steps: Step 1: Professional data preprocessing, including collecting, cleaning, and formatting the data to be analyzed; Step 2: The preprocessed data is concatenated with prompt and the large language model is used for data analysis and text generation; Step 3: Analyze the output of the model to obtain the corresponding analysis conclusions, data statistics, and reference documents, and use object storage to construct various forms of content, including tables, pictures, videos, and hyperlinks; Step 4, design the report template in FreeMarker, including preset dynamic directory, table placeholder, image and video embedding area and hyperlink location; Step 5: Fill the content generated by the large language model into the FreeMarker template, format it, and output and display the report content.

2. According to claim 1, a method for generating a multimodal report based on a large language model and FreeMarker is characterized in that: Methods for preprocessing professional data include: Data preprocessing: Clean and localize the original professional data to reduce the understanding bias of the large language model and convert the data collection into a form that can be processed by computers; Keyword identification: Use natural language processing technology to identify key values / keywords in the data collection, including name, category, degree, area correlation, identify the corresponding meaning of the data, and form a data dictionary; Data conversion: Convert the formatted data collection into a form that can be processed by a computer, construct a prompt project and input it into the LLM model for analysis and processing.

3. The method for generating a multimodal report based on a large language model and FreeMarker according to claim 1, characterized in that: The FreeMarker template design allows users to customize the layout and style of the report to meet the needs of different industries and application scenarios.

4. A method for generating a multimodal report based on a large language model and FreeMarker according to claim 1 or 3, characterized in that: The FreeMarker template design further includes: Design template layouts, including defining page size, margins, font style and size, and setting report titles, subtitles, and footers; Set up a dynamic table of contents, including links to chapter titles and subtitles, so that users can quickly jump to the corresponding report section by clicking on a table of contents item; Configure table, image, video, hyperlink multimodal content placeholder.

5. The method for generating a multimodal report based on a large language model and FreeMarker according to claim 4, characterized in that: The method of preset module dynamic directory is as follows: Dynamic table of contents algorithm can automatically identify chapters and sub-chapter in the report and generate a structured table of contents, which makes it easy for users to quickly navigate to different parts of the report; WIN32 implements updating the directory field of the generated report to ensure that the directory page number is consistent with the dynamic report content page number.

6. The method for generating a multimodal report based on a large language model and FreeMarker according to claim 5, characterized in that: Setting the dynamic directory: In the FreeMarker template, use specific FreeMarker syntax including Servlet context loading or Spring Boot integration to load the dynamic directory; The table of contents will be automatically generated based on the content in the report, including links to chapter titles and subtitles, allowing users to quickly jump to the corresponding report section by clicking on the table of contents item; Configure table placeholders: reserve a place for a table in the report template, use FreeMarker's list and loop instructions to dynamically generate a table; automatically fill in table data based on the data analysis results generated by the large language model; Embed images and videos: reserve placeholders for images and videos in the template; store the link addresses of the relevant images and videos output by the model in the object storage, obtain their remote URLs, and embed them into the report through FreeMarker's URL processing instructions; Add hyperlinks: In the report text, use FreeMarker's link directive to add hyperlinks.

7. The method for generating a multimodal report based on a large language model and FreeMarker according to claim 1, characterized in that: The text content generated by the large language model is filled in according to the specified position of the FreeMarker template; the FreeMarker template engine will parse the template file, replace the placeholders with the actual content, and apply the preset formatting rules to generate the final report document; The method to output and display the report content is as follows: Object storage is used to store images, videos, and reference documents in reports, which is highly scalable and reliable, ensuring remote and fast access and efficient storage of reports.

8. A system for generating multimodal reports based on a large language model and FreeMarker, characterized in that: include: Professional data preprocessing module, used to collect, clean and format the data to be analyzed; The large language model processing module combines the preprocessed data with prompts to perform data analysis and text generation using the large language model. Content parsing module: The output of the parsing model obtains the corresponding analysis conclusions, data statistics, and reference documents. With the help of object storage, it constructs various forms of content, including tables, pictures, videos, and hyperlinks. FreeMarker template customization module, design report templates in FreeMarker, including preset dynamic directories, table placeholders, image and video embedding areas, and hyperlink locations; The output and display module fills the content generated by the large language model into the FreeMarker template, formats it, and outputs and displays the report content; The system realizes multimodal report generation through the method of generating multimodal reports based on a large language model and FreeMarker as described in any one of claims 1 to 7.

9. A device for generating multimodal reports based on a large language model and FreeMarker, characterized in that: include: at least one memory and at least one processor; The at least one memory is used to store a machine-readable program; The at least one processor is used to call the machine-readable program to implement the method described in any one of claims 1 to 7.

10. A computer-readable medium, characterized in that The computer readable medium stores computer instructions, which, when executed by a processor, cause the processor to execute the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Financial report automatic generation method based on natural language processing

    CN106649223A

  • Method, device and equipment for generating Word document by Java application and medium

    CN113408244A

  • Complex PDF generation method

    CN117151063A

  • Natural language-to-SQL interactive generation method based on large language model

    CN117493379A

  • Intelligent business opportunity analysis method and device, computer equipment and storage medium

    CN117876083A

Cited By

  • Data processing method and device, electronic equipment and storage medium

    CN120763222A

  • Report verification method, electronic device, storage medium and program product

    CN120873160A

  • Visual report generation method and device based on large language model and program product

    CN121093935A

  • Certificate report generation method and device based on multi-modal large model

    CN122366390A