Translation quality optimization method and system based on discourse structure diagram and double-loop evolution

By constructing a discourse structure diagram and a dynamic terminology database, combined with a two-loop evolutionary approach, the problems of discourse context consistency and fine-grained quality assessment in high-value scenarios of online translation technology were solved. This achieved cost-optimized translation quality optimization and real-time updating of terminology knowledge, thereby improving translation quality and consistency.

CN123180184APending Publication Date: 2026-11-27INSPUR GENERSOFT CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611512281.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-28
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

Existing online translation technologies struggle to balance textual context consistency, fine-grained quality assessment, risk quantification decision-making, and knowledge update efficiency in high-value scenarios, resulting in low translation quality and high costs for manual intervention.

Method used

We employ a translation quality optimization method based on discourse structure diagrams and dual-loop evolution. By constructing discourse structure diagrams and dynamic terminology databases, we perform restricted terminology decoding and dual-loop evolution to achieve fine-grained defect localization and cost-optimal intervention decisions. We also combine fast and slow loops to update terminology knowledge in real time.

Benefits of technology

It significantly improves translation quality and consistency, achieves cost-optimal intervention decisions and real-time updates of terminology knowledge, and reduces the cost of manual intervention and process knowledge loss.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123180184A_ABST
    Figure CN123180184A_ABST
Patent Text Reader

Abstract

The disclosure provides a translation quality optimization method and system based on a chapter structure diagram and double-loop evolution, relates to the technical field of computer technology and natural language processing, and comprises the following steps: obtaining an original translation source document, performing chapter structure analysis, and constructing a chapter structure diagram; taking a clause as a translation unit, injecting a term constraint into a decoding process to generate an initial translation; inputting the initial translation into a double-flow cross-attention defect labeling model to obtain a defect type; weighting risk elements of the initial translation; performing a routing decision on a defect segment based on a quantitative comparison of risk weighting expected loss and intervention cost, encapsulating the defect segment as a micro task for distribution and repair to generate a structured editing operation sequence; performing double-loop evolution on the editing operation sequence by a constraint layer fast loop and a parameter layer slow loop; and propagating updated term corrections back to the initial translation based on the chapter structure diagram. The disclosure improves the quality, consistency and resource utilization efficiency of online translation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the fields of computer technology and natural language processing technology, specifically to a translation quality optimization method and system based on discourse structure diagrams and two-loop evolution. Background Technology

[0002] The statements in this section are merely background information relating to this disclosure and do not necessarily constitute prior art.

[0003] Online translation services have become an indispensable tool for cross-language communication. In high-value scenarios such as contract management, legal documents, and technical documents, a single mistranslation of terminology, an error in a monetary figure, or a deviation in the modality of obligation (such as mistranslating "shall" as "may") can alter the legal validity or commercial consequences of a document.

[0004] Existing online translation technologies primarily rely on rule-based machine translation, statistical machine translation, or neural machine translation, which can process large amounts of text quickly, but struggle to meet the stringent requirements of quality, consistency, and reliability in these scenarios. Furthermore, existing online translation technologies still have the following limitations: (1) Discourse context fragmentation and terminology inconsistency: Mainstream neural translation models take sentences as translation units, with limited attention windows (mostly ≤512 tokens), making it impossible to model the relationship between "preceding definition clauses and subsequent reference clauses" in long documents such as contracts; lacking discourse-level constraint mechanisms, the translation of the same term in the same document drifts with the context, resulting in inconsistency; (2) The quality assessment is coarse and uninterpretable: Existing quality assessments mostly output single confidence scores (or BLEU-type indicators) at the sentence or document level, which cannot locate the specific word positions where defects occur, nor can they distinguish between defect types and business risk levels. "Mistranslation of monetary figures" and "redundant modifiers" cannot be distinguished in a single score, which means that manual review can only be carried out in the whole document, resulting in high intervention costs. (3) The routing decision lacks unified quantification of risk and cost: The existing mechanism of "confidence threshold triggering manual review" relies on manually set static thresholds. The business risks of defects (the consequences of mistranslation of contract amount and redundancy of modifiers are completely different) and the time delay and manpower cost of manual intervention are not included in the decision-making framework, and cannot answer the question of "whether this defect is worth investing in manual repair". (4) The learning loop is single and slow to take effect: existing feedback learning is mostly a single loop of "accumulating corpus - periodically fine-tuning parameters". Deterministic knowledge such as term correction must wait for parameter updates (usually in days) to take effect; direct fine-tuning is also prone to catastrophic forgetting and damages baseline domain performance. (5) Loss of procedural knowledge in manual repair: Existing human-machine collaborative systems only retain the final text after manual repair. The repair process (where it was changed, how it was changed, and how the terminology was mapped) is discarded as procedural knowledge, which cannot support the real-time update of terminology constraints, the construction of high-quality comparative training samples, and the propagation of full-text terminology consistency. Summary of the Invention

[0005] To address the aforementioned issues, this disclosure proposes a translation quality optimization method and system based on discourse structure diagrams and dual-loop evolution. It constructs a closed-loop architecture of "structure perception—fine-grained localization—expected loss decision—minimum intervention—dual-loop evolution—consistency rewrite," precisely allocating human intervention resources to the smallest defective segment with the highest return. Knowledge is also accumulated through both constraint updates and parameter updates, significantly improving the quality, consistency, and resource utilization efficiency of online translation.

[0006] According to some embodiments, the present disclosure adopts the following technical solutions: Translation quality optimization methods based on discourse structure diagrams and two-loop evolution include: Obtain the original source document to be translated, perform text structure analysis on the source document, construct a text structure diagram, and initialize a dynamic terminology database; Using clauses as translation units, the term constraints of the dynamic terminology database are injected into the decoding process to perform restricted term decoding and generate the initial translation; The initial translation is input into the dual-stream cross-attention defect labeling model, and the defect type is output; at the same time, the initial translation is weighted by risk factors. Based on a quantitative comparison of risk-weighted expected loss and intervention cost, a routing decision is made on the handling method of defective segments. The defective segments are encapsulated into micro-tasks for distribution and repair, and a structured editing operation sequence is generated through consistency arbitration. The edit operation sequence is routed by type to the fast loop of the constraint layer and the slow loop of the parameter layer for dual-loop evolution, and constraint updates and parameter updates are performed. The updated terminology corrections are propagated back to the initial translation based on the discourse structure diagram, resulting in the final translation.

[0007] As one embodiment, the steps of obtaining the original source document to be translated, parsing the document's text structure, constructing a text structure diagram, and initializing a dynamic terminology database include: Receive source documents submitted by users, including the text to be translated, the target language, domain tags, and business scenario parameters; A hybrid approach combining rule templates and sequence labeling is employed. The rule templates match chapter / clause / sub-clause numbering patterns. For unnumbered text, a pre-trained sequence labeling model is used to identify chapter functional units. The results from both approaches are then fused to construct a hierarchical tree. Using clauses as nodes, a dependency parsing and coreference resolution model is used to extract three types of edges: referential edges, reference edges, and definition edges. Extract candidate terms from the source document, query the domain terminology knowledge base, and initialize it.

[0008] As one embodiment, the step of using clauses as translation units, injecting term constraints from a dynamic terminology database into the decoding process for restricted term decoding, and generating an initial translation includes: Using clauses as translation units, the term constraints of the dynamic terminology database are injected into the decoding process in the form of logarithmic biases for restricted term decoding; When translating a clause, the term selections already determined in its ancestor nodes and referenced nodes on the discourse structure graph are written into the constraint set. At the same time, the term selections determined in the translated clauses are propagated to subsequent clauses as context constraints. The initial translation is generated by the domain label intelligent selection engine.

[0009] As one embodiment, the initial translation is input into a two-stream cross-attention defect annotation model, which outputs defect types. Simultaneously, the initial translation is weighted by risk factors. The two-stream cross-attention defect annotation model includes a pre-trained multilingual encoder, a cross-attention layer, a feature fusion layer, a defect classification layer, and BiGRU. The model outputs word-level defect types, including omissions, mistranslations of terms, errors in numbers / dates, duty-modal shifts, inconsistencies in referencing, semantic additions, sentence redundancy, and format loss.

[0010] As one embodiment, the shared parameter copies of the pre-trained multilingual encoder encode the source text and the initial translation respectively. The translation stream of the cross-attention layer performs cross-attention on the source text stream and then performs feature fusion. The defect type probability is output by the defect classification layer to obtain the defect type. The defect type of the previous lexical is used as the embedding input BiGRU to model the sequence correlation between defects. Using a domain-specific NER model and rule-based regularization, high-risk elements in the translation are identified, risk element types are output and weighted according to business risk levels, and the translated terms covered by the risk elements inherit the weights.

[0011] As one example, the routing decision for handling defective segments based on a quantitative comparison of risk-weighted expected loss and intervention cost includes: Instead of a single confidence score, risk-weighted expected loss is used to calculate the expected quality loss in the direct delivery scenario. This loss is then quantitatively compared with the time and manpower costs of manual intervention. Based on the principle of minimizing the total expected cost, the system automatically makes decisions among four handling methods: direct delivery, delivery with alerts, fragment-level manual repair, and full-text manual translation.

[0012] As one embodiment, defective fragments are encapsulated into microtasks for distribution and repair, and a structured editing operation sequence is generated through consistency arbitration, including: When the decision is to manually repair at the fragment level, the defect fragment is encapsulated into a micro-task containing the defect type, a set of machine-constrained candidate corrections, and contextual constraints. This micro-task is then distributed to two translators who are matched in three dimensions based on domain skills, historical reputation, and task efficiency for independent repair back-to-back. After automatic adjudication by the consistency arbitration module, the manual repair process is recorded as a structured editing operation sequence. The editing operation sequence includes defect fragment location information, operation type, replacement content, and terminology mapping changes.

[0013] As one embodiment, the step of routing the editing operation sequence by type to a fast loop in the constraint layer and a slow loop in the parameter layer for dual-loop evolution, performing constraint updates and parameter updates; and propagating the updated terminology corrections back to the initial translation based on the discourse structure diagram, including: The terminology mapping editing operation is routed to the fast loop, and the dynamic terminology base and restricted decoding constraints are updated in minutes, so that new terms take effect immediately in subsequent translation requests; Editing operations related to grammar, sentence structure, and fluency are routed to slow loops and converted into comparative training samples. A course learning strategy based on defect type is used to incrementally train the domain LoRA adapter. The adapter is then fused with the base model through a gating mechanism, and KL anchored loss and experience replay are used to suppress catastrophic forgetting. Based on the text structure diagram, terminology-based corrections are automatically propagated to all occurrences of the same term throughout the entire text.

[0014] According to some embodiments, the present disclosure adopts the following technical solutions: A translation quality optimization system based on discourse structure diagrams and two-loop evolution includes: The user interface module is used to obtain the original source document to be translated. The document structure parsing module is used to parse the document structure, construct a document structure diagram, and initialize a dynamic terminology database. The machine translation module is used to decode terms with clauses as translation units, injecting term constraints from a dynamic terminology database into the decoding process to perform restricted term decoding and generate an initial translation. The multi-granularity quality assessment module is used to input the initial translation into the dual-stream cross-attention defect labeling model and output the defect type; at the same time, it applies risk factor weighting to the initial translation. The expected loss routing decision module is used to make routing decisions on the handling of defective segments based on a quantitative comparison of risk-weighted expected loss and intervention costs. The microtask encapsulation and translator matching module is used to encapsulate defective segments into microtasks for distribution and repair. The consistency arbitration module is used to generate a structured sequence of editing operations for consistency arbitration. The dual-loop evolution engine module is used to route the edit operation sequence according to type to the fast loop of the constraint layer and the slow loop of the parameter layer for dual-loop evolution, and to perform constraint update and parameter update. The consistency propagation and write-back verification module is used to propagate the updated terminology corrections back to the initial translation based on the discourse structure diagram, so as to obtain the final translation.

[0015] According to some embodiments, the present disclosure adopts the following technical solutions: An electronic device includes a processor, a memory, and a computer program; wherein the processor is connected to the memory, the computer program is stored in the memory, and when the electronic device is running, the processor executes the computer program stored in the memory to enable the electronic device to implement the translation quality optimization method based on discourse structure diagrams and two-loop evolution.

[0016] Compared with the prior art, the beneficial effects of this disclosure are as follows: This disclosed translation quality optimization method based on discourse structure diagrams and two-loop evolution breaks through the discourse context bottleneck: by constructing a discourse structure diagram composed of clause structure tree and reference graph, and performing translation with restricted terminology decoding, the clause hierarchy, reference, and terminology definition relationship of long documents are explicitly modeled into the translation process, thereby eliminating terminology inconsistency and contextual fragmentation from a mechanism perspective.

[0017] This disclosed translation quality optimization method based on discourse structure diagrams and dual-loop evolution achieves fine-grained quality perception: replacing a single confidence score with nine types of defect profiles at the word level and risk factor weighting, so that the system not only knows "how bad the overall translation is", but also "which word is bad, what type of defect it belongs to, and what level of business risk it corresponds to".

[0018] This disclosed translation quality optimization method based on discourse structure diagrams and two-loop evolution achieves cost-optimal intervention decisions: it unifies the quantitative comparison of quality loss and intervention costs using the expected loss minimization framework, so that limited human resources are precisely allocated to defective segments where "the repair benefits outweigh the intervention costs", rather than "cutting off" according to a static threshold.

[0019] The translation quality optimization method disclosed herein, based on discourse structure diagrams and dual-loop evolution, achieves dual-speed evolution without forgetting: through the dual-loop design of fast loop (constraint layer, effective in minutes) and slow loop (parameter layer, effective in days / weeks), terminology knowledge takes effect immediately and language ability is continuously enhanced, while KL anchoring and experience playback ensure that baseline domain performance does not degrade.

[0020] This disclosed translation quality optimization method based on discourse structure diagrams and two-loop evolution achieves full accumulation and reuse of intervention knowledge: it structures the manual repair process into an editing operation sequence, while simultaneously serving the real-time updating of terminology constraints, the construction of comparative training samples, and the propagation of full-text consistency, thus maximizing the value of a single manual intervention. Attached Figure Description

[0021] The accompanying drawings, which form part of this disclosure, are used to provide a further understanding of this disclosure. The illustrative embodiments of this disclosure and their descriptions are used to explain this disclosure and do not constitute an undue limitation of this disclosure.

[0022] Figure 1 This is the architecture diagram of the translation quality optimization system based on discourse structure diagram and two-loop evolution disclosed in this paper; Figure 2 This is a flowchart of a translation quality optimization method based on discourse structure diagrams and dual-loop evolution, according to an embodiment of this disclosure. Detailed Implementation

[0023] The present disclosure will be further described below with reference to the accompanying drawings and embodiments.

[0024] It should be noted that the following detailed descriptions are illustrative and intended to provide further explanation of this disclosure. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this disclosure pertains.

[0025] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the exemplary embodiments according to this disclosure. As used herein, the singular form is intended to include the plural form as well, unless the context clearly indicates otherwise. Furthermore, it should be understood that when the terms “comprising” and / or “including” are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.

[0026] Example 1 One embodiment of this disclosure provides a translation quality optimization method based on discourse structure graphs and two-loop evolution, the method steps of which include: Step 1: Obtain the original source document to be translated, perform text structure analysis on the source document, construct a text structure diagram, and initialize a dynamic terminology database; Step 2: Using clauses as translation units, inject term constraints from the dynamic terminology database into the decoding process to perform restricted term decoding and generate the initial translation; Step 3: Input the initial translation into the dual-stream cross-attention defect labeling model and output the defect type; at the same time, apply risk factor weighting to the initial translation; Step 4: Based on a quantitative comparison of risk-weighted expected loss and intervention cost, make routing decisions on defect fragment handling methods, encapsulate defect fragments into micro-tasks for distribution and repair, and generate a structured editing operation sequence through consistency arbitration; Step 5: Route the edit operation sequence by type to the fast loop of the constraint layer and the slow loop of the parameter layer for dual-loop evolution, and perform constraint update and parameter update; Step Six: Based on the discourse structure diagram, propagate the updated terminology corrections back to the initial translation to obtain the final translation.

[0027] As one embodiment, the translation quality optimization method based on discourse structure diagrams and dual-loop evolution disclosed herein constructs a six-loop intelligent closed-loop system of "perception—localization—decision—intervention—evolution—writeback": discourse structure perception (constructing discourse structure diagrams and dynamic terminology databases), fine-grained localization (lexical-level defect profiling and risk profiling), expected loss decision (cost-optimal routing), minimal intervention (micro-task-based human-machine collaboration and consistency arbitration), dual-loop evolution (constraint-level fast loop and parameter-level slow loop), and consistency writeback (full-text terminology propagation and delivery verification). Each loop outputs structured data available for consumption by the next loop—discourse structure diagram, defect profiling, routing decisions, editing operation sequences, constraint / parameter updates, and writeback results. Specific details are as follows: Step 1: Obtain the original source document to be translated, perform text structure analysis on the source document, construct a text structure diagram and initialize a dynamic terminology database; Specifically, the user interface module receives the text to be translated, target language, domain tags (such as "law" and "medical"), and business scenario parameters (delivery time limit level and quality requirement level) submitted by the user. The user interface module ultimately returns the translation, a word-level quality profile report, a bilingual glossary and consistency verification report to the user, and provides a micro-task arbitration interface and a dual-loop evolution status viewing interface.

[0028] Furthermore, the source document undergoes document-level structural parsing, outputting a document structure graph G=(V, E) and an initial dynamic terminology database T0, providing a structural foundation for restricted terminology decoding, consistency propagation, and write-back verification; where V is the set of clause nodes, E is the set of edges (referencing edges, referencing edges, defining edges), and the nodes are labeled with document roles (titles, defining clauses, obligatory clauses, breach of contract clauses, etc.), including: (1) Construction of the clause structure tree: The "rule template + sequence labeling" hybrid method is adopted - the rule template matches the chapter / clause / sub-clause numbering pattern (such as "Article X" "Clause XY", English "Article X" "Clause (y)"); for unnumbered text, the pre-trained sequence labeling model (BERT+CRF) is used to identify the chapter functional units; the two are integrated to form the hierarchical tree Tree(D); (2) Construction of reference graph: Using clauses as nodes, three types of edges are extracted using dependency parsing and coreference resolution model: reference edge (pronoun → antecedent), reference edge ("the term mentioned in Article X above" → the cited clause node), definition edge (definition clause → the first occurrence position of the defined term). (3) Initialization of dynamic terminology database: Candidate terms are extracted from the source documents and ranked by TF-IDF × domain dictionary filtering × structural weighting (candidate weight appearing in the definition clause × 3). The domain terminology knowledge base is queried to obtain the initial mapping. Candidates without mapping are marked as "pending terms" and left to be determined by manual process.

[0029] Output example: Node v37 (Article 8.2 Obligation Clause) in the chapter structure diagram has a reference edge pointing to node v12 (Article 1 Definition Clause "Confidential Information").

[0030] As one example, the user interface can be a web page, a mobile app interface, or an API interface.

[0031] Step 2: Using clauses as translation units, inject the term constraints from the dynamic terminology database into the decoding process to perform restricted term decoding and generate the initial translation; Specifically, the initial translation is generated using clauses as translation units. During the decoding process, terminology constraints are enforced, and contextual constraints are propagated along the discourse structure diagram, including: (1) Restricted term decoding: Let the source text of the current clause be x=(x1,…,xm), and the set of legal target terms for the source term s in the dynamic term library be A(s). A logit bias is applied to the vocabulary during decoding: p′(yt=w | y <t, x) ∝ p(yt=w | y<t, x) · exp(λ·1[w∈A(sj)]) Where sj is the source term located at the current decoding position by the attention alignment matrix, λ∈[3,8] is the constraint strength, and 1[·] is the indicator function; when aligned to "undetermined term", λ takes the upper limit and the position is marked as a high uncertainty segment for subsequent defect profiling and key detection. The above formula ensures that the term constraint is executed during the decoding stage, rather than a mechanical replacement after translation, thus avoiding the replacement operation from destroying the syntactic structure; (2) Context constraint propagation: When translating clause v, the terms already determined in its ancestor nodes and referenced nodes on the discourse structure graph are written into the constraint set C(v) (discourse context cache) to ensure that the terms of "subsequent reference" and "previous definition" are necessarily consistent; (3) Multi-engine fusion: It can integrate multiple translation engines, intelligently select the most suitable engine according to the domain label, or fuse and reorder the output of multiple engines to obtain the best initial translation.

[0032] Step 3: Input the initial translation into the dual-stream cross-attention defect labeling model and output the defect type; at the same time, apply risk factor weighting to the initial translation; Specifically, this step outputs a word-level defect profile D={(i, pi)}, where i is the word position in the translation and pi is the probability distribution of the nine types of defects. The risk element profile R={(e, c(e))} is also output, where e is the risk element and c(e) is its risk weight, providing fine-grained and interpretable input for expected loss routing.

[0033] Furthermore, the dual-stream cross-attention defect annotation model includes a pre-trained multilingual encoder, a cross-attention layer, a feature fusion layer, a defect classification layer, and BiGRU. The dual-stream cross-attention defect annotation model outputs word-level defect types, which include omissions, terminological mistranslations, number / date errors, obligation modality shifts, inconsistencies in referencing, semantic additions, sentence redundancy, and format loss.

[0034] Furthermore, the specific processing steps of the dual-stream cross-attention defect annotation model include: a. Shared encoding layer: The source document X and the initial translation Y are encoded by shared parameter copies of a pre-trained multilingual encoder (such as XLM-RoBERTa-base, 12 layers, 768 dimensions) to obtain Hs∈R^(m×d) and Ht∈R^(n×d); b. Cross-attention layer: The translation stream performs cross-attention on the source stream, Ha = softmax(Q·Ht·(K·Hs)^T / √d)·(V·Hs); c. Feature Fusion Layer: For the i-th word element in the translation, Fi = Wf·[Ht,i ; Ha,i ; Ht,i⊙Ha,i ; |Ht,i Ha,i|]; d. Defect classification layer: P(di=k) = softmax(Wo·BiGRU(F)i + bk), k∈{normal, omission, terminology mistranslation, number / date error, obligation modality shift, inconsistency in reference, semantic addition, sentence redundancy, format loss} nine categories; e. Defect type embedding: The predicted defect type of the previous word is used as the embedding input BiGRU to model the sequence correlation between defects (e.g., "missed translation" is often followed by "inconsistent reference"). f. Weakly supervised training: Training data is constructed using "synthetic defect injection"—controlled perturbations are injected into high-quality parallel corpora according to nine defect types (random deletion of source text fragments to simulate omissions, synonym substitution to simulate mistranslations, number perturbation to simulate number errors, and modal verb substitution to simulate duty-modal shifts, etc.), so that the annotator can be trained without large-scale manual lexical-level annotation.

[0035] Furthermore, a domain-specific NER model (BiLSTM-CRF or a span classifier based on XLM-R) is combined with rule regularization (amount / date pattern matching) to output risk element types e∈{amount, date, obligation modal verb, party name, definition term, ordinary}, and weighted according to business risk level: c(e) = 1 + α·rank(e) Where rank: amount / date / obligation status = 3, parties / definition terms = 2, ordinary = 0, α ∈ [0.5, 1] The translated terms covered by the risk factors inherit this weight, i.e., ci = c(e(i)).

[0036] Step 4: Based on a quantitative comparison of risk-weighted expected loss and intervention cost, make routing decisions on defect fragment handling methods, encapsulate defect fragments into micro-tasks for distribution and repair, and generate a structured editing operation sequence through consistency arbitration; Specifically, the expected quality loss is calculated based on defect profiles and risk profiles, and compared with the unified quantitative value of intervention costs. Routing decisions are then made based on minimizing the expected total cost, including: (1) Defect risk coefficient rk: The unit risk coefficient of defect type k is fitted by regression of historical manual repair data. The initial value can be set as: number / date error = 1.0, obligation modality deviation = 0.9, term mistranslation = 0.8, omission / addition = 0.6, inconsistency of reference = 0.5, redundancy / format = 0.2.

[0037] (2) Expected quality loss upon direct delivery: E[L] = Σi ci · Σk rk · pi(k) (i traverses the translated word units, k traverses the defect types) (3) Intervention cost: Cost(a) = β1·Delay(a) + β2·Labor(a) Among them, the Labor for fragment-level repair is proportional to the fragment length (averaging 8%~15% of the full text), the Labor for full-text human translation is proportional to the full text length, and Delay includes translator response and arbitration time; β1 and β2 are dynamically adjusted according to business scenario parameters (time limit level, quality level).

[0038] (4) Routing decision: a = argmin(a∈A) [ E[L|a] + Cost(a) ] A = {Direct delivery, delivery with alerts, fragment-level manual repair, full-text manual translation} Where, E[L|fragment-level repair] = E[L]·(1 Recall rate)·κ (Recall rate is the recall rate of the defect labeler for high-risk defects, and κ is the residual risk discount coefficient), E[L|full text manual]≈0; Delivery with alerts is suitable for scenarios where expected loss is low but users explicitly require high protection.

[0039] (5) Minimum Fragment Last-Cut Rule: Even if the decision is to deliver directly, if any high-risk term in the "amount / date" category satisfies pi(k)>0.5, it will be forcibly upgraded to fragment-level repair to prevent a single high-risk defect from being overwhelmed by the document-level average score.

[0040] Furthermore, the defective segments requiring manual repair are encapsulated as micro-tasks, matched, and distributed to two translators for independent, back-to-back repair. Specifically, this includes: (1) Micro-task encapsulation: Task package = {defect fragment (including source text alignment), defect type and probability, machine-constrained candidate correction set (Top-K candidates generated by constrained decoding under relaxed constraints), context constraints (dynamic terminology base constraints, text structure context), expected loss contribution}; transforming manual review from "free editing of the whole text" to "making minimal decisions on the constrained candidate set"; (2) Translator matching: Matching degree M = w1·domain skill score + w2·historical reputation + w3·task efficiency, w3 increases to 0.5 in emergency tasks; the same micro-task is assigned to two translators for independent repair back to back; (3) Microtask granularity control: When the interval between adjacent defective segments is ≤ 3 normal words, they are merged into the same microtask to reduce the context switching overhead of translators.

[0041] Furthermore, a consensus will be reached on the independent revisions made by the two translators, deciding whether to automatically adopt the revised version, vote on each operation individually, or escalate the decision to arbitration, including: (1) Structured representation: The translator's repair results are parsed into an editing operation sequence E=(op1,…,opl), where each operation op=(position, operation type {replace / delete / insert / confirm}, content, terminology mapping change); (2) Consistency measure: Sim(E1,E2) = γ·(1 Lev(E1,E2) / max(|E1|,|E2|)) + (1 γ)·TermOverlap(E1,E2) Where Lev is the Levenshtein distance between the operation-level sequences of edit operations, TermOverlap is the Jaccard consistency rate of the term mapping change between the two sequences, and γ=0.6; (3) Adjudication rules: When Sim≥θ1 (0.85), the merged result is automatically adopted; when Sim<θ2 (0.5), the arbitration is upgraded to senior translator or terminology committee; when θ2≤Sim<θ1, operation-by-operation voting is adopted - the operation common to both sequences is directly adopted, and the divergent operation is subject to third opinion.

[0042] Step 5: Route the edit operation sequence by type to the fast loop of the constraint layer and the slow loop of the parameter layer for dual-loop evolution, and perform constraint update and parameter update; Specifically, structured editing operations are routed to two loops, fast and slow, based on their types, and knowledge is accumulated through two forms: constraint updates and parameter updates, respectively, including: (1) Fast loop (constraint layer, effective in minutes): The routing condition is that the editing operation includes "term mapping change" or "determination of pending term"; the update algorithm atomically writes the term mapping change into the dynamic term library T←T∪{(s→s′)}, synchronously updates the restricted decoding constraint A(s)←{s′} and removes the decoding bias of the old mapping; this process has no training and no parameter change, and the average effective time is less than 3 minutes, and subsequent translation requests will take effect immediately; if the new mapping conflicts with the existing domain term library, it will enter the terminology committee arbitration queue; (2) Slow loop (parameter layer, effective daily / weekly): a. Sample construction: Combine "source text x + machine translation y" (Negative example) + manual repair y + (positive example)" is constructed as the contrast training sample; b. Comparative learning objectives (in InfoNCE format): LCL= log[exp(sim(h(x,y+),h(x,x)) / τ) / (exp(sim(h(x,y+),h(x,x)) / τ)+Σjexp(sim(h(x,y j),h(x,x)) / τ) ) ] Where h(·,·) is the encoder's representation of the splicing input, and τ=0.07 is the temperature coefficient.

[0043] c. Course learning: Training samples are stratified by defect type and trained in batches from easy to difficult according to the difficulty function d(sample) = number of edit operations + λd·proportion of high-risk operations; d. LoRA-gated fusion: Train an independent LoRA adapter ΔWd for each vertical domain d, and perform domain-labeled gating fusion during inference: y = σ(G(x,d))·yLoRA(d) + (1 σ(G(x,d)))·ybase Where G(x,d)=MLP([Enc(x); ed]), ed is the domain embedding, and σ is the sigmoid function; e. Catastrophic forgetting suppression: Total loss = LCL + μ·KL(pnew‖pold) (μ=0.1, pold is the output distribution of the model on the replay set before the update), and further stabilize the training with an empirical replay buffer (500 baseline samples are retained per domain, and 20% are mixed in each round); f. Triggering conditions: ≥500 new editing operation samples in the domain, or the error rate of high-frequency defect types increases by more than 15% week-on-week.

[0044] Step 6: Based on the discourse structure diagram, propagate the updated terminology corrections back to the initial translation to obtain the final translation.

[0045] Specifically, terminology-related corrections are automatically propagated throughout the entire text, and consistency checks are performed before delivery, including: (1) Consistency propagation algorithm: For each term mapping change (s→s′) of the fast loop, perform a breadth-first search on the discourse structure graph to locate all occurrences of the source term s (including nodes reachable via referential edges and reference edges), and apply a replacement to each position; during the replacement, regenerate the local translation of the clause at that position using the same restricted decoding as in step 2 to avoid mechanical replacement from destroying the syntax; (2) Conflict detection: If the same location is covered by multiple different mappings, or if there is another confirmed valid translation in the context of the location, it is marked as a conflict location and a re-check microtask is generated; (3) Delivery verification: The bilingual terminology list of the translation is automatically extracted (source terminology → actual translation terminology) and cross-referenced with the dynamic terminology database. Any inconsistencies are included in the delivery report. (4) Traceability: All write-back and verification operations are recorded in the audit log (operation, location, time, basis) to meet the compliance audit requirements of contract documents.

[0046] Example 2 One embodiment of this disclosure uses Chinese-to-English contract clauses as an example, and the specific calculation process is as follows: Suppose that Article 8.2 of the original text contains the clause "Party B shall pay liquidated damages equivalent to 10% of the total contract price within 30 days of receiving the notice." The initial machine translation mistranslated the obligatory modality "shall" as "may." (1) The text structure analysis attaches this clause to the obligation clause node, identifies "liquidation penalty" and "total contract price" as candidate terms and obtains the mapping by querying the database; the restricted term decoding generates the translation "...Party B may, within 30 days after receipt of the notice, pay an amount equal to 10% of the total contract price as liquidated damages..."; (2) The defect labeler outputs p(obligation modality offset) = 0.86 for the word "may" and p(number / date error) = 0.31 for the amount fragment; the risk element recognizer determines that "may" covers the obligation modality element (rank = 3, α = 0.8, calculated as c = 1 + 0.8 × 3 = 3.4), the amount fragment also has c = 3.4, and the other words have c = 1; (3) E[L] = 3.4×0.9×0.86 + 3.4×1.0×0.31 + the contribution of other lexical units is approximately 1.2 ≈ 2.63 + 1.05 + 1.2 = 4.88; fragment-level repair cost ≈ 1.5 (for short defective fragments), E[L|repair] ≈ 4.88×(1 0.92)×0.3 ≈ 0.12, the total cost 0.12+1.5=1.62 < the direct delivery cost of 4.88, and the amount segment satisfies the minimum segment catch-all rule of p>0.5, therefore decision a. =Fragment-level repair; (4) Encapsulate two micro-tasks: {"may" fragment + obligation modality defect + restricted candidate set [shall, must]} and {amount fragment + number defect + candidate verification}; both translators submit "shall" corrections back-to-back, and the calculated Sim=0.95≥0.85 is automatically adopted; generate the editing operation sequence [(position i1, replace, "shall", no terminology change), (position i2, confirm, amount is correct)]; (5) In this example, there is no change in terminology mapping and no fast loop is triggered; the edited samples (source text, machine translation negative examples containing "may", and manual repair positive examples containing "shall") are entered into the slow loop comparison sample pool. After the cumulative number of "obligation modality shift" type samples reaches the course batch threshold, they participate in the next round of training. (6) No terminology write-back operation; the delivery report is marked "the obligation status has been confirmed by both parties and the amount fragment has been verified", and a bilingual glossary and audit log are attached.

[0047] Example 3 An embodiment of the present disclosure takes a Chinese-to-English technical contract as an example, and the example process of minute-level effective term correction fast loop is as follows: Assume that the definition clause of Article 1 of an English technical contract defines the term "Deliverable", and the Chinese expression "交付物" (to be translated) appears in Article 3.1 (previously, there was no mapping for this term in the dynamic term base, so it is marked as a pending term): (1) Restricted term decoding: the pending term "交付物" is decoded with the upper limit of constraint strength λ=8, the initial translation output is "deliverables" (plural form), and this position is marked as a high-uncertainty segment; (2) The defect annotator outputs p(term mistranslation)=0.78 for the token "deliverables"; the risk element identifier determines that it is a defined term (rank=2, α=0.8, and c=1+0.8×2=2.6 is obtained from Equation (2)); (3) Clause expected loss E[L]=2.6×0.8×0.78+ other token contributions 0.9≈1.62+0.9=2.52; segment-level repair Cost≈1.2, E[L|repair]=2.52×(1 0.92)×0.3≈0.06, total cost 0.06+1.2=1.26, which is less than the expected loss of direct delivery of 2.52, so the decision is segment-level repair; (4) Microtask encapsulation {defective segment "deliverables", defect type term mistranslation, restricted candidate correction set [Deliverable, Deliverables, Delivery Items], context constraint: Article 1 defined term mapping}; both translators submitted "Deliverable" back-to-back, calculated Sim=0.96≥θ1=0.85, and automatically adopted; generate an edit operation sequence [(position i1, replacement, "Deliverable", term mapping change: 交付物→Deliverable)]; (5) S5 fast loop: this operation includes a term mapping change, which is routed to the fast loop to execute the constraint layer update—dynamic term base atomic write T←T∪{交付物→Deliverable}, and the decoding constraint is synchronously updated to A(交付物)={Deliverable}; this process does not require any parameter update, and takes about 2 minutes; (6) Consistency propagation: along the breadth-first direction of the discourse structure diagram, locate the remaining 23 occurrences of "交付物" in the full text, and regenerate local translations for each occurrence with restricted decoding using Equation (1); among them, the context of Article 9.4 has another confirmed mapping "交付材料→Delivery Materials", which is determined as a conflict position and generates a re-inspection microtask; (7) Technical effect: After about 3 minutes, the "deliverables" in the new translation request submitted by the same tenant will directly adopt the adjudicated mapping without the need for manual intervention again; when using the existing technology for periodic fine-tuning, the correction of similar terms will take effect only after the next round of model parameter updates (usually 1 to 7 days).

[0048] Example 4 One embodiment of this disclosure uses multi-contract batch translation and tenant memory reuse as an example, and the specific process is as follows: A tenant company needs to translate 50 English purchase contracts signed with the same supplier into Chinese in bulk: (1) The first batch of 10 samples were executed one by one in the process of (1)-(6) of Example 3: the fast loop accumulated 87 terms mapping (such as "Indemnification→compensation" "Force Majeure→force majeure"), and the slow loop accumulated 1,240 comparison training samples. (2) Tenant memory construction: The system persists the dynamic terminology database (87 items), the chapter structure diagram summary (the distribution of clause types: obligation clauses 41%, definition clauses 12%, breach clauses 9%, and the rest 38%) and the historical editing operation mode (term mistranslation accounts for 58%) into the tenant's memory; (3) Before translating the next 40 contracts, the memory was matched using the subgraph of the new contract chapter structure as the retrieval key, and the template contracts of the same supplier were hit; the prior filling of the terminology database enabled the direct reuse of 87 adjudicated mappings in the restricted decoding, and the rate of pending terms decreased from an average of 6.2 per contract in the first batch to 0.8, and the manual intervention rate of expected loss routing decreased from 18% to 6%; (4) The slow loop triggers incremental training of the domain LoRA adapter after 1,240 comparison samples reach the course learning batch threshold. After training, the sampling inspection shows that the incidence of term mistranslation defects decreased by 62%, and the baseline domain performance was guaranteed by KL anchoring and experience playback without degradation. (5) Technical effect: The total number of manual interventions for 50 contracts was reduced from about 350 times for each independent translation to 82 times, the average processing cost per contract decreased by about 57%, and the cross-verification pass rate of the bilingual terminology table for all translations was 100%.

[0049] Example 5 One embodiment of this disclosure provides a translation quality optimization system based on discourse structure graphs and two-loop evolution, including: The user interface module is used to obtain the original source document to be translated. The document structure parsing module is used to parse the document structure, construct a document structure diagram, and initialize a dynamic terminology database. The machine translation module is used to decode terms with clauses as translation units, injecting term constraints from a dynamic terminology database into the decoding process to perform restricted term decoding and generate an initial translation. The multi-granularity quality assessment module is used to input the initial translation into the dual-stream cross-attention defect labeling model and output the defect type; at the same time, it applies risk factor weighting to the initial translation. The expected loss routing decision module is used to make routing decisions on the handling of defective segments based on a quantitative comparison of risk-weighted expected loss and intervention costs. The microtask encapsulation and translator matching module is used to encapsulate defective segments into microtasks for distribution and repair. The consistency arbitration module is used to generate a structured sequence of editing operations for consistency arbitration. The dual-loop evolution engine module is used to route the edit operation sequence according to type to the fast loop of the constraint layer and the slow loop of the parameter layer for dual-loop evolution, and to perform constraint update and parameter update. The consistency propagation and write-back verification module is used to propagate the updated terminology corrections back to the initial translation based on the discourse structure diagram, so as to obtain the final translation.

[0050] Example 6 One embodiment of this disclosure provides an electronic device, including a processor, a memory, and a computer program; wherein the processor is connected to the memory, the computer program is stored in the memory, and when the electronic device is running, the processor executes the computer program stored in the memory to enable the electronic device to implement the translation quality optimization method based on discourse structure graph and two-loop evolution.

[0051] This disclosure is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create a machine for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0052] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0053] While the specific embodiments of this disclosure have been described above in conjunction with the accompanying drawings, this is not intended to limit the scope of protection of this disclosure. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art without creative effort based on the technical solutions of this disclosure are still within the scope of protection of this disclosure.

Claims

1. A translation quality optimization method based on discourse structure diagrams and two-loop evolution, characterized in that, include: Obtain the original source document to be translated, perform text structure analysis on the source document, construct a text structure diagram, and initialize a dynamic terminology database; Using clauses as translation units, the term constraints of the dynamic terminology database are injected into the decoding process to perform restricted term decoding and generate the initial translation; The initial translation is input into the dual-stream cross-attention defect labeling model, and the defect type is output; at the same time, the initial translation is weighted by risk factors. Based on a quantitative comparison of risk-weighted expected loss and intervention cost, a routing decision is made on the handling method of defective segments. The defective segments are encapsulated into micro-tasks for distribution and repair, and a structured editing operation sequence is generated through consistency arbitration. The edit operation sequence is routed by type to the fast loop of the constraint layer and the slow loop of the parameter layer for dual-loop evolution, and constraint updates and parameter updates are performed. The updated terminology corrections are propagated back to the initial translation based on the discourse structure diagram, resulting in the final translation.

2. The translation quality optimization method based on discourse structure diagrams and two-loop evolution as described in claim 1, characterized in that, The process of obtaining the original source document to be translated, performing text structure analysis on the source document, constructing a text structure diagram, and initializing a dynamic terminology database includes: Receive source documents submitted by users, including the text to be translated, the target language, domain tags, and business scenario parameters; A hybrid approach combining rule templates and sequence labeling is employed. The rule templates match chapter / clause / sub-clause numbering patterns. For unnumbered text, a pre-trained sequence labeling model is used to identify chapter functional units. The results from both approaches are then fused to construct a hierarchical tree. Using clauses as nodes, a dependency parsing and coreference resolution model is used to extract three types of edges: referential edges, reference edges, and definition edges. Extract candidate terms from the source document, query the domain terminology knowledge base, and initialize it.

3. The translation quality optimization method based on discourse structure diagrams and two-loop evolution as described in claim 1, characterized in that, The process of using clauses as translation units, injecting term constraints from a dynamic terminology database into the decoding process for restricted term decoding, and generating an initial translation includes: Using clauses as translation units, the term constraints of the dynamic terminology database are injected into the decoding process in the form of logarithmic biases for restricted term decoding; When translating a clause, the term selections already determined in its ancestor nodes and referenced nodes on the discourse structure graph are written into the constraint set. At the same time, the term selections determined in the translated clauses are propagated to subsequent clauses as context constraints. The initial translation is generated by the domain label intelligent selection engine.

4. The translation quality optimization method based on discourse structure diagrams and two-loop evolution as described in claim 1, characterized in that, The initial translation is input into a two-stream cross-attention defect labeling model, which outputs defect types. Simultaneously, the initial translation is weighted by risk factors. The two-stream cross-attention defect labeling model includes a pre-trained multilingual encoder, a cross-attention layer, a feature fusion layer, a defect classification layer, and BiGRU. The model outputs word-level defect types, including omissions, mistranslations of terms, errors in numbers / dates, duty-modal shifts, inconsistencies in referencing, semantic additions, sentence redundancy, and format loss.

5. The translation quality optimization method based on discourse structure diagrams and two-loop evolution as described in claim 4, characterized in that, The shared parameter copies of the pre-trained multilingual encoder encode the source text and the initial translation respectively. The translation stream of the cross-attention layer performs cross-attention on the source text stream and then performs feature fusion. The defect type probability is output by the defect classification layer to obtain the defect type. The defect type of the previous word is used as the embedding input BiGRU to model the sequence correlation between defects. Using a domain-specific NER model and rule-based regularization, high-risk elements in the translation are identified, risk element types are output and weighted according to business risk levels, and the translated terms covered by the risk elements inherit the weights.

6. The translation quality optimization method based on discourse structure diagrams and two-loop evolution as described in claim 1, characterized in that, Routing decisions for handling defective segments are based on a quantitative comparison of risk-weighted expected loss and intervention costs, including: Instead of a single confidence score, risk-weighted expected loss is used to calculate the expected quality loss in the direct delivery scenario. This loss is then quantitatively compared with the time and manpower costs of manual intervention. Based on the principle of minimizing the total expected cost, the system automatically makes decisions among four handling methods: direct delivery, delivery with alerts, fragment-level manual repair, and full-text manual translation.

7. The translation quality optimization method based on discourse structure diagrams and two-loop evolution as described in claim 1, characterized in that, Defective fragments are encapsulated into microtasks for distribution and repair. A structured edit operation sequence is generated through consistency arbitration, including: When the decision is to manually repair at the fragment level, the defect fragment is encapsulated into a micro-task containing the defect type, a set of machine-constrained candidate corrections, and contextual constraints. This micro-task is then distributed to two translators who are matched in three dimensions based on domain skills, historical reputation, and task efficiency for independent repair back-to-back. After automatic adjudication by the consistency arbitration module, the manual repair process is recorded as a structured editing operation sequence. The editing operation sequence includes defect fragment location information, operation type, replacement content, and terminology mapping changes.

8. The translation quality optimization method based on discourse structure diagrams and two-loop evolution as described in claim 1, characterized in that, The editing operation sequence is routed by type to the fast loop of the constraint layer and the slow loop of the parameter layer for dual-loop evolution, thereby performing constraint updates and parameter updates. Based on the discourse structure diagram, the updated terminology corrections are propagated back to the initial translation, including: The terminology mapping editing operation is routed to the fast loop, and the dynamic terminology base and restricted decoding constraints are updated in minutes, so that new terms take effect immediately in subsequent translation requests; Editing operations related to grammar, sentence structure, and fluency are routed to slow loops and converted into comparative training samples. A course learning strategy based on defect type is used to incrementally train the domain LoRA adapter. The adapter is then fused with the base model through a gating mechanism, and KL anchored loss and experience replay are used to suppress catastrophic forgetting. Based on the text structure diagram, terminology-based corrections are automatically propagated to all occurrences of the same term throughout the entire text.

9. A translation quality optimization system based on discourse structure diagrams and two-loop evolution, characterized in that, include: The user interface module is used to obtain the original source document to be translated. The document structure parsing module is used to parse the document structure, construct a document structure diagram, and initialize a dynamic terminology database. The machine translation module is used to decode terms with clauses as translation units, injecting term constraints from a dynamic terminology database into the decoding process to perform restricted term decoding and generate an initial translation. The multi-granularity quality assessment module is used to input the initial translation into the dual-stream cross-attention defect labeling model and output the defect type; at the same time, it applies risk factor weighting to the initial translation. The expected loss routing decision module is used to make routing decisions on the handling of defective segments based on a quantitative comparison of risk-weighted expected loss and intervention costs. The microtask encapsulation and translator matching module is used to encapsulate defective segments into microtasks for distribution and repair. The consistency arbitration module is used to generate a structured sequence of editing operations for consistency arbitration. The dual-loop evolution engine module is used to route the edit operation sequence according to type to the fast loop of the constraint layer and the slow loop of the parameter layer for dual-loop evolution, and to perform constraint update and parameter update. The consistency propagation and write-back verification module is used to propagate the updated terminology corrections back to the initial translation based on the discourse structure diagram, so as to obtain the final translation.

10. An electronic device, characterized in that, include: The device includes a processor, a memory, and a computer program; wherein the processor is connected to the memory, the computer program is stored in the memory, and when the electronic device is running, the processor executes the computer program stored in the memory to enable the electronic device to perform the translation quality optimization method based on discourse structure graph and two-loop evolution as described in any one of claims 1-8.