Iterative text refining method, system and equipment based on fidelity and medium

Through an iterative text refinement method, using a progressive denoising language model and a content fidelity assessment module, the problems of irreversibility and insufficient fidelity of generated text in existing technologies are solved, and high-quality, self-evaluated and iteratively optimized text generation is achieved.

CN120706380AActive Publication Date: 2025-09-26SHANDONG INSPUR SCI RES INST CO LTD

Patent Information

Application Number
CN202511195539.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-26
Publication Date
2025-09-26
Estimated Expiration
2045-08-26

AI Technical Summary

Technical Problem

When dealing with tasks with high structural and factual requirements, existing automatic text generation technologies have problems such as one-way generation irreversibility, insufficient fidelity, content illusion, difficulty in ensuring structure and conciseness, and lack of automated correction and refinement mechanisms, resulting in low quality of generated text.

Method used

A fidelity-based iterative text refinement method is adopted, using a pre-trained progressive denoising language model and a content fidelity assessment module. Through multiple iterative generation and evaluation, text fragments that lack source information support, have redundant content, or are logically incomplete are identified and corrected until the preset quality standards are met.

Benefits of technology

It significantly improves the fidelity, conciseness and coherence of the generated text, ensures that the output text is highly faithful to the source information, has a clear structure and is free of redundancy, provides a mechanism for self-assessment and iterative optimization, and improves the quality and reliability of the generated text.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120706380A_ABST
    Figure CN120706380A_ABST
Patent Text Reader

Abstract

The invention discloses a fidelity-based iterative text refining method, system and equipment and a medium, belongs to the technical field of natural language processing and artificial intelligence, and aims to solve the technical problem of how to overcome the limitation of unidirectional generation, realize self-evaluation and iterative optimization of a generated text, and improve the reliability of the text. According to the technical scheme, the method comprises the following steps: collecting a group of structured source information sets; a target text sequence is initialized, the length of the target text sequence is determined according to the estimated target text length, and the target text sequence is completely filled with special [MASK] lexical elements; entering an iterative refining cycle, and specifically, performing de-noising processing on a target text sequence by utilizing a pre-trained gradual de-noising language model to generate an intermediate version text; and evaluating fragments in the intermediate version text through a content fidelity evaluation module.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical fields of natural language processing (NLP) and artificial intelligence (AI), and in particular to a fidelity-based iterative text refinement method, system, device and medium. Background Art

[0002] Automatic text generation aims to extract the core content from structured or unstructured source information and generate a concise, coherent, and faithful text. This technology has important applications in scenarios such as legal document analysis, interpretation of government document debates, product review integration, and academic literature reviews. Currently, text generation technology based on large language models (LLMs) has made significant progress. However, existing technologies still face the following major challenges when handling tasks with extremely high structural and factual requirements: ① One-way generation and irreversibility: Most existing models use an autoregressive decoding strategy, generating text from left to right, word by word, all at once. This one-way model makes it difficult or even impossible to correct factual errors, logical deviations, or omissions of key information in the early stages of generation, leading to cumulative errors.

[0003] ② Insufficient fidelity and content hallucinations: Common generation strategies such as greedy decoding and beam search tend to select locally optimal, high-probability tokens. This can easily lead to the model generating content that appears fluent but does not conform to the source information, a phenomenon known as model hallucination. In many application scenarios, any deviation from the source information is unacceptable.

[0004] ③ Difficulty ensuring structure and conciseness: High-quality generated text requires not only accurate content but also clear structure and high conciseness (avoiding redundancy). Existing models lack effective mechanisms to control the redundancy of generated content, making it difficult to ensure that all key information is fully and non-repetitively covered.

[0005] ④ Lack of automated correction and refinement mechanisms: Once text is generated, existing technologies generally do not provide systematic, automated post-correction and refinement mechanisms. Any modification of the generated results relies heavily on manual intervention, which is costly and inefficient.

[0006] These issues severely restrict the reliability and usability of automated text generation technology in practical applications. Therefore, overcoming the limitations of one-way generation and enabling self-evaluation and iterative optimization of generated text to ensure the final output is highly faithful, concise, and coherent is a pressing technical challenge. Summary of the Invention

[0007] The technical task of the present invention is to provide a fidelity-based iterative text refinement method, system, device and medium to solve the problem of how to overcome the limitations of one-way generation, realize self-evaluation and iterative optimization of generated text, and thus ensure the high fidelity, conciseness and coherence of the final output.

[0008] The technical task of the present invention is achieved in the following manner: an iterative text refinement method based on fidelity, the method being specifically as follows: Collecting a set of structured source information; wherein the structured source information set includes at least one core idea and corresponding supporting materials; Initialize a target text sequence. The length of the target text sequence is determined according to the estimated target text length and is filled with special [MASK] tokens. Entering an iterative refinement loop, each iteration involves the following steps: Using a pre-trained progressive denoising language model, the target text sequence is denoised to generate a clearer intermediate version of the text; using a content fidelity assessment module to evaluate segments in the intermediate version of the text, identifying segments that lack source information support, have redundant content, or are logically incomplete; based on the evaluation results of the content fidelity assessment module, the identified segments that lack source information support, have redundant content, or are logically incomplete are selectively masked for reconstruction; The iterative generation process is repeated until the preset number of iterations is reached or the text quality meets the convergence condition, and the refined target text is obtained.

[0009] As a preference, the underlying architecture of the pre-trained progressive denoising language model is a Transformer-based model to capture long-range dependencies in text; The pre-trained progressive denoising language model is trained using a mask prediction objective function. During training, a portion of the input text tokens are randomly masked, replacing them with [MASK]. The progressive denoising language model is then required to predict and restore the masked tokens based on the unmasked context. The loss function uses negative log-likelihood, which is as follows: ; in, represents the denoising loss; represents the original clear training text; represents a set of randomly masked tokens; Indicates an uncovered lemma; represents the complement set; represents a subset; Represents the set of masked tokens; Indicates the uncovered context token; Represents a collection of source information; represents the probability distribution of masked words predicted by the progressive denoising language model; It is the mathematical expectation symbol, which means calculating the average value of all possible random masking situations; It means that by performing multiple different random masking operations on the same text and calculating the average loss in all cases, the progressive denoising language model is ensured to learn universal repair capabilities rather than memorizing specific masking patterns. By minimizing the loss function, the progressive denoising language model learns contextual understanding and content repair capabilities.

[0010] As a preference, the denoising process in the iterative refinement loop is a reverse evolutionary process. The goal of the denoising process is to input the current masked text sequence and the source information set as the guiding condition into the step-by-step denoising language model. The step-by-step denoising language model predicts the most appropriate word at the [MASK] position and optimizes the generated word to sample a clearer intermediate version of the text. , the formula is as follows: ; in, Represents the time step The text state is a partially clear and partially obscured text sequence; Represents a set of source information as a condition, guiding the step-by-step denoising language model to generate text consistent with the source information content; Indicates the total number of iteration steps; Represents the core content learned by the progressive denoising language model, namely Represents the learned back transfer kernel function. The back transfer kernel function is a probability distribution with ϕ as a parameter, which is used to predict the text with a current noise level higher than the set threshold. and source information collection Under the condition of , calculate all possible intermediate versions of text with noise level lower than the set threshold The probability of ; ∼ symbol means “sample from…”, that is, the generation process is probabilistic, from Randomly extract the most likely result from the defined probability distribution as the output of this denoising .

[0011] Preferably, the content fidelity assessment module is assessed by a supervised verification classifier and / or a logic reasoning module based on a large language model; Among them, the supervised verification classifier is used to determine whether the text segment to be evaluated is fully supported by the core ideas and supporting materials in the source information; The logical reasoning module based on a large language model uses guided reasoning to determine the support, redundancy or contradiction between text fragments and source information.

[0012] More optimally, the fidelity prediction formula for the supervised verification classifier is as follows: ; in, Representation fidelity; A text fragment representing an intermediate version of the text; Represents the source core idea associated with the text fragment of the intermediate version of the text; represents a collection of supporting materials associated with a text fragment of an intermediate version of the text; Indicates the source core idea that will be associated with the text fragment of the intermediate version text A collection of supporting material associated with the text fragments of the intermediate version text Spliced ​​into Input; Represents a pre-trained RoBERTa or similar architecture classifier, outputting a score between 0 and 1, indicating quilt the degree of fidelity supported; is a Sigmoid activation function, which is used to output a probability value representing the fidelity level, that is, to map any real number to the (0, 1) interval, thereby converting the output of the classifier into a probability value.

[0013] Preferably, when selectively masking for reconstruction, the fidelity score of each token output by the content fidelity assessment module is , the guided reconstruction controller determines the reconstruction area of ​​the next iteration, the fidelity score of a word The lower the probability, the more likely the corresponding word is wrong, unsupported or redundant, and the probability that the corresponding word is re-covered for reconstruction The higher the probability that the word is covered and reconstructed The formula is as follows: ; in, The symbol represents "proportional to", meaning that each word is masked to be reconstructed to reach the probability and Directly proportional relationship; It is the core item, ensuring that the lower the fidelity of the word, the easier it is to be selected for reconstruction; It is a small random perturbation term used to increase exploration and prevent the progressive denoising language model from falling into the local optimum; Indicates uniform distribution of sampling items to increase exploration diversity; Represents the balance factor.

[0014] More optimally, the guided reconstruction controller is based on the probability The worst-quality tokens are selected in a set proportion and restored to [MASK] tokens to form a new text sequence to be processed.

[0015] A fidelity-based iterative text refinement system, which is used to implement the fidelity-based iterative text refinement method described above; the system comprises: An information collection unit, configured to collect a set of structured source information; wherein the structured source information set includes at least one core idea and corresponding supporting materials; The text initialization unit is used to initialize a target text sequence. The length of the target text sequence is determined according to the estimated target text length and is filled with special [MASK] tokens. Iterative training unit, used to enter the iterative refinement cycle; A text acquisition unit is used to repeat the iterative generation process until a preset number of iterations is reached or the text quality meets the convergence condition, thereby obtaining the refined target text; The iterative training unit includes: The denoising module is used to denoise the target text sequence using a pre-trained step-by-step denoising language model to generate a clearer intermediate version of the text; A content fidelity assessment module is used to evaluate segments in the intermediate version of the text and identify segments that lack source information support, have redundant content, or are logically incomplete. The selective masking and pending reconstruction module is used to selectively mask and await reconstruction of the identified segments that lack source information support, have redundant content, or are logically incomplete based on the evaluation results of the content fidelity evaluation module.

[0016] An electronic device comprising: a memory and at least one processor; Wherein, the memory stores a computer program; The at least one processor executes the computer program stored in the memory, so that the at least one processor performs the above-mentioned fidelity-based iterative text refinement method.

[0017] A computer-readable storage medium stores a computer program, wherein the computer program can be executed by a processor to implement the above-mentioned fidelity-based iterative text refinement method.

[0018] The fidelity-based iterative text refinement method, system, device, and medium of the present invention have the following advantages: (1) The present invention uses a non-autoregressive stepwise denoising model as the generation basis, constructs text through a multi-step process, and introduces a core "content fidelity assessment module". The content fidelity assessment module actively evaluates the generated text fragments in each iteration, identifying content that is inconsistent with the source information, lacks supporting evidence, is redundant, or is incomplete. The assessment results are then used to guide a "selective reconstruction controller" to mark problematic text fragments and regenerate them in a targeted manner. Through the closed-loop iteration of "evaluation-reconstruction", the fidelity, conciseness, and overall quality of the generated text can be significantly improved, making it more accurate, reliable, and structured, solving the problem of low quality of automatically generated text (especially argument summaries) in the existing technology. (2) The core of this invention lies in the introduction of a "fidelity-guided refinement loop." Instead of a one-shot generation approach, the final text is gradually refined from a fuzzy, content-free state (a completely obscured sequence) through multiple iterations. Each iteration is guided by a dedicated "content fidelity assessment module," overcoming the limitations of one-way generation and enabling self-evaluation and iterative optimization of the generated text, thereby ensuring a highly faithful, concise, and coherent final output. (3) This invention uses a non-autoregressive step-by-step denoising language model as the generative backbone. Starting from a sequence completely covered by special "[MASK]" tokens, the model gradually predicts and replaces the masked tokens over multiple time steps until the complete text is generated. This iterative nature provides a natural window for modification and refinement during the generation process. (4) After each generation iteration, the content fidelity assessment module of the present invention conducts a comprehensive "physical examination" of the currently generated intermediate text. Its main task is to evaluate whether each segment in the text is truly supported by the input source information. The content fidelity assessment module aims to identify three types of problems: ① Unsupported content: certain statements in the text cannot be found in any direct or indirect basis in the source information; ② Content redundancy: the text contains repeated or highly semantically similar statements; ③ Incompleteness or logical discontinuity: the text fails to fully convey a key message, or the logical relationship between information is unclear; (5) The content fidelity assessment module of the present invention can be implemented using two complementary technologies: one is to train a classifier through supervised learning to directly determine the fidelity of text fragments; the other is to conduct a deeper logical and factual analysis of text fragments through the chain-of-thought reasoning capability of large language models; (6) The evaluation results of the content fidelity assessment module of the present invention will directly guide the next round of refinement. Based on the degree of problem of each word or text segment, a reconstruction probability is calculated. The lower the fidelity and the more problematic the segment, the higher the probability of being re-covered and awaiting the next round of regeneration. In this way, the model can focus its "attention" and computing resources on correcting the most flawed parts of the text, rather than blindly or randomly modifying them. (7) This invention transforms the text generation process from a linear, irreversible process into a dynamic, self-improving optimization process through a closed-loop iteration of "generate-evaluate-label-reconstruct." Each iteration improves the quality of the text, gradually eliminating insincere and redundant content and filling in missing key information, ultimately producing a text that meets high standards. (8) Compared with the existing technology, the present invention also has the following significant advantages: ① High fidelity: Through fidelity assessment and iterative correction, we effectively eliminate content illusions and ensure that every sentence in the text is rooted in the source information; ② High simplicity: The redundancy detection mechanism can identify and merge repeated information, making the text more concise; ③ Controllability and interpretability: The iterative process makes the path of text formation clearer, and the conclusions of the evaluation module also provide an interpretable basis for the quality of the text; ④ Structural integrity: Through comprehensive assessment, ensure that all key information is covered and the integrity of the content structure is maintained. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The present invention will be further described below with reference to the accompanying drawings.

[0020] Attachment Figure 1 The flowchart of the fidelity-based iterative text refinement method. DETAILED DESCRIPTION

[0021] The fidelity-based iterative text refinement method, system, device and medium of the present invention are described in detail below with reference to the accompanying drawings and specific embodiments.

[0022] Example 1: As shown in the attached Figure 1 As shown, this embodiment provides an iterative text refinement method based on fidelity, which is specifically as follows: S1. Collect a set of structured source information; wherein the structured source information set includes at least one core idea and corresponding supporting materials; S2. Initialize a target text sequence. The length of the target text sequence is determined according to the estimated target text length and is filled with special [MASK] tokens. S3, enter the iterative refining cycle, each iterative generation process is as follows: S301, using a pre-trained stepwise denoising language model to denoise the target text sequence and generate a clearer intermediate version of the text; S302: Evaluate the segments in the intermediate version text using a content fidelity assessment module to identify segments that lack source information support, have redundant content, or are logically incomplete. S303. Based on the evaluation results of the content fidelity evaluation module, the identified segments lacking source information support, having redundant content, or being logically incomplete are selectively masked for reconstruction; S4. Repeat the iterative generation process until the preset number of iterations is reached or the text quality meets the convergence condition, and obtain the refined target text.

[0023] The underlying architecture of the pre-trained progressive denoising language model in step S301 of this embodiment is a Transformer-based model, which is used to capture long-range dependencies in text; The pre-trained progressive denoising language model is trained using a mask prediction objective function. During training, a portion of the input text tokens are randomly masked, replacing them with [MASK]. The progressive denoising language model is then required to predict and restore the masked tokens based on the unmasked context. The loss function uses negative log-likelihood, which is as follows: ; in, represents the denoising loss; represents the original clear training text; represents a set of randomly masked tokens; Indicates an uncovered lemma; represents the complement set; represents a subset; Represents the set of masked tokens; Indicates the uncovered context token; Represents a collection of source information; represents the probability distribution of masked words predicted by the progressive denoising language model; It is the mathematical expectation symbol, which means calculating the average value of all possible random masking situations; It means that by performing multiple different random masking operations on the same text and calculating the average loss in all cases, the progressive denoising language model is ensured to learn universal repair capabilities rather than memorizing specific masking patterns. By minimizing the loss function, the progressive denoising language model learns contextual understanding and content repair capabilities.

[0024] The progressive denoising language model in this embodiment has a non-autoregressive property: it can predict and generate all word-units in a text sequence in parallel rather than generating them word by word, which makes it possible to modify and refine them at any position.

[0025] The denoising process in the iterative refinement loop in step S301 of this embodiment is a reverse evolution process. The goal of the denoising process is to input the current masked text sequence and the source information set as the guiding condition into the step-by-step denoising language model. The step-by-step denoising language model predicts the most appropriate word at the [MASK] position and optimizes the generated word to obtain a clearer intermediate version of the text. , the formula is as follows: ; in, Represents the time step The text state is a partially clear and partially obscured text sequence; Represents a set of source information as a condition, guiding the step-by-step denoising language model to generate text consistent with the source information content; Indicates the total number of iteration steps; Represents the core content learned by the progressive denoising language model, namely Represents the learned back transfer kernel function. The back transfer kernel function is a probability distribution with ϕ as a parameter, which is used to predict the text with a current noise level higher than the set threshold. and source information collection Under the condition of , calculate all possible intermediate versions of text with noise level lower than the set threshold The probability of ; ∼ symbol means “sample from…”, that is, the generation process is probabilistic, from Randomly extract the most likely result from the defined probability distribution as the output of this denoising .

[0026] The content fidelity assessment module in step S303 of this embodiment performs assessment through a supervised verification classifier and / or a logic reasoning module based on a large language model; Among them, the supervised verification classifier is used to determine whether the text segment to be evaluated is fully supported by the core ideas and supporting materials in the source information; The logical reasoning module based on the large language model uses guided reasoning to determine the support, redundancy, or contradiction between the text fragment and the source information. When using the logical reasoning module based on the large language model, a prompt is constructed, which is similar to: "Please determine whether the following text fragment Can it be considered by the following viewpoints and materials Completely, partially, or not at all supported? Please provide detailed reasoning. After the analysis, please provide a quantitative score in the following format: 'Fidelity score: [a number between 0.0 and 1.0]'. This prompt is then sent to a large language model (such as Deepseek) and parsed to return the conclusion, justification, and formatted fidelity score.

[0027] The fidelity prediction formula of the supervised verification classifier in this embodiment is as follows: ; in, Representation fidelity; A text fragment representing an intermediate version of the text; Represents the source core idea associated with the text fragment of the intermediate version of the text; represents a collection of supporting materials associated with a text fragment of an intermediate version of the text; Indicates the source core idea that will be associated with the text fragment of the intermediate version text A collection of supporting material associated with the text fragments of the intermediate version text Spliced ​​into Input; Represents a pre-trained RoBERTa or similar architecture classifier, outputting a score between 0 and 1, indicating quilt the degree of fidelity supported; is a Sigmoid activation function, which is used to output a probability value representing the fidelity level, that is, to map any real number to the (0, 1) interval, thereby converting the output of the classifier into a probability value.

[0028] In this embodiment, when selectively masking for reconstruction, the fidelity score of each token output by the content fidelity assessment module is , the guided reconstruction controller determines the reconstruction area of ​​the next iteration, the fidelity score of a word The lower the probability, the more likely the corresponding word is wrong, unsupported or redundant, and the probability that the corresponding word is re-covered for reconstruction The higher the probability that the word is covered and reconstructed The formula is as follows: ; The ∝ symbol indicates "proportional to", meaning that each word is masked to be reconstructed to reach the probability and Directly proportional relationship; It is the core item, ensuring that the lower the fidelity of the word, the easier it is to be selected for reconstruction; It is a small random perturbation term used to increase exploration and prevent the progressive denoising language model from falling into the local optimum; Indicates uniform distribution of sampling items to increase exploration diversity; Represents the balance factor.

[0029] The guided reconstruction controller in this embodiment is based on the probability The worst-quality tokens are selected in a set proportion and restored to [MASK] tokens to form a new text sequence to be processed.

[0030] A fidelity-based iterative text refinement system, which is used to implement the fidelity-based iterative text refinement method described above; the system comprises: An information collection unit, configured to collect a set of structured source information; wherein the structured source information set includes at least one core idea and corresponding supporting materials; The text initialization unit is used to initialize a target text sequence. The length of the target text sequence is determined according to the estimated target text length and is filled with special [MASK] tokens. Iterative training unit, used to enter the iterative refinement cycle; A text acquisition unit is used to repeat the iterative generation process until a preset number of iterations is reached or the text quality meets the convergence condition, thereby obtaining the refined target text; The iterative training unit includes: The denoising module is used to denoise the target text sequence using a pre-trained step-by-step denoising language model to generate a clearer intermediate version of the text; A content fidelity assessment module is used to evaluate segments in the intermediate version of the text and identify segments that lack source information support, have redundant content, or are logically incomplete. The selective masking and pending reconstruction module is used to selectively mask and await reconstruction of the identified segments that lack source information support, have redundant content, or are logically incomplete based on the evaluation results of the content fidelity evaluation module.

[0031] This embodiment aims to convert a set of structured source information, such as {(core idea 1, [supporting material 1A, supporting material 1B]), (core idea 2, [supporting material 2A])}, into a piece of high-quality text.

[0032] Step 1: Input and initialization: The system receives structured source information (set) provided by the user ;in, It is A core idea, is a collection of materials that support this viewpoint. At the same time, the system initializes a target text sequence The length of this sequence is determined by the estimated target text length and is filled entirely with special [MASK] tokens. Here represents the total number of iterations.

[0033] Step 2: Enter the iterative refining cycle: the system starts a arrive At each iteration step , do the following: (1) Stepwise denoising generation: This step is performed by a pre-trained stepwise denoising language model. This model does not refer to a specific commercially available model, but rather a class of deep learning models built on specific principles. Its core features are: ① Model architecture: Its underlying architecture is usually a Transformer-based model, similar to BERT or GPT, to effectively capture long-distance dependencies in text.

[0034] ② Training Objective: Unlike traditional language models, its training objective is not to predict the next word, but to learn to "denoise" or "repair" a partially damaged or obscured text. Specifically, it is trained using a mask prediction objective function. During training, the system randomly masks a portion of the input text tokens, replacing them with [MASK], and then requires the model to predict and restore these masked original tokens based on the unmasked context. Its loss function usually uses negative log-likelihood, which is as follows: ; in, represents the denoising loss; represents the original clear training text; represents a set of randomly masked tokens; Indicates an uncovered lemma; represents the complement set; represents a subset; Represents the set of masked tokens; Indicates the uncovered context token; Represents a collection of source information; represents the probability distribution of masked words predicted by the progressive denoising language model; It is the mathematical expectation symbol, which means calculating the average value of all possible random masking situations; It means that by performing multiple different random masking operations on the same text and calculating the average loss in all cases, the progressive denoising language model is ensured to learn universal repair capabilities rather than memorizing specific masking patterns. By minimizing the loss function, the progressive denoising language model learns contextual understanding and content repair capabilities.

[0035] ③ Non-autoregressive feature: It can predict and generate all the tokens in the text sequence in parallel, rather than generating them word by word, which makes it possible to modify and refine them at any position.

[0036] In the specific implementation, the system will be the current text sequence with the mask And the source information data as the guiding condition The model predicts the most appropriate token at the [MASK] position and optimizes the generated tokens to output a slightly clearer version of the text. This process can be formally described as sampling from a learned back-evolving distribution: ; in, Indicates that at time step , which is a partially clear and partially obscured sequence. Represents a set of source information as a condition, guiding the model to generate text consistent with the source information content throughout the process. The core capability learned by the model, namely the "backward transfer kernel function", is a probability distribution with ϕ as a parameter. Its function is: given the current text with a high noise level and source information collection Under the condition of The ∼ symbol means “sampled from”, which means that the generation process is probabilistic and the system is Randomly extract the most likely result from the defined probability distribution as the output of this denoising .

[0037] In the initial step ( ), since the entire sequence is [MASK], the model will be completely based on the source information set Generate a first draft of the text.

[0038] (2) Content Fidelity Assessment Module: Generated Intermediate Text The content is immediately sent to the content fidelity assessment module for evaluation. The content fidelity assessment evaluates each sentence or meaningful text fragment in the text. Conduct analysis.

[0039] If a supervised verification classifier is used: for the segment , the system will find its most relevant source core opinion and support materials Then, concatenate them into one input , fed into a pre-trained RoBERTa or similar architecture classifier Classifier A score between 0 and 1 will be output, indicating the fragment quilt The degree of fidelity supported. The calculation formula is: ; in, is the Sigmoid activation function, which maps any real number to the (0, 1) interval, thereby converting the output of the classifier into a probability value.

[0040] If the LLM logical reasoning module is used: the system will construct a prompt similar to: "Please judge the following text fragment Can it be considered by the following viewpoints and materials Completely, partially, or not at all supported? Please provide detailed reasoning. After the analysis, please provide a quantitative score in the following format: 'Fidelity score: [a number between 0.0 and 1.0]'. This prompt is then sent to a large language model (such as Deepseek) and parsed to return the conclusion, justification, and formatted fidelity score.

[0041] Combined mode: The system can combine the above two methods to obtain more robust evaluation results.

[0042] (3) Guided selective reconstruction: The content fidelity assessment module is used to evaluate the content of each word w in the text. j A fidelity score is generated ∈[0,1]. The guided reconstruction controller determines the reconstruction area for the next iteration based on these scores. The lower the probability, the more likely it is to be wrong, unsupported, or redundant, and therefore the probability that it will be re-covered for reconstruction. The probability can be calculated as follows: ; in, The symbol stands for “proportional to”, meaning that the reconstructed probability is proportional to the expression on the right. It is the core item, ensuring that low-scoring words are selected with high probability. is a small random perturbation term used to increase exploration and prevent the model from falling into local optimality. Based on this probability distribution, the controller selects a certain proportion (e.g. 20%) of the "worst quality" tokens and restores them to [MASK] tokens to form a new sequence to be processed. .

[0043] Step 3: Loop and Output: The system returns to step 2 and uses the new, selectively reconstructed sequence The next round of the "Generate-Evaluate-Mark-Reconstruct" cycle begins. This process is repeated continuously, and each iteration refines the previous one and gradually fixes the defects in the text. When the number of cycles reaches the preset value, The loop terminates when the number of iterations (e.g., 10) or the text quality (assessed by the average score of the evaluation module) stabilizes and no longer improves.

[0044] At this point, the system outputs the final text version ,This version is the result of multiple rounds of iterative optimization, and has a high degree of fidelity, simplicity and coherence.

[0045] Through the above implementation, the present invention transforms the original black box, one-time text generation process into a transparent, controllable, iterative and refined engineering process, thereby fundamentally improving the quality of automatically generated text.

[0046] Embodiment 2: This embodiment also provides an electronic device, including: a memory and a processor; wherein the memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the processor performs the fidelity-based iterative text refinement method in any embodiment of the present invention.

[0047] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The processor may be a microprocessor or any conventional processor, etc.

[0048] The memory can be used to store computer programs and / or modules. The processor implements various functions of the electronic device by running or executing the computer programs and / or modules stored in the memory and accessing the data stored in the memory. The memory can mainly include a program storage area and a data storage area. The program storage area can store the operating system and at least one application required for the function; the data storage area can store data generated based on the use of the terminal. In addition, the memory can also include high-speed random access memory and non-volatile memory, such as a hard disk, internal memory, a plug-in hard disk, a smart card (SMC), a secure digital (SD) card, a flash memory card, at least one disk storage device, a flash memory device, or other volatile solid-state memory devices.

[0049] Embodiment 3: This embodiment further provides a computer-readable storage medium storing a plurality of instructions. The instructions are loaded by a processor, causing the processor to execute the fidelity-based iterative text refinement method according to any embodiment of the present invention. Specifically, a system or device equipped with a storage medium can be provided. The storage medium stores software program code that implements the functions of any of the above embodiments, and the computer (or CPU or MPU) of the system or device can read and execute the program code stored in the storage medium.

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

[0051] Examples of storage media for providing program code include floppy disks, hard disks, magneto-optical disks, optical disks (e.g., CD-ROMs, CD-Rs, CD-RWs, DVD-ROMs, DVD-RWs, DVD+RWs), magnetic tapes, non-volatile memory cards, and ROMs. Alternatively, the program code may be downloaded from a server computer via a communications network.

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

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

[0054] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A fidelity-based iterative text refinement method, characterized in that: The method is as follows: Collecting a set of structured source information; wherein the structured source information set includes at least one core idea and corresponding supporting materials; Initialize a target text sequence. The length of the target text sequence is determined according to the estimated target text length and is filled with special [MASK] tokens. Entering an iterative refinement loop, each iteration involves the following steps: Using a pre-trained progressive denoising language model, the target text sequence is denoised to generate an intermediate version of the text; using a content fidelity assessment module to evaluate segments in the intermediate version of the text, identifying segments lacking source information support, redundant content, or logically incomplete; based on the evaluation results of the content fidelity assessment module, the identified segments lacking source information support, redundant content, or logically incomplete are selectively masked for reconstruction; The iterative generation process is repeated until the preset number of iterations is reached or the text quality meets the convergence condition, and the refined target text is obtained.

2. The fidelity-based iterative text refinement method according to claim 1, characterized in that: The underlying architecture of the pre-trained progressive denoising language model is a Transformer-based model, which is used to capture long-range dependencies in text; The pre-trained progressive denoising language model is trained using a mask prediction objective function. During training, a portion of the input text tokens are randomly masked, that is, replaced with [MASK]. The progressive denoising language model is then required to predict and restore the masked original tokens based on the unmasked context. The loss function uses negative log-likelihood, which is as follows: ; in, represents the denoising loss; represents the original clear training text; represents a set of randomly masked tokens; Indicates an uncovered lemma; represents the complement set; represents a subset; Represents the set of covered tokens; Indicates the uncovered context token; Represents a collection of source information; represents the probability distribution of masked words predicted by the progressive denoising language model; It is the mathematical expectation symbol, which means calculating the average value of all possible random masking situations; It means that by performing multiple different random masking operations on the same text and calculating the average loss in all cases, the progressive denoising language model is ensured to learn universal repair capabilities rather than memorizing specific masking patterns. By minimizing the loss function, the progressive denoising language model learns contextual understanding and content repair capabilities.

3. The fidelity-based iterative text refinement method according to claim 1, characterized in that: The denoising process in the iterative refinement cycle is a reverse evolution process. The goal of the denoising process is to input the current masked text sequence and the source information set as the guiding condition into the step-by-step denoising language model. The step-by-step denoising language model predicts the most appropriate word at the [MASK] position and optimizes the generated word to obtain an intermediate version of the text. , the formula is as follows: ; in, Represents the time step The text state is a partially clear and partially obscured text sequence; Represents a set of source information as a condition, guiding the step-by-step denoising language model to generate text consistent with the source information content; Indicates the total number of iteration steps; Represents the core content learned by the progressive denoising language model, namely Represents the learned back transfer kernel function. The back transfer kernel function is a probability distribution with ϕ as a parameter, which is used to predict the text with a current noise level higher than the set threshold. and source information collection Under the condition of , calculate all possible intermediate versions of text with noise level lower than the set threshold The probability of ; ∼ symbol means "sampling from...", that is, the generation process is probabilistic, from Randomly extract the most likely result from the defined probability distribution as the output of this denoising .

4. The fidelity-based iterative text refinement method according to claim 1, characterized in that: The content fidelity assessment module is evaluated through a supervised verification classifier and / or a logical reasoning module based on a large language model; Among them, the supervised verification classifier is used to determine whether the text segment to be evaluated is fully supported by the core ideas and supporting materials in the source information; The logical reasoning module based on a large language model uses guided reasoning to determine the support, redundancy or contradiction between text fragments and source information.

5. The fidelity-based iterative text refinement method according to claim 4, characterized in that: The fidelity prediction formula for the supervised verification classifier is as follows: ; in, Representation fidelity; A text fragment representing an intermediate version of the text; Represents the source core idea associated with the text fragment of the intermediate version of the text; represents a collection of supporting materials associated with a text fragment of an intermediate version of the text; Indicates the source core idea that will be associated with the text fragment of the intermediate version text A collection of supporting material associated with the text fragments of the intermediate version text Spliced ​​into Input; Represents a pre-trained RoBERTa or similar architecture classifier, outputting a score between 0 and 1, indicating quilt the degree of fidelity supported; is a Sigmoid activation function, which is used to output a probability value representing the fidelity level, that is, to map any real number to the (0, 1) interval, thereby converting the output of the classifier into a probability value.

6. The fidelity-based iterative text refinement method according to claim 1, characterized in that: When selectively masking for reconstruction, the fidelity score of each word output by the content fidelity assessment module , the guided reconstruction controller determines the reconstruction area of ​​the next iteration, the fidelity score of a word The lower the probability, the more likely the corresponding word is wrong, unsupported or redundant, and the probability that the corresponding word is re-covered for reconstruction The higher the probability that the word is covered and reconstructed The formula is as follows: ; in, The symbol represents "proportional to", meaning that each word is masked to be reconstructed to reach the probability and Directly proportional relationship; It is the core item, ensuring that the lower the fidelity of the word, the easier it is to be selected for reconstruction; It is a small random perturbation term used to increase exploration and prevent the progressive denoising language model from falling into the local optimum; Indicates uniform distribution of sampling items to increase exploration diversity; Represents the balance factor.

7. The fidelity-based iterative text refinement method according to claim 6, characterized in that: The guided reconstruction controller is based on the probability The worst-quality tokens are selected in a set proportion and restored to [MASK] tokens to form a new text sequence to be processed.

8. A fidelity-based iterative text refinement system, characterized in that The system is used to implement the fidelity-based iterative text refinement method according to any one of claims 1 to 7; the system comprises: An information collection unit, configured to collect a set of structured source information; wherein the structured source information set includes at least one core idea and corresponding supporting materials; The text initialization unit is used to initialize a target text sequence. The length of the target text sequence is determined according to the estimated target text length and is filled with special [MASK] tokens. Iterative training unit, used to enter the iterative refinement cycle; A text acquisition unit is used to repeat the iterative generation process until a preset number of iterations is reached or the text quality meets the convergence condition, thereby obtaining the refined target text; The iterative training unit includes: The denoising module is used to denoise the target text sequence using a pre-trained step-by-step denoising language model to generate a clearer intermediate version of the text; A content fidelity assessment module is used to evaluate segments in the intermediate version of the text and identify segments that lack source information support, have redundant content, or are logically incomplete. The selective masking and pending reconstruction module is used to selectively mask and await reconstruction of the identified segments that lack source information support, have redundant content, or are logically incomplete based on the evaluation results of the content fidelity evaluation module.

9. An electronic device, characterized in that: include: memory and at least one processor; Wherein, the memory stores a computer program; The at least one processor executes the computer program stored in the memory, so that the at least one processor performs the fidelity-based iterative text refinement method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which can be executed by a processor to implement the fidelity-based iterative text refinement method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Text keyword desensitization method, system and equipment based on large model and medium

    CN119622809A

  • Text generation method and system and model training method and system

    CN120104737A

  • Improvements in retrieval-enhanced generation for large language models

    DE202025101876U1

  • Interactive semantic document mapping and navigation with meaning-based features

    US20240338393A1

  • Text generation method, method for training text generation model, and related device

    WO2025139386A1

Cited By

  • Text outline automatic generation method and system based on artificial intelligence

    CN121833945A

  • An artificial intelligence-based text outline automatic generation method and system

    CN121833945B