File generation method, news manuscript generation method and file generation model training method

By extracting entity and event data from material files, generating event description files and aligning them, the problem of knowledge hallucination in deep learning models during file generation is solved, highly factual and reliable file generation is achieved, and the user experience is improved.

CN120633653APending Publication Date: 2025-09-12HANGZHOU ALICLOUD FEITIAN INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410279085.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-03-11
Publication Date
2025-09-12

AI Technical Summary

Technical Problem

Existing deep learning models suffer from knowledge hallucination problems in document generation, resulting in insufficient factuality and reliability of generated documents and an inability to accurately generate new factual content.

Method used

By obtaining material files, extracting entity data and event data, generating event description files, and inputting entity data and event description files into the file generation model for alignment, the target file is generated, avoiding over-reliance on the model's own generation performance and improving the factuality and reliability of file generation.

Benefits of technology

It improves the factuality and reliability of document generation, enhances the user experience, and ensures the accuracy and consistency of the entity content in the generated documents.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120633653A_ABST
    Figure CN120633653A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a file generation method, a news manuscript generation method and a file generation model training method. The file generation method comprises the steps of obtaining at least one material file; extracting entity data and event data based on the material file, and generating an event description file based on the event data; and inputting the entity data and the event description file into a file generation model, aligning entity contents in the event description file based on the entity data, and generating a target file. Under the conditions of extracting the entity data and the event data based on the material file and then generating the event description file based on the event data, the target file is generated by aligning the entity content in the event description file based on the entity data in the file generation model, so that the generation performance of the file generation model is prevented from being excessively dependent; the problem of knowledge illusion is solved, the factuality and reliability of file generation are improved, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of this specification relate to the field of deep learning technology, and in particular to a method for document generation, news release generation, and document generation model training. Background Art

[0002] With the development of deep learning technology, document generation has been widely used in many fields. For example, document generation models are used to automatically generate news releases, legal documents, and financial reports.

[0003] Currently, in the document generation scenario, there are very strict requirements for the factuality of the generated documents. There must be no errors in the description of time, place, people, news events and related facts.

[0004] However, using document generation models to generate documents carries the risk of knowledge hallucinations inherent in deep learning models, which can lead to fictitious facts appearing in generated documents. This results in insufficient factuality and reliability, and reduces user experience. Therefore, a document generation method with high factuality and reliability is urgently needed. Summary of the Invention

[0005] In view of this, embodiments of this specification provide a document generation method. One or more embodiments of this specification also relate to a news release generation method, a document generation model training method, a document generation device, a news release generation device, a document generation model training method, a computing device, a computer-readable storage medium, and a computer program to address technical deficiencies in the prior art.

[0006] According to a first aspect of an embodiment of this specification, a file generation method is provided, comprising:

[0007] Obtain at least one material file;

[0008] Extract entity data and event data based on the material file, and generate event description files based on the event data;

[0009] The entity data and the event description file are input into the file generation model, and the entity content in the event description file is aligned based on the entity data to generate a target file.

[0010] According to a second aspect of the embodiments of this specification, a method for generating a news article is provided, comprising:

[0011] Obtain at least one news material file;

[0012] Extract entity data and event data based on news material files, and generate event description files based on event data;

[0013] Input the entity data and event description file into the news article generation model, align the entity content in the event description file based on the entity data, and generate the target news article;

[0014] Feedback the target news releases to the front end.

[0015] According to a third aspect of an embodiment of this specification, a file generation model training method is provided, which is applied to a cloud-side device, including:

[0016] Obtaining a sample set, wherein the sample set includes a sample material file and a label file;

[0017] Extracting sample entity data and sample event data based on the sample material file, and generating a sample event description file based on the sample event data;

[0018] Input the sample entity data and the sample event description file into the file generation model, align the entity content in the sample event description file based on the sample entity data, and generate a prediction file;

[0019] Based on the prediction files and label files, the document generation model is trained;

[0020] The model parameters of the trained file generation model are sent to the terminal device.

[0021] According to a fourth aspect of the embodiments of this specification, there is provided a file generation device, including:

[0022] A first acquisition module is configured to acquire at least one material file;

[0023] The first extraction and description module extracts entity data and event data based on the material file, and generates an event description file based on the event data;

[0024] The first generation module is configured to input entity data and an event description file into a file generation model, align entity content in the event description file based on the entity data, and generate a target file.

[0025] According to a fifth aspect of the embodiments of this specification, there is provided a news release generating apparatus, comprising:

[0026] A second acquisition module is configured to acquire at least one news material file;

[0027] The second extraction and description module is configured to extract entity data and event data based on the news material file, and generate an event description file based on the event data;

[0028] The second generation module is configured to input the entity data and the event description file into the news article generation model, align the entity content in the event description file based on the entity data, and generate a target news article;

[0029] The manuscript feedback module is configured to feed back the target news manuscript to the front end.

[0030] According to a sixth aspect of the embodiments of this specification, a file generation model training device is provided, which is applied to a cloud-side device, including:

[0031] A third acquisition module is configured to acquire a sample set, wherein the sample set includes a sample material file and a label file;

[0032] a third extraction and description module configured to extract sample entity data and sample event data based on the sample material file, and generate a sample event description file based on the sample event data;

[0033] A third generation module is configured to input the sample entity data and the sample event description file into the file generation model, align the entity content in the sample event description file based on the sample entity data, and generate a prediction file;

[0034] A model training module is configured to train a file generation model based on the prediction file and the label file;

[0035] The parameter sending module is configured to send the model parameters of the trained file generation model to the terminal device.

[0036] According to a seventh aspect of the embodiments of this specification, a computing device is provided, including:

[0037] memory and processor;

[0038] The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions. When the computer programs / instructions are executed by the processor, the steps of the above method are implemented.

[0039] According to an eighth aspect of the embodiments of this specification, a computer-readable storage medium is provided, which stores a computer program / instruction, and the computer program / instruction implements the steps of the above method when executed by a processor.

[0040] According to a ninth aspect of the embodiments of this specification, a computer program product is provided, comprising a computer program / instruction, which implements the steps of the above method when executed by a processor.

[0041] In one embodiment of the present specification, at least one source file is obtained; entity data and event data are extracted based on the source file, and an event description file is generated based on the event data; the entity data and event description file are input into a file generation model, and the entity content in the event description file is aligned based on the entity data to generate a target file. In the case where the entity data and event data are extracted based on the source file and then the event description file is generated based on the event data, the target file is generated by aligning the entity content in the event description file based on the entity data in the file generation model. This avoids over-reliance on the generation performance of the file generation model itself, overcomes the problem of knowledge illusion, improves the factuality and reliability of file generation, and enhances the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 This is a flowchart of a file generation method provided by one embodiment of this specification;

[0043] Figure 2 This is a flowchart of the application phase of a file generation method provided in one embodiment of this specification;

[0044] Figure 3 This is a flowchart of a training phase in a file generation method provided in one embodiment of this specification;

[0045] Figure 4 This is a flow chart of a news release generation method provided by one embodiment of this specification;

[0046] Figure 5 This is a front-end schematic diagram of a news release generation method provided by one embodiment of this specification;

[0047] Figure 6 This is a flowchart of a file generation model training method provided by one embodiment of this specification;

[0048] Figure 7 This is a flowchart of a processing process of a news release generation method for a virtual digital person provided by one embodiment of this specification;

[0049] Figure 8 This is a schematic diagram of the structure of a file generating device provided by an embodiment of this specification;

[0050] Figure 9 This is a structural diagram of a news release generating device provided in one embodiment of this specification;

[0051] Figure 10 This is a structural diagram of a file generation model training device provided by an embodiment of this specification;

[0052] Figure 11This is a structural block diagram of a computing device provided by one embodiment of this specification. DETAILED DESCRIPTION

[0053] The following description sets forth many specific details to facilitate a thorough understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the scope of this specification. Therefore, this specification is not limited to the specific implementations disclosed below.

[0054] The terms used in one or more embodiments of this specification are for the purpose of describing specific embodiments only and are not intended to limit one or more embodiments of this specification. The singular forms "a," "the," and "the" used in one or more embodiments of this specification and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items.

[0055] It should be understood that although the terms first, second, etc. may be used to describe various information in one or more embodiments of this specification, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of this specification, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0056] In addition, it should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in one or more embodiments of this specification are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0057] In one or more embodiments of this specification, a large model refers to a deep learning model with large-scale model parameters, typically containing hundreds of millions, tens of billions, hundreds of billions, trillions, or even more than ten trillion model parameters. A large model can also be called a cornerstone model / foundation model. It is pre-trained on a large-scale unlabeled corpus to produce a pre-trained model with more than 100 million parameters. This model can adapt to a wide range of downstream tasks and has good generalization capabilities, such as a large language model (LLM) and a multi-modal pre-training model.

[0058] When large models are used in practice, only a small number of samples are needed to fine-tune the pre-trained model and it can be applied to different tasks. Large models can be widely used in natural language processing (NLP), computer vision and other fields. Specifically, they can be applied to computer vision tasks such as visual question answering (VQA), image caption (IC), and image generation, as well as natural language processing tasks such as text-based sentiment classification, text summary generation, and machine translation. The main application scenarios of large models include digital assistants, intelligent robots, retrieval, online education, office software, e-commerce, and intelligent design.

[0059] First, the terms involved in one or more embodiments of this specification are explained.

[0060] Knowledge illusion: The model is overconfident in the knowledge learned through training, and thus over-relies on previously learned knowledge when generating data, resulting in factual errors.

[0061] Fact alignment: By extracting and organizing core event data or entity data from the input and output respectively, and allowing the model to learn to objectively retell the cause, process, and result of the event, the aligned entity content is constructed to avoid information asymmetry during model learning and the generation of knowledge illusions.

[0062] Opinion alignment: Mainly through methods such as opinion extraction, opinion reasoning, and opinion completion, the model learns which parts of the material file are opinion data, how to complete the opinion data in the generated file, and how to interpret the event description file based on the generated opinion data, so that the model can truly learn what opinions are, how to express opinions, and how to explain the expressed opinions.

[0063] Decoupling: Disassemble a module composed of multiple modules into multiple modules.

[0064] Deep Learning: A branch of machine learning, it is an algorithm that uses artificial neural networks as its architecture to represent and learn data.

[0065] Conditional Random Field (CRF): An undirected graph model mainly used for sequence labeling tasks such as part-of-speech tagging and named entity recognition.

[0066] Hidden Markov Model (HMM): A statistical modeling method used to describe a random process with hidden states.

[0067] Support Vector Machine (SVM): A supervised learning model for binary or multi-class classification that performs classification by constructing a maximum margin hyperplane.

[0068] Convolutional Neural Networks (CNN) model: A multi-layer deep learning model with forward propagation and backpropagation, and a convolution filter for processing feature data.

[0069] Recurrent Neural Network (RNN) model: A recursive deep learning model that processes vector representations recursively and connects intermediate layers in a chain-like manner.

[0070] Long Short Term Memory (LSTM) model: A deep learning model that has the ability to memorize long-term and short-term information and has a convolution filter for processing feature data.

[0071] Deep Self-Attention Model (Transformer Model): A deep learning architecture based on the attention mechanism for processing sequential data such as natural language.

[0072] Bidirectional Encoder Representations from Transformers (BERT): A special Transformer model trained using a bidirectional Transformer encoder and large-scale unlabeled text data.

[0073] Term Frequency-Inverse Document Frequency (TF-IDF): A statistical method for measuring the importance of words in a document collection. It evaluates the relevance of a word to the document content by calculating the frequency of occurrence (TF) of a word in a document and the inverse document frequency (IDF) of the word in the entire corpus.

[0074] Chain of Thoughts (CoT): A capability emerging from large models. When a model is asked to perform a task, it is explicitly told to output the intermediate thinking steps and finally obtain the answer. This approach significantly improves the effectiveness of tasks that require reasoning.

[0075] Currently, document generation based on deep learning models directly leverages the general generation capabilities of deep learning models and relies on prior knowledge learned during the training phase to complete document generation. This approach, due to its over-reliance on the knowledge acquired by the deep learning model, can lead to serious knowledge hallucination issues. This is particularly true when generating documents containing new facts. Because the model lacks prior knowledge about the new facts, document generation cannot be performed based on the facts. This results in insufficient factuality and reliability of the generated documents, reducing the user experience.

[0076] In response to the above problems, this specification provides a file generation method. This specification also involves a news release generation method, a file generation model training, a file generation device, a news release generation device, a file generation model training device, a computing device, a computer-readable storage medium and a computer program, which are described in detail one by one in the following embodiments.

[0077] See also Figure 1 , Figure 1 A flowchart of a file generation method provided according to an embodiment of this specification is shown, including the following specific steps:

[0078] Step 102: Obtain at least one material file.

[0079] The embodiments of this specification are applied to applications, websites or mini-programs with file generation functions. On the application, website or mini-program, a target file containing factual content is generated. For example, a website deployed with a large language model can automatically generate news releases, legal documents or financial reports. For another example, an e-commerce platform calls the deployed large language model through the Application Programming Interface (API) to automatically generate intelligent customer service reply texts, user analysis reports, product analysis reports, merchant analysis reports or platform analysis reports. For another example, on an application that includes a virtual assistant, news releases, course manuscripts or live broadcast manuscripts can be automatically generated.

[0080] Source files are source files containing content data containing factual content. Source files are files related to the target event for the target file to be generated, providing factual content support for file generation. Source files include, but are not limited to, data in various formats, such as text, images, audio, and video. Source files correspond to the factual content of events related to or identical to the target event and record data related to that factual content, including entity data for both the entity content and the entity data for the event content. For example, source files are news source files that provide factual content support for news release generation and may include: social media text, factual content videos, streaming media data, news eyewitness accounts, background investigation reports, and publicly available information. Another example is legal source files that provide factual content support for legal document generation and may include: copies of indictments, evidentiary materials (including but not limited to physical evidence, documentary evidence, audiovisual materials, and electronic data), expert opinions, witness testimony transcripts, court records, previous judgments or rulings, expert opinions, and various contracts, agreements, and correspondence related to the case. For example, material files are financial material files that provide factual content support for the generation of financial reports: corporate financial statements (such as balance sheets, income statements and cash flow statements), audit reports, industry analysis reports, market research data, economic indicator statistics, shareholder meeting minutes, tax declaration documents, performance forecast models and relevant legal and regulatory bases, etc.

[0081] The at least one material file can be obtained directly, for example, the user directly uploads material files such as corporate financial statements (such as balance sheets, income statements and cash flow statements) on the front end, or it can be retrieved based on event data of a target event, for example, the user enters the subject text on the front end: Please generate a news release about "smart city", and based on the event data "smart city", the public information of relevant departments is retrieved from the database.

[0082] For example, on a website deployed with a large language model, a user enters the following information on the front end of the website: Please generate a news article about "H brand mobile phone XX model", which must be more than 800 words, with the subject text being "H brand mobile phone XX model". Based on this subject text, relevant material files are retrieved from the database: a social media text released by H Company: "On January 1, 2024, at the highly anticipated H brand New Year's press conference, the company's CEO personally unveiled the new generation flagship mobile phone XX. This smart terminal, equipped with the latest 20th generation chip, integrates augmented reality technology. The XX phone is equipped with a high-definition borderless display, supports ultra-high-speed 5G+ network connection, and has optimized AI photography algorithms to provide professional-level image creation capabilities. In addition, the phone also has an advanced cooling system and long-lasting battery life to ensure smooth use around the clock. The new XX series flagship phone is expected to be launched globally in the first quarter, aiming to redefine the standard of the high-end smartphone market."

[0083] Acquiring at least one material file provides data support for data extraction and event description file generation, and provides factual content support for file generation.

[0084] Step 104: extracting entity data and event data based on the material file, and generating an event description file based on the event data.

[0085] Entity data is the content data of physical content, typically representing individuals, objects, or concepts that exist in the real world. It provides factual alignment support for document generation and is a fundamental element of factual content. Entity data is generally represented in text or string format. Entity content includes identifying elements of factual content, such as people, places, times, organizations, and products or services. For example, in news documents, entity data includes people, places, times, organizations, and project names. In legal documents, entity data includes plaintiffs, defendants, judges, lawyers, courts, locations, times, case names, and case numbers. In financial documents, entity data includes organizations, products or services, financial indicators, locations, and times.

[0086] Event data is the content data of an event, typically representing a specific real-world event. It provides factual content support for the generation of event description files and is an element of factual content, recording specific actions, state changes, or interactions within the factual content. Event data is generally represented in text format. Event content includes factual content elements such as time, location, entities involved, results, and action types. For example, in a news source file, event data includes sports news events and livelihood news events. In another example, in a legal source file, event data includes infringement events, civil infringement events, criminal infringement events, litigation events, civil litigation events, criminal litigation events, civil liability, and criminal liability. In another example, in a financial source file, event data includes product launch events, earnings events, and corporate restructuring events.

[0087] An event description file objectively describes the facts. It is a descriptive file generated by event recovery of a target event. It details the cause, process, and outcome of the target event and does not include non-factual (subjective) content. The event description text consists of the generated event content. For example, in news release generation, the event description file might read: "At a public event on May 18th, City A and technology giant Company B jointly announced the launch of a construction project called 'City A Smart City 3.0' at the Civic Center Square. The two parties signed a five-year cooperation agreement with an estimated total investment of RMB 1 billion. The parties plan to complete major infrastructure construction and initial application deployment within the next three years." Another example, in legal document generation, the event description file might read: "Company C filed a lawsuit in March 2023, accusing Company D of illegally using Company C's well-known registered trademark on its products, causing consumer confusion and misidentification and damaging Company C's legitimate rights and interests. After an authoritative appraisal confirmed trademark infringement, Company C demanded that Company D cease the infringement, compensate for economic losses, and issue a public apology." For example, in the generation of financial reports, the event description file is: "Company E launched 20 new market-competitive products in fiscal year 2023. As of the end of 2023, Company E's full-year net profit increased by 50% compared with the same period last year."

[0088] Extract entity data based on source files. Optional methods include: performing entity recognition on source files to obtain entity data. Entity recognition methods include, but are not limited to, those based on entity recognition rules, statistical algorithms, and deep learning algorithms. Entity recognition rule-based implementations include regular expressions, keyword matching, prefix and suffix analysis, and syntactic structure analysis. Statistical algorithm-based implementations include conditional random fields, hidden Markov models, and support vector machines. Deep learning algorithm-based implementations include CNN models, RNN models, LSTM models, Transformer models, and BERT models.

[0089] Extract event data from source files. Optional methods include extracting event data from source files based on the target event's event data. Extraction methods include relevance extraction, including cosine similarity, TF-IDF, and BM25 algorithms.

[0090] Generate an event description file based on event data. This is done by performing event recovery on the target event based on the event data to obtain the event description file. Event recovery includes deep learning algorithms and knowledge graph restoration.

[0091] For example, the large language model LLM is used to perform entity recognition on the social media text released by H Company to obtain the entity data: time entity: January 1, 2024; location entity: H brand New Year's press conference; organization entity: H Company, XX (mobile phone brand); person entity: company CEO; product entity: new generation flagship mobile phone XX, the latest 20th generation chip, augmented reality technology, high-definition borderless display, 5G+ network connection, AI photography algorithm, cooling system, and long-lasting battery life. Using the large language model LLM, event data is extracted from social media texts based on the event data of the target event "H brand mobile phone XX model": Event data 1: The CEO of H company personally unveiled the new generation flagship mobile phone XX; Event data 2: The new generation flagship mobile phone XX is a smart terminal equipped with the latest 20th generation chip; Event data 3: The smart terminal equipped with the latest 20th generation chip integrates augmented reality technology; Event data 4: XX mobile phone is equipped with a high-definition borderless display; Event data 5: XX mobile phone supports ultra-high-speed 5G+ network connection; Event data 6: XX mobile phone has optimized AI photography algorithms; Event data 7: XX mobile phone provides professional-level image creation capabilities; Event data 8: Provides professional-level image creation capabilities; Event data 9: XX mobile phone has an advanced heat dissipation system and long-lasting battery life; Event data 10: Long-lasting battery life ensures smooth use around the clock; Event data 11: The XX series flagship phone is expected to be launched globally in the first quarter; Event data 12: The XX series flagship phone aims to redefine the standard of the high-end smartphone market. Using the Large Language Model (LLM), we recovered the target event based on 12 event data items, resulting in an event description file: "At the H-brand New Year's press conference held on January 1, 2024, the CEO of XX brand company personally presided over the launch ceremony of the new generation flagship phone, model XX. This event marked the official market entry of the XX mobile phone brand's new products. According to the announcement at the event, the CEO of XX brand company personally unveiled the new generation flagship phone, XX, at the event. Equipped with the latest 20th generation chip technology, this smart device boasts significantly improved performance and integrates augmented reality technology. The XX phone is equipped with a series of advanced hardware and software features, including a high-definition borderless display and support for ultra-fast 5G+ network connectivity. Furthermore, the official disclosure states that the XX phone has optimized AI photography algorithms to provide professional-level image creation capabilities. Furthermore, the new XX phone is equipped with an advanced cooling system and a long-lasting battery life design, designed to ensure smooth all-day use without the worry of overheating or low battery. According to the plan revealed at the press conference, the XX series flagship phone is expected to be launched globally in the first quarter of 2024, aiming to redefine the performance and technical standards in the high-end smartphone market." There are some factual errors in the event description document: "CEO of XX Brand Company" should be "CEO of H Brand Company".

[0092] Extract entity data and event data from source files, and generate event description files based on the event data. This provides event description text support for subsequent target file generation, and entity data support for entity content alignment.

[0093] Step 106: Input the entity data and the event description file into the file generation model, align the entity content in the event description file based on the entity data, and generate a target file.

[0094] The file generation model is a deep learning model with file generation capabilities. Pre-trained, the file generation model has the ability to generate files with entity content aligned, avoiding the problem of knowledge illusion, where the generated factual content does not match reality. Based on the data processing modality, the target task models include but are not limited to: text processing models, image processing models, audio processing models, video processing models, and structured data processing models. Based on model type, the file generation model includes but is not limited to: CNN models, RNN models, LSTM models, Transformer models, BERT models, and large models. The text generation model can achieve entity content alignment through targeted pre-training or through prompt information, which is not limited here.

[0095] The target file is a target file containing content data of factual content. The target file records the factual content of the target event and is a file generated through entity content alignment. The target file includes but is not limited to data in various formats such as text, images, audio, and video. The target file records content data of the factual content of the target event, including but not limited to entity data of the entity content in the target event and entity data of the event content in the target event. For example, the target file is a press release generated for the target event. For another example, the target file is a legal document for the target case. For another example, the target file is a financial report.

[0096] Optionally, in addition to the content data of factual content, the target file also includes content data of opinion content, that is, using a text generation model, subjective opinion content is generated based on the factual content to obtain a target file with both factual content and opinion content.

[0097] Aligning entity content in event description files based on entity data involves inputting entity data and event description files into the file generation model. This involves using pre-trained model parameters or prompts to guide the model during the generation process, ensuring that the generated content accurately matches the entity data. This ensures that the generated target file does not contain misaligned, confused, or fabricated entities.

[0098] For example, the entity data and event description file are input into the Large Language Model (LLM). Based on the preset prompt "Please generate a 300-word press release based on the entity data and event description file. The entity content and entity data must be aligned," a press release is generated based on the alignment of the entity data with the entity content in the event description file: "At the H brand's New Year's press conference on January 1, 2024, the company's CEO personally unveiled the highly anticipated new generation flagship phone, model XX. This phone utilizes the most advanced 20th generation chip technology and integrates augmented reality capabilities, demonstrating a new breakthrough in the field of smart devices. The XX phone is equipped with a high-definition borderless display and supports ultra-fast 5G+ network connectivity. It also optimizes AI photography algorithms to provide professional-level image creation capabilities. In addition, its efficient heat dissipation system and long-lasting battery life design ensure smooth all-day use without worrying about overheating or low battery. It is reported that the XX series flagship phone is expected to be launched simultaneously worldwide this quarter, committed to redefining the performance standards and technological boundaries in the high-end smartphone market."

[0099] In an embodiment of the present specification, at least one source file is obtained; entity data and event data are extracted based on the source file, and an event description file is generated based on the event data; the entity data and event description file are input into a file generation model, and the entity content in the event description file is aligned based on the entity data to generate a target file. In the case where the entity data and event data are extracted based on the source file and then the event description file is generated based on the event data, the target file is generated in the file generation model by aligning the entity content in the event description file based on the entity data. This avoids over-reliance on the generation performance of the file generation model itself, overcomes the problem of knowledge illusion, improves the factuality and reliability of file generation, and enhances the user experience.

[0100] In an optional embodiment of the present specification, generating an event description file based on the event data in step 104 includes the following specific steps:

[0101] Retrieving event description data of a target event based on the event data;

[0102] Event recovery is performed based on the event description data to obtain the event description file of the target event.

[0103] Since the data in the material file is not necessarily complete, or omissions occur during event extraction, it is impossible to fully and accurately restore the target event during the generation of the event description file. Therefore, it is necessary to fully restore the target event through retrieval enhancement to ensure the factuality and reliability of the target event.

[0104] In the embodiments of this specification, event data refers to key information data of a target event, representing the core event attributes of the target event, such as the title of a news release, the case number of a legal document, or the report body and time information of a financial report.

[0105] Event description data objectively describes the facts and serves as retrieval enhancement for the target event. It contains structured or unstructured information related to the facts of the target event. It typically consists of at least one element of the target event, including time, location, entities involved, results, and action type. Combined with the extracted event data, a comprehensive and detailed description of the target event is constructed. Event description data is recorded in text, databases, or other information sources and retrieved through event data retrieval. For example, through the case number, the case background information of the target case is retrieved on the case public information website. This event description data is as follows: Case number: 2023-LW-001234; Plaintiff: Company C; Defendant: Company D; Time: The lawsuit was filed on March 15, 2023; Location: Intermediate People's Court of a certain city; Core event: Trademark infringement dispute; Action and result: Company C accused Company D of illegally using registered trademarks on its products; The existence of trademark infringement was confirmed by an authoritative appraisal agency; Company C required Company D to stop the infringement, compensate for the losses and make a public apology; Background information: The two parties had a business cooperation relationship, but later had differences over the right to use the trademark.

[0106] Event recovery is performed based on event description data to obtain an event description file for the target event. Specifically, event recovery is performed using event orchestration based on the event description data to obtain an event description file for the target event. Event orchestration involves classifying the event description data to determine whether the event description data pertains to the cause, process, or result of the target event, and integrating the cause, process, and result of the target event to obtain an event description file for the target event. Event orchestration can be implemented using structured data analysis (such as knowledge graph construction and triple data analysis) and deep learning algorithms. For example, data classification is performed on the event description data to determine whether the event description data pertains to the cause, process, or result of the target event. Acquirer: Company H; Acquired Party: Company B; Transaction Amount: 5,000,000; Transaction Date: May 1, 2023; Background: Company B possesses innovative technologies in the field of artificial intelligence; Reason: Company H aims to strengthen its competitiveness in the AI ​​field; Process: After eight months of negotiations, the two parties ultimately reached an agreement; Result: Company B becomes a wholly-owned subsidiary of Company H, with no changes to the core team.

[0107] For example, based on the subject text "H brand mobile phone XX model", event description data such as the development history of H brand mobile phones, the R&D plan of XX model mobile phones, and product information of competing mobile phones are retrieved from the open source database. Based on the event description data, event recovery is performed through event orchestration to obtain the event description file of the target event: "At the H brand New Year's press conference held on January 1, 2024, the CEO of XX brand company personally presided over the launch ceremony of the new generation flagship mobile phone XX model. This event marked the official entry of the new product of XX mobile phone brand into the market. According to the news released on the scene, the CEO of XX brand company personally unveiled the new generation flagship mobile phone XX at the event. This phone is equipped with the latest 20th generation chip Technology, as a smart terminal, its performance has been greatly improved, and augmented reality technology is integrated. The XX phone is equipped with a series of advanced hardware and software features, including a high-definition borderless display and support for ultra-high-speed 5G+ network connection. At the same time, the official disclosed that the XX phone has been optimized for AI photography algorithms to provide professional-level image creation capabilities. In addition, the new XX phone is also equipped with an advanced cooling system and long-lasting battery life design, designed to ensure smooth use all day without worrying about overheating or low power. According to the plan revealed at the press conference, the XX series flagship phone is expected to be launched globally in the first quarter of 2024, with the goal of redefining the performance and technical standards of the high-end smartphone market." There are some factual errors in the event description document: "XX brand company CEO" should be "H brand company CEO."

[0108] In the embodiments of this specification, a highly authentic and reliable event description file is restored by means of retrieval enhancement and event recovery, providing highly authentic and reliable event content input for subsequent generation of a target file.

[0109] In an optional embodiment of the present specification, before step 106, the following specific steps are further included:

[0110] Extracting opinion data based on the source file; or receiving opinion data input from the front end;

[0111] Correspondingly, step 106 includes the following specific steps:

[0112] The entity data, event description file and opinion data are input into the file generation model, and the entity content in the event description file is aligned based on the entity data to generate a target file containing target opinion content, wherein the target opinion content is obtained by inferring the aligned event description file based on the opinion data.

[0113] In the target document generation process, in addition to objective content such as factual content, subjective content such as opinion based on the factual content is often required. Otherwise, target documents generated strictly based on the factual content will be too rigid, lack readability and differentiation, and fail to meet the needs of some scenarios with creative requirements. However, current document generation models generate opinion content simultaneously with factual content, failing to effectively decouple the generation of factual content from opinion content. Therefore, a document generation method is needed that decouples the generation of factual content from opinion content and generates opinion content with high factuality and reliability.

[0114] Opinion data is the content data of opinion content, providing support for the generation of the target document and forming an essential element of opinion content. Opinion data records subjective evaluations, attitudes, emotions, or insights based on factual content related to the target event. Opinion data is generally expressed in text format. For example, in a news source file, opinion data may include commentary on sports news events and public welfare news events. Another example is that in a legal source file, opinion data may include the basis for adjudication of infringement cases, the basis for adjudication of civil infringement cases, the basis for adjudication of criminal infringement cases, the basis for adjudication of litigation cases, the basis for adjudication of civil litigation cases, the basis for adjudication of criminal litigation cases, commentary on civil liability, and commentary on criminal liability. Another example is that in a financial source file, opinion data may include the significance of product launches, analysis of earnings trends, and analysis of corporate restructuring events. Opinion data can be included in the source file, extracted, or directly received from the front-end input, without limitation here.

[0115] The target opinion content is generated by the document generation model based on the aligned event description file. The target opinion content is derived through reasoning based on highly factual and reliable factual content. In the target document generation process, the target opinion content is the subjective component relative to the objective factual content, reflecting the understanding of the factual content. For example, in press release generation, the target opinion content might be, "The XX model phone released by brand H, with its innovative technology and high-end features, is expected to trigger a new wave of competition in the smartphone market and redefine users' perception of flagship models." Another example, in legal document generation, the target opinion content might be, "Given that Company C has sufficient evidence to prove that Company D has committed trademark infringement, and considering the economic losses and damage to Company C's reputation caused by this infringement, the court should support Company C's claim for compensation and impose severe penalties on Company D to maintain fair competition in the market." For example, in the generation of financial reports, the target viewpoint content is "Despite the complex and changing global economic environment, Company E's strong growth momentum in the past year demonstrates the effectiveness of its product strategy and market positioning. It is expected that in the next few fiscal years, as the new layout gradually matures, Company E will maintain stable profitability and has the potential to further expand its market share."

[0116] In the embodiment of this specification, the target file is a target file containing content data of factual content and opinion content, and the target file records the factual content and opinion content (target opinion content) of the target event. The target file records data of the factual content and opinion content of the target event, including but not limited to: entity data of the entity content in the target event, entity data of the event content in the target event, and opinion data of the opinion content in the target event. For example, the target file is a news release generated for the target event. For another example, the target file is a legal document of the target case. For another example, the target file is a financial report.

[0117] Extract opinion data from source files. Optional methods include identifying opinions in source files to obtain opinion data. Opinion identification methods include, but are not limited to, rule-based, statistical, and deep learning algorithms. Rule-based approaches include regular expressions, keyword matching, prefix and suffix analysis, and syntactic structure analysis. Statistical algorithms include conditional random fields, hidden Markov models, and support vector machines. Deep learning algorithms include CNN models, RNN models, LSTM models, Transformer models, and BERT models.

[0118] Input entity data, event description file and opinion data into the file generation model, align the entity content in the event description file based on the entity data, and generate a target file containing the target opinion content. The specific method is as follows: input entity data, event description file and opinion data into the file generation model, align the entity content in the event description file based on the entity data, and generate a target file containing the target opinion content through opinion reasoning and opinion completion.

[0119] For example, the large language model LLM is used to identify opinions on the social media text released by H Company to obtain opinion data: The XX model mobile phone released by H brand this time is expected to trigger a new round of competition in the smartphone market with its innovative technology and high-end configuration, and redefine users' cognitive standards for flagship models. The entity data, event description file and opinion data are input into the large language model LLM, and the entity content in the event description file is aligned based on the entity data. Through opinion reasoning and opinion completion, a news release containing the target opinion content is generated: "At the H brand New Year's press conference held on January 1, 2024, the CEO of H brand personally unveiled the highly anticipated new generation flagship mobile phone - XX model. This phone is Equipped with the latest 20th-generation chip technology and integrated augmented reality capabilities, it demonstrates a major breakthrough in the field of smart terminals. Its numerous cutting-edge features, including a high-definition borderless display, 5G+ network connectivity, and optimized AI photography algorithms, not only highlight the product's excellent performance but also demonstrate the H brand's commitment to innovation. It is worth noting that the industry generally believes that the XX model mobile phone released by the H brand, with its unique innovative technology and luxurious configuration, is expected to usher in a new round of climax in the current fierce competition in the smartphone market, challenging and rewriting consumers' existing cognitive standards for flagship models. This phone not only carries the H brand's forward-looking vision for the future development of mobile technology, but also heralds that the smartphone industry may usher in a new stage of development."

[0120] In the embodiments of this specification, based on the opinion data, the aligned fact description files are inferred, which effectively decouples the fact content generation and the opinion content generation, realizes opinion alignment, and obtains a target file containing the target opinion content with high authenticity, high reliability and high readability, thereby improving the diversity of file generation and further enhancing the user experience.

[0121] In an optional embodiment of the present specification, the document generation model includes a document generation unit, a viewpoint reasoning unit, and a viewpoint completion unit;

[0122] Correspondingly, the entity data, event description file, and viewpoint data are input into the file generation model, and the entity content in the event description file is aligned based on the entity data to generate a target file containing the target viewpoint content, including the following specific steps:

[0123] Inputting the entity data and the event description file into a file generation unit, aligning the entity content in the event description file based on the entity data, and obtaining an aligned event description file;

[0124] Inputting the aligned event description file and opinion data into the opinion reasoning unit, performing opinion reasoning on the aligned event description file based on the opinion data to obtain the target opinion content;

[0125] The aligned event description file and the target viewpoint content are input into the viewpoint completion unit, and a target file containing the target viewpoint content is generated based on the aligned event description file and the target viewpoint content.

[0126] In the case where the document generation model is a large model including multiple model units, entity content alignment and target viewpoint content generation can be achieved through independent functional units.

[0127] The file generation unit is a model unit in the file generation model that has entity content alignment and file generation functions. After inputting entity data and event description files, the file generation unit uses a pre-trained language model to align entity content, ensuring that the relationship between entity content in the generated content is correct and that the factual information is logical, thereby achieving accurate and highly readable generation of factual content.

[0128] The opinion reasoning unit is a model unit with opinion reasoning function in the file generation model. After inputting the aligned event description file and opinion data, it performs opinion reasoning on the aligned event description file based on the opinion data. During the reasoning process, the opinion data is used as an example to guide the opinion reasoning unit to complete opinion reasoning based on the aligned event description file, obtain the target opinion content, and realize authentic and reliable opinion reasoning.

[0129] The viewpoint completion unit is a model unit with viewpoint completion function in the file generation model. After inputting the alignment event description file and the target viewpoint content, the target viewpoint content is embedded in the specific position of the alignment event description file to obtain a highly readable target file.

[0130] Optionally, step 104 can also be implemented in the large model including multiple model units. Correspondingly, the file generation model further includes: an entity extraction unit, an event extraction unit, and an event recovery unit. Step 104 includes the following specific steps:

[0131] Input the material file into the entity extraction unit, and extract entity data based on the material file;

[0132] Inputting the material file into the event extraction unit, and extracting event data based on the material file;

[0133] The event data is input into the event recovery unit, and an event description file is generated based on the event data.

[0134] The entity extraction unit is a model unit in the file generation model that has the function of extracting entity data. After the material file is input, the entity extraction unit uses a pre-trained language model to extract entity data from the material file. The entity extraction unit can extract basic elements of factual content such as people, places, time, organizations, products or services from text, images or other formats of data. The entity extraction unit usually uses natural language processing technology (such as regular expressions, keyword matching, statistical models, deep learning algorithms, etc.) to identify entities in the text and output them in a structured form for easy use in subsequent steps. For example, in the news material file, the entity extraction unit identifies "H Brand New Year Press Conference" as a location entity, "January 1, 2024" as a time entity, "Company CEO" as a person entity, and "New Generation Flagship Mobile Phone XX" as a product entity.

[0135] The event extraction unit is a model unit in the file generation model that has the function of extracting event data. After the material file is input, the event extraction unit uses the pre-trained language model to extract event data from the material file. The event extraction unit can identify the event type (such as product release, infringement, financial report, etc.), the entities involved, and the key attributes of the event, and extract the event data. The event extraction unit uses pattern matching, statistical methods or deep learning algorithms to analyze the content of the material file and construct a factual description of the target event to ensure that the specific actions, state changes or interactive behaviors of the event are accurately captured. For example, for the material file of "H brand mobile phone XX model", the event extraction unit will extract multiple event data points, such as "Product release event-H brand CEO unveiled a new mobile phone on a specific date."

[0136] The event recovery unit is a model unit within the file generation model that has event recovery capabilities. After inputting event data, the event recovery unit reconstructs an objective, detailed, and coherent event description file based on the event data. Specifically, it integrates the main elements of the event in a logical order and causal relationship to generate an event description file that reflects the complete event. The event recovery unit can reconstruct events based on the extracted entity data and event data, ensuring that the generated event description file does not contain non-factual content while maintaining consistency and accuracy with the original source material. For example, inputting the event data "Product launch event - H brand CEO unveiled a new mobile phone on a specific date" into the event recovery unit generates the event description file "At the launch conference on January 1, 2024, the CEO of H brand announced the launch of a new generation flagship mobile phone model XX, equipped with the latest 20th generation chip. This phone integrates multiple advanced technologies and is scheduled to be launched globally in the first quarter."

[0137] Figure 2 FIG. 1 shows a flow chart of the application phase of a file generation method provided in one embodiment of the present specification, such as Figure 2 As shown:

[0138] During the application phase: Entity extraction and event extraction are performed based on the source file to obtain entity data and event data, respectively. Viewpoint extraction is performed based on the source file to obtain viewpoint data. Based on the event data, an event description file is obtained through event recovery. The entity data, event description file, and viewpoint data are input into the file generation unit. The entity content in the event description file is aligned based on the entity data to obtain an aligned event description file. Viewpoint inference is performed on the aligned event description file based on the viewpoint data to obtain the target viewpoint content. Based on the aligned event description file and the target viewpoint content, a target file containing the target viewpoint content is generated.

[0139] In the embodiment of this specification, the file generation model is a large model. In order to make the model execute effectively, prompt information is used to guide the large model to execute targeted operations. The following are examples of prompt information corresponding to each functional unit:

[0140] Entity extraction prompt information: {“user”: “{searched_info}\n\nPlease extract the entities and corresponding sentences in the material file:”, “bot”: “{entity-sentences}”}.

[0141] Event extraction prompt information: {"user":"{searched_info}\n\nPlease extract the x events most relevant to {title} based on the source file:","bot":"{events}"}.

[0142] Event recovery prompt: {"user":"{searched_info}\n\nPlease restore the time related to \"{events}\" based on the source file. It is required to include the cause, process and result of the event. Be as detailed as possible:","bot":"{event-arrangement}"}.

[0143] Tips for opinion extraction: {"user":"{searched_info}\n\nPlease extract sentences containing subjective opinions, views, and comments based on the source file. Only the sequence numbers preceding the corresponding sentences will be output, such as {1}{2}{5}. Do not output the specific content, and summarize the position of the source file in one sentence:","bot":"{opinions}"}.

[0144] Prompt information for file generation: {“user”: “{entity-sentences}\n\n{event-arrangement}\n\n{opinions}\n\nPlease generate a news release based on {title} while ensuring entity alignment, within 800 words:”, “bot”: “{article}”}.

[0145] Tips for reasoning and completing opinions: {"user":"{article}\n\nPlease infer and supplement your opinions or comments based on the above content, and summarize the main views, paying attention to maintaining contextual coherence:","bot":"{article_with_opinions}"}.

[0146] Among them, title is the subject of the news article, searched_info is the material file, entity-sentences is the entity data, events is the event data, event-arrangement is the event description file, opinions is the opinion data, article is the file without opinion content, and article_with_opinions is the target file containing factual content and opinion content.

[0147] It should be noted that the multiple model units in the embodiments of this specification may be physical units or virtual units corresponding to the logical execution, which is not limited here.

[0148] Exemplarily, the entity data and event description file are input into the file generation unit of the large language model LLM, and the corresponding prompt information is generated according to the file. The entity content in the event description file is aligned based on the entity data to obtain the aligned event description file. "At the H brand New Year's press conference held on January 1, 2024, the CEO of the H brand company personally presided over the launch ceremony of the new generation flagship mobile phone model XX. This event marks the official entry of the new product of the XX mobile phone brand into the market. According to the news released on the scene, the CEO of the H brand company personally unveiled the new generation flagship mobile phone XX at the event. This phone is equipped with the latest 20th generation chip technology. As a smart terminal, its performance has been greatly improved and it integrates augmented reality technology. XX phone The phone is equipped with a series of advanced hardware and software features, including a high-definition borderless display and support for ultra-high-speed 5G+ network connection. At the same time, the official disclosed that the XX phone has been optimized for AI photography algorithms to provide professional-grade image creation capabilities. In addition, the new XX phone is also equipped with an advanced cooling system and long-lasting battery life design to ensure smooth use all day without worrying about overheating or low power. According to the plan revealed at the press conference, the XX series flagship phone is expected to be launched globally in the first quarter of 2024. Its goal is to redefine the performance and technical standards of the high-end smartphone market. The alignment event description file and opinion data are input into the opinion reasoning unit, and according to the prompt information corresponding to the opinion reasoning unit, based on Based on the opinion data, the aligned event description files are reasoned on the opinions to obtain the target opinion content: "It is worth noting that the industry generally believes that the XX model mobile phone released by the H brand this time, with its unique innovative technology and luxurious configuration, is expected to set off a new round of climax in the current fierce competition in the smartphone market, challenging and rewriting consumers' existing cognitive standards for flagship models. This mobile phone not only carries the H brand's forward-looking vision for the future development of mobile technology, but also indicates that the smartphone industry may usher in a new stage of development." The aligned event description file and the target opinion content are input into the opinion completion unit, and based on the aligned event description file and the target opinion content, a news release containing the target opinion content is generated: "On January 1, 2024 At the H brand's New Year's press conference, the H brand's CEO personally unveiled the highly anticipated next-generation flagship phone, the XX model. This phone, equipped with the latest 20th-generation chip technology and integrated augmented reality capabilities, represents a major breakthrough in the smart device market. Its cutting-edge features, including a high-definition borderless display, 5G+ connectivity, and optimized AI photography algorithms, not only highlight the product's superior performance but also demonstrate the H brand's commitment to innovation. Notably, the industry generally believes that the H brand's newly released XX model, with its unique innovative technologies and luxurious features, is poised to usher in a new wave of competition in the fiercely competitive smartphone market, challenging and rewriting consumers' existing expectations of flagship phones.This phone not only carries the H brand's forward-looking vision for the future development of mobile technology, but also heralds that the smartphone industry may usher in a new stage of development."

[0149] In the embodiments of this specification, in the text generation model, the execution logic of entity alignment, opinion reasoning and opinion completion is refined, and more accurate file generation is achieved. On the basis of ensuring factuality and reliability, the generated target opinion content is closer to the factual content, and the factual content generation and opinion content generation are more effectively decoupled, resulting in a target file containing the target opinion content with high authenticity, high reliability and high readability, further improving the diversity of file generation and further improving the user experience.

[0150] In an optional embodiment of the present specification, after inputting the entity data and the event description file into the file generation unit and aligning the entity content in the event description file based on the entity data to obtain the aligned event description file, the following specific steps are further included:

[0151] Send the alignment event description file to the front end;

[0152] Receive an adjusted event description file fed back by the front-end, wherein the adjusted event description file is obtained by the front-end user adjusting entity content in the aligned event description file;

[0153] The aligned event description file is replaced with the adjusted event description file.

[0154] For example, the aligned event description file is sent to the front end of the website, and the adjusted event description file is received as feedback from the front end. "At the H brand New Year's press conference on January 1, 2024, the brand's CEO personally served as the host and led the launch of the new generation flagship mobile phone model XX. This event marks the official launch of the XX mobile phone brand's latest generation of products and its entry into the market. According to the official information released at the press conference, the CEO personally unveiled this new mobile phone equipped with 20th generation chip technology at the event. As a high-end smart device, it has achieved significant performance improvements and integrated cutting-edge augmented reality technology. The XX mobile phone is equipped with a series of advanced hardware configurations and optimized software feature combinations. , including a high-definition borderless display and support for ultra-high-speed 5G+ network connectivity. It is worth noting that the manufacturer disclosed that the phone has been deeply optimized for AI photography algorithms to provide a more professional-level image creation experience. In addition, the new XX phone is also equipped with an efficient heat dissipation system and a long-lasting battery design to ensure that users can use it smoothly all day without worrying about performance degradation due to overheating or battery depletion. According to the global simultaneous launch plan revealed at the press conference, the XX series flagship mobile phones are expected to enter major markets in the first quarter of 2024. Its goal is to "reset the performance and technology benchmarks in the high-end smartphone market" and use the adjusted event description file to replace the alignment event description file.

[0155] In the embodiments of this specification, by interacting with the front end, the accuracy of entity alignment is improved, the reliability of subsequent opinion reasoning is improved, and the authenticity and reliability of the subsequently generated target file are improved.

[0156] In an optional embodiment of the present specification, after inputting the aligned event description file and the viewpoint data into the viewpoint inference unit, performing viewpoint inference on the aligned event description file based on the viewpoint data, and obtaining the target viewpoint content, the following specific steps are further included:

[0157] Send the target viewpoint content to the front end;

[0158] Receive the adjusted target viewpoint content fed back by the front-end, wherein the adjusted target viewpoint content is obtained by adjusting the target viewpoint content by the front-end user;

[0159] Replace the target viewpoint content with the adjusted target viewpoint content.

[0160] For example, the target viewpoint content is sent to the front end of the website, and the adjusted target viewpoint content after receiving front-end user feedback is "particularly noteworthy is that the industry has generally reached a consensus that the XX model mobile phone launched by the H brand this time is like a blockbuster bomb. With its unique innovative technology and luxurious configuration, it is expected to trigger a subversive new wave in the current fierce competition in the smartphone market. It not only challenges the existing cognitive paradigm of flagship models, but also aims to reshape the boundaries of consumers' expectations for smart devices. This masterpiece, which carries the H brand's enterprising spirit for future mobile technology, is like a trailer for the smartphone industry to enter a new era. It will witness and promote the innovation process of the entire industry." The target viewpoint content is replaced with the adjusted target viewpoint content.

[0161] In the embodiments of this specification, the readability of viewpoint reasoning is improved by interacting with the front end, and the readability of the target file generated subsequently is improved.

[0162] In an optional embodiment of the present specification, the alignment event description file includes a plurality of target event contents;

[0163] Correspondingly, the aligned event description file and the opinion data are input into the opinion reasoning unit, and opinion reasoning is performed on the aligned event description file based on the opinion data to obtain the target opinion content, including the following specific steps:

[0164] The aligned event description file and opinion data are input into the opinion reasoning unit. Based on the opinion data, multiple opinion reasonings are performed in sequence according to the description logic of multiple target event contents, and the target opinion content is determined based on the opinion contents obtained by the multiple reasonings.

[0165] Target event content is the multiple factual contents that divide the target event. To align the event contents of multiple independent, interrelated, or unrelated target events contained in the event description file, the multiple target event contents are arranged according to a specific logical sequence (for example, chronological order, causal relationship, parallel relationship, general-specific structure, etc.). Multiple target event contents ensure that the generated target file accurately and comprehensively reflects the target event.

[0166] The description logic for multiple target event contents is the organizational structure and narrative format of these multiple target event contents within the aligned event description file. This logic incorporates various logical connections, including chronological order, causal relationships, parallel relationships, and a general-to-specific structure. For example, in the aligned event description file for a financial report, the company's overall performance over the past year is described first (the first target event content), followed by an analysis of product sales by quarter (the second target event content), and finally, a prediction of future market trends and their impact on the company (the third target event content). In this case, the description logic unfolds each target event content sequentially according to the inherent logic of chronological order and trend development.

[0167] The aligned event description file and viewpoint data are input into the viewpoint inference unit. Based on the viewpoint data, multiple viewpoint inferences are sequentially performed according to the description logic of multiple target event contents. Target viewpoint content is determined based on the viewpoint contents obtained from the multiple inferences. Alternatively, the aligned event description file and viewpoint data are input into the viewpoint inference unit. Based on the viewpoint data, chain inference is sequentially performed according to the description logic of multiple target event contents. Target viewpoint content is determined based on the viewpoint contents obtained from the chain inference. Chain inference can be understood as follows: viewpoint data is A, aligned event description file is B, and according to the event development logic, the arrangement is B1->B2->B3. Chain inference involves first inferring B1 based on A to obtain the first viewpoint content A1. Then, based on A+A1 (or A1), the viewpoint inference unit infers B2 to obtain the second viewpoint content A2. Finally, based on A+A1+A2 (or A1+A2 or A2), the viewpoint inference unit infers B3 to obtain the third viewpoint content A3. The third viewpoint content A3 may be determined as the target viewpoint content, or the first viewpoint content A1, the second viewpoint content A2 and the third viewpoint content A3 may be determined as the target viewpoint content, which is not limited here.

[0168] For example, the aligned event description file and opinion data are input into the opinion reasoning unit. Based on the opinion data, chain reasoning is performed sequentially according to the descriptive logic of multiple target event contents to obtain the opinion content obtained by chain reasoning: Opinion Content 1: It is worth noting that the industry generally believes that the XX model mobile phone released by brand H, with its unique innovative technology and luxurious configuration, is expected to usher in a new round of climax in the current fierce competition in the smartphone market, challenging and rewriting consumers' existing cognitive standards for flagship models; Opinion Content 2: This mobile phone not only carries the forward-looking vision of brand H for the future development of mobile technology, but also indicates that the smartphone industry may usher in a new stage of development. The opinion content obtained by chain reasoning is integrated to determine the target opinion content: "It is worth noting that the industry generally believes that the XX model mobile phone released by brand H, with its unique innovative technology and luxurious configuration, is expected to usher in a new round of climax in the current fierce competition in the smartphone market, challenging and rewriting consumers' existing cognitive standards for flagship models. This mobile phone not only carries the forward-looking vision of brand H for the future development of mobile technology, but also indicates that the smartphone industry may usher in a new stage of development."

[0169] In the embodiments of this specification, multiple viewpoint reasonings are performed in sequence according to the description logic to implement chain reasoning, thereby improving the readability and comprehensiveness of the target viewpoint content obtained by reasoning, further improving the readability of the generated target file, and further improving the user experience.

[0170] In an optional embodiment of the present specification, before step 106, the following specific steps are further included:

[0171] Obtaining a sample set, wherein the sample set includes a sample material file and a label file;

[0172] Extracting sample entity data and sample event data based on the sample material file, and generating a sample event description file based on the sample event data;

[0173] Input the sample entity data and the sample event description file into the file generation model, align the entity content in the sample event description file based on the sample entity data, and generate a prediction file;

[0174] Based on the prediction files and label files, the document generation model is trained.

[0175] The sample set is a collection of sample data used to train the file generation model. It can be constructed from historical data in historical file generation scenarios, obtained from open source databases, or manually generated, and there is no limitation here.

[0176] Sample material files are factual content data files used as training input in the dataset used to train the document generation model. During training, sample material files are used to extract entity data and event data to construct sample event description files. Sample material files provide real-world factual content, enabling the model to learn how to extract relevant entity and event data from different types of material and generate high-quality target documents based on this data.

[0177] Label files are reference output files corresponding to the sample source files in the sample set. They are typically manually annotated or known real-world results files, and they guide the model in learning how to correctly generate the target file. Label files represent the ideal processing result for a given sample source file. The model compares the differences between its own prediction files and the label files, and then performs backpropagation to adjust parameters to approximate the correct output, thus completing model training.

[0178] Sample entity data is the content data of sample entity content used to train the document generation model, providing fact alignment support for document generation during the training process. Sample entity data is generally represented in text format or string format.

[0179] Sample event data is the content data of sample event content used to train the file generation model. It provides factual content support for the generation of event description files during the training process, and records the specific actions, state changes or interactive behaviors of the sample factual content. Sample event data is generally expressed in text format.

[0180] The sample event description file is a file that objectively describes the factual content as a sample for training the file generation model. It is a sample description file obtained through event recovery and can describe the cause, process, and result of the event in detail. It does not contain non-factual content (subjective content). The sample event description text is composed of the generated event content.

[0181] The prediction file is the target file output by the file generation model. The prediction file is the result that the file generation model attempts to generate based on the learned knowledge. By comparing the quality of the prediction file and the label file, the performance of the file generation model can be evaluated.

[0182] Based on the prediction file and the label file, the file generation model is trained. An optional method is: based on the prediction file and the label file, a loss value is determined, and the file generation model is trained based on the loss value. In one training iteration, the file generation model is trained based on the loss value. Specifically, the model parameters of the file generation model are adjusted based on the loss value through a gradient update method. The loss value can be Mean Squared Error (MSE), Cross-Entropy Loss (CE), and KL (Kullback-Leibler) divergence loss.

[0183] The other steps in the embodiment of this specification correspond to step 104 and step 106. For specific methods, please refer to the above embodiment of the specification and will not be repeated here.

[0184] For example, a sample set is obtained, wherein the sample set includes 1000 groups of sample material files (X i , i~[1,1000]) and label file (Y i , [i~1,1000]), based on the sample material file, extract the sample entity data and sample event data, and generate a sample event description file based on the sample event data, input the sample entity data and the sample event description file into the large language model LLM, align the entity content in the sample event description file based on the sample entity data, and generate a prediction file (Y' i , i~[1,1000]), based on the prediction file Y' i and label file Y i , calculate the cross entropy loss value Lce, and based on the cross entropy loss value, adjust the model parameters of the file generation model through the gradient descent method.

[0185] In an embodiment of the present specification, during the training process of the file generation model, sample entity data and sample event data are extracted based on the sample material file, and then a sample event description file is generated based on the sample event data. In the file generation model, the entity content in the sample event description file is aligned based on the sample entity data to generate a prediction file, thereby avoiding over-reliance on the generation performance of the file generation model itself, overcoming the problem of knowledge illusion, and improving the factuality and reliability of the prediction file. Furthermore, based on the prediction file and the label file, the file generation model is more effectively trained, thereby improving the model performance of the file generation model and providing high factuality and high reliability model support for the file generation process.

[0186] In an optional embodiment of the present specification, the document generation model includes a document generation unit, a viewpoint reasoning unit, and a viewpoint completion unit;

[0187] Before inputting the sample entity data and the sample event description file into the file generation model and aligning the entity content in the sample event description file based on the sample entity data to generate the prediction file, the following specific steps are also included:

[0188] Extract sample opinion data based on sample material files;

[0189] Correspondingly, the sample entity data and the sample event description file are input into the file generation model, and the entity content in the sample event description file is aligned based on the sample entity data to generate a prediction file, including the following specific steps:

[0190] Inputting the sample entity data and the sample event description file into a file generation unit, aligning the entity content in the event description file based on the sample entity data, and obtaining a predicted aligned event description file;

[0191] Inputting the predicted aligned event description file and the sample opinion data into the opinion reasoning unit, performing opinion reasoning on the predicted aligned event description file based on the sample opinion data, and obtaining the predicted opinion content;

[0192] Inputting the predicted alignment event description file and the predicted opinion content into the opinion completion unit, and generating a prediction file containing the predicted opinion content based on the predicted alignment event description file and the predicted opinion content;

[0193] Based on the prediction file and the label file, the file generation model is trained, including the following specific steps:

[0194] Based on the prediction files and label files, the document generation unit, opinion reasoning unit and opinion completion unit are trained.

[0195] Sample opinion data is the content data of opinion content in the sample material file, which provides opinion content support for prediction file generation and is an element that constitutes opinion content. Sample opinion data records related subjective evaluations, attitudes, emotional colors or insights generated based on factual content, etc. Sample opinion data is generally expressed in text format.

[0196] The predicted aligned event description file is an event description file generated by the entity alignment of the sample entity data during the training process. This file not only contains the sample fact content extracted from the original sample material, but also ensures accurate alignment with the sample entity content during the generation process.

[0197] Predicted opinion content is derived during the training of the document generation model by the opinion inference unit based on the input sample entity data, sample event description files, and opinion content in sample source files. This is used to subsequently generate subjective prediction files, ensuring that the generated prediction files not only contain accurate factual descriptions but also reflect reasonable and factually consistent opinions or sentiments.

[0198] Based on the prediction file and the label file, the document generation unit, opinion reasoning unit, and opinion completion unit are trained. An optional method is to determine a loss value based on the prediction file and the label file, and then train the document generation unit, opinion reasoning unit, and opinion completion unit based on the loss value. In one training iteration, the document generation unit, opinion reasoning unit, and opinion completion unit are trained based on the loss value. Specifically, the model parameters of the document generation unit, opinion reasoning unit, and opinion completion unit are adjusted based on the loss value using a gradient update method.

[0199] The other steps in the embodiments of this specification correspond to the above embodiments including viewpoint extraction, viewpoint reasoning and viewpoint completion. For specific methods, please refer to the above embodiments of the specification and will not be repeated here.

[0200] Optionally, extracting sample entity data and sample event data based on the sample material file, and generating a sample event description file based on the sample event data can also be implemented in the large model including multiple model units. Correspondingly, the file generation model also includes: an entity extraction unit, an event extraction unit, and an event recovery unit. This step includes:

[0201] Input the sample material file into the entity extraction unit, and extract the sample entity data based on the sample material file;

[0202] Inputting the sample material file into the event extraction unit, and extracting sample event data based on the sample material file;

[0203] The sample event data is input into the event recovery unit, and a predicted event description file is generated based on the sample event data.

[0204] Figure 3 FIG. 1 shows a flow chart of a training phase in a file generation method provided in one embodiment of the present specification. Figure 3 As shown:

[0205] During the training phase, the document generation model is trained through two branches: fact alignment and opinion alignment. The sample set includes sample material files and label files. Fact alignment includes entity extraction, event extraction, and event recovery. Opinion alignment includes opinion extraction, opinion reasoning, and opinion completion.

[0206] Optionally, training the document generation unit, opinion inference unit, and opinion completion unit based on the prediction file and the label file includes the following specific steps: training the entity extraction unit, event extraction unit, event recovery unit, document generation unit, opinion inference unit, and opinion completion unit based on the prediction file and the label file. The specific training method is described above and will not be repeated here.

[0207] It should be noted that, based on the prediction file and the label file, the training of multiple units can be completed in one go by designing the corresponding loss values ​​(for example, setting weighting parameters), or by freezing some units and completing the training one by one, or by a combination of the two, which is not limited here.

[0208] For example, based on the sample material file X i , extract sample opinion data, input sample entity data and event description file into file generation unit, align entity content in event description file based on sample entity data, obtain predicted aligned event description file, input predicted aligned event description file and sample opinion data into opinion reasoning unit, perform opinion reasoning on predicted aligned event description file based on sample opinion data, obtain predicted opinion content, input predicted aligned event description file and predicted opinion content into opinion completion unit, generate prediction file (Y') containing predicted opinion content based on predicted aligned event description file and predicted opinion content i , i~[1,1000]), based on the prediction file and the label file, the cross entropy loss value Lce is calculated, and based on the cross entropy loss value, the model parameters of the file generation unit, the opinion reasoning unit and the opinion completion unit are adjusted by the gradient descent method.

[0209] In the embodiments of this specification, in the text generation model, the execution logic of entity alignment, opinion reasoning and opinion completion is refined, and more accurate document generation is achieved. On the basis of ensuring factuality and reliability, more effective model training is completed, thereby improving the model performance of the trained text generation model.

[0210] In an optional embodiment of the present specification, after step 106, the following specific steps are further included:

[0211] Send the target file to the front end;

[0212] Receive feedback messages sent by the front end;

[0213] Generate an inquiry guidance message based on the feedback message, and send the inquiry guidance message to the front end;

[0214] Collect the opinion information input by the front-end user based on the query guidance message, and obtain an updated sample set based on the opinion information;

[0215] The document generation model is trained using the updated sample set.

[0216] Feedback messages are evaluations, suggestions, error corrections or other relevant information given by the front-end user for the generated file content after receiving the target file. This information can be the user's subjective feelings and objective corrections on the quality, accuracy, relevance, etc. of the file, including but not limited to: failure to understand instructions, failure to find errors in the questions, inability to understand the context, irrelevant answers, factual errors, repeated replies, confusing answer logic, incorrect answer format, sensitive / harmful replies, etc. In the embodiment of this specification, the feedback message sent by the front end is received in order to collect the user's actual use effect and satisfaction data on the target file generated by the model, so as to further improve the model performance or solve problems in the generated file. For example, in the news release generation scenario, the user finds that a certain time point in the news release is incorrect, so the feedback message is: "The press conference date mentioned in the manuscript should be January 5, 2024 instead of January 1".

[0217] Inquiry guidance messages are questions or prompts automatically generated by applications, websites, or mini-programs based on user feedback received. They are used to guide front-end users to provide their opinions or needs regarding the target file in a more specific manner. Based on user feedback messages, the system generates inquiry guidance messages through intelligent means, aiming to help users express their opinions on the target file more clearly and in more detail, and to provide accurate information input for subsequent updates to sample sets and training models. For example, upon receiving user feedback about the timeliness of a news release, the following inquiry guidance message is generated: "Which parts of this news release do you think are not timely enough? Please provide the specific time point and relevant correct information."

[0218] After receiving the query guidance message, the front-end user provides a more detailed and targeted evaluation, modification opinions, or suggestions for the generated target file. This information directly reflects the user's satisfaction with the model generation results and their desired improvement directions, and serves as an important basis for updating the sample set and optimizing the model. For example, in response to the query guidance message above, the user replied with a comment: "I think the release date should be changed to January 5, 2024, and a section about the pre-sale status of the phone should be added."

[0219] The updated sample set is a new set of training sample data formed by integrating the source files, user feedback, and corrected target files after collecting feedback and opinions from front-end users. The updated sample set captures the actual needs of users and incorporates the user's reasonable corrections and expectations for the generated files into the training data, allowing the document generation model to better learn and adapt to real-world generation needs during subsequent iterative training, thereby improving the quality and accuracy of the generated files. For example, in the generation of legal documents, if a user points out that an entity name is incorrect and provides the correct name, the system will add the source file, the mapping relationship between the incorrect entity and the correct entity, and the corrected legal document to the updated sample set to train the document generation model to avoid similar errors in the future.

[0220] For example, a generated press release titled "On January 1, 2024, XYZ Company successfully held the global launch of its new flagship Alpha series smartphones in Times Square, New York..." is pushed to a front-end user for review. Upon receiving the press release, the user discovers an error in the date and sends a feedback message: "The actual launch date is January 3, 2024, not January 1 as stated in the press release." Based on this feedback, a query message is generated: "Thank you for pointing out the incorrect launch date. Besides that, do you think there are any other timeliness or factual corrections in the press release? Or what additional coverage would you like to see?" After receiving the query message, the user responds with a comment: "In addition to the date correction, I also recommend adding information about pre-sales and market response to the new product." Based on this user's feedback and comments, the original source file (containing the correct launch date and other relevant information), the user's comments (the launch date is January 3), and the revised press release are integrated into an updated sample set. The large language model (LLM) is then trained using this updated sample set.

[0221] In the embodiments of this specification, the sample set update is completed in an interactive manner, the file generation model is further trained, the model performance of the file generation model is improved, and more accurate model support is provided for subsequent file generation.

[0222] See also Figure 4 , Figure 4 A flowchart of a news release generation method according to an embodiment of the present disclosure is shown, including the following specific steps:

[0223] Step 402: Obtain at least one news material file.

[0224] Step 404: extracting entity data and event data based on the news material file, and generating an event description file based on the event data.

[0225] Step 406: Input the entity data and the event description file into the news release generation model, align the entity content in the event description file based on the entity data, and generate a target news release.

[0226] Step 408: Feedback the target news release to the front end.

[0227] The embodiments of this specification are applied to an application, website or mini-program with a news release generation function. On the application, website or mini-program, a news release containing factual content is generated.

[0228] The examples and Figure 1 The embodiments of the specification are based on the same inventive concept. The specific methods of steps 402 to 408 refer to the above steps 102 to 106 and are not repeated here.

[0229] Figure 5 A front-end schematic diagram of a news release generation method provided by an embodiment of this specification is shown. Figure 5 As shown:

[0230] The front-end interface includes a dialogue display area, an input box, a send control, and an export control. The user enters the command in the input box: "Please generate a news release about 'H brand mobile phone model XX', requiring more than 800 words." Then, the user clicks the send control. After processing through steps 402 to 408, the generated news release is displayed in the dialogue display area: "At the H brand New Year's press conference on January 1, 2024, the company's CEO personally unveiled the highly anticipated new generation flagship phone - model XX. This phone uses the most advanced 20th generation chip technology and integrates augmented reality capabilities..." The user can export the news release to a file in a specific format, such as txt, doc, or pdf, by clicking the export control.

[0231] In the embodiments of this specification, at least one news material file is obtained; entity data and event data are extracted based on the news material file, and an event description file is generated based on the event data; the entity data and event description file are input into a news article generation model, and the entity content in the event description file is aligned based on the entity data to generate a target news article; and the target news article is fed back to the front end. In the case where entity data and event data are extracted based on the news material file, and then an event description file is generated based on the event data, the target news article is generated in the file generation model by aligning the entity content in the event description file based on the entity data. This avoids over-reliance on the generation performance of the news article generation model itself, overcomes the problem of knowledge illusion, improves the factuality and reliability of news article generation, and enhances user experience.

[0232] In an optional embodiment of this specification, before step 406, the following specific steps are further included:

[0233] Extracting opinion data based on news material files; or receiving opinion data input by a terminal device;

[0234] Correspondingly, step 406 includes the following specific steps:

[0235] The entity data, event description file and opinion data are input into the news release generation model, the entity content in the event description file is aligned based on the entity data, and based on the opinion data, a target news release containing target opinion content is generated, wherein the target opinion content is obtained by inferring the aligned event description file based on the opinion data.

[0236] The embodiments of this specification are similar to the above Figure 1 The embodiments of the specification are based on the same inventive concept, and the specific methods of each step are the same as those described above. Figure 1 The embodiments of the specification include corresponding viewpoint alignment embodiments. For specific methods, please refer to the above-mentioned embodiments of the specification and will not be repeated here.

[0237] In the embodiments of this specification, based on opinion data, the aligned fact description files are inferred, effectively decoupling the fact content generation and opinion content generation, achieving opinion alignment, and obtaining news releases containing target opinion content with high authenticity, high reliability and high readability, thereby improving the diversity of news release generation and further enhancing the user experience.

[0238] See also Figure 6 , Figure 6 A flowchart of a file generation model training method provided according to one embodiment of this specification is shown. The method is applied to a cloud-side device and includes the following specific steps:

[0239] Step 602: Acquire a sample set, wherein the sample set includes a sample material file and a label file.

[0240] Step 604: extracting sample entity data and sample event data based on the sample material file, and generating a sample event description file based on the sample event data.

[0241] Step 606: Input the sample entity data and the sample event description file into the file generation model, align the entity content in the sample event description file based on the sample entity data, and generate a prediction file.

[0242] Step 608: Based on the prediction file and the label file, the file generation model is trained.

[0243] Step 610: Send the model parameters of the trained file generation model to the terminal device.

[0244] Cloud-side devices are virtual devices that provide model training. End-side devices are physical devices that provide file generation. End-side and cloud-side devices are connected via network channels for data transmission. Cloud-side devices have higher computing power and storage capacity than end-side devices.

[0245] The embodiments of this specification are similar to the above Figure 1 The embodiments are based on the same inventive concept. For the specific methods of steps 602 to 610, refer to the above Figure 1 The embodiments of the training phase in the embodiments will not be described in detail here.

[0246] In an embodiment of the present specification, a sample set is obtained, wherein the sample set includes a sample material file and a label file; based on the sample material file, sample entity data and sample event data are extracted, and based on the sample event data, a sample event description file is generated; the sample entity data and the sample event description file are input into a file generation model, and the entity content in the sample event description file is aligned based on the sample entity data to generate a prediction file; based on the prediction file and the label file, the file generation model is trained; and the model parameters of the trained file generation model are sent to a terminal device. During the training process of the file generation model, based on the sample material file, sample entity data and sample event data are extracted, and then based on the sample event data, a sample event description file is generated. In the file generation model, the entity content in the sample event description file is aligned based on the sample entity data to generate a prediction file, avoiding over-reliance on the generation performance of the file generation model itself, overcoming the problem of knowledge illusion, and improving the factuality and reliability of the prediction file. Then, based on the prediction file and the label file, the file generation model is trained more effectively, which improves the model performance of the file generation model and provides high factuality and high reliability model support for the file generation process. In addition, the model training is completed on cloud-side devices with high computing performance and high storage performance, which improves the training effect and training efficiency of the model training.

[0247] The following combined Figure 7 Taking the application of the news release generation method provided in this specification to a virtual digital human as an example, the news release generation method is further explained. Figure 7 A flowchart of a method for generating news articles for a virtual digital person provided in one embodiment of this specification is shown, which includes the following specific steps:

[0248] Step 702: Receive a news article generation instruction input by user voice, wherein the generation instruction includes the subject of the news article: "Xiao T, please report today's financial news."

[0249] Step 704: Based on the theme, retrieve and obtain at least one material file.

[0250] Step 706: Input the material file into the large language model, extract corresponding prompt information according to the entity, and extract entity data based on the material file.

[0251] Step 708: Input the material file into the large language model, extract corresponding prompt information according to the event, and extract event data based on the material file.

[0252] Step 710: Input the source file into the large language model, extract corresponding prompt information according to the viewpoint, and extract viewpoint data based on the source file.

[0253] Step 712: Input the event data into the large language model, and generate an event description file based on the event data according to the prompt information corresponding to the event recovery.

[0254] Step 714: Input the entity data and the event description file into the large language model, generate corresponding prompt information according to the file, align the entity content in the event description file based on the entity data, and obtain an aligned event description file.

[0255] Step 716: Input the aligned event description file and opinion data into the large language model, and according to the prompt information corresponding to the opinion reasoning, based on the opinion data, execute the thinking chain opinion reasoning in sequence according to the description logic of multiple target event contents in the aligned event description file, and determine the target opinion content based on the opinion content obtained by the thinking chain opinion reasoning.

[0256] Step 718: Input the aligned event description file and target opinion content into the large language model, complete the corresponding prompt information according to the opinion, and generate a news release containing the target opinion content based on the aligned event description file and target opinion content: "Today, the central bank of Country A made a major monetary policy adjustment, announcing a 0.25 percentage point cut in the benchmark interest rate. This is the first interest rate cut after keeping the interest rate unchanged last month. This interest rate cut is intended to stimulate domestic consumer demand and promote economic growth. Economists have responded enthusiastically to this policy, unanimously predicting that it will inject vitality into the stock market and drive up major indices. At the same time, the real estate market may also benefit from the loose credit environment, and transaction volume and prices may usher in a new round of increases. In the context of global economic linkage, Country A's move will also have a profound impact on other countries and regions, contributing to the global economic recovery."

[0257] Step 720: Convert the news release into voice data and send it to the front end of the virtual digital human for broadcasting.

[0258] In the embodiments of this specification, a method for decoupling facts and opinions is introduced. Through a multi-step scheme, the objective facts in the input information are extracted and refined, and with the help of the thinking chain method, the model learns how to supplement and complete the subjective comments and opinions, and make an objective analysis of the events behind the facts, thereby avoiding the illusion of facts due to over-reliance on the model's own prior knowledge, and over-reliance on search engines. The model's creative ability is reduced, and the problems of excessive plagiarism and lack of innovation in the article creation process are solved, thereby improving the subjective expression ability of news creation. In summary, the embodiments of this specification well balance the factuality of the objective reporting of events in the news creation process and the subjective creative ability of the creator in the news creation process, and can adjust the subjective and objective content composition of news writing through the control of processes and modules.

[0259] Corresponding to the above method embodiment, this specification also provides a file generation device embodiment, Figure 8 FIG1 shows a schematic diagram of the structure of a file generating device provided by an embodiment of this specification. Figure 8 As shown, the device includes:

[0260] A first acquisition module 802 is configured to acquire at least one material file;

[0261] The first extraction and description module 804 extracts entity data and event data based on the material file, and generates an event description file based on the event data;

[0262] The first generation module 806 is configured to input the entity data and the event description file into the file generation model, align the entity content in the event description file based on the entity data, and generate a target file.

[0263] Optionally, the first extraction description module 804 is further configured to:

[0264] Based on the event data, event description data of the target event is retrieved; based on the event description data, event recovery is performed to obtain an event description file of the target event.

[0265] Optionally, the device further comprises:

[0266] The first opinion data acquisition module is configured to extract opinion data based on the source file; or receive opinion data input by the front end;

[0267] Correspondingly, the first generating module 806 is further configured to:

[0268] The entity data, event description file and opinion data are input into the file generation model, and the entity content in the event description file is aligned based on the entity data to generate a target file containing target opinion content, wherein the target opinion content is obtained by inferring the aligned event description file based on the opinion data.

[0269] Optionally, the document generation model includes a document generation unit, an opinion reasoning unit, and an opinion completion unit;

[0270] Correspondingly, the first generating module 806 is further configured to:

[0271] The entity data and event description file are input into the file generation unit, and the entity content in the event description file is aligned based on the entity data to obtain an aligned event description file; the aligned event description file and the viewpoint data are input into the viewpoint reasoning unit, and the viewpoint reasoning is performed on the aligned event description file based on the viewpoint data to obtain the target viewpoint content; the aligned event description file and the target viewpoint content are input into the viewpoint completion unit, and a target file containing the target viewpoint content is generated based on the aligned event description file and the target viewpoint content.

[0272] Optionally, the alignment event description file includes multiple target event contents;

[0273] Correspondingly, the first generating module 806 is further configured to:

[0274] The aligned event description file and opinion data are input into the opinion reasoning unit. Based on the opinion data, multiple opinion reasonings are performed in sequence according to the description logic of multiple target event contents, and the target opinion content is determined based on the opinion contents obtained by the multiple reasonings.

[0275] Optionally, the device further comprises:

[0276] The file feedback module is configured to send the aligned event description file to the front end; receive the adjusted event description file fed back by the front end, wherein the adjusted event description file is obtained by the front end user adjusting the entity content in the aligned event description file; and replace the aligned event description file with the adjusted event description file.

[0277] Optionally, the device further comprises:

[0278] The opinion feedback module is configured to send the target opinion content to the front end; receive the adjusted target opinion content fed back by the front end, wherein the adjusted target opinion content is obtained by the front end user adjusting the target opinion content; and replace the target opinion content with the adjusted target opinion content.

[0279] Optionally, the device further comprises:

[0280] The training module is configured to obtain a sample set, wherein the sample set includes a sample material file and a label file; extract sample entity data and sample event data based on the sample material file, and generate a sample event description file based on the sample event data; input the sample entity data and the sample event description file into the file generation model, align the entity content in the sample event description file based on the sample entity data, and generate a prediction file; and train the file generation model based on the prediction file and the label file.

[0281] Optionally, the document generation model includes a document generation unit, an opinion reasoning unit, and an opinion completion unit;

[0282] Correspondingly, the training module is further configured to: extract sample opinion data based on the sample material file; input the sample entity data and the event description file into the file generation unit, align the entity content in the event description file based on the sample entity data, and obtain the predicted aligned event description file; input the predicted aligned event description file and the sample opinion data into the opinion reasoning unit, perform opinion reasoning on the predicted aligned event description file based on the sample opinion data, and obtain the predicted opinion content; input the predicted aligned event description file and the predicted opinion content into the opinion completion unit, and generate a prediction file containing the predicted opinion content based on the predicted aligned event description file and the predicted opinion content; train the file generation unit, the opinion reasoning unit, and the opinion completion unit based on the prediction file and the label file.

[0283] Optionally, the device further comprises:

[0284] The model retraining module is configured to send the target file to the front end; receive the feedback message sent by the front end; generate an inquiry guidance message based on the feedback message, and send the inquiry guidance message to the front end; collect the opinion information input by the front end user based on the inquiry guidance message, and obtain an updated sample set based on the opinion information; use the updated sample set to train the file generation model.

[0285] In the embodiments of this specification, based on the material file, entity data and event data are extracted, and then based on the event data, an event description file is generated. In the file generation model, the entity content in the event description file is aligned based on the entity data to generate the target file, thereby avoiding over-reliance on the generation performance of the file generation model itself, overcoming the problem of knowledge illusion, improving the factuality and reliability of file generation, and enhancing the user experience.

[0286] The above is a schematic diagram of a file generation device according to this embodiment. It should be noted that the technical solution of the file generation device and the technical solution of the above-mentioned file generation method are based on the same concept. For details not described in detail in the technical solution of the file generation device, please refer to the description of the technical solution of the above-mentioned file generation method.

[0287] Corresponding to the above method embodiment, this specification also provides a news release generating device embodiment. Figure 9 FIG1 shows a schematic diagram of the structure of a news release generating device provided by an embodiment of this specification. Figure 9 As shown, the device includes:

[0288] The second acquisition module 902 is configured to acquire at least one news material file;

[0289] The second extraction and description module 904 is configured to extract entity data and event data based on the news material file, and generate an event description file based on the event data;

[0290] The second generation module 906 is configured to input the entity data and the event description file into the news article generation model, align the entity content in the event description file based on the entity data, and generate a target news article;

[0291] The manuscript feedback module 908 is configured to feed back the target news manuscript to the front end.

[0292] Optionally, the device further comprises:

[0293] The second opinion data acquisition module is configured to extract opinion data based on the news material file; or receive opinion data input by the terminal device;

[0294] Correspondingly, the second generation module 906 is further configured to: input entity data, event description file and opinion data into the news release generation model, align the entity content in the event description file based on the entity data, and generate a target news release containing target opinion content based on the opinion data, wherein the target opinion content is obtained by inferring the aligned event description file based on the opinion data.

[0295] In the embodiments of the present specification, based on the news material file, entity data and event data are extracted, and then based on the event data, an event description file is generated. In the file generation model, the entity content in the event description file is aligned based on the entity data to generate the target news article, thereby avoiding over-reliance on the generation performance of the news article generation model itself, overcoming the problem of knowledge illusion, improving the factuality and reliability of news article generation, and enhancing the user experience.

[0296] The above is a schematic diagram of a news release generation device according to this embodiment. It should be noted that the technical solution of this news release generation device and the technical solution of the aforementioned news release generation method are based on the same concept. For details not described in detail in the technical solution of the news release generation device, please refer to the description of the technical solution of the aforementioned news release generation method.

[0297] Corresponding to the above method embodiment, this specification also provides an embodiment of a file generation model training device, Figure 10 FIG1 shows a schematic diagram of a file generation model training device provided by an embodiment of this specification. Figure 10 As shown, the device is applied to cloud-side equipment and includes:

[0298] The third acquisition module 1002 is configured to acquire a sample set, wherein the sample set includes a sample material file and a label file;

[0299] The third extraction and description module 1004 is configured to extract sample entity data and sample event data based on the sample material file, and generate a sample event description file based on the sample event data;

[0300] The third generation module 1006 is configured to input the sample entity data and the sample event description file into the file generation model, align the entity content in the sample event description file based on the sample entity data, and generate a prediction file;

[0301] The model training module 1008 is configured to train the file generation model based on the prediction file and the label file;

[0302] The parameter sending module 1010 is configured to send the model parameters of the trained file generation model to the terminal device.

[0303] In an embodiment of the present specification, during the training process of the file generation model, sample entity data and sample event data are extracted based on the sample material file, and then a sample event description file is generated based on the sample event data. In the file generation model, the entity content in the sample event description file is aligned based on the sample entity data to generate a prediction file, thereby avoiding over-reliance on the generation performance of the file generation model itself, overcoming the problem of knowledge illusion, and improving the factuality and reliability of the prediction file. Furthermore, based on the prediction file and the label file, the file generation model is more effectively trained, thereby improving the model performance of the file generation model, providing high factuality and high reliability model support for the file generation process, and completing the model training on a cloud-side device with high computing performance and high storage performance, thereby improving the training effect and training efficiency of the model training.

[0304] The above is a schematic diagram of a document generation model training device according to this embodiment. It should be noted that the technical solution of the document generation model training device and the technical solution of the document generation model training method described above are based on the same concept. For details not described in detail in the technical solution of the document generation model training device, please refer to the description of the technical solution of the document generation model training method described above.

[0305] Figure 11 The following is a block diagram of a computing device 1100 according to one embodiment of the present disclosure. Components of the computing device 1100 include, but are not limited to, a memory 1110 and a processor 1120. The processor 1120 is connected to the memory 1110 via a bus 1130, and a database 1150 is used to store data.

[0306] The computing device 1100 also includes an access device 1140 that enables the computing device 1100 to communicate via one or more networks 1160. Examples of such networks include a Public Switched Telephone Network (PSTN), a Local Area Network (LAN), a Wide Area Network (WAN), a Personal Area Network (PAN), or a combination of communication networks such as the Internet. The access device 1140 may include one or more of any type of network interface (e.g., a Network Interface Controller (NIC)) whether wired or wireless, such as an IEEE 802.11 Wireless Local Area Network (WLAN) wireless interface, a Worldwide Interoperability for Microwave Access (Wi-MAX) interface, an Ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a Bluetooth interface, or a Near Field Communication (NFC).

[0307] In one embodiment of the present specification, the above components of the computing device 1100 and Figure 11 Other components not shown in the figure may also be connected to each other, for example, via a bus. Figure 11 The computing device structure block diagram shown is for illustrative purposes only and is not intended to limit the scope of this specification. Those skilled in the art may add or replace other components as needed.

[0308] Computing device 1100 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, personal digital assistant, laptop computer, notebook computer, netbook computer, etc.), a mobile phone (e.g., a smartphone), a wearable computing device (e.g., a smartwatch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or personal computer (PC). Computing device 1100 may also be a mobile or stationary server.

[0309] Among them, the processor 1120 is used to execute the following computer-executable instructions, which, when executed by the processor, implement the steps of the above-mentioned file generation method, news release generation method or file generation model training method.

[0310] The above is a schematic diagram of a computing device according to this embodiment. It should be noted that the technical solution of this computing device is based on the same concept as the technical solutions of the aforementioned document generation method, news release generation method, and document generation model training method. For details not described in detail in the technical solution of the computing device, please refer to the description of the technical solutions of the aforementioned document generation method, news release generation method, or document generation model training method.

[0311] An embodiment of the present specification also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the steps of the above-mentioned file generation method, news release generation method, or file generation model training method.

[0312] The above is a schematic diagram of a computer-readable storage medium according to this embodiment. It should be noted that the technical solution of this storage medium is based on the same concept as the technical solutions of the aforementioned file generation method, news release generation method, and file generation model training method. For details not described in detail in the technical solution of the storage medium, please refer to the description of the technical solutions of the aforementioned file generation method, news release generation method, or file generation model training method.

[0313] An embodiment of this specification also provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps of the above-mentioned file generation method, news release generation method, and file generation model training method.

[0314] The above is an illustrative solution of a computer program according to this embodiment. It should be noted that the technical solution of this computer program is based on the same concept as the technical solution of the aforementioned document generation method, news release generation method, or document generation model training method. For details not described in detail in the technical solution of the computer program, please refer to the description of the technical solution of the aforementioned document generation method, news release generation method, or document generation model training method.

[0315] The foregoing description of this specification describes specific embodiments. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in an order different from that described in the embodiments and still achieve the desired results. Furthermore, the processes depicted in the accompanying drawings do not necessarily require the specific order shown or the sequential order to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0316] The computer instructions include computer program code, which may be in source code form, object code form, executable file, or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal, and software distribution medium. It should be noted that the content contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of patent practice. For example, in some regions, according to patent practice, computer-readable media does not include electric carrier signals and telecommunication signals.

[0317] It should be noted that for the aforementioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the embodiments of this specification are not limited by the order of the actions described, because according to the embodiments of this specification, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in this specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the embodiments of this specification.

[0318] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0319] The preferred embodiments disclosed above are intended only to help illustrate this specification. The optional embodiments do not exhaustively describe all details, nor do they limit the invention to the specific embodiments described. Obviously, many modifications and variations can be made based on the content of the embodiments of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the embodiments of this specification, so that those skilled in the art can better understand and utilize this specification. This specification is limited only by the claims and their full scope and equivalents.

Claims

1. A file generation method, comprising: Obtain at least one material file; Extracting entity data and event data based on the material file, and generating an event description file based on the event data; The entity data and the event description file are input into a file generation model, and entity contents in the event description file are aligned based on the entity data to generate a target file.

2. The method according to claim 1, wherein generating an event description file based on the event data comprises: Retrieving event description data of a target event based on the event data; Event recovery is performed based on the event description data to obtain the event description file of the target event.

3. The method according to claim 1 or 2, before inputting the entity data and the event description file into a file generation model and aligning entity content in the event description file based on the entity data to generate a target file, further comprising: Extracting viewpoint data based on the material file; Alternatively, receiving opinion data input from the front end; The step of inputting the entity data and the event description file into a file generation model, aligning entity content in the event description file based on the entity data, and generating a target file comprises: The entity data, the event description file and the viewpoint data are input into the file generation model, and the entity content in the event description file is aligned based on the entity data to generate the target file containing the target viewpoint content, wherein the target viewpoint content is obtained by inferring the aligned event description file based on the viewpoint data.

4. The method according to claim 3, wherein the document generation model comprises a document generation unit, a viewpoint inference unit, and a viewpoint completion unit; The step of inputting the entity data, the event description file, and the viewpoint data into a file generation model, aligning entity content in the event description file based on the entity data, and generating a target file containing target viewpoint content comprises: Inputting the entity data and the event description file into the file generating unit, aligning the entity content in the event description file based on the entity data to obtain an aligned event description file; Inputting the alignment event description file and the viewpoint data into the viewpoint reasoning unit, and performing viewpoint reasoning on the alignment event description file based on the viewpoint data to obtain the target viewpoint content; The alignment event description file and the target viewpoint content are input into the viewpoint completion unit, and the target file containing the target viewpoint content is generated based on the alignment event description file and the target viewpoint content.

5. The method according to claim 4, wherein the alignment event description file includes a plurality of target event contents; The step of inputting the alignment event description file and the viewpoint data into the viewpoint inference unit, and performing viewpoint inference on the alignment event description file based on the viewpoint data to obtain target viewpoint content includes: The aligned event description file and the viewpoint data are input into the viewpoint reasoning unit, and based on the viewpoint data, multiple viewpoint reasonings are performed in sequence according to the description logic of the multiple target event contents, and the target viewpoint content is determined based on the viewpoint contents obtained by the multiple reasonings.

6. The method according to claim 4, further comprising: after inputting the entity data and the event description file into the file generating unit and aligning the entity content in the event description file based on the entity data to obtain the aligned event description file; Sending the alignment event description file to the front end; receiving an adjusted event description file fed back by the front-end, wherein the adjusted event description file is obtained by the front-end user adjusting entity content in the aligned event description file; The aligned event description file is replaced by the adjusted event description file.

7. The method according to claim 4, further comprising: after inputting the alignment event description file and the viewpoint data into the viewpoint inference unit, and performing viewpoint inference on the alignment event description file based on the viewpoint data to obtain target viewpoint content; Sending the target viewpoint content to the front end; receiving the adjusted target viewpoint content fed back by the front-end, wherein the adjusted target viewpoint content is obtained by the front-end user adjusting the target viewpoint content; The target viewpoint content is replaced by the adjusted target viewpoint content.

8. The method according to claim 1, before inputting the entity data and the event description file into a file generation model and aligning entity content in the event description file based on the entity data to generate a target file, further comprising: Acquire a sample set, wherein the sample set includes a sample material file and a label file; Extracting sample entity data and sample event data based on the sample material file, and generating a sample event description file based on the sample event data; Inputting the sample entity data and the sample event description file into the file generation model, aligning entity content in the sample event description file based on the sample entity data, and generating a prediction file; The file generation model is trained based on the prediction file and the label file.

9. The method according to claim 8, wherein the document generation model comprises a document generation unit, a viewpoint inference unit, and a viewpoint completion unit; Before inputting the sample entity data and the sample event description file into a file generation model and aligning entity content in the sample event description file based on the sample entity data to generate a prediction file, the method further includes: Extracting sample opinion data based on the sample material file; The step of inputting the sample entity data and the sample event description file into a file generation model, aligning entity content in the sample event description file based on the sample entity data, and generating a prediction file comprises: Inputting the sample entity data and the sample event description file into the file generation unit, aligning entity content in the event description file based on the sample entity data to obtain a predicted aligned event description file; Inputting the predicted aligned event description file and the sample opinion data into the opinion reasoning unit, and performing opinion reasoning on the predicted aligned event description file based on the sample opinion data to obtain predicted opinion content; Inputting the prediction alignment event description file and the prediction viewpoint content into the viewpoint completion unit, and generating the prediction file containing the prediction viewpoint content based on the prediction alignment event description file and the prediction viewpoint content; The training of the file generation model based on the prediction file and the label file includes: The file generation unit, the opinion inference unit, and the opinion completion unit are trained based on the prediction file and the label file.

10. The method according to claim 8, further comprising, after inputting the entity data and the event description file into a file generation model and aligning entity contents in the event description file based on the entity data to generate a target file: Sending the target file to the front end; Receiving a feedback message sent by the front end; generating an inquiry guidance message based on the feedback message, and sending the inquiry guidance message to the front end; collecting opinion information input by the front-end user based on the inquiry guidance message, and obtaining an updated sample set based on the opinion information; The document generation model is trained using the updated sample set.

11. A method for generating a news release, comprising: Obtain at least one news material file; Extracting entity data and event data based on the news material file, and generating an event description file based on the event data; Inputting the entity data and the event description file into a news article generation model, aligning the entity content in the event description file based on the entity data, and generating a target news article; Feedback the target news release to the front end.

12. The method according to claim 11, before inputting the entity data and the event description file into the news article generation model and aligning the entity content in the event description file based on the entity data to generate the target news article, further comprising: Extracting opinion data based on the news material file; Alternatively, receiving opinion data input by the terminal device; The step of inputting the entity data and the event description file into a news article generation model, aligning the entity content in the event description file based on the entity data, and generating a target news article includes: The entity data, the event description file and the opinion data are input into a news release generation model, the entity content in the event description file is aligned based on the entity data, and a target news release containing target opinion content is generated based on the opinion data, wherein the target opinion content is obtained by inferring the aligned event description file based on the opinion data.

13. A file generation model training method, applied to a cloud-side device, comprising: Acquire a sample set, wherein the sample set includes a sample material file and a label file; Extracting sample entity data and sample event data based on the sample material file, and generating a sample event description file based on the sample event data; Inputting the sample entity data and the sample event description file into a file generation model, aligning entity content in the sample event description file based on the sample entity data, and generating a prediction file; Training the file generation model based on the prediction file and the label file; The model parameters of the trained file generation model are sent to the terminal device.

14. A computing device comprising: memory and processor; The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions. When the computer program / instructions are executed by the processor, the steps of the method according to any one of claims 1 to 13 are implemented.

15. A computer-readable storage medium storing a computer program / instruction, wherein the computer program / instruction is executed by a processor to implement the steps of the method according to any one of claims 1 to 13.

16. A computer program product comprising a computer program / instruction, which implements the steps of the method according to any one of claims 1 to 13 when executed by a processor.