Large model-based thematic report generation method and system, terminal and storage medium
Through the large-scale model-based thematic report generation method, data is processed automatically and the generation model is trained, which solves the problems of time-consuming and unstable quality of manual writing, and achieves efficient and standardized report generation.
Patent Information
- Application Number
- CN202510367831.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-26
- Publication Date
- 2025-08-01
AI Technical Summary
In the prior art, the preparation of special reports depends on labor time and low efficiency, and the quality depends on the professional level of the writers. It is difficult to ensure the consistency of multiple reports. The workload of data collection and sorting is large, making it easy to miss important information.
Using a large-scale model-based thematic report generation method, we design structural templates and define generation rules by obtaining basic data and historical special reports, training the special report generation model, and using data mining and machine learning technology to automatically generate reports.
It improves the efficiency and quality of the generation of special reports, realizes the standardization and intelligence of reports, ensures the consistency of report structure and content accuracy, and reduces the workload of manual intervention.
Smart Images

Figure CN120407764A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of natural language processing, and specifically relates to a method, system, terminal and storage medium for generating special reports based on large models. Background Art
[0002] Research reports are mainly completed through a large amount of preliminary research in the corresponding subject area, statistical analysis of data, and finally integration. It is a very professional report.
[0003] Currently, the compilation of special reports mainly relies on manual work. Manual compilation of special reports takes a long time and has low efficiency; the quality of the report depends on the professional level and experience of the compiler; it is difficult to ensure the consistency of the structure and style of multiple reports; the workload of data collection and collation is large, and important information is easily omitted. Summary of the Invention
[0004] In view of the above deficiencies of the prior art, the present invention provides a method, system, terminal and storage medium for generating special reports based on large models to solve the above technical problems.
[0005] In the first aspect, the present invention provides a method for generating a special report based on a large model, including: S1, obtaining the basic data, historical special reports and historical basic data that make up the special report; S2, designing a structure template according to the structural requirements of the special report. The template includes four parts: title, abstract, body text, and conclusion. Define generation rules and content requirements for each part, and extract and annotate the content of the four parts from the historical special reports; S3, training a special report generation model based on the historical basic data, the content of the four parts extracted from the historical special reports and the corresponding annotations; S4, inputting the basic data into the special report generation model, and the model outputs the generated special report.
[0006] In an optional embodiment, in step S3, the special report generation model specifically includes: Constructing a data set from the historical basic data, the content of the four parts extracted from the historical special reports and the corresponding annotations, and dividing it into a training set, a validation set and a test set; Inputting the training set into the model in batches for model training, and the model outputs a special report; Construct the title loss function, abstract loss function, body loss function, and conclusion loss function based on the generation rules and content requirements defined for each part. Construct the loss function based on the title loss function, abstract loss function, body loss function, and conclusion loss function. Calculate the loss value of the model according to the generated result of the model's special report and the real special report. Use the optimizer to perform backpropagation according to the loss value, calculate the gradient, and update the parameters of the model; Use the trained model to generate a special report on the validation set, and calculate the loss value and other evaluation metrics on the validation set; Use the tuned model to perform tests on the test set, and calculate the loss value and evaluation metrics on the test set.
[0007] In an alternative embodiment, the title loss function specifically includes: .
[0008] Among them, is the set of key concepts; is the set of key concepts included in the title; is the title word count, and the title word count ranges from , ; , and are weight coefficients.
[0009] In an alternative embodiment, the abstract content includes: purpose, method, result, and conclusion. The abstract loss function specifically includes:
[0010] Among them, is the evaluation of the content integrity of the purpose; is the evaluation of the content integrity of the method; is the evaluation of the content integrity of the result; is the evaluation of the content integrity of the conclusion; is the abstract word count, and the abstract word count ranges from , ; , , , , , are weight coefficients.
[0011] In an alternative embodiment, the body loss function specifically includes:
[0012] Among them, is the number of logically coherent paragraphs in the main text; is the total number of paragraphs in the main text; is the evaluation of data accuracy; 、 is the weight coefficient.
[0013] In an alternative embodiment, the conclusion includes the main findings and recommendations. The conclusion loss function specifically includes:
[0014] Among them, is the evaluation of the integrity of the main findings; is the evaluation of the integrity of the recommendations; is the number of words in the conclusion, and the specified range of the number of words in the conclusion is ; 、 、 、 are the weight coefficients.
[0015] In an alternative embodiment, after generating the special report, based on the statistical analysis algorithm, it is judged whether there are outliers, and based on the knowledge graph matching method, it is judged whether the report content is accurate. When there are outliers and / or the report content is inaccurate, an anomaly score is given to the special report, and an anomaly score label is added to the special report generation model.
[0016] In a second aspect, the present invention provides a special report generation system based on a large model. When the system is implemented, it executes the above-mentioned special report generation method based on a large model. The system includes: A data acquisition module that acquires the basic data constituting the special report, historical special reports, and historical basic data; A requirement definition module that designs a structure template according to the structural requirements of the special report. The template includes four parts: title, abstract, main text, and conclusion. Generation rules and content requirements are defined for each part, and the content of the four parts is extracted from the historical special reports and annotated; A model training module that trains a special report generation model based on the historical basic data, the content of the four parts extracted from the historical special reports, and the corresponding annotations; A report generation module that inputs the basic data into the special report generation model, and the model outputs the generated special report.
[0017] In a third aspect, a terminal is provided, including: A processor and a memory, where the memory is used to store a computer program, the processor is used to call and run the computer program from the memory, so that the terminal executes the above-mentioned method of the terminal.
[0018] In a fourth aspect, a computer-readable storage medium is provided. Instructions are stored in the computer-readable storage medium, and when they run on a computer, the computer is made to execute the methods described in the above aspects.
[0019] The beneficial effects of the present invention are as follows. The method, system, terminal, and storage medium for generating special reports based on a large model provided by the present invention obtain basic data, historical special reports, and historical basic data, design a structural template including a title, abstract, body, and conclusion, and define the generation rules and content requirements for each part. By extracting and annotating relevant content from historical special reports, and then training a special report generation model based on these data, it can generate special reports using basic data, effectively improving the efficiency and quality of special report generation, and providing a standardized and intelligent solution for related work.
[0020] In addition, the design principle of the present invention is reliable, the structure is simple, and it has a very wide application prospect. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or in the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0022] Figure 1 is a schematic flowchart of a method for generating a special report based on a large model according to an embodiment of the present invention.
[0023] Figure 2 is a schematic block diagram of a system for generating a special report based on a large model according to an embodiment of the present invention.
[0024] Figure 3 is a schematic structural diagram of a terminal provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0025] In order to enable those skilled in the art to better understand the technical solutions in the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0026] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the technical field to which this invention belongs. The terms used in the description of this invention herein are for the purpose of describing specific embodiments only and are not intended to limit the invention.
[0027] The method for generating a special report based on a large model provided by an embodiment of the present invention is executed by a computer device. Correspondingly, the system for generating a special report based on a large model runs in the computer device.
[0028] Figure 1 It is a schematic flowchart of the method for generating a special report based on a large model according to an embodiment of the present invention. Among them, Figure 1 The execution subject can be a system for generating a special report based on a large model. According to different requirements, the order of the steps in this flowchart can be changed, and some can be omitted.
[0029] As Figure 1 shown, the method includes: S1, obtaining the basic data, historical special reports, and historical basic data that make up the special report; Through a systematic data collection process, various data sources related to the special report are integrated. The basic data provides first-hand information on the current research object, while the historical special reports and historical basic data serve as empirical data, which record past research results and relevant information. Using data mining and sorting techniques, these data are gathered to establish an information warehouse for subsequent analysis and model training, so as to fully explore the value behind the data and provide comprehensive support for the generation of special reports.
[0030] [[ID=2,1]]S2, designing a structure template according to the structural requirements of the special report. The template includes four parts: title, abstract, body, and conclusion. Define generation rules and content requirements for each part, and extract and annotate the content of the four parts in the historical special report; Based on the understanding of the commonalities of the special report structure, a combination of manual design and data-driven methods is adopted. First, according to the report structure requirements, a template framework including title, abstract, body, and conclusion is manually defined, and generation rules and content requirements for each part are formulated to form a set of standardized specifications. Then, using text extraction and annotation techniques in natural language processing, the content of the corresponding parts is identified in the historical special report and annotated according to the rules. In this way, samples with clear structure and content annotation are provided for subsequent model training, enabling the model to learn a report construction mode that conforms to the specifications.
[0031] S3, training a special report generation model based on the historical basic data, the content of the four parts extracted from the historical special report, and the corresponding annotations; Leveraging machine learning training mechanisms, using historical basic data and annotated historical special report content as training data, we select an appropriate model architecture (such as a Transformer-based language model). During training, the model continuously adjusts its parameters, learning the features and patterns in the data and understanding how to generate report content that meets the requirements based on the input data.
[0032] S4, input the basic data into the special report generation model, and the model outputs the generated special report.
[0033] When new basic data is input, the model generates corresponding special reports based on the knowledge learned during training and in accordance with the established structure and content rules, thus realizing the automated generation process from data to reports.
[0034] Optionally, as one embodiment of the present invention, in step S1, if the need arises from an enterprise, basic data is obtained from the enterprise's internal systems. The Enterprise Resource Planning (ERP) system stores core operational data, such as production data, inventory data, and financial data. The system's built-in data export function allows for the acquisition of data such as product production quantities, cost breakdowns, and raw material inventory. This data is crucial for analyzing internal operations, cost-effectiveness, and other topics. The Customer Relationship Management (CRM) system records customer information, sales orders, and customer feedback. Data such as customer purchase frequency, purchasing preferences, and customer satisfaction scores can be extracted from this data for use in market analysis and customer behavior research reports. For scientific research needs: For research reports, conduct experiments in a laboratory setting, strictly control variables, and record all parameters and results during the experiment. For example, in a drug development report, record data such as the dosage of medication used in different experimental groups and changes in the subjects' physiological indicators. Conduct market research through questionnaires, interviews, and other methods. Design targeted questionnaires and distribute them to target groups to collect data on consumer demand for products and brand awareness. Interviews can provide in-depth insights into the views of experts and opinion leaders on industry trends and technological developments, which can then be compiled into textual data. Regarding equipment: In fields such as industrial manufacturing, intelligent transportation, and environmental monitoring, a large number of sensors and IoT devices collect data in real time. For example, sensors on industrial production lines collect equipment operating status data, including temperature, pressure, and vibration frequency; sensors in intelligent transportation systems record vehicle flow, speed, and road congestion; and environmental monitoring equipment collects data such as air and water quality indicators. Using data collection software and communication protocols, the data collected by these devices is aggregated into data storage centers.
[0035] Optionally, as an embodiment of the present invention, in step S3, the special report generation model specifically includes: Annotate the historical special reports in detail according to the generation rules and content requirements of the title, abstract, body, and conclusion defined above. For example, mark the key concepts of the title, the purpose, methods, results, and conclusions of the abstract, the logically coherent paragraphs and accurate data parts in the body, as well as the main findings and suggestions in the conclusion, etc.
[0036] Clean the text data to remove noise, special characters, garbled codes, etc.; perform word segmentation to convert the text into a sequence of words or sub-words that can be processed by the model; construct a vocabulary and assign a unique ID to each word or sub-word; convert the text data into an ID sequence and perform necessary padding or truncation operations to make all sequences of the same length for batch processing.
[0037] Construct a dataset from the historical basic data, the four parts of content extracted from the historical special reports, and their corresponding annotations, and divide it into a 70% training set, a 15% validation set, and a 15% test set. The training set is used to update the model's parameters, the validation set is used to evaluate the model's performance and adjust hyperparameters during training, and the test set is used to finally evaluate the model's generalization ability on unseen data; Select randomly initialized model parameters, input the training set into the model in batches for Transformer model training, and the model outputs the special report; Construct a title loss function, an abstract loss function, a body loss function, and a conclusion loss function based on the generation rules and content requirements defined for each part. Based on the title loss function, the abstract loss function, the body loss function, and the conclusion loss function, construct a loss function. Calculate the loss value of the model according to the generated result of the special report by the model and the true special report, and use the optimizer to perform backpropagation according to the loss value, calculate the gradient, and update the model's parameters; Use the trained model to generate special reports on the validation set, and calculate the loss value and other evaluation metrics on the validation set; Use the tuned model to perform tests on the test set, and calculate the loss value and evaluation metrics on the test set.
[0038] Optionally, as an embodiment of the present invention, the title loss function specifically includes: Extract a set of key concepts from the core content of the special report. For example, if the special report is about "Analysis of the Sales Situation of New Energy Vehicles in a Certain City in 2023", the keywords may be "a certain city", "2023", "new energy vehicles", "sales situation".
[0039] .
[0040] Among them, is the set of key concepts; The set of key concepts included in the title; is the title word count, and the title word count ranges from , ; 、 and are weight coefficients.
[0041] Optionally, as an embodiment of the present invention, the abstract content includes: purpose (for example, the purpose is to analyze the sales situation and influencing factors of new energy vehicles), method (such as "by collecting the sales data of this city in 2023 and using statistical analysis methods for research"), result (such as "the sales volume of new energy vehicles has increased by 20% compared with last year, and the main influencing factors are policy support and the improvement of consumers' environmental protection awareness"), and conclusion (such as "the new energy vehicle market in this city has broad prospects and it is necessary to further improve the supporting facilities"). The abstract loss function specifically includes:
[0042] Among them, is the evaluation of the content integrity of the purpose; is the evaluation of the content integrity of the method; is the evaluation of the content integrity of the result; is the evaluation of the content integrity of the conclusion; is the abstract word count, and the abstract word count ranges from , ; 、 、 、 、 、 are weight coefficients.
[0043] Optionally, as an embodiment of the present invention, the body loss function specifically includes:
[0044] Among them, is the number of logically coherent paragraphs in the body content; is the total number of paragraphs in the body; is the evaluation of data accuracy; 、 are weight coefficients.
[0045] Optionally, as an embodiment of the present invention, the conclusion includes main findings (such as the reasons and trends for the increase in the sales volume of new energy vehicles) and suggestions (such as strengthening infrastructure construction and encouraging technological innovation). The conclusion loss function specifically includes:
[0046] Among them, Integrity evaluation for the main findings; Integrity evaluation for the suggestions; For the number of words in the conclusion, the specified range of the number of words in the conclusion is ; , , , are the weight coefficients.
[0047] Optionally, as an embodiment of the present invention, after generating the special report, based on the statistical analysis algorithm, it is judged whether there are outliers, and statistical quantities such as the mean, median, mode, standard deviation, minimum value, and maximum value of the data are calculated to understand the central tendency, dispersion degree, and distribution range of the data. Through these statistical quantities, it can be preliminarily judged whether there are outliers in the data. For example, if the deviation of a certain data point from the mean exceeds three times the standard deviation, it may be an outlier. Based on the knowledge graph matching method, it is judged whether the content of the report is accurate. An existing knowledge graph is constructed or utilized, and the entities in the report (such as people, organizations, events, etc.) are matched with the information in the knowledge graph. For example, when the establishment time of a certain company is mentioned in the report, the NLP system automatically searches for the corresponding establishment time information of the company in the knowledge graph to judge whether the content of the report is accurate. If there is no relevant information in the knowledge graph, authoritative data sources can be supplemented and verified through network search. When there are outliers and / or the content of the report is inaccurate, an anomaly score is given to the special report, and an anomaly score label is added to the special report generation model.
[0048] Optionally, as an embodiment of the present invention, the reportlab library of Python is used to create a PDF document. After having the report content, a PDF document object is generated with the help of the Canvas class. For a pure text-based special report, the content is drawn at the specified position in the document according to a certain format. If the report contains pictures, the Image class is used to insert the pictures into the appropriate places; if there are tables, they are drawn through the Table class, thus completing the production of the special report in PDF format.
[0049] With the help of the python-docx library, a Document object is constructed. The report content is added to the document paragraph by paragraph. In the face of a complex report structure, different levels of title styles can be set using this library, which is achieved through the add_heading method; for pictures, the add_picture method is used to insert them; at the same time, the paragraph format can also be adjusted, thus generating a special report in Word format that meets the requirements.
[0050] By organizing the report content according to the HTML tag structure, HTML code is spliced and generated. First, the basic HTML structure is constructed, including the head and the body. In the body part, each paragraph of the report content is enclosed by Wrapped with tags. If there are style requirements for the report, add <style>标签,通过定义 CSS 样式,对字体、颜色、排版布局等进行美化,最终生成 HTML 格式的专题报告。
[0051] 可选地,作为本发明一个实施例,使用 Flask 库搭建 Web 应用。安装好 Flask库后,创建应用实例。在应用中定义路由,当用户访问特定路由时,从报告生成模块获取报告内容,并通过 render_template_string 函数将内容渲染到 HTML 页面上展示。页面设有 "编辑报告” 按钮,点击该按钮后,利用 JavaScript 将原本显示报告内容的元素替换为<textarea>元素,这样用户就能对报告内容进行编辑。在实际应用里,编辑后的内容可发送回服务器保存。
[0052] Django 实现:先创建 Django 项目和应用。在视图函数中处理报告内容的展示与编辑逻辑。从报告生成模块获取报告内容,当用户以 POST 方法提交编辑后的内容时,在视图函数里获取并处理这些数据,完成保存操作。在模板文件中,通过<form>标签设计页面结构,实现编辑和提交功能,方便用户对报告进行编辑和保存。
[0053] 在一些实施例中,所述基于大模型的专题报告生成系统可以包括多个由计算机程序段所组成的功能模块。所述基于大模型的专题报告生成系统中的各个程序段的计算机程序可以存储于计算机设备的存储器中,并由至少一个处理器所执行,以执行(详见图1描述)基于大模型的专题报告生成的功能。
[0054] 本实施例中,所述基于大模型的专题报告生成系统根据其所执行的功能,可以被划分为多个功能模块,如图2所示。系统的功能模块可以包括:数据获取模块、需求定义模块、报告生成模块。本发明所称的模块是指一种能够被至少一个处理器所执行并且能够完成固定功能的一系列计算机程序段,其存储在存储器中。在本实施例中,关于各模块的功能将在后续的实施例中详述。系统包括:数据获取模块,获取构成专题报告的基本数据、历史的专题报告和历史基本数据;需求定义模块,根据专题报告的结构需求,设计结构模板,模板包括标题、摘要、正文、结论四个部分,为每个部分定义生成规则和内容要求,在历史的专题报告中提取四个部分的内容并进行标注;模型训练模块,基于历史基本数据、历史的专题报告中提取的四个部分内容和对应的标注训练专题报告生成模型;报告生成模块,将基本数据输入专题报告生成模型,模型输出生成的专题报告。
[0055] 数据获取模块广泛收集构成专题报告的基本数据、历史专题报告及历史基本数据,为后续流程奠定坚实信息基础;需求定义模块依专题报告结构需求设计涵盖标题、摘要、正文、结论的模板,明确各部分生成规则与内容要求并对历史报告相关内容标注,规范报告生成框架;报告生成模块凭借历史数据及标注训练模型,以基本数据为输入生成专题报告,极大提升报告生成效率,产出逻辑严谨、内容详实且符合规范的报告,为工作开展提供高效、高质量的报告生成解决方案。
[0056] 图3为本发明实施例提供的一种终端的结构示意图,该终端可以用于执行本发明实施例提供的基于大模型的专题报告生成的方法。
[0057] 其中,该终端可以包括:处理器、存储器及通信单元。这些组件通过一条或多条总线进行通信,本领域技术人员可以理解,图中示出的服务器的结构并不构成对本发明的限定,它既可以是总线形结构,也可以是星型结构,还可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。
[0058] 其中,该存储器可以用于存储处理器的执行指令,存储器可以由任何类型的易失性或非易失性存储终端或者它们的组合实现,如静态随机存取存储器(SRAM),电可擦除可编程只读存储器(EEPROM),可擦除可编程只读存储器(EPROM),可编程只读存储器(PROM),只读存储器(ROM),磁存储器,快闪存储器,磁盘或光盘。当存储器中的执行指令由处理器执行时,使得终端能够执行以下上述方法实施例中的部分或全部步骤。
[0059] 处理器为存储终端的控制中心,利用各种接口和线路连接整个电子终端的各个部分,通过运行或执行存储在存储器内的软件程序和 / 或模块,以及调用存储在存储器内的数据,以执行电子终端的各种功能和 / 或处理数据。所述处理器可以由集成电路(IntegratedCircuit,简称IC) 组成,例如可以由单颗封装的IC 所组成,也可以由连接多颗相同功能或不同功能的封装IC而组成。举例来说,处理器可以仅包括中央处理器(Central ProcessingUnit,简称CPU)。在本发明实施方式中,CPU可以是单运算核心,也可以包括多运算核心。
[0060] 通信单元,用于建立通信信道,从而使所述存储终端可以与其它终端进行通信。接收其他终端发送的用户数据或者向其他终端发送用户数据。
[0061] 本发明还提供一种计算机存储介质,其中,该计算机存储介质可存储有程序,该程序执行时可包括本发明提供的各实施例中的部分或全部步骤。所述的存储介质可为磁碟、光盘、只读存储记忆体(英文:read-only memory,简称:ROM)或随机存储记忆体(英文:random access memory,简称:RAM)等。
[0062] 本领域的技术人员可以清楚地了解到本发明实施例中的技术可借助软件加必需的通用硬件平台的方式来实现。基于这样的理解,本发明实施例中的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中如U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质,包括若干指令用以使得一台计算机终端(可以是个人计算机,服务器,或者第二终端、网络终端等)执行本发明各个实施例所述方法的全部或部分步骤。
[0063] 本说明书中各个实施例之间相同相似的部分互相参见即可。尤其,对于终端实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例中的说明即可。
[0064] 在本发明所提供的几个实施例中,应该理解到,所揭露的系统和方法,可以通过其它的方式实现。例如,以上所描述的系统实施例仅仅是示意性的,例如,所述模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个模块或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,系统或模块的间接耦合或通信连接,可以是电性,机械或其它的形式。
[0065] 所述作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理模块,即可以位于一个地方,或者也可以分布到多个网络模块上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。
[0066] 另外,在本发明各个实施例中的各功能模块可以集成在一个处理模块中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个模块中。
[0067] 尽管通过参考附图并结合优选实施例的方式对本发明进行了详细描述,但本发明并不限于此。在不脱离本发明的精神和实质的前提下,本领域普通技术人员可以对本发明的实施例进行各种等效的修改或替换,而这些修改或替换都应在本发明的涵盖范围内 / 任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。< / style>
Claims
1. A method for generating a special report based on a large model, characterized in that, It includes the following steps: S1. Obtain the basic data constituting the special report, historical special reports, and historical basic data; S2. According to the structural requirements of the special report, design a structure template. The template includes four parts: title, abstract, body, and conclusion. Define generation rules and content requirements for each part, and extract the content of the four parts from the historical special reports and make annotations; S3. Train a special report generation model based on the historical basic data, the content of the four parts extracted from the historical special reports, and the corresponding annotations; S4. Input the basic data into the special report generation model, and the model outputs the generated special report.
2. The method for generating a special report based on a large model according to claim 1, wherein In step S3, the special report generation model specifically includes: Construct a data set from the historical basic data, the content of the four parts extracted from the historical special reports, and the corresponding annotations, and divide it into a training set, a validation set, and a test set; Input the training set into the model in batches for model training, and the model outputs a special report; Construct a title loss function, an abstract loss function, a body loss function, and a conclusion loss function based on the generation rules and content requirements defined for each part. Construct a loss function based on the title loss function, the abstract loss function, the body loss function, and the conclusion loss function. Calculate the loss value of the model according to the generated result of the special report of the model and the real special report, and use an optimizer to perform backpropagation according to the loss value, calculate the gradient, and update the parameters of the model; Use the trained model to generate a special report on the validation set, and calculate the loss value and other evaluation metrics on the validation set; Use the tuned model to test on the test set, and calculate the loss value and evaluation metrics on the test set.
3. The method for generating a special report based on a large model according to claim 2, wherein The title loss function specifically includes: Among them, is a set of key concepts; is a set of key concepts included in the title; is the title word count, and the title word count range is , ; , and are weight coefficients.
4. The method for generating a special report based on a large model according to claim 2, wherein, The abstract content includes: purpose, method, result, and conclusion. The abstract loss function specifically includes: Among them, is the evaluation of the content integrity of the purpose; is the evaluation of the content integrity of the method; is the evaluation of the content integrity of the result; is the evaluation of the content integrity of the conclusion; is the abstract word count, and the abstract word count range is , ; , , , , , are the weight coefficients.
5. The method for generating a special report based on a large model according to claim 2, wherein The body loss function specifically includes: Among them, is the number of logically coherent paragraphs in the main text; is the total number of paragraphs in the main text; is the data accuracy evaluation; 、 are the weight coefficients.
6. The method for generating a special report based on a large model according to claim 2, wherein The conclusion includes main findings and suggestions. The conclusion loss function specifically includes: Among them, is the integrity evaluation of the main findings; is the integrity evaluation of the suggestions; is the number of words in the conclusion, and the specified range of the number of words in the conclusion is ; , , , are the weight coefficients.
7. The method for generating a special report based on a large model according to claim 1, wherein After generating the special report, judge whether there are outliers based on the statistical analysis algorithm, and judge whether the report content is accurate based on the knowledge graph matching method. When there are outliers and / or the report content is inaccurate, perform an anomaly score on the special report, and add an anomaly score label to the special report generation model.
8. A special report generation system based on a large model, characterized in that, When the system is implemented, it executes the special report generation method based on the large model described in any one of claims 1-7. The system includes: A data acquisition module that obtains the basic data constituting the special report, historical special reports, and historical basic data; A requirement definition module that designs a structure template according to the structural requirements of the special report. The template includes four parts: title, abstract, body, and conclusion. Define generation rules and content requirements for each part, and extract the content of the four parts from the historical special reports and make annotations; A model training module that trains a special report generation model based on the historical basic data, the content of the four parts extracted from the historical special reports, and the corresponding annotations; A report generation module that inputs the basic data into the special report generation model, and the model outputs the generated special report.
9. A terminal, characterized in that, It includes: A memory for storing a special report generation program based on the large model; A processor for implementing the steps of the method for generating a special report based on a large model as described in any one of claims 1-7 when executing the program for generating a special report based on a large model.
10. A computer-readable storage medium, characterized in that, A program for generating a special report based on a large model is stored on the readable storage medium, and when the program for generating a special report based on a large model is executed by a processor, the steps of the method for generating a special report based on a large model as described in any one of claims 1-7 are implemented.