Text generation method, server, storage medium, and program product
By determining the outline and materials of the text generation model and conducting fine-tuning training and screening, the problem of material length limitation in existing text generation algorithms is solved and high-quality text generation is achieved.
Patent Information
- Application Number
- PCT/IB2025/051862
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-03-18
- Filing Date
- 2025-02-21
- Publication Date
- 2025-09-25
AI Technical Summary
Existing text generation algorithms are limited by the length of the input material, resulting in low generation quality and an inability to effectively utilize domain knowledge from a large amount of relevant material.
By determining the outline of the target text, obtaining relevant materials, fine-tuning the pre-trained model, screening the preferred materials, and generating high-quality text.
While keeping the input length short, the quality of text generation is improved, and high-quality materials related to the outline and a large amount of domain knowledge are utilized to generate high-quality text.
Smart Images

Figure IB2025051862_25092025_PF_FP_ABST
Abstract
Description
[0001] This disclosure claims priority to Chinese patent application number 202410310061.1, filed with the China Patent Office on March 18, 2024, and entitled "Text Generation Method, Server, Storage Medium, and Program Product," the entire contents of which are incorporated herein by reference. Technical Field: This disclosure relates to computer technology, and more particularly to a text generation method, server, storage medium, and program product. Background: In various industries, such as publishing and media, text workers experience significant productivity deficiencies compared to AI-based text generation algorithms. AI-based text generation algorithms are a major research area in the field of natural language processing (NLP) and hold promising application prospects in industry. Current text generation algorithms mostly rely on AI models to generate target text based on relevant material. However, current AI models have input length limitations, which restricts the length of relevant material available for reference, resulting in low text generation quality. SUMMARY OF THE INVENTION The present disclosure provides a text generation method, server, storage medium, and program product for improving the quality of text generation. In a first aspect, the present disclosure provides a text generation method, comprising: determining an outline of a target text to be generated based on given subject information; obtaining relevant materials for the outline, and fine-tuning a pre-trained model based on the relevant materials to obtain a text generation model; performing quality screening on the relevant materials for the outline to obtain preferred materials related to the outline; and generating the target text based on the preferred materials related to the outline using the text generation model. In a second aspect, the present disclosure provides a server, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to cause the server to perform the method provided in the first aspect. In a third aspect, the present disclosure provides a computer-readable storage medium, wherein the computer-executable instructions are stored on the computer-readable storage medium. When the processor executes the computer-executable instructions, the method provided in the first aspect is implemented. In a fourth aspect, the present disclosure provides a computer program product, comprising a computer program. When executed by the processor, the computer program implements the method provided in the first aspect.The text generation method, server, storage medium, and program product provided herein determine the outline of a target text to be generated based on given subject information, obtain relevant materials for the outline, and fine-tune a pre-trained model based on the relevant materials to obtain a text generation model. The domain knowledge contained in a large amount of relevant materials for the outline can be stored in a parameterized form in the text generation model, thereby injecting the domain knowledge contained in the large amount of relevant materials into the text generation model, allowing the text generation model to learn more domain knowledge. Furthermore, the relevant materials for the outline are quality-screened to obtain a small amount of high-quality, preferred materials related to the outline. The text generation model then generates the target text based on the preferred materials. When generating the target text, the domain knowledge contained in not only the small amount of high-quality, preferred materials but also the domain knowledge contained in the large amount of relevant materials for the outline is referenced, thereby improving the quality of text generation. BRIEF DESCRIPTION OF THE DRAWINGS The accompanying drawings herein are incorporated into and constitute a part of this specification and illustrate embodiments consistent with the present disclosure. Together with the specification, they serve to explain the principles of the present disclosure. Figure 1 is a schematic diagram of an example system architecture applicable to the present disclosure; Figure 2 is a flow chart of a text generation method provided by an exemplary embodiment of the present disclosure; Figure 3 is a detailed flow chart of a text generation method provided by an exemplary embodiment of the present disclosure; Figure 4 is an example framework diagram of a text generation method provided by an exemplary embodiment of the present disclosure; and Figure 5 is a schematic diagram of the structure of a server provided by an exemplary embodiment of the present disclosure. The above figures illustrate specific embodiments of the present disclosure, which will be described in more detail below. These figures and the description are not intended to limit the scope of the present disclosure in any way, but rather to illustrate the concepts of the present disclosure for those skilled in the art by reference to specific embodiments. DETAILED DESCRIPTION OF THE EMBODIMENTS Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different drawings represent identical or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Rather, they are merely examples of apparatuses and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.It should be noted that the user information (including but not limited to user device information, user attribute information, etc.) and data (including but not limited to data used for analysis, storage, and display) involved in this disclosure are all authorized by the user or fully authorized by all parties. The collection, use, and processing of relevant data must comply with relevant laws, regulations, and standards, and corresponding operation portals are provided for users to choose to authorize or deny. First, let's explain the terms involved in this disclosure: Source: The text fragments provided to the model for generating the target text are the content source of the target text to be generated. In this embodiment, source can be text fragments extracted from documents, images, presentations, web pages, etc. Outline: The overall content framework of the target text to be generated. For example, the outline may include the main chapters, subtopics, core content, etc. In this embodiment, the outline includes one or more levels of content highlights of the target text, providing a content framework and guidance for the subsequent generation of the target text, ensuring the logic and coherence of the target text. Internet search engine: A tool used to retrieve information on the internet, typically searching for information within the scope of publicly available data on the public network.
[0002] BERT (Bidirectional Encoder Representations from Transformer): A bidirectional encoder representation model based on the Transformer and a pre-trained language representation model. Visual question answering tasks: Given an input image and question, determine the answer to a question from the visual information of the input image. Image captioning tasks: Generate a caption for the input image. Visual entailment tasks: Predict the semantic relevance between the input image and text, i.e., entailment, neutrality, or contradiction. Referential expression and comprehension tasks: Based on the input text, locate the image region corresponding to the input text. Image generation tasks: Generate an image based on the input caption. Text-based sentiment classification tasks: Predict the sentiment classification information of the input text. Text summarization tasks: Generate a summary of the input text. Multimodal tasks: These are downstream tasks whose input and output data involve multiple modalities, such as images and text. Examples include visual question answering, image captioning, visual entailment, referential expression and comprehension, and image generation. Multimodal pre-trained models: These are pre-trained models whose input and output data involve multiple modalities, such as images and text. After fine-tuning and training, they can be applied to multimodal task processing. Pre-trained language models: These are pre-trained models obtained by pre-training a large-scale language model (LLM). Large models are deep learning models with large model parameters, typically containing hundreds of millions, tens of billions, or even hundreds of billions. Large models, also known as foundation models (FM), are pre-trained on large-scale unlabeled corpora, producing pre-trained models with parameters exceeding 100 million. Such models are adaptable to a wide range of downstream tasks and exhibit good generalization capabilities. Examples include large-scale language models (LLMs) and multi-modal pre-training models.In practical applications, large models only require a small number of samples to fine-tune the pre-trained model and can be applied to various tasks. Large models can be widely used in fields such as natural language processing (NLP) and computer vision. Specifically, they can be applied to computer vision tasks such as visual question answering (VQA), image captioning (IC), and image generation, as well as natural language processing tasks such as text-based sentiment classification, text summarization, and machine translation. Key application scenarios for large models include digital assistants, intelligent robots, search, online education, office software, e-commerce, and intelligent design. Existing text generation algorithms mostly utilize text generation models. Using a configured prompt template, they generate text around a given topic based on a small amount of matching material. Text generation models can be various language models with text generation capabilities, such as various large-scale language models (LLMs) and BERT-based text generation models. Regardless of the type of text generation model, all have a maximum input data length limit, thereby limiting the length of the material content input to the text generation model. A text generation model can only generate target text based on a small amount of input material, with limited reference source material, resulting in low text quality. This disclosure provides a text generation method that determines the outline of a target text to be generated based on given topic information, obtains relevant material for the outline, and fine-tunes a pre-trained model based on the relevant material to obtain a text generation model. Furthermore, the relevant material for the outline is quality-screened to obtain preferred material related to the outline. The text generation model then generates the target text based on the preferred material related to the outline. The pre-trained model can use any existing text generation model, specifically, but not limited to, various large-scale language models (LLMs) and BERT-based text generation models. The method of this embodiment uses a large amount of material related to the outline to fine-tune a pre-trained model for text generation to obtain a text generation model. The method can store the domain knowledge contained in the large amount of material related to the outline in a parameterized form in the text generation model. In other words, the domain knowledge contained in the large amount of relevant material is injected into the text generation model, allowing the text generation model to learn more domain knowledge and adapt to different domains.Furthermore, the outline's related materials are quality-screened to obtain a small amount of high-quality, preferred materials relevant to the outline. A fine-tuned text generation model is then used to generate the target text based on this small amount of high-quality, preferred materials. When generating the target text, the text generation model not only references the domain knowledge contained in the small amount of quality-screened, high-quality preferred materials, but also references the domain knowledge contained in a large amount of related materials, thereby improving the quality of text generation. By inputting less material (keeping the input short), high-quality target text can be generated, reducing the impact of model input length limitations on text generation quality and improving text generation quality. Figure 1 is a schematic diagram of an example system architecture applicable to the present disclosure. As shown in Figure 1, the system architecture includes a server and an end-side device. A communication link is established between the server and the end-side device, enabling communication between the server and the end-side device. The server is a device with computing power deployed in the cloud or locally, such as a cloud cluster. The server stores a pre-trained model for text generation, which can generate target text based on given descriptive text and given materials. The given description text can be user-given information describing the target text to be generated, such as the subject information, title, abstract, key points, etc. The client-side device can be an electronic device running downstream applications, specifically a hardware device with network communication, computing, and information display capabilities, including but not limited to smartphones, tablets, desktop computers, local servers, and cloud servers. For example, the client-side device can be a server or user terminal in various industries such as publishing and media that provides online text generation functions such as online copywriting, online writing, and online editing. When a user needs to generate a target text using an online text generation system, they can transmit the user-given subject information to the server via the client-side device. The server receives the user-given subject information transmitted by the client-side device, determines the outline of the target text to be generated based on the given subject information, obtains relevant materials for the outline, and fine-tunes the pre-trained model based on the relevant materials to obtain a text generation model. This in turn infuses the domain knowledge contained in the large amount of relevant materials into the text generation model. Furthermore, the server performs quality screening on the outline's related materials to obtain preferred materials. Using a text generation model, the server generates target text based on the preferred materials. Furthermore, the server can return the generated target text to the client-side device. The client-side device then outputs the target text to the user. Based on the system architecture shown in Figure 1, taking an online writing scenario as an example, in this scenario, the client-side device can be an electronic device running an AI writing assistant.When a user needs to write an article based on a specific topic, they enter the given topic information through the client-side device. The client-side device sends a text generation request to the server, which carries the given topic information. In response to receiving the text generation request, the server determines the outline of the target article to be generated based on the given topic information, obtains relevant materials for the outline, and fine-tunes the pre-trained model based on the relevant materials to obtain a text generation model. Furthermore, the server performs quality screening on the relevant materials to obtain preferred materials related to the outline. Using the text generation model, the target article is generated based on the preferred materials. The server returns the generated target article to the client-side device, which then outputs the generated target article to the user. It should be noted that the pre-trained model and the fine-tuned text generation model can be stored and run on another server. During fine-tuning of the pre-trained model, the server responsible for text generation sends the relevant materials for fine-tuning to the other server, which then fine-tunes the pre-trained model based on the relevant materials to obtain a text generation model. Another server provides the fine-tuned application programming interface (API) of the text generation model to the server responsible for text generation. When the text generation model is needed, the server responsible for text generation invokes the text generation model's API to generate text. In response to the API call, the other server generates text based on the input data and returns the generated results. The following detailed description of the technical solution of the present disclosure and how it solves the aforementioned technical problems is provided through specific embodiments. The following specific embodiments may be combined with one another, and identical or similar concepts or processes may not be described in detail in certain embodiments. The following embodiments of the present disclosure are described with reference to the accompanying drawings. Figure 2 is a flowchart of a text generation method provided by an exemplary embodiment of the present disclosure. This embodiment is executed by the server in the aforementioned system architecture. As shown in Figure 2, the method comprises the following steps: Step S201: Determine the outline of the target text to be generated based on given subject information. The given subject information refers to user-given information describing the subject of the target text to be generated, such as text describing the central theme or core content of the target text. The given subject information may be a simple subject or keyword, or a more detailed subject description, which is not specifically limited here.The given topic information can be text directly input by the user, text obtained through voice recognition of collected user input audio, or text obtained through image recognition of collected images, without specific limitation here. For example, a user can directly input the title of the article to be generated through a client-side device, which then sends the title to the server. The server receives the article title sent by the client-side device as the given topic information. For example, a user can enter a voice message describing the core content of the article to be generated through a client-side device, which then sends the user voice message to the server. The server receives the user voice message sent by the client-side device, converts the user voice message into text, and obtains the user-given topic information. In this embodiment, the server automatically determines the outline of the target text to be generated based on the given topic information. Based on the given topic information, the server creates or selects a structured outline or summary to guide and organize the target text to be generated. The outline refers to the overall content framework of the target text to be generated, including one or more levels of key points of the target text. For example, the outline may include the text's main chapters, subtopics, and core content. This provides a content framework and guidance for the subsequent generation of the target text, ensuring the target text's logic and coherence. Optionally, the server can generate an outline for the target text using a pre-trained model based on given topic information and a configured outline generation prompt template. Specifically, the given topic information is entered into the outline generation prompt template to obtain outline generation prompt information. The outline generation prompt information is then input into the pre-trained model, which then generates an outline based on the outline generation prompt information to obtain the target text outline. The pre-trained model used by the server to generate the target text outline can be any existing text generation model that generates outlines based on the subject or title, specifically various Large Language Models (LLMs) or BERT-based text generation models, although this is not specifically limited here. Optionally, the server can select at least one outline template from a configured outline template library based on the given topic information as a candidate outline for the target text to be generated. Furthermore, candidate outlines for the target text are output through an outline selection interface on the front end, allowing the user to select one of the candidate outlines as the target text outline. In response to the user selecting any candidate outline displayed on the outline selection interface, the selected outline is used as the target text outline. Optionally, the server can generate a candidate outline for the target text using a pre-trained model based on the given topic information and a configured outline generation prompt template.At the same time, based on the given topic information, the server selects at least one outline template from the configured outline template library as a candidate outline for the target text to be generated. Furthermore, the server displays all candidate outlines through the front-end outline selection interface. This interface also allows editing and selecting the displayed candidate outlines. Through the outline selection interface, users can edit the displayed candidate outlines to a more satisfactory one. In response to an edit operation on any candidate outline, the server updates the edited candidate outline and stores the edited candidate outline. Furthermore, the user can select any displayed candidate outline (which may be an edited one) as the outline for the target text. In response to the user selecting any candidate outline, the server selects the selected candidate outline as the outline for the target text. Step S202: Obtaining relevant materials for the outline. After determining the outline for the target text, the server obtains relevant materials for the outline. These materials are materials related to the outline content. The relevant materials for the outline can be text snippets extracted from documents, images, presentations, webpages, and the like. Exemplarily, the server can obtain the relevant materials for the outline by at least one of the following methods: invoking an internet search engine to search for relevant materials for the outline; invoking a local search engine to search a local database for relevant materials for the outline; or obtaining relevant materials for the outline input by the user. The internet search engine can be a third-party internet search engine. By invoking the internet search engine to search for materials related to the outline within publicly available data on the public network, the server can obtain a large amount of relevant materials for the outline. The local search engine is a search engine owned by the provider of the text generation system itself, and can search a local database for materials related to the outline. For example, the text generation system can be used internally by a radio station, which has a large number of internal manuscripts, such as interview transcripts and press releases, and can build a local database. The local search engine can be used to search the local database for materials related to the outline content to obtain the relevant materials for the outline. Furthermore, the method of this embodiment also supports users submitting relevant materials for the outline. Exemplarily, the server outputs the outline through a material submission interface. This interface displays the outline content and a material submission area. Users can edit or upload outline-related materials online in the outline content submission area. In this embodiment, the server can combine the aforementioned methods to obtain outline-related materials, enabling more comprehensive and accurate acquisition of a large amount of outline-related materials, providing richer materials for generating the target text and improving the quality of the generated target text.Step S203: Fine-tune the pre-trained model based on the relevant materials of the syllabus to obtain a text generation model. After obtaining a large amount of relevant materials from the syllabus, the pre-trained model used to generate the target text is fine-tuned based on the relevant materials to obtain the text generation model. The domain knowledge contained in the large amount of relevant materials can be stored in a parameterized form in the text generation model, thereby injecting the domain knowledge contained in the large amount of relevant materials into the text generation model, allowing the text generation model to learn more domain knowledge and improve the text generation quality of the text generation model. The pre-trained model can be any existing text generation model, specifically various large language models (LLMs) or BERT-based text generation models, which are not specifically limited here. Optionally, in this step, the server can fine-tune the pre-trained model using all the relevant materials of the syllabus obtained in the previous step to obtain the text generation model. Optionally, in this step, the server can use some of the relevant materials from the outline obtained in the previous step to fine-tune the pre-trained model to obtain a text generation model, thereby improving the efficiency of model fine-tuning and training, and thus improving the efficiency of text generation. Specifically, the server can filter the relevant materials from the outline based on the configured first basic related condition to obtain a screening result. If the number of materials in the screening result is less than the total amount of all relevant materials, the screening result will be used as the material for fine-tuning training to reduce the complexity of fine-tuning training. Using the materials included in the screening result, the pre-trained model is fine-tuned to obtain a text generation model. Furthermore, the number of materials in the screening result should be greater than the number of preferred materials to ensure the effectiveness of fine-tuning training and improve the quality of the text generation model. The first basic relevance condition refers to a pre-configured condition for roughly screening relevant materials for the outline. Compared to the quality screening of relevant materials in subsequent steps, the first basic relevance condition screens the relevant materials for the outline at a coarse level based on their relevance and / or timeliness. This appropriately reduces the amount of materials used for fine-tuning training while ensuring that the text generation model learns domain knowledge from a large amount of relevant materials, thereby ensuring the effectiveness of fine-tuning training. For example, the first basic relevance condition may include at least one of the following: a relevance assessment value of the relevant materials to the outline greater than or equal to a first relevance threshold, and a timeliness assessment value of the relevant materials greater than or equal to a first timeliness threshold. Both the first relevance threshold and the first timeliness threshold are relatively low thresholds. The specific values can be configured and adjusted by relevant technical personnel based on the needs and experience of actual application scenarios and are not specifically limited here.When the server fine-tunes the pre-trained model using relevant materials (all or part) of the outline, it adopts the fine-tuning method of next token prediction. Based on the first i - 1 token results of the input materials, which can be expressed as [x1, x2,..., xi-1], it predicts the next token result xi. Then, it compares the predicted result of the next token with the true next token result and performs backpropagation, enabling the model to learn the domain knowledge contained in the outline-related materials, enhancing the model's adaptability to different domains, and thus improving the quality of text generation in various professional fields. In this step, when the server fine-tunes the pre-trained model using relevant materials (all or part) of the outline to obtain a text generation model, it can use the fine-tuning method of Parameter-Efficient Fine-Tuning (PEFT), such as Low-Rank Adaptation (LoRA), p-tuning and other fine-tuning methods, to quickly fine-tune the pre-trained model to improve the efficiency of model fine-tuning training, and thus improve the efficiency of text generation. Exemplarily, in an optional implementation, the server can use the Low-Rank Adaptation LoRA method to fine-tune the pre-trained model. Specifically, by adding new parameters (trainable rank decomposition matrices) to the pre-trained model, a text generation model to be fine-tuned is constructed; based on relevant materials (all or part) of the outline for the text. The parameters Wo are only fine-tuned for the two low-rank matrices A and B. Before LoRA fine-tuning training, the inference of the pre-trained model can be expressed as: Wo%. After LoRA fine-tuning training, the inference of the text generation model can be expressed as: lV ox + BAXo In addition, the server can also use PEFT fine-tuning methods other than LoRA, such as P-Tuning and P-Tuning v2, which are not specifically limited here. Optionally, in this step, the server uses (all or part of) the outline's relevant materials to fine-tune the pre-trained model. When obtaining the text generation model, fine-tuning methods other than PEFT can also be used to fine-tune all parameters of the pre-trained model. This can also improve the quality of text generation, but may have a certain impact on the efficiency of text generation. The method of this embodiment fine-tunes the pre-trained model using a large amount of outline-related materials, storing the domain knowledge contained in this large amount of relevant materials in a parameterized form within the model structure. This allows more domain knowledge to be injected into the text generation model without increasing the model input length, significantly improving the quality of text generation. Step S204: Quality screening of the outline's relevant materials to obtain preferred outline-related materials. In this step, quality screening of the outline's relevant materials is performed to obtain a small amount of high-quality preferred outline-related materials. In this embodiment, the server can evaluate the outline's relevant materials based on at least one of timeliness, authority, and relevance to obtain quality evaluation results for each relevant material. Based on the quality evaluation results for each relevant material, a first number of high-quality relevant materials are selected as preferred materials for the outline. Timeliness represents the impact of the time dimension on material demand satisfaction. Timeliness typically includes sudden timeliness, periodic timeliness, and general timeliness. Timeliness intensity can be categorized into several levels, such as strong, medium, general, and none. Different timeliness intensity levels are mapped to different timeliness evaluation values. Authority represents the user's trust in the material content and their willingness to question the output. The authority of a material can be determined based on its source (e.g., different creative teams, publishing organizations / websites / platforms, etc.). For example, materials with higher-level sources are more authoritative. Relevance represents the textual and semantic relevance between the outline and its relevant materials. Specifically, the server can evaluate the quality of the outline's relevant materials based on timeliness, authority, and relevance, obtaining the relevant materials' timeliness, authority, and relevance evaluation values. The server then determines the material's quality evaluation value by combining the timeliness, authority, and relevance evaluation values. The authority evaluation value can be determined based on factors such as the source rating of the material. For example, materials with higher-level sources have higher authority evaluation values.For example, different levels of material sources can be preconfigured, with different levels mapped to different authority ratings. The authority ratings mapped to the material source levels are then used as the material's authority ratings. The timeliness rating can be determined when determining the timeliness label for the relevant material. For example, while determining the timeliness label based on the material's creation time and user behavior (such as clicks, reads, forwarding, and comments), timeliness ratings for the timeliness labels "strong," "medium," "average," and "none" can also be determined. Specifically, any existing method for determining the timeliness of text information can be used to determine the timeliness rating of the outline's relevant materials, without specific limitation here. The relevance rating can be obtained by evaluating the relevance of the outline's relevant materials to the outline using existing text relevance algorithms. Specific text relevance algorithms include, but are not limited to, best-match algorithms such as BM25 and the Term Frequency-Inverse Document Frequency (TF-IDF) algorithm. Optionally, the server performs a weighted summation of the timeliness evaluation value, authority evaluation value, and relevance evaluation value of the relevant material to obtain the quality evaluation value of the relevant material. Optionally, the server may also calculate and determine the quality evaluation value (expressed as Fscore) of the relevant material based on the timeliness evaluation value (expressed as ScoreTimeliness), authority evaluation value (expressed as ScoreAuthority), and relevance evaluation value (expressed as ScoreRelevance) of the relevant material using the following formula:
[0003] Pscore +(庇 * Scorej)^, where Scorej ∈ {Score timeliness, Score authority, Score relevance}, and the value ranges of Score timeliness, Score authority, and Score relevance are [0,1]. 庇 and & are weight parameters for evaluation values in different dimensions. The weight parameters 庇 for evaluation values of any two different dimensions can be different or the same, and the weight parameters & for evaluation values of any two different dimensions can be different or the same. The values of the weight parameters for evaluation values of each dimension are configured and adjusted according to the requirements of the actual application scenario and empirical values, and no specific limitation is made here. Further, according to the quality evaluation values of relevant materials, at least one relevant material with a larger quality evaluation value is selected as the preferred material for the outline. The number of the preferred materials for the retained outline can be configured and adjusted according to factors such as the input length of the text generation model in the actual application scenario, and no specific limitation is made here. In an optional embodiment, the server can output the preferred materials for the outline through a material editing interface. The material editing interface also provides a display and editing area for the preferred materials. The user can edit and save any preferred material of the outline through the material editing interface. In response to the user's editing operation on any preferred material in the material editing interface, the preferred material is updated and saved. Additionally, when outputting the preferred materials, the source information of the preferred materials can also be output, so that the user can know the source of the preferred materials and can perform screening intervention on the preferred materials. In this embodiment, step S203 and step S204 can be executed in parallel or in any order successively, and no specific limitation is made here. Step S205, through the text generation model, generate the target text according to the preferred materials related to the outline. After performing quality screening on the relevant materials of the outline and obtaining a small number of high-quality preferred materials related to the outline, the server inputs the outline and the preferred materials related to the outline into the text generation model, and the text generation model generates the target text according to the outline and the preferred materials. Exemplarily, the outline and the preferred materials can be filled into a text generation prompt template to obtain text generation prompt information. The text generation prompt information is input into the text generation model, and the text generation model generates the detailed content text corresponding to the outline according to the text generation prompt information to obtain the target text. Exemplarily, an example of the text generation prompt template for generating the target text based on the outline and the preferred materials is as follows: "Known information: {preferred materials}, based on the above known information, analyze and answer the outline concisely and professionally. If no answer can be obtained from it, please say 'The question cannot be answered based on the known information' or 'Insufficient relevant information is provided', and no fabricated content is allowed in the answer. The answer should be in Chinese."The outline is "{Outline}". The "{Outline}" field is filled with the outline of the target text, and the "{Preferred Material}" field is filled with the preferred material related to the outline. In an optional embodiment, the target text may include a main body and a title. The server generates the main body of the target text based on the outline and the relevant preferred material, and then generates a title based on the main body of the target text. Specifically, the outline and the relevant preferred material are entered into a content generation prompt template to obtain content generation prompt information. This content generation prompt information is then input into a text generation model. The text generation model generates the main body corresponding to the outline based on the content generation prompt information, thereby obtaining the main body of the target text. For example, an example of a content generation prompt template is as follows: "Known Information: {Preferred Material} Based on the above known information, concisely and professionally analyze and answer the outline. If you cannot find an answer, please state "I cannot answer this question based on the known information" or "Not enough relevant information is provided." Fabricated answers are not allowed. Please use Chinese. The outline is "{Outline}". The "{Outline}" section is filled with the outline of the target text, and the "{Preferred Materials}" section is filled with preferred materials related to the outline. Furthermore, the main text of the target text is entered into a title generation prompt template to obtain title generation prompt information. This title generation prompt information is input into a text generation model, which generates the title of the target text based on the title generation prompt information. For example, an example title generation prompt template is as follows: "As a journalist, please summarize the title of the following article {Main Text}, with no more than 30 words." The "{Main Text}" section is filled with the main text of the target text. The method of this embodiment determines the outline of the target text to be generated based on given topic information, obtains a large amount of materials related to the outline, and uses this large amount of materials related to the outline to fine-tune a pre-trained model for text generation to obtain a text generation model. The domain knowledge contained in the large amount of materials related to the outline can be stored in a parameterized form in the text generation model. This involves injecting domain knowledge from a large amount of relevant material into the text generation model, allowing it to learn more domain knowledge and adapt to different domains. Furthermore, the outline's related materials are quality-screened to obtain a small amount of high-quality, selected material relevant to the outline. This fine-tuned text generation model is then used to generate the target text based on this small amount of high-quality, selected material.Because the text generation model has learned domain knowledge from a large amount of relevant material, when generating the target text, it not only references the domain knowledge contained in a small number of high-quality, quality-screened, selected materials, but also the domain knowledge contained in a larger number of relevant materials, thereby improving the quality of text generation. By inputting a smaller amount of selected materials (keeping the input short), high-quality target text can be generated, reducing the impact of model input length limitations on text generation quality and improving text generation quality. In an optional implementation, after the text generation model generates the target text based on the outline-related selected materials, the server can also verify the authenticity of the generated target text based on the outline-related selected materials. If the authenticity verification of the main content of the key points fails, the main content of the key points is revised. Optionally, the generated target text is verified for authenticity based on the preferred materials associated with the outline. This can be achieved by: extracting triple information from the target text and the preferred materials using a triple extraction model; identifying whether the triple information in the preferred materials conflicts with the triple information in the target text; if the identification result indicates a conflict, the authenticity verification of the target text fails; if the identification result indicates no conflict, the authenticity verification of the target text passes. By extracting triple information from the target text and the preferred materials and performing fine-grained triple information comparison, content conflicts between the target text and the preferred materials can be quickly and accurately located, supplementing the authenticity verification of triple information not covered by the knowledge graph. The triple information extracted from the target text and the preferred materials consists of triples consisting of "subject, predicate, object," namely, Subject-Predicate-Object triples, or SPO triples for short. A conflict between any two triples occurs when any two parts of the two triples are consistent, but the remaining part is inconsistent. For example, if the subject and predicate in the two triples are consistent, but the object is inconsistent; or if the predicate and object in the two triples are consistent, but the subject is inconsistent; or if the subject and object in the two triples are consistent, but the predicate is inconsistent, this indicates that the relationship between the two entities of the subject and object is inconsistent. Optionally, the generated target text can be verified for authenticity based on the preferred materials related to the syllabus. This can be achieved by using a conflict identification model to identify whether the target text and the preferred materials related to the syllabus conflict. If the identification result indicates a conflict, the target text fails the authenticity verification; if the identification result indicates no conflict, the target text passes the authenticity verification.Leveraging model reasoning capabilities, content conflicts between the target text and the preferred source material can be quickly identified. The conflict identification model can be any large language model (LLM). Leveraging the model's reasoning capabilities, the generated target text and the referenced preferred source material are reasoned and verified to determine whether there are content conflicts. Optionally, the target text and the preferred source material are entered into a conflict identification prompt template to obtain conflict identification prompt information. This conflict identification prompt information is then input into the conflict identification model, which then uses the conflict identification prompt information to determine whether there are content conflicts between the target text and the preferred source material. For example, an example of a conflict identification prompt template is as follows: "As an experienced writer, please use the given descriptive text {outline}, combined with the original material {preferred material} and the generated summary {target text}, to determine whether the summary of the {outline} is inconsistent with the original material. If there is any contradiction, please point it out and provide an explanation.", where "{outline}" is used to fill in the outline, "{preferred material}" is used to fill in the preferred material related to the outline, and "{target text}" is used to fill in the generated target text. For example, another example of a conflict identification prompt template is as follows: "As an experienced writer, based on the original material {preferred material} and the generated summary {target text}, please determine whether the summary conflicts with the original material. If so, please point out any conflicts and provide an explanation." The "{preferred material}" field is used to fill in the preferred material related to the outline, and the "{target text}" field is used to fill in the generated target text. Optionally, the target text and preferred material are entered into the conflict identification prompt template to obtain conflict identification prompt information. The conflict identification prompt information is input into the conflict identification model, which then performs sentence-level relationship judgment between the target text and the preferred material based on the conflict identification prompt information to determine whether the relationship between the two is inclusion, contradiction, or neutrality. If the relationship judgment result is contradiction, the authenticity check of the target text fails. If the recognition result is inclusion or neutrality, the authenticity check of the target text passes. For example, an example of a conflict identification prompt template is as follows: "As an experienced linguist, please determine whether the relationship between the given {preferred material} and the generated {result} is one of the following: inclusion, contradiction, or neutrality, and output it in JSON format. If you are not sure, please output {}." o Where "{preferred material}" is used to fill in the preferred material related to the outline, and "{result}" is used to fill in the generated target text. Optionally, the server can also use the knowledge graph to verify the authenticity of the generated target text.Specifically, a triple extraction model is used to extract triple information from the target text. The triple information in the target text is then compared with the triples in the knowledge graph to identify any conflicts. If a conflict is detected, the target text fails the authenticity verification; if no conflict is detected, the target text passes the authenticity verification. The triple information extracted from the target text and the preferred source material consists of three parts: "subject, predicate, object." A conflict between any two triples occurs when any two parts of the two triples are consistent and the remaining part is inconsistent. Furthermore, the knowledge graph used for authenticity verification can include a domain knowledge graph and / or an open source knowledge graph. A domain knowledge graph is a knowledge graph constructed by the owner of the text generation system based on domain knowledge. An open source knowledge graph can be an established open source knowledge graph in the industry. Optionally, a named entity recognition (NER) model is used to identify entities in the target text. The candidate set of named entities can be configured and adjusted based on the needs of the actual application scenario and is not specifically limited here. For example, identified named entities include, but are not limited to, names of people, places, organizations, meetings, job levels, time periods, and quantities. The target text is segmented into sentences, and a mapping relationship is established between entities and their corresponding sentences. Based on the mapping relationship between entities and sentences, the entities in the sentences are used as answers, and the answers in the sentences are masked to construct questions. A question-answering model is used to generate responses to the questions based on the selected materials. If at least one response to the question conflicts with the corresponding answer, the target text fails the authenticity check. The question-answering model can be implemented using any existing large language model and is not specifically limited here. For example, for a sentence in the target text: "Xiao Ming attended the meeting on January 10, 2024.", the entities that can be identified include: Xiao Ming, January 10, 2024, and meeting. Questions such as "Who attended the meeting on January 10, 2024?" and "What meeting did Xiao Ming attend?" can be constructed. If the answer to the first question generated by the question-answering model based on the preferred material includes Xiao Ming, and the answer to the second question includes the meeting on January 10, 2024, and there is no conflict with the masked answer, then the authenticity check of the target text will pass. Furthermore, the target text can be corrected as follows: The text generation model regenerates the target text based on the preferred material and the target text related to the outline, as well as the conflict information identified during the authenticity check of the target text.Specifically, the outline, its related preferred materials, the target text, and any conflicting information identified during the authenticity check of the target text are entered into a correction prompt template to obtain correction prompt information. The correction prompt information is then input into a text generation model, which then regenerates the target text based on the correction prompt information, eliminating the conflicting information. For example, an example correction prompt template might read: "As a seasoned writer, I have the original materials {preferred materials} and the generated summary {target text}. Based on the conflicts {conflicting information} I discovered, please re-create a summary based on the outline {outline}. If you cannot find an answer, please state "I cannot answer this question based on the known information" or "Not enough relevant information is provided." Fabricated answers are not permitted. Please use Chinese." The "{outline}" field is used to fill in the outline, the "{preferred materials}" field is used to fill in the preferred materials associated with the outline, and the "{target text}" field is used to fill in the generated target text. The "{Conflict Information}" field is used to fill in conflict information identified during the authenticity verification of the target text. This information may include conflicting triples, contradictory content, and so on. Optionally, correction of the target text can be achieved by outputting the target text and conflict information between the target text and the preferred source material through a correction interface. The user can manually correct the target text based on the conflict information between the target text and the preferred source material to obtain a corrected target text. In this embodiment, the target text can be verified by combining the aforementioned authenticity verification methods to quickly and accurately locate content conflicts between the target text and the preferred source material. Correction of the target text based on the conflict information can improve the quality of the target text. In an optional embodiment, the outline of the target text includes at least one level of key points. For example, Figure 3 is a detailed flow chart of a text generation method provided in an exemplary embodiment of the present disclosure. As shown in Figure 3, the method specifically implements the following steps: Step S301: Determine the outline of the target text to be generated based on given topic information. The outline includes at least one level of key points. The specific implementation principles and technical effects of this step are described in the previous embodiment related to step S201 and will not be further described here. Step S302: Relevant materials for each key point in the outline are obtained. In this embodiment, the outline includes at least one level of key points. When obtaining the relevant materials for the outline, relevant materials for each key point in the outline are obtained.In this step, the server can obtain relevant materials for each content point through at least one of the following methods: invoking an internet search engine to search for relevant materials for each content point; invoking a local search engine to search a local database for relevant materials for each content point; or obtaining relevant materials for any content point input by the user. The internet search engine can be a third-party internet search engine. By invoking the internet search engine and searching for relevant materials for each content point within the publicly available data on the public network, the server can obtain a large amount of relevant materials for each content point. The local search engine is a search engine owned by the provider of the text generation system itself, and can search a local database for materials related to each content point. For example, the text generation system can be used internally by a radio station, which has a large number of internal manuscripts, such as interview transcripts and press releases, and can build a local database. The local search engine can be used to search the local database for materials related to each content point to obtain relevant materials for each content point. Furthermore, the method of this embodiment also supports users submitting relevant materials for each content point. For example, the server outputs each content point of the outline through a material submission interface. This material submission interface provides a material submission area for each content point of the outline. Users can edit or upload relevant materials for each key point online in the material submission area for each key point. In this embodiment, the server can combine the aforementioned methods to obtain relevant materials for each key point in the outline. This allows for more comprehensive and accurate acquisition of a large amount of relevant materials for each key point, providing richer materials for generating the target text and improving the quality of the target text. Step S303: Fine-tune the pre-trained model based on the relevant materials in the outline to obtain a text generation model. In this step, the server fine-tunes the pre-trained model based on the large amount of relevant materials for each key point in the outline to obtain a text generation model. The domain knowledge contained in the large amount of relevant materials related to each key point can be stored in a parameterized form in the text generation model. This allows the domain knowledge contained in the large amount of relevant materials to be incorporated into the text generation model, allowing the text generation model to learn more domain knowledge and improve its text generation quality. The pre-trained model can be any existing text generation model, specifically various large language models (LLMs) or BERT-based text generation models, which are not specifically limited here. Optionally, in this step, the server may use all relevant materials of each content point acquired in the above steps to fine-tune the pre-trained model to obtain a text generation model.Optionally, in this step, the server can use some of the relevant materials for each content point acquired in the previous step to fine-tune the pre-trained model to obtain a text generation model, thereby improving the efficiency of model fine-tuning and training, and thus improving the efficiency of text generation. Specifically, the server can filter the relevant materials for each content point based on the configured second basic related condition to obtain a screening result. If the number of materials in the screening result is less than the total amount of materials related to the content point, the screening result will be used as the material for fine-tuning training to reduce the complexity of fine-tuning training. Using the materials included in the screening result, the pre-trained model is fine-tuned to obtain a text generation model. Furthermore, the number of materials in the screening result should be greater than the number of preferred materials for the content point to ensure the effectiveness of fine-tuning training and improve the quality of the text generation model. The second basic relevance condition refers to a pre-configured condition for roughly screening relevant materials for content highlights. Compared to the quality screening of relevant materials for each content highlight in subsequent steps, the second basic relevance condition performs a coarse-grained screening of relevant materials for content highlights based on their relevance and / or timeliness, thereby appropriately reducing the amount of materials used for fine-tuning training while ensuring that the text generation model learns domain knowledge from a large amount of relevant materials, thereby ensuring the effectiveness of fine-tuning training. Exemplarily, the second basic relevance condition may include at least one of the following: a relevance evaluation value between the relevant materials and the content highlights greater than or equal to a second relevance threshold; and a timeliness evaluation value of the relevant materials greater than or equal to a second timeliness threshold. The second relevance threshold and the second timeliness threshold are both relatively low thresholds. The specific values can be configured and adjusted by relevant technical personnel based on the needs and experience of actual application scenarios and are not specifically limited here. In this embodiment, the server fine-tunes the pre-trained model using relevant materials (all or part) of each content key point. When obtaining a text generation model, the server can use a parameter-efficient fine-tuning (PEFT) fine-tuning method, such as low-rank adaptation (LoRA) and p-tuning, to quickly fine-tune the pre-trained model, thereby improving the efficiency of model fine-tuning and, consequently, text generation. For example, in an optional embodiment, the server can use the low-rank adaptation LoRA method to fine-tune the pre-trained model.Specifically, a text generation model to be fine-tuned is constructed by adding new parameters (a trainable rank decomposition matrix) to the pre-trained model. The added parameters in the text generation model are fine-tuned based on relevant materials (full or partial) for each content key point, resulting in a trained text generation model. During the fine-tuning process, the original parameters of the pre-trained model remain unchanged, and only the newly added parameters are trained. This significantly improves the efficiency of fine-tuning and, consequently, text generation. Furthermore, the server can also use PEFT fine-tuning methods other than LoRA, such as P-Tuning and P-Tuning v2, which are not specifically limited here. Optionally, in this step, when the server fine-tunes the pre-trained model using relevant materials (full or partial) for each content key point, fine-tuning all parameters of the pre-trained model using fine-tuning methods other than PEFT can also be used to improve text generation quality, but this may have a certain impact on text generation efficiency. The method of this embodiment fine-tunes a pre-trained model using a large amount of relevant material for each content point. The domain knowledge contained in this large amount of relevant material is stored in a parameterized form within the model structure. This allows for the injection of more domain knowledge into the text generation model without increasing the model input length, significantly improving the quality of text generation. Step S304: Quality screening is performed on the relevant material for each content point to obtain preferred material for each content point. In this step, quality screening is performed on the relevant material for each content point in the outline to obtain a small amount of high-quality, preferred material for each content point. Specifically, the relevant material for each content point is evaluated based on at least one of the following dimensions: timeliness, authority, and relevance, to obtain a quality assessment result for the relevant material for each content point. Based on the quality assessment result for each content point, the relevant material for each content point is screened to obtain preferred material for each content point. Relevance represents the textual and semantic correlation between a content point and its related material. The relevance assessment value can be obtained by evaluating the relevance between the relevant material and the content point using existing text relevance algorithms. Specific text relevance algorithms that can be used include, but are not limited to, best match algorithms such as BM25 and the TF-IDF algorithm. The meanings of timeliness and authority, as well as the calculation methods for the timeliness and authority evaluation values of relevant materials, are consistent with those in the aforementioned embodiments. For details, please refer to the relevant content in the aforementioned embodiments and will not be repeated here. In this step, the server can perform a quality assessment of the relevant materials of the content key points based on timeliness, authority, and relevance, respectively, to obtain the timeliness, authority, and relevance evaluation values of the relevant materials.The quality evaluation values of the materials related to the content points are determined by comprehensively evaluating the timeliness, authority, and relevance of the relevant materials. Furthermore, based on the quality evaluation values of the materials related to the content points, at least one relevant material with a higher quality evaluation value is selected as the preferred material for the content points. The specific implementation principles and technical effects are described in detail in step S204 of the aforementioned embodiment and will not be further elaborated here. In an optional embodiment, the server may output the preferred materials for each content point included in the outline through a material editing interface. The material editing interface also provides a display and editing area for the preferred materials related to each content point. Users can edit and save any preferred material related to any content point through the material editing interface. In response to a user's editing operation on any preferred material related to any content point in the material editing interface, the preferred material is updated and saved. Furthermore, when outputting the preferred materials related to the content points, source information of the preferred materials may also be output, allowing users to understand the source of the preferred materials and to filter and intervene in the selection of the preferred materials. In this embodiment, the outline includes at least one level of key points. When generating the target text, the server generates the corresponding body content for each key point based on the preferred materials associated with each key point. The body content of each key point in the outline is organized hierarchically to produce the target text. This is specifically accomplished through the following steps S305-S306. Step S305: For any key point in the outline, the key point and its associated preferred materials are entered into a content generation prompt template to obtain content generation prompt information. This content generation prompt information is then input into a text generation model. The text generation model then generates the key point's body content based on the content generation prompt information. In this step, the server generates the key point's body content for each key point in the outline. Specifically, the key point and its associated preferred materials are entered into a text generation prompt template to obtain text generation prompt information. This text generation prompt information is then input into the text generation model. The text generation model then generates the key point's body content based on the text generation prompt information. For example, an example of a text generation prompt template for generating content points based on content points and preferred materials related to the content points is as follows: "Known information: {Preferred material}, based on the above known information, analyze and answer the content points concisely and professionally. If you cannot get an answer from it, please say "The question cannot be answered based on the known information" or "Not enough relevant information is provided". It is not allowed to add fabricated elements to the answer. Please use Chinese to answer. The content point is {content point}".The "{Content Key Points}" field is filled with the content key points, and the "{Preferred Materials}" field is filled with preferred materials related to the content key points. In an optional embodiment, for any content key point, after generating the main content of the content key point, the server may further verify the authenticity of the main content of the content key point based on the preferred materials related to the content key point. If the authenticity verification fails, the main content of the content key point may be revised. Optionally, the authenticity of the main content of the content point can be verified based on the preferred materials associated with the content point. This can be achieved by: extracting triple information from the main content of the content point and triple information from the preferred materials associated with the content point using a triple extraction model; identifying whether the triple information from the preferred materials associated with the content point conflicts with the triple information from the main content of the content point; if the identification result indicates a conflict, the authenticity verification of the main content of the content point fails; if the identification result indicates no conflict, the authenticity verification of the main content of the content point passes. By extracting triple information from the main content of the content point and the related preferred materials and comparing them at a fine-grained level, conflicts between the main content of the generated content point and the preferred materials can be quickly and accurately located, supplementing the authenticity verification of triple information not covered by the knowledge graph. The triple information extracted from the main content of the content point and the preferred material is a triple consisting of three parts: "subject, predicate, object." A conflict between any two triples occurs when any two parts of the two triples are consistent, but the remaining part is inconsistent. For example, if the subject and predicate in the two triples are consistent, but the object is inconsistent; or if the predicate and object in the two triples are consistent, but the subject is inconsistent; or if the subject and object in the two triples are consistent, but the predicate is inconsistent, this indicates that the relationship between the two entities of the subject and object is inconsistent. Optionally, the main content of the content point can be verified for authenticity based on the preferred material associated with the content point. This can also be achieved by using a conflict identification model to identify whether the main content of the content point conflicts with the content of the preferred material associated with the content point; if the identification result indicates a conflict, the main content of the content point fails the authenticity verification; if the identification result indicates no conflict, the main content of the content point passes the authenticity verification. Leveraging model reasoning capabilities, conflicts and contradictions between the main content of key points and the preferred source material can be quickly identified. The conflict identification model can be any large language model (LLM). Leveraging the model's reasoning capabilities, it can perform reasoning and verification to determine whether conflicts exist between the generated main content of key points and the referenced preferred source material.Optionally, the main content of the key points and the preferred materials related to the key points are entered into a conflict identification prompt template to obtain conflict identification prompt information. The conflict identification prompt information is then input into a conflict identification model, which uses the conflict identification prompt information to identify whether there is a conflict between the main content of the key points and the preferred materials. For example, an example conflict identification prompt template is as follows: "As an experienced writer, based on the given descriptive text {key points}, the original materials {preferred materials}, and the generated summary {main content}, please determine whether the summary of {key points} conflicts with the original materials. If so, please indicate and explain." The "{key points}" field is used to enter the key points, the "{preferred materials}" field is used to enter the preferred materials related to the key points, and the "{main content}" field is used to enter the main content of the key points. For example, another example of a conflict identification prompt template is as follows: "As an experienced writer, based on the original material {preferred material} and the generated summary {main content}, please determine whether the summary conflicts with the original material. If so, please point out any conflicts and provide an explanation." The "{preferred material}" field is used to fill in the preferred material related to the outline, and the "{main content}" field is used to fill in the main content of the key points. Optionally, the main content of the key points and the preferred material related to the key points are entered into the conflict identification prompt template to obtain conflict identification prompt information. The conflict identification prompt information is input into the conflict identification model, which uses the conflict identification prompt information to perform sentence-level relationship judgment on the main content of the key points and the preferred material, determining whether the relationship between the two is inclusion, contradiction, or neutrality. If the relationship judgment result is contradiction, the authenticity check of the main content of the key points fails. If the recognition result is inclusion or neutrality, the authenticity check of the main content of the key points passes. For example, an example of a conflict identification prompt template is as follows: "As an experienced linguist, please determine whether the relationship between the given {preferred material} and the generated {result} is one of the following: inclusion, contradiction, or neutrality, and output it in JSON format. If you are unsure, please output {}." o Where "{preferred material}" is used to fill in the preferred material related to the outline, and "{result}" is used to fill in the text of the generated content points. Optionally, the server can also use the knowledge graph to verify the authenticity of the text of the content points.Specifically, a triple extraction model is used to extract triple information from the main content of the content points. The triple information in the main content of the content points is then compared with the triples in the knowledge graph to determine whether there is a conflict between the triple information in the main content of the content points and the triples in the knowledge graph. If a conflict is detected, the authenticity verification of the main content of the content points fails. If no conflict is detected, the authenticity verification of the main content of the content points passes. The triple information extracted from the main content of the content points and the preferred materials is a triple consisting of three parts: "subject, predicate, object." A conflict between any two triples means that any two parts of the two triples are consistent, while the remaining part is inconsistent. Furthermore, the knowledge graph used for authenticity verification can include a domain knowledge graph and / or an open source knowledge graph. A domain knowledge graph is a knowledge graph constructed by the owner of the text generation system based on domain knowledge. An open source knowledge graph can be an open source knowledge graph already established in the industry. Optionally, a named entity recognition (NER) model is used to perform entity recognition on the main content of the content highlights. The candidate set of named entities can be configured and adjusted according to the needs of the actual application scenario and is not specifically limited here. For example, named entities include but are not limited to names of people, places, organizations, meetings, job levels, time, and quantity. The main content of the content highlights is divided into sentences, and a mapping relationship between entities and their corresponding sentences is established. Based on the mapping relationship between entities and sentences, the entities in the sentences are used as answers, and the answers in the sentences are masked to construct questions. A question-answering model is used to generate responses to the questions based on the selected materials. If there is a conflict between the response to at least one question and the corresponding answer, the authenticity verification of the main content of the content highlights fails. The question-answering model can be implemented using any existing large language model and is not specifically limited here. Furthermore, the main content of a key point can be corrected by regenerating the main content of the key point using the text generation model based on the preferred materials and main content of the key point, as well as conflict information determined by authenticity verification of the main content of the key point. Alternatively, the main content of the key point can also be corrected by, specifically, populating a correction prompt template with the key point, the preferred materials related to the key point, the main content of the key point, and conflict information determined by authenticity verification of the main content of the key point to obtain correction prompt information. The correction prompt information is then input into the text generation model, and the text generation model regenerates the main content of the key point based on the correction prompt information, so that the conflict information is no longer present in the main content of the key point.Optionally, correction of the main content of the key points can be achieved by outputting the main content of the key points through a correction interface, along with conflict information between the main content of the key points and the preferred materials. Based on this conflict information, the user can manually correct the main content of the key points to obtain the corrected main content of the key points. In this embodiment, the main content of the key points can be verified using a combination of the aforementioned authenticity verification methods. This allows for quick and accurate identification of conflicts between the main content of the key points and the preferred materials associated with the key points. Correction of the main content of the key points based on this conflict information can improve the quality of the main content of the key points. Step S306: Generate the main text of the target text based on the main content of the key points at each level in the outline. After obtaining the main content of the key points at each level in the outline, the main content of the key points at each level in the outline is organized and concatenated hierarchically to obtain the main text of the target text. Step S307: The target text's main text is entered into a title generation prompt template to obtain title generation prompt information. The title generation prompt information is then input into a text generation model. The text generation model generates the target text's title based on the title generation prompt information. After obtaining the target text's main text, the server generates the target text's title based on the main text. Specifically, the server enters the target text's main text into a title generation prompt template to obtain title generation prompt information. The title generation prompt information is then input into the text generation model. The text generation model generates the target text's title based on the title generation prompt information. For example, an example of a title generation prompt template is as follows: "As a journalist, please summarize the title of the following article {Main Text}. The title should contain no more than 30 characters." The main text of the target text is entered into "{Main Text}." In another alternative embodiment, the server may replace the main text of the target text with the main text of each key point and enter the title generation prompt template to obtain the title generation prompt information. The title generation prompt information is input into the text generation model. The text generation model generates the target text title based on the title generation prompt information. Step S308: Output the target text title and body. After obtaining the target text title and body, the server outputs the target text title and body to the client device. The client device then displays the target text title and body to the user.The method of this embodiment determines the outline of the target text to be generated based on given subject information. The outline includes at least one level of key points. A large amount of relevant material for each key point is obtained. This material is used to fine-tune a pre-trained model to obtain a text generation model. The domain knowledge contained in this large amount of material related to each key point can be stored in a parameterized form in the text generation model. In other words, the domain knowledge contained in this large amount of relevant material is injected into the text generation model, allowing the text generation model to learn more domain knowledge and adapt to different domains. Furthermore, the material related to each key point is quality-screened to obtain a small amount of high-quality, preferred material related to each key point. The fine-tuned text generation model generates the body content of each key point based on this small amount of high-quality, preferred material. The body content of each key point is organized hierarchically to generate the main text of the target text. The text generation model then generates a title based on the main text of the target text. Because the text generation model has learned domain knowledge from a large amount of relevant material, when generating the target text, it not only references the domain knowledge contained in a small amount of high-quality, quality-screened, preferred material, but also references the domain knowledge contained in a large amount of relevant material, thereby improving the quality of text generation. By inputting fewer preferred materials (keeping the input short), high-quality target text can be generated, reducing the impact of model input length limitations on text generation quality, thereby improving text generation quality. For example, Figure 4 is a schematic diagram of a text generation method provided by an exemplary embodiment of the present disclosure. As shown in Figure 4, the text generation model includes the following stages: outline determination, material processing, model fine-tuning, text generation, and verification and confirmation. In the outline determination stage, based on the user-entered topic information of the target text to be generated, the model automatically generates an outline using the model. Simultaneously, configured outline templates are obtained as candidate outlines, allowing users to edit and select candidate outlines, thereby supporting manual outline selection. During the material processing phase, based on the selected outline, a large amount of relevant material is obtained through various methods, including internet search engines, local search engines, and manual input. This material is then evaluated for quality based on relevance, authority, and timeliness, and a small number of high-quality, selected materials are selected. During the model fine-tuning phase, the pre-trained model is fine-tuned based on the large amount of relevant material from the outline to obtain a text generation model. The domain knowledge contained in this large amount of relevant material is stored in a parameterized form in the text generation model. This infusion of this domain knowledge into the text generation model allows the model to learn more domain knowledge and improves its text generation quality.During the text generation phase, based on the outline, its preferred materials, and a preconfigured, unified prompt template, the text generation model summarizes the content of the preferred materials to generate the target text. During the verification phase, the generated text is verified for authenticity by verifying the SPO triples of the generated results against the preferred materials, verifying the authenticity of the generated results against the SPO triples of the knowledge graph, and checking for content conflicts between the generated results and the preferred materials using the model's reasoning capabilities. If the authenticity verification fails, the generated text is corrected through automatic correction by the large model or manual verification. The text generation framework of this embodiment leverages artificial intelligence models to assist in text creation. It combines the summarization and reasoning capabilities of large models with search engines, knowledge graphs, entity recognition, and other technologies to provide a comprehensive text generation solution. This framework leverages the summarization and reasoning capabilities of large models to generate outlines, and leverages the powerful search capabilities of search engines to quickly search for materials related to the outline. It also conducts comprehensive quality assessments of materials based on timeliness, authority, and relevance, selecting a small number of high-quality, selected materials. It uses large models to summarize and generalize the material content to generate target text. Finally, it utilizes knowledge graphs, named entity recognition, and large model reflective reasoning to verify and correct the generated results. This provides a complete intelligent text generation solution for the publishing and media industries, improving text generation quality. Figure 5 is a schematic diagram of the structure of a server provided by an embodiment of the present disclosure. As shown in Figure 5, the server includes a memory 501 and a processor 502. Memory 501 is used to store computer-executable instructions and can be configured to store various other data to support operations on the server. Processor 502 is communicatively coupled to memory 501 and configured to execute computer-executable instructions stored in memory 501 to implement the technical solution provided by any of the aforementioned method embodiments. The specific functions and technical effects achieved are similar and are not further described here. Optionally, as shown in FIG5 , the server also includes other components, such as a firewall 503, a load balancer 504, a communication component 505, and a power supply component 506. FIG5 illustrates only some of the components, and does not necessarily mean that the server only includes the components shown in FIG5 . FIG5 illustrates the server as a cloud server deployed in the cloud for illustrative purposes only; the server can also be deployed locally, which is not specifically limited in this embodiment. The disclosed embodiments also provide a computer-readable storage medium storing computer-executable instructions. When the processor executes the computer-executable instructions, the method of any of the aforementioned embodiments is implemented. The specific functions and technical effects achieved are not further described here.The present disclosure also provides a computer program product, including a computer program. When executed by a processor, the computer program implements the method of any of the aforementioned embodiments. The computer program is stored in a readable storage medium. At least one processor of a server can read the computer program from the readable storage medium. Execution of the computer program by the at least one processor causes the server to implement the technical solution provided in any of the aforementioned method embodiments. The specific functions and technical effects achieved are not described in detail here. The present disclosure also provides a chip, including a processing module and a communication interface. The processing module can implement the technical solution of the server in the aforementioned method embodiments. Optionally, the chip also includes a storage module (e.g., a memory) for storing instructions, and the processing module for executing the instructions stored in the storage module. Execution of the instructions stored in the storage module causes the processing module to implement the technical solution provided in any of the aforementioned method embodiments. The integrated module implemented as a software function module can be stored in a computer-readable storage medium. The software function module, stored in a storage medium, includes instructions for causing a computer device (such as a personal computer, server, or network device) or processor to perform some of the steps of the methods of various embodiments of the present disclosure. It should be understood that the processor described above may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), or application-specific integrated circuits (ASICs). A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the application may be directly executed by a hardware processor or by a combination of hardware and software modules within the processor. The memory may include high-speed random access memory (RAM) or non-volatile storage, such as at least one disk storage device, or may be a USB flash drive, a mobile hard drive, a read-only memory, a magnetic disk, or an optical disk. The memory described above may be an object storage service (OSS).The aforementioned memory can be implemented by any type of volatile or non-volatile memory device, or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The aforementioned communication component is configured to facilitate wired or wireless communication between the device in which the communication component is located and other devices. The device containing the communication component can access wireless networks based on communication standards, such as mobile hotspots (WiFi), second-generation mobile communication systems (2G), third-generation mobile communication systems (3G), fourth-generation mobile communication systems (4G) / Long Term Evolution (LTE), fifth-generation mobile communication systems (5G), or combinations thereof. In one exemplary embodiment, the communication component receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, the communication component also includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID), infrared, ultra-wideband (UWB), Bluetooth, or other technologies. The power supply component provides power to various components of the device containing the power supply component. The power supply component may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the device containing the power supply component.The aforementioned storage medium can be implemented by any type of volatile or non-volatile storage device, or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The storage medium can be any available medium that can be accessed by a general-purpose or special-purpose computer. An exemplary storage medium is coupled to a processor, enabling the processor to read information from and write information to the storage medium. Of course, the storage medium can also be an integral part of the processor. The processor and storage medium can reside in an application-specific integrated circuit. Of course, the processor and storage medium can also reside as discrete components in an electronic device or a host control device. It should be noted that, as used herein, the terms "comprise," "include," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus comprising a list of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. Without further limitation, an element specified by the phrase "comprising a..." does not preclude the presence of other identical elements in the process, method, article, or apparatus comprising that element. The order of the above-described embodiments of the present disclosure is for descriptive purposes only and does not necessarily indicate superiority or inferiority of the embodiments. Furthermore, some processes described in the above-described embodiments and accompanying drawings include multiple operations that appear in a specific order. However, it should be understood that these operations may be performed out of the order presented herein or in parallel. The sequence numbers are used solely to distinguish between different operations, and the sequence numbers themselves do not indicate any order of execution. Furthermore, these processes may include more or fewer operations, and these operations may be performed sequentially or in parallel. It should be noted that the terms "first" and "second" herein are used to distinguish different messages, devices, modules, etc., and do not indicate a sequential order, nor do they limit the "first" and "second" to different types. "Multiple" means two or more, unless otherwise specifically defined. From the above description of the embodiments, those skilled in the art will clearly understand that the methods of the above embodiments can be implemented using software plus a necessary general-purpose hardware platform. Hardware can also be used, but in many cases the former is the preferred implementation method.Based on this understanding, the technical solution of the present disclosure, or the portion that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (e.g., ROM / RAM, a magnetic disk, or an optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the methods of various embodiments of the present disclosure. Those skilled in the art will readily conceive of other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the present disclosure, which adhere to the general principles of the present disclosure and include common knowledge or customary techniques in the art not disclosed herein. The above are merely preferred embodiments of the present disclosure and are not intended to limit the scope of the present disclosure. Any equivalent structures or equivalent processes that are transformed using the contents of the present specification and drawings, or that are directly or indirectly applied in other related technical fields, are similarly included within the scope of the present disclosure.
Claims
Claims 1. A text generation method, wherein: include: Determine the outline of the target text to be generated according to the given subject information; Relevant materials of the outline are obtained, and a pre-trained model is fine-tuned based on the relevant materials of the outline to obtain a text generation model; the relevant materials of the outline are quality-screened to obtain preferred materials related to the outline; and the target text is generated according to the preferred materials related to the outline through the text generation model.
2. The method according to claim 1, wherein: The fine-tuning training of the pre-trained model based on the relevant materials of the outline to obtain the text generation model includes: adding new parameters to the pre-trained model to construct the text generation model to be fine-tuned; and fine-tuning the parameters added to the text generation model based on the relevant materials of the outline to obtain the trained text generation model.
3. The method according to claim 1 or 2, wherein: The fine-tuning training of the pre-trained model based on the relevant materials of the outline to obtain the text generation model includes: screening the relevant materials of the outline according to the configured basic relevant conditions to obtain a screening result, wherein the number of materials in the screening result is greater than the number of the preferred materials; and fine-tuning the pre-trained model using the materials included in the screening result to obtain the text generation model.
4. The method according to any one of claims 1 to 3, wherein: Determining an outline of a target text to be generated based on given subject information includes: generating an outline of the target text using the pre-trained model based on an outline generation prompt template and given subject information; outputting the candidate outlines using the outline generated by the pre-trained model and at least one pre-configured outline template; updating the edited candidate outline in response to an edit operation on any candidate outline; and selecting any candidate outline by a user as the outline of the target text.
5. The method according to any one of claims 1 to 4, wherein: The outline includes at least one level of content highlights, and obtaining relevant materials of the outline includes: respectively obtaining relevant materials of each content highlight contained in the outline; performing quality screening on the relevant materials of the outline to obtain preferred materials related to the outline includes: performing quality screening on the relevant materials of each content highlight to obtain preferred materials related to each content highlight.
6. The method according to claim 5, wherein: The generating of the target text according to the preferred materials related to the outline by the text generation model includes: for any content point included in the outline, filling the content point and related preferred materials into a content generation prompt template to obtain content generation prompt information, inputting the content generation prompt information into the text generation model, and generating the main content of the content point according to the content generation prompt information by the text generation model; and generating the main text of the target text according to the main content of the content points at each level included in the outline.
7. The method according to claim 6, wherein: The step of generating the target text according to the preferred materials related to the outline by the text generation model includes: filling the body of the target text into a title generation prompt template to obtain title generation prompt information; The title generation prompt information is input into the text generation model, and the title of the target text is generated by the text generation model according to the title generation prompt information.
8. The method according to claim 5, wherein: For any of the content highlights, after generating the body of the content highlight, the method further includes: performing authenticity verification on the body of the content highlight based on preferred materials related to the content highlight; and if the authenticity verification on the body of the content highlight fails, revising the body of the content highlight.
9. The method according to claim 8, wherein: The authenticity verification of the main content of the content points based on the preferred materials related to the content points includes: extracting triple information contained in the main content of the content points and triple information contained in the preferred materials related to the content points through a triple extraction model; identifying whether the triple information contained in the preferred materials related to the content points conflicts with the triple information contained in the main content of the content points; if the identification result is that there is a conflict, the authenticity verification of the main content of the content points fails; if the identification result is that there is no conflict, the authenticity verification of the main content of the content points passes.
10. The method according to claim 8, wherein: The authenticity verification of the main content of the content points based on the preferred materials related to the content points includes: identifying whether there is a conflict between the main content of the content points and the content of the preferred materials related to the content points through a conflict identification model; if the identification result is that there is a conflict, then the authenticity verification of the main content of the content points fails; if the identification result is that there is no conflict, then the authenticity verification of the main content of the content points passes.
11. The method according to claim 9 or 10, wherein: The modifying of the main content of the content point includes: regenerating the main content of the content point by the text generation model according to the preferred material and main content of the content point, and conflict information determined by verifying the authenticity of the main content of the content point.
12. The method according to any one of claims 5 to 11, wherein: The obtaining of relevant materials for each of the content points included in the outline includes at least one of the following: calling an Internet search engine to search for relevant materials for each of the content points; calling a local search engine to search for relevant materials for each of the content points in a local database; obtaining relevant materials for any of the content points input by the user.
13. The method according to any one of claims 1 to 12, wherein: The quality screening of the relevant materials of the outline to obtain the preferred materials related to the outline includes: evaluating the relevant materials of the outline from at least one dimension of timeliness, authority and relevance to obtain the quality evaluation results of the relevant materials; and screening the relevant materials based on the quality evaluation results of the relevant materials to obtain the preferred materials related to the outline.
14. The method according to any one of claims 1 to 13, wherein: Also includes: Outputting the preferred materials related to each outline; In response to a user's editing operation on any preferred material, the preferred material is updated.
15. A server, wherein: include: at least one processor; and a memory communicatively coupled to the at least one processor; The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the server to perform the method according to any one of claims 1 to 14.
16. A computer-readable storage medium, wherein: The computer-readable storage medium stores computer-executable instructions, and when the processor executes the computer-executable instructions, the method according to any one of claims 1 to 14 is implemented.
17. A computer program product comprising a computer program, wherein: When the computer program is executed by a processor, the method according to any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
Long text generation method and device based on large language model, equipment and storage medium
CN116796728A
Joint training method, system and equipment of language model and storage medium
CN117094383A
Method and device for carrying out sample screening on large language model for questions and answers
CN117493890A
Cited By
Financial problem analysis method and device based on large language model, equipment and medium
CN121233980A
Text generation method, electronic equipment and computer readable storage medium
CN121524308A