Skeletonized document translation and localization system and method
Patent Information
- Application Number
- CN202611193245.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-07
- Publication Date
- 2026-10-09
AI Technical Summary
[0006]本发明针对现有技术中格式保真文档翻译与本地化处理存在的以下技术缺陷提出相应的技术解决方案:首先,格式控制码在翻译过程中易被破坏,现有方案将含标签的整段文本直接送入翻译模型,导致模型错误地删除、移动、复制或翻译格式控制码,造成交付文件无法被计算机辅助翻译工具回导、排版错乱或时间轴错位;其次,译文存在回声源文、空译文或源语种残留等问题,现有流程缺乏针对单元的确定性与可回退的纠正机制,导致问题译文以空白或英文残留状态交付;再次,质量校验依赖人工逐行审校或大语言模型评估,前者成本高、速度慢,后者存在单元级评估成本与时延高、评估本身可能产生幻觉的问题,缺乏纯确定性、低时延、零模型调用的逐行门控机制;第四,受限于单一推理接口密钥速率,逐单元串行处理大型文档时吞吐量严重不足;第五,译文单元的产出层级缺乏可审计记录,无法满足法务、医药等高合规场景对翻译过程可追溯的要求
通过骨架分解技术使大语言模型仅接收纯自然语言文本游程而从不接触格式控制码,从源头杜绝标签破坏,配合标签拓扑保持模块的进入退出成对校验与内联标签计数校验,保证交付文件可无损回导计算机辅助翻译工具,实现格式零损耗;
Smart Images

Figure CN122886630A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of natural language processing, specifically a method and system for format-preserving document translation and localization. Background Technology
[0002] With the accelerated development of cross-border trade, transnational legal affairs, film and television exports, and the globalization of technical documents, the demand for professional-grade document translation and localization is growing rapidly. The core requirement that distinguishes professional localization from general machine translation is that the deliverable must be translated into natural language text while maintaining the original formatting, inline tags, placeholders, and timecodes completely unchanged—the so-called "format fidelity" or "zero format loss" requirement. This technical field involves the processing of various complex document formats, including Rich Text Format (RTF), Office Open XML documents (DOCX), Portable Document Format (PDF), Spreadsheets (XLSX), Subtitle Files (SRT), and Computer-Aided Translation Exchange Files (SDLXLIFF and MQXLIFF).
[0003] Under current technological conditions, translation quality verification is a core bottleneck restricting the efficiency and cost of the entire translation process. Existing technologies primarily rely on two approaches for translation quality verification: first, manual line-by-line review. While this method can guarantee a certain level of accuracy, it suffers from high costs, slow processing speed, and inconsistent results due to human fatigue, making it difficult to meet the demands of rapid delivery of large-scale documents; second, using large language models for quality assessment. Although this method improves the intelligence level of quality verification, the computational cost and response latency of unit-level assessment are high, and the assessment model itself may produce false positives, leading to unreliable results. More importantly, both manual review and model-based quality verification rely on post-processing checks, lacking a closed-loop feedback mechanism deeply integrated with the translation process, making it difficult to effectively trace and correct problems discovered during quality verification.
[0004] Specifically, when quality checks reveal issues such as echoes (direct copying of the source text), empty translations, language leakage (residual source language vocabulary in the target language translation), content drift, and incorrect formatting tags, existing systems lack a deterministic, reversible correction mechanism to drive retranslation. This often results in problematic translations being delivered as blank, containing English remnants, or incomplete. Furthermore, existing technologies are limited by the rate of a single inference interface key when processing large documents. The serialized, unit-by-unit processing mode makes processing tens of thousands of lines of large documents, such as those in medical and legal fields, excessively time-consuming, failing to meet the timeliness requirements of actual delivery. In addition, the production process of translation units lacks traceable hierarchical records. Translation units from different sources, such as memory reuse, lead translator, rigorous retranslation, avalanche retranslation, and source text backup, are delivered mixed together, making it difficult to meet the stringent traceability requirements of high-compliance scenarios such as legal and medical fields.
[0005] Subtitle and video localization scenarios also require translated texts to meet reading speed constraints while maintaining timecode consistency. Contract review scenarios require systematic risk assessment of clauses. These professional constraints, coupled with the lack of unified architecture in general translation systems, further exacerbate the technical complexity of translation quality assurance. Therefore, there is an urgent need for a format-accurate document translation and localization solution that can perform line-by-line gating of translated text in a purely deterministic, low-latency manner with zero large language model calls, while possessing high-throughput parallel processing capabilities and providing a complete and auditable traceability record for each translated unit. This solution would fundamentally overcome the technical shortcomings of existing technologies, such as high quality inspection costs, low efficiency, and the lack of a closed-loop feedback mechanism. Summary of the Invention
[0006] This invention proposes corresponding technical solutions to address the following technical deficiencies in existing format-accurate document translation and localization processes: First, format control codes are easily corrupted during translation. Existing solutions directly input entire segments of text containing tags into the translation model, causing the model to erroneously delete, move, copy, or translate format control codes. This results in delivered documents that cannot be imported back by computer-aided translation tools, formatting errors, or timeline misalignments. Second, the translated text suffers from issues such as echoing the source text, empty translations, or source language remnants. Existing processes lack deterministic and reversible correction mechanisms for specific units. This results in problematic translations being delivered in a blank or partially written English state; secondly, quality verification relies on manual line-by-line review or large language model evaluation, the former being costly and slow, and the latter suffering from high unit-level evaluation costs and latency, and the evaluation itself potentially producing illusions, lacking a purely deterministic, low-latency, zero-model-call line-by-line gating mechanism; fourthly, limited by the key rate of a single inference interface, the throughput is severely insufficient when processing large documents serially unit by unit; fifthly, the output level of translation units lacks auditable records, failing to meet the traceability requirements of high-compliance scenarios such as legal and pharmaceutical industries.
[0007] Therefore, the present invention adopts the following technical solution: The skeleton decomposition quality inspection gating format-preserving document translation and localization system includes a document skeleton decomposition module, a layered translation backtracking cascade module, a deterministic quality inspection gating module, and a source tracing marking module; The document skeleton decomposition module is configured to receive a source document containing rich text format control codes, inline tags, or time code structures, and orthogonally decompose each translatable unit into two independent parts: a format skeleton and translatable text runs. The format skeleton retains the topological order and nesting relationship of all format control codes, inline tags, placeholders, and untranslatable symbols, while the translatable text runs only carry the natural language text fragments to be translated. The document skeleton decomposition module only submits the translatable text runs to the translation inference interface. After obtaining the translated text runs, it backfills and splices them according to the original positions of each text run in the format skeleton to reconstruct the translated unit containing complete format control codes. The deterministic quality check gating module is configured to run no less than 26 deterministic quality check gates independently for each translation unit. Except for the self-consistency gate and the no-reference quality estimation gate, all other gates in the deterministic quality check are implemented by regular matching and set operations. The single gate processing latency is less than 100 microseconds and no large language model calls are initiated. The hierarchical translation back-off cascade module is configured to perform multi-level back-off cascade processing with increasing strictness on each translatable unit. Any unit that fails to pass any blocking gate is re-injected into the corresponding back-off layer of the hierarchical translation back-off cascade module. The source tracing and marking module is configured to record and persistently store the output level identifier of the final translation for each translation unit. The document skeleton decomposition module, the hierarchical translation backtracking cascade module, the deterministic quality inspection gating module, and the source tracing marking module work together to form an end-to-end zero-loss format translation closed loop from the source document to the format-fidelity deliverable. The hierarchical translation backtracking cascade module ensures that the translation bit of each translatable unit is not empty at the time of delivery through the layer-by-layer backtracking process.
[0008] Preferably, the document skeleton decomposition module supports source document types including at least one of the following: rich text format RTF, OfficeOpen XML document DOCX, portable document format PDF, spreadsheet XLSX, subtitle file SRT, and computer-aided translation exchange file SDLXLIFF and MQXLIFF.
[0009] Preferably, for rich text bilingual files, the format skeleton retains format switches and their respective scopes, retains inline tags and half tags, and automatically sets language codes according to the target language; the backfill splicing operation performs pairwise verification of entry and exit tags for each format switch during translation backfilling, and performs consistency verification of source tag count and translation tag count for each inline tag.
[0010] Preferably, the N determination gates of the determination quality inspection gating module are divided into three levels according to severity: blocking level, alarm level, and prompt level. A unit that fails any blocking level quality inspection gate is re-injected into the corresponding back-off layer of the hierarchical translation back-off cascade module. Each quality inspection gate scores the unit independently. When a unit fails the i-th gate, it continues to score the remaining gates, thereby outputting a complete quality inspection profile of passing or failing gate by gate.
[0011] Preferably, the N deterministic property detection gates are divided into four families: structural class, authenticity class, semantic class, and language-specific class. The structural quality inspection gates include the inline label count consistency gate, the alphanumeric code retention gate, the numeric value and localization retention gate, the gate for not introducing numbers, the scientific notation leakage gate, the format switch parity gate, and the superscript and subscript retention gate. Authenticity-related quality control gates include the translation-equivalent source text gate, the translation-echo-source text gate, the source text being non-empty while the translation is empty gate, the control byte leakage gate, and the source text quality guard gate. Semantic quality control gates include content drift gate, named entity retention gate, length ratio out-of-bounds gate, language pair specific length ratio lookup table gate, term constraint satisfaction gate, numerical and entity illusion gate, self-consistency gate, and no-reference quality estimation gate. Language-specific quality control gates include source language character leakage gate, known Greek spelling gate, decimal localization gate, spacing between numbers and words gate, line continuation mark leakage gate, character spacing gate, and East Asian full-width punctuation leakage gate.
[0012] Preferably, the numerical and entity illusion gates in the semantic class family are configured to extract numbers and named entities from the source text and the translation text respectively, and mark those that appear in the translation text but not in the source text and are not caused by unit conversion or date rewriting as suspected illusions and perform blocking processing. This gate is implemented through deterministic regular expression extraction and set difference operation. The self-consistency gate is configured to generate multiple translations for units determined to have low confidence with different temperatures or different prompts, calculate the pairwise similarity between the multiple translations, and determine low confidence when the maximum pairwise similarity is lower than a preset threshold and trigger the review process. The self-consistency gate samples the units at a preset sampling ratio.
[0013] Preferably, the layered translation backtracking cascade module includes four layers: a skeleton translation master translation layer, an anti-echo strict retranslation layer, an avalanche cross-model layer, and a source text word-by-word preservation layer, arranged in ascending order of strictness. The skeleton translation master translation layer performs regular translation on the translatable text run. If all blocking levels pass, the unit is finalized and marked as "master translation". The anti-echo strict retranslation layer retranslates units that trigger blocking levels with explicit prompts in ascending order of retry number. The avalanche cross-model layer switches units that still fail after the anti-echo strict retranslation layer to different models or different capability levels for retranslation. The source text word-by-word preservation layer backfills the translation position of the unit with the source text word by word and sets the unit as "pending review".
[0014] Preferably, the outputs of each layer of the hierarchical translation backtracking cascade module are respectively marked as "main translation", "strict retranslation", "avalanche retranslation" and "source text backup", and are persistently stored by the source tracing marking module; the hierarchical translation backtracking cascade module constitutes a state machine with backtracking layers as states. The key operating rule of the state machine is that the state transitions between each backtracking layer driven by the blocking level quality inspection result, and it is prohibited to finalize the unit in any blocking level gate failure state.
[0015] Preferably, it also includes a tag topology preservation module, which is configured to perform topology consistency checks on inline tags, half tags, field instructions and permutable tokens in computer-aided translation bilingual files. The module requires that the inline tag count, nesting depth, pairing balance and arrangement order of the translation and the source text match one by one, and performs parity checks on the format switches of bold, italics, underline, superscript and subscript to ensure that the format switches appear in pairs in the translation.
[0016] Preferably, for bilingual paragraphs in the "locked" or "confirmed" state, the tag topology preservation module prohibits any rewriting operations; the structure preservation score is defined as min(1.0, the number of translated format elements divided by the number of source format elements), and a quality inspection alarm is triggered when the structure preservation score is lower than 0.9.
[0017] Preferably, it also includes a multi-key polling avalanche parallel module, which is configured to maintain a key pool consisting of M inference service keys, where M is no less than six; the multi-key polling avalanche parallel module uses a "take next key" function to poll and select keys at the entry point of concurrent translation requests, and distributes concurrent translation requests of multiple translatable units of the same document to different keys, so that each key bears its own independent rate limit.
[0018] Preferably, the key pool supports two arrangement methods: comma-separated multi-account grouping configuration and single-account multi-key, with each account maintaining its own subset of keys; the multi-key polling avalanche parallel module maintains a chain exhaustion detection function, and when all models in the locked chain member set fail consecutively within a preset time window, it sends a degradation signal to the deterministic quality inspection gating module and the front-end progress channel.
[0019] Preferably, the system also includes a multi-agent translation pipeline module, which is configured to sequentially or in parallel schedule at least four of six agents: a context extraction agent, a translation agent, a consistency check agent, a quality review agent, a back-translation agent, and a terminology check agent, for the same translatable unit. The multi-agent translation pipeline module also includes a relay pipeline submodule, which is configured to schedule the above agents in a unit-by-unit relay manner for ultra-large-scale files and maintain a live heartbeat beacon.
[0020] Preferably, the consistency checking agent maintains a cross-file terminology consistency tracking table, which forces the same translation to be used for the same source term appearing in multiple files of the same project.
[0021] Preferably, it also includes a translation memory ring module, which is configured to perform an exact match query for each translatable unit by first using the 64-character cryptographic hash of the source text as the exact match key, and then perform a fuzzy match query by using the index based on the character triplet similarity operator as the fuzzy match key. If a match is found, the stored translation is directly reused and the inference call is skipped. If a match is not found, the translation is obtained through inference and the "source text-translation text-metadata" triplet is written back to the translation memory.
[0022] Preferably, the translation memory establishes unique constraints at the project level, recording source text hash, source text normalized text, translation, language pairs, and hit count; the write-back operation is performed after quality inspection is passed; the translation memory ring module supports bidirectional import and export in two industry standard formats: Translation Memory Exchange Format TMX and Translation Memory Library Format SDLTM.
[0023] Preferably, the source tracing marking module records at least five values for the output level identifier of each translation unit: memory hit, main translator, strict retranslation, avalanche retranslation, and source text guarantee; the output level record of each unit includes unit number, source text content, translation content, output level identifier, and timestamp.
[0024] Preferably, it also includes a multilingual localization rule engine module, which is configured to apply differentiated number and typesetting localization rules according to the target language, including decimal separator rules, thousands separator rules, language pair specific length ratio lookup table and reading direction rules; the multilingual localization rule engine module supports no less than thirty target languages.
[0025] Preferably, the system also includes a statistical assurance authentication submodule. This submodule is configured based on a distribution-independent conformal calibration framework. It constructs an inconsistency metric using calibration data with manual annotations and outputs an upper bound for the serious error omission rate with a preset statistical confidence level for the set of translated units that have passed the quality inspection gating module. When the upper bound exceeds a preset threshold, it triggers mandatory manual review or re-injection of the hierarchical translation backtracking cascade module. The certified units are locked in the exported computer-aided translation bilingual file. The statistical assurance authentication submodule is also configured to calculate a version identifier for the implementation code and runtime behavior of the quality inspection scoring strategy using content addressing. Both the calibration data and the upper bound for the serious error omission rate are bound to the version identifier. When the scoring strategy changes, causing a change in the version identifier, the existing authentication results automatically become invalid and trigger recalibration. Authentication records (certificates) are issued for certified deliverables. The authentication record is bound to the content hash of the deliverable and the version identifier and can be verified by an independent verification terminal.
[0026] Preferably, the document skeleton decomposition module and the deterministic quality inspection gating module support streaming processing mode, configured to perform block skeleton decomposition and pipeline quality inspection on ultra-large documents or real-time data streams using a sliding window or incremental parsing method, retaining only the current processing window and its context-dependent tag stack in memory, and releasing the memory occupied by the delivered unit after translation backfilling.
[0027] Preferably, the system adopts a cloud-edge collaborative deployment. The document skeleton decomposition module and the deterministic quality inspection gating module are deployed on the local terminal device. The format skeleton stripping and deterministic quality inspection are completed on the terminal side. Only the run length of the translatable text after stripping the format information is transmitted to the translation inference interface on the remote end, and the translation backfilling and splicing are completed on the terminal side, so that the format and layout data do not leave the local terminal.
[0028] The second aspect of this invention provides a method for translating and localizing format-preserving documents using a skeleton decomposition quality inspection gating system as described in any of the above claims, characterized by comprising the following steps: S1, Receive the source document, and the document skeleton decomposition module decomposes each translatable unit into a format skeleton and translatable text run, and submits translation inference only for the translatable text run. S2, the translation memory ring module first performs an exact match query and then a fuzzy match query on the translatable unit. If a match is found, the translation is reused and the reasoning is skipped. S3, those that are not hit enter the hierarchical translation back-off cascade module, which processes the translation with increasing strictness in four layers: skeleton translation main translation layer, anti-echo strict retranslation layer, avalanche cross-model layer, and source text word-by-word preservation of the bottom layer. S4, the quality check gating module runs no less than twenty-six quality check gates on the translation unit. Except for the self-consistency gate and the no-reference quality estimation gate, the other gates are implemented by regular matching and set operation. If any blocking level gate fails, the unit will be back-injected to the corresponding fallback layer in step S3. S5, the traceability tagging module records the output level of each unit. After the translation is verified by the tag topology preservation module to ensure the integrity of the format skeleton, it is backfilled and spliced according to the original skeleton to form a format-authentic deliverable. S6. Units that pass quality inspection are written back to the memory bank by the translation memory ring module, and the hierarchical sequence produced by each unit is persisted as translation source tracing evidence.
[0029] The beneficial effects of this invention include: By using skeleton decomposition technology, the large language model only receives pure natural language text runs and never touches the format control codes, thus eliminating tag corruption at the source. Combined with the tag topology preservation module's entry and exit pairwise verification and inline tag count verification, it ensures that the delivered files can be losslessly imported back to computer-aided translation tools, achieving zero format loss. By defining a quality inspection gating module that uses regular expression matching and set operations to implement no fewer than twenty-six quality inspection gates, the single-gate processing latency is less than one hundred microseconds and there are zero calls to the large language model. This reduces the cost and latency of line-by-line quality inspection by several orders of magnitude compared to quality inspection based on the large language model. At the same time, the "translation-quality inspection-back" line-by-line closed loop ensures that the translated text is never empty. By using a multi-key polling avalanche parallel module to distribute the rate limit of a single account across M keys, an effective throughput of M times is achieved, enabling tens of thousands of lines of documents to be processed within an acceptable timeframe. The source tracing and marking module records the output level of each unit, forming line-by-line translation source tracing evidence, which meets the stringent requirements of high compliance scenarios such as legal and medical fields for the traceability of the translation output process. By integrating professional capabilities such as multilingual localization rules, feedback-driven subtitle reading speed constraints, and systematic review of legal clauses into a closed loop of format-accurate translation, an integrated platform oriented towards professional localization is formed. Attached Figure Description
[0030] Figure 1 This is a schematic diagram of the overall architecture of the platform of the present invention; Figure 2 Flowchart for document skeleton decomposition and backfilling; Figure 3 A schematic diagram of a hierarchical translation backtracking cascaded state machine; Figure 4 To determine the 33-gate quality inspection control pipeline diagram; Figure 5 This is a schematic diagram illustrating the label topology and format fidelity verification. Figure 6Diagram of a multi-key polling avalanche parallel architecture; Figure 7 A collaborative diagram of the six-agent translation pipeline; Figure 8 This is a schematic diagram of phase band progress mapping; Figure 9 For translating memory loop diagrams; Figure 10 This is a schematic diagram of a multilingual localization rules engine; Figure 11 A flowchart for the nine-point verification process of legal contracts; Figure 12 Flowchart for feedback retranslation based on subtitle reading speed constraints; Figure 13 Image extraction for optical character recognition of text on video screen; Figure 14 This is a schematic diagram of a no-reference quality estimation and hallucination detection gate; Figure 15 Diagram of local inference acceleration and speculative decoding architecture; Figure 16 Domain-adaptive low-rank adapter and data flywheel diagram; Figure 17 For adaptive complexity routing and multi-level caching graphs; Figure 18 Deduplication and auditing billing graph for idempotent key tasks; Figure 19 A complete diagram of the closed-loop translation process for end-to-end format-fidelity. Detailed Implementation
[0031] The embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings.
[0032] The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain the invention, and should not be construed as limiting the invention.
[0033] like Figure 1As shown, the format-accurate document translation and localization processing platform system of this invention adopts a four-layer application structure, including a front-end interaction layer, an interface service layer, an asynchronous translator layer, and a data storage layer. Each layer collaborates through server-pushed events and a large language model gateway. The front-end interaction layer uses a front-end framework that supports server-side component rendering and in-application routing to render the interactive interface, providing users with entry points for task submission, progress viewing, and result download. The interface service layer provides authentication, project and task management, and billing and management interfaces using an asynchronous framework, receiving requests from the front-end interaction layer and distributing translation tasks to the asynchronous translator layer. The asynchronous translator layer polls the task queue and executes the translation pipeline, performing core processing logic such as document skeleton decomposition, layered translation rollback cascading, deterministic quality inspection gating, and tag topology preservation. The data storage layer includes a relational database and an in-memory database. The relational database carries persistent storage of projects, tasks, line-by-line checkpoints, translation memories, legal decisions, token ledgers, and audit logs, while the in-memory database carries cache and task queues to meet high-concurrency access requirements. The large language model gateway uniformly carries all inference traffic, providing an upward mapping from routing keys to model chains, and downward connecting to international multi-base address automatic routing inference services and domestic direct-connection inference services. In this implementation, routing keys are organized into two types: translation chains and inference chains. Translation chains primarily use fast models with high-precision models as backup, for high-frequency tasks such as line-by-line translation; inference chains primarily use high-precision models for lower-frequency tasks requiring deep inference, such as legal analysis, quality review, terminology extraction, and optical character recognition. The front end receives real-time progress via server-pushed events, enabling real-time status updates without polling.
[0034] like Figure 2 As shown, the document skeleton decomposition module performs orthogonal decomposition on each translatable unit of the source document. The document skeleton decomposition module receives source documents containing rich text format control codes, inline tags, or timecode structures, supporting various formats such as rich text format RTF, Office Open XML document DOCX, portable document format PDF, spreadsheet XLSX, subtitle file SRT, and computer-aided translation exchange files SDLXLIFF and MQXLIFF. Taking a rich text format bilingual file as an example, a single bilingual unit may contain a bold switch \b, inline tags [1\…\1], half tags {2], alphanumeric codes, and natural language text. The module first parses the input unit, identifies the boundary between the format control code and the natural language text, and then decomposes it into two orthogonal parts: the format skeleton is the topological structure of the format control code and the tag represented by the sequence of placeholder marks, for example, the placeholder marks such as ⟦RUN0⟧, ⟦TAG1⟧, ⟦FMT_B_ON⟧, ⟦FMT_B_OFF⟧ are arranged in the original order and nesting relationship; A translatable text run is an ordered set {t1, t2, ..., t3} containing only the natural language text segments to be translated. t2, …, t k After decomposition, only the translatable text runs {t1,} are decomposed. t2, …, t k} Submit to the translation inference interface for translation, and obtain the translated text run {t1} ′ , t2 ′, …, t k ′ Afterwards, the text runs in the format skeleton are backfilled and spliced according to their original positions to reconstruct the translation unit containing complete format control codes. Since the large language model only receives plain text runs and never touches any format control codes, the possibility of control codes being deleted, moved, copied, or mistranslated is eliminated at the source. In a specific embodiment, for an RTF unit containing three text runs and two pairs of format switches, after skeleton decomposition, only the runs "human cells", "and", and "mitochondria" are translated into the target language. The two pairs of switches \b…\b0 and \i…\i0 and their scopes are restored as is during backfilling, ensuring that the scope of bold and italics is aligned character by character with the source text. For rich text format bilingual files, the format skeleton retains the \b, \i, \ul, \super, and \sub format switches and their respective scopes, retains inline tags of the form [N\…\N] and semi-tags of the form {N], and automatically sets the \lang language code according to the target language. During the translation backfilling and splicing operation, pairwise checks are performed on the entry and exit tags of each format switch, and consistency checks are performed on the source tag count and the translation tag count for each inline tag. When a format switch in the translation is missing its paired exit tag or the inline tag count does not match the source text, the document skeleton decomposition module determines that the unit is a broken format skeleton and backfills the unit to the hierarchical translation backfilling cascade module for retranslation.
[0035] like Figure 3As shown, the hierarchical translation backtracking cascade module performs a four-layer backtracking cascade process with increasing strictness for each translatable unit, forming a directed state machine. The first layer is the skeleton translation master translation layer, which performs regular translation on the translatable text run. After the master translation is completed, it is immediately verified by the deterministic quality check gating module. If all blocking gates pass, the unit is finalized, and the output level is marked as "master translation". The second layer is the anti-echo strict retranslation layer. For units that trigger blocking gates such as "translation is equivalent to source text", "translation echoes source text", "source text is not empty while translation is empty", or "source language character leakage", retranslation is performed with explicit prompts in ascending retry sequence. The first retry is subject to the constraint "the source text must not be copied", the second retry is subject to the constraint "the source text is different from the target language, and the target language text must be output", and the third retry is subject to word-by-word examples and counterexamples. After each retry, the deterministic quality check gating module is re-executed for verification. The third layer is the avalanche cross-model layer, which switches units that fail after the rigorous retranslation layer to different models or price tiers for retranslation. In the translation-based pipeline, it performs an upgrade from a fast model to a high-precision model; in the inference-based pipeline, it performs retries within the high-precision model. The fourth layer is the source text-by-word guarantee layer. When all three layers fail, the translated text of the unit is filled back word-by-word with the source text, and a "pending review" flag is set for the unit. The relevant record is written to the quality inspection report, ensuring that the unit is explicitly prompted on the review interface before delivery to prevent delivery with blank pages or English remnants. The outputs of each layer of the layered translation backtracking cascade module are marked as "Main Translation," "Rigorous Retranslation," "Avalanche Retranslation," and "Source Text Guarantee," respectively, and are persistently stored by the source tracing marking module. The key operating rule of the state machine is that the blocking-level quality inspection results drive state transitions between each backtracking layer, and it prohibits finalizing the unit if any blocking-level gate fails, thus ensuring that the invariant that the translated text of any unit is never empty always holds true.
[0036] like Figure 4 As shown, the quality inspection gating module independently runs N quality inspection gates for each translated unit, with N being no less than twenty-six and preferably thirty-three. Except for the self-consistency gate and the no-reference quality estimation gate, all other gates in the quality inspection are implemented using regular expression matching and set operations, with a single gate processing latency of less than one hundred microseconds and without initiating any large language model calls. The quality inspection gates are divided into three levels according to severity: blocking level, alarm level, and prompt level. Units that fail any blocking-level quality inspection gate are re-injected into the corresponding backoff layer of the hierarchical translation backoff cascade module, forming a line-by-line closed loop of "translation—quality inspection—backoff". Each quality inspection gate scores the unit independently. If a unit fails the i-th gate, the remaining gates are still scored, thus outputting a complete quality inspection profile of passing or failing each gate. The twenty-seven representative quality inspection gates among the thirty-three quality inspection gates are organized into four gate families as follows: The structural gate family includes: an inline tag count consistency gate to verify that the inline tag counts in the translation match those in the source text; an alphanumeric code preservation gate to verify that alphanumeric codes such as MR0004-05 and humans.2 are preserved in the translation; a numeric value and localization preservation gate to verify that numeric values remain unchanged while only the localization format changes; a no-introduction gate to verify that the translation does not introduce numbers that do not exist in the source text; a scientific notation leakage gate to detect abnormal leakage of scientific notation; a format switch parity gate to verify that bold, italic, underline, superscript, and subscript switches appear in pairs in the translation; and a superscript and subscript preservation gate to verify the preservation of superscripts and subscripts.
[0037] The authenticity gate family includes: the translation equivalence gate, which is used to determine that the translation is not translated when the translation and the source text are identical byte by byte; the translation echo source text gate, which is used to detect echo phenomena at the level of capitalization, whitespace, and punctuation; the source text is not empty while the translation is empty gate, which is used to detect the case where the source text has content but the translation is empty; the control byte leakage gate, which is used to detect the leakage of NUL and C0 control bytes; and the source text quality guard gate, which is used to detect damaged optical character recognition input marks.
[0038] The semantic gate family includes: Content Drift Gate (for detecting additions or deletions of content in the translation that exceed the scope of translation); Named Entity Retention Gate (for verifying the retention of named entities during the translation process); Length Ratio Out-of-Bounds Gate (for detecting whether the length ratio between the translation and the source text exceeds the bounds); Language Pair Specific Length Ratio Lookup Table Gate (for configuring the upper and lower bounds of the reasonable length ratio between the translation and the source text according to the language pair); Terminology Constraint Satisfaction Gate (for verifying the terminology constraint satisfaction level item by item, i.e., if the number of satisfied terms divided by the total number of terms that should be satisfied is less than 1.0, it is marked); Numerical and Entity Illusion Gate (for detecting numerical and named entity illusions in the translation); Self-Consistency Gate (for generating multiple translations for low-confidence units and calculating pairwise similarity); and No-Reference Quality Estimation Gate (for predicting the output quality score of the source-to-translation pair without relying on human reference to the translation).
[0039] Language-specific gate families include: a source language character leakage gate for detecting East Asian characters leaked into Latin or Greek translations; a known Greek spelling gate for verifying Greek spelling; a decimal localization gate for detecting the correct use of decimal separators by language; a number and word spacing gate for detecting whether the spacing between numbers and words conforms to language standards; a line continuation mark leakage gate for detecting line numbers and line continuation marks leaked into translations; a character spacing gate for detecting abnormal character spacing such as “Α υ τή”; and an East Asian full-width punctuation leakage gate for detecting abnormal leakage of East Asian full-width punctuation. Because all quality checks are implemented deterministically with extremely low latency, line-by-line full-gate quality checks of a single document with tens of thousands of lines can be completed within seconds in the worker's process, reducing cost and latency by several orders of magnitude compared to line-by-line calls to large language models for quality checks.
[0040] like Figure 14As shown, the numerical and entity illusion gates in the semantic class family extract numerical and named entities from the source and translation texts, respectively. Entities appearing in the translation text but not in the source text, and not due to unit conversion or date rewriting, are marked as suspected illusions and blocked. This gate is implemented using deterministic regular expression extraction and set difference operations, with zero large language model calls. The self-consistency gate generates multiple translations for units judged as having low confidence, using different temperatures or prompts. It calculates the pairwise similarity between the multiple translations. When the maximum pairwise similarity is lower than a preset threshold, it is judged as low confidence and triggers the review process. The self-consistency gate samples units at a preset sampling ratio to control computational costs. The no-reference quality estimation gate outputs a quality prediction score for the source-to-translation pair without relying on human reference to the translation. When the quality prediction score is lower than a first preset threshold, it is marked as pending review; when it is lower than a second preset threshold, delivery is blocked. The generation of multiple translations required by the aforementioned self-consistency gate is executed through the translation inference interface of the hierarchical translation backtracking cascade module, and its inference call is undertaken by this module rather than initiated by the deterministic quality check gate itself; the quality prediction score of the no-reference quality estimation gate is generated by a preset evaluator that does not depend on the generative language model; each gate itself only performs deterministic similarity or threshold comparison judgment.
[0041] like Figure 5 As shown, the tag topology preservation module performs topology consistency checks on inline tags, half tags, field instructions, and permutable tokens in computer-aided translated bilingual files, requiring that the inline tag count, nesting depth, pairing balance, and arrangement order of the translated and source texts match one by one. The tag topology preservation module performs parity checks on bold, italic, underline, superscript, and subscript format switches, counting the number of entry and exit markers for each type of format switch in the source text, requiring that the corresponding format switches appear in pairs in the translated text; if a format switch in the translated text lacks its paired exit marker, the format skeleton of that unit is considered broken and retranslated. For bilingual paragraphs with a status of "locked" or "confirmed," the tag topology preservation module prohibits any rewriting operations, ensuring that manually confirmed content is not touched in the automated processing flow. The structure preservation score is defined as min(1.0, the number of format elements in the translated text divided by the number of format elements in the source text). When the structure preservation score is below 0.9, a quality inspection alarm is triggered, thus providing a continuous measure of format fidelity in addition to the binary pass / fail judgment.
[0042] like Figure 6As shown, the multi-key polling avalanche parallel module maintains a key pool consisting of M inference service keys, where M is no less than six and preferably no less than ninety. The multi-key polling avalanche parallel module uses a "take next key" function to poll and select keys at the entry point of concurrent translation requests, distributing concurrent translation requests for multiple translatable units of the same document to different keys. Each key bears its own independent rate limit, thus achieving M times the effective throughput for parallel translation of multiple translatable units of the same document. The key pool supports two arrangement methods: comma-separated multi-account grouping configuration and single-account multi-key. Each account maintains its own subset of keys. The multi-key polling avalanche parallel module maintains a chain exhaustion detection function. When all models within the locked chain member set fail consecutively within a preset time window, a degradation signal is sent to the deterministic quality check gating module and the front-end progress channel, causing the front-end data source logo to be downgraded in display. In one specific embodiment, the key pool size is ninety-three, supporting a multi-account grouping configuration where two accounts each hold a subset of keys, and is compatible with the old single-key numbering configuration. Through avalanche parallel processing, the 99th percentile processing latency for multi-unit translation of a single document is significantly reduced compared to the serial baseline. In a set of tests, the 99th percentile latency for line-by-line processing was reduced from hundreds of milliseconds to hundreds of milliseconds, and the processing time for a document with tens of thousands of lines was reduced from hours to minutes.
[0043] like Figure 7 As shown, the multi-agent translation pipeline module schedules six agents sequentially or in parallel for the same translatable unit: the context extraction agent provides document-level context for translation, extracting background information relevant to the current unit from the context of the entire document and injecting it into translation prompts; the translation agent performs the main translation, receiving the plain text run after removing the format skeleton and translating it; the consistency checking agent ensures that the same source terms are translated consistently throughout the entire text, maintaining a cross-document terminology consistency tracking table, and forcing the same translation method to be used for the same source terms appearing in multiple documents of the same project; the quality review agent performs a review, performing a second verification of the translation results; the back-translation agent performs reverse translation of the translation and compares it with the source text to detect semantic shifts; and the terminology checking agent verifies the terminology table constraints to ensure that the translation conforms to the project terminology specifications. The multi-agent translation pipeline module also includes a relay pipeline submodule, configured to schedule the above agents in a unit-by-unit relay manner for ultra-large-scale files and maintain a live heartbeat beacon. When a unit does not update its heartbeat within a preset time, it is determined to be stalled and re-entered into the queue, thereby ensuring the reliable progress of large-scale tasks.
[0044] like Figure 8As shown, the phase band progress mapping module deterministically maps fine-grained stage identifiers generated during the translation task execution to predefined phase bands. Each phase band corresponds to a percentage range. The mapping results are output to the front end in real time via server push events, allowing the front end to present phase-by-phase progress without polling. Different task types are configured with their own set of phase bands. The mapping uses a phase derivation function to match fine-grained stage identifiers to the corresponding phase bands and linearly scales the current percentage within the percentage range of that phase band, reverting to the first phase for unidentified stages. Each progress event carries at least four fields: phase identifier, percentage within the phase, lower bound of the phase band, and upper bound of the phase band. For translation tasks, the phase bands are as follows: first phase (e.g., read, detect, translate.row, etc.) corresponding to 0-65%; rescue phase corresponding to 65-80%; revision phase corresponding to 80-88%; consistency check phase corresponding to 88-93%; splicing phase corresponding to 93-97%; and write phase corresponding to 97-100%. For different task types, such as unified pipeline for subtitle videos, legal analysis, and quality inspection reruns, configure their own phase band sets to ensure that the progress semantics are consistent with the actual stage of the task.
[0045] like Figure 9 As shown, the translation memory loop module first performs an exact match query for each translatable unit using the 64-character cryptographic hash of the source text as the exact matching key, and then performs a fuzzy match query using the index based on the triple similarity operator as the fuzzy matching key. If a match is found, the stored translation is directly reused and the inference call is skipped. For units that do not match, the translation is obtained through inference, and the source text-translation-metadata triple is written back to the translation memory, forming a memory value-added loop from query to inference to write-back. The translation memory establishes unique constraints at the project level, recording the source text hash, source text normalized text, translation, language pair, and hit count. The write-back operation is performed after quality inspection, and units produced by mandatory terminology constraints are marked with a higher confidence level. The translation memory loop module supports bidirectional import and export in two industry standard formats, TMX and SDLTM, ensuring interoperability with third-party computer-aided translation tools. As the memory accumulates, the memory hit rate increases, and the number of inference calls and costs per unit document decrease, forming a positive feedback loop for memory value-added.
[0046] The source tracing module records the output level identifier of the final translation for each translation unit. The output level identifier includes at least five values: memory hit, lead translator, strict retranslation, avalanche retranslation, and source text guarantee. The output level sequence of each unit is persistently stored in a relational database as auditable translation source tracing evidence. The output level record of each unit includes fields such as unit number, source text content, translated text content, output level identifier, and timestamp, forming a complete audit chain to meet the stringent requirements for traceability of the translation output process in high-compliance scenarios such as legal and pharmaceutical industries.
[0047] The cost cap and token budget module applies token budget constraints at both the task and tenant levels. For excessively long contexts exceeding a single request threshold, it automatically switches to streaming segmented calls. When the tenant budget reaches the soft cap, an alarm is triggered; when it reaches the hard cap, a circuit breaker is executed. If the task-level cost cap is exceeded, a cost cap exceedance exception is thrown to terminate task execution. The cost cap and token budget module monitors token consumption in real time. When token consumption is detected to be approaching a preset threshold, corresponding alarms or circuit breaker mechanisms are triggered to ensure that system resources are not consumed indefinitely.
[0048] like Figure 10 As shown, the multilingual localization rule engine module applies differentiated number and typesetting localization rules according to the target language. The decimal separator rule uses commas as decimal separators for Dutch, Polish, Russian, and German; the thousandths separator rule uses thousandths places as thousandths separators for Dutch and German, and spaces as thousandths separators for Polish and Russian; the language-to-specific-length-ratio lookup table configures upper and lower bounds for the reasonable length ratio of the translation relative to the source text for each source-to-target language pair. When the translation length ratio exceeds the configured range, a quality check alarm is triggered to detect issues such as translations that are too short (omissions) or too long (additions); the reading direction rule enables right-to-left typesetting reinforcement for Arabic, Hebrew, Persian, and Urdu, and East Asian character reinforcement for Chinese, Japanese, Thai, and Korean. The multilingual localization rule engine module supports no fewer than thirty target languages, covering German, Dutch, Greek, French, Italian, Spanish, Portuguese, Polish, Russian, Czech, Slovak, Hungarian, Romanian, Bulgarian, Turkish, Japanese, Korean, Chinese, Arabic, Hebrew, Persian, Urdu, Thai, Swedish, Danish, Finnish, Norwegian, Vietnamese, Indonesian, Malay, and Ukrainian. The localization rules are linked with the decimal localization gate, the number and word spacing gate, and the East Asian full-width punctuation leakage gate in the deterministic quality inspection gating module to form a language-specific gate family.
[0049] like Figure 11As shown, the legal contract review module performs systematic clause verification on uploaded contract documents and outputs structured rulings. The systematic clause verification covers nine points: protection of minors, insurance clauses, compliance with personal data protection, enforceability of liquidated damages, party identities, signing blocks, conflicts of interest, jurisdiction, and force majeure. The legal contract review module includes a Chinese legal agent oriented towards Chinese law and an international legal agent oriented towards EU, US, and UK law. It automatically selects the legal agent based on the applicable legal jurisdiction of the contract and uses a high-precision inference-based link scheduling model. The structured ruling outputs an overall risk level as a machine-readable object, with values ranging from low, medium, high, to blocking. For each marker, it provides a severity level (blocking, severe, or alert) and a bilingual summary, while simultaneously generating an exported document with highlighted risky clauses. The legal analysis task is configured with a dedicated set of phase bands, including legal analysis phases corresponding to 0 to 30%, legal analysis phases corresponding to 30 to 65%, legal translation phases corresponding to 65 to 85%, and legal rendering phases corresponding to 85 to 100%, so that the progress semantics are aligned with the legal process.
[0050] like Figure 12 and Figure 13 As shown, the subtitle and video screen text processing module retains the timecode format of the subtitle file (HH:MM:SS, mmm) and the line break structure of each subtitle block, while applying reading speed constraints. This ensures that the number of characters per second does not exceed a preset limit (e.g., 20), and the number of characters per line does not exceed a first preset limit (e.g., 42) for Latin characters and a second preset limit (e.g., 20) for East Asian characters. When the translation exceeds the reading speed constraint, the subtitle and video screen text processing module injects the subtitle unit along with its character budget as a restricted retranslation instruction back to the hierarchical translation backtracking cascade module. This triggers a restricted retranslation constrained by restating the subtitle within the specified character budget, using reading speed constraint feedback to drive translation compression. For inputs containing video, the subtitle and video screen text processing module uses a large visual model to perform optical character recognition on the screen text in the video frame and returns text with bounding boxes. It then performs terminology extraction and translation on both the screen text and subtitle text, supporting the export of video files with burned subtitles. The unified video pipeline is configured with a dedicated set of phase bands, including optical character recognition phase corresponding to 0 to 40%, term extraction phase corresponding to 40 to 55%, translation phase corresponding to 55 to 95%, and export phase corresponding to 95 to 100%.
[0051] like Figure 15As shown, the local inference acceleration module runs a quantized local translation model on a local node equipped with an ARM architecture processor or GPU. For translatable units deemed simple according to preset complexity rules, such as short text, unlabeled text, or text without numbers, translation is completed locally without initiating cloud inference calls. Only complex or low-confidence units are sent to the cloud inference service. The local inference acceleration module employs speculative decoding technology, proposing candidate terms in parallel using a small-parameter draft model, which is then verified and accepted in parallel by a large-parameter target model. Because translation is a low-temperature task with a high consistency rate between the draft and the target, speculative decoding significantly improves decoding throughput while maintaining the same translation quality. The local inference acceleration module performs key-value caching reuse for system hints and terminology prefixes, reusing the prefix key-value cache across multiple files in the same project to reduce hint processing latency. Local quantization uses an 8-bit or 4-bit quantization scheme to achieve a balance between quality preservation and speed.
[0052] like Figure 16 As shown, the Domain Adaptation and Data Flywheel module extracts source text to target text unit pairs for each translation task that passes quality inspection and is manually confirmed. After de-identification to remove client names and project metadata, these pairs are appended to the training corpus. This appending operation is selectively performed on a project-by-project basis, with client authorization as a prerequisite. Based on the training corpus, the Domain Adaptation and Data Flywheel module periodically trains low-rank adaptive adapters. These adapters are trained separately by domain, such as Dutch technical manuals, German instruction manuals, French marketing copy, and English security data tables. During inference, multiple adapters are switched on the same base model without reloading the base model. The Domain Adaptation and Data Flywheel module includes an expert hybrid routing submodule, which routes translatable units to domain experts corresponding to technical, legal, or marketing departments based on their domain labels. When the routing confidence falls below a preset threshold, it reverts to the general model, thus forming a data flywheel from translation to confirmation to de-identification to incremental training to deployment to better translation.
[0053] like Figure 17As shown, the adaptive routing and multi-level caching module includes a complexity adaptive routing submodule, which estimates the complexity of each translatable unit based on character length, number of tags, and term hit count, routing simple units to the low-cost fast channel, medium-sized units to the main model, and complex units to the high-precision model. The confidence routing submodule collects the logarithmic probabilities of the tokens output by the main translation model and calculates the unit-level confidence, skipping revision phases for high-confidence units and applying a stricter revision process to low-confidence units. The progressive refinement submodule first produces a draft translation using the fast channel, then refines it using the high-precision model as a hint, ensuring that the token consumption for refinement hints is lower than that of translating from scratch. The multi-level caching submodule includes at least a precise cache keyed by the source text and terminology hash, a fuzzy cache keyed by the source text embedding vector, and a retrieval enhancement submodule. Before inference, the retrieval enhancement submodule retrieves several translation memory entries most similar to the source text as few-sample examples to inject into inference hints, improving terminology consistency and memory reuse rate.
[0054] like Figure 18 As shown, the idempotency and audit billing module includes a task idempotency submodule. For each task, an idempotency key is generated using a triplet of owner identifier, request header value, and request body hash. Within a preset validity period (e.g., 24 hours), repeated submissions to the same idempotency key directly return the first result without duplicate queuing, preventing duplicate billing and processing. The audit log submodule records the entire chain of events, from task creation and scoring calculation to quality inspection, voucher export, and queue sorting. Each log entry includes the event type, timestamp, operator identifier, operation object identifier, and event details. The billing submodule charges by word count in RMB, applies a multiplier (e.g., 1.5x) to bilingual output, charges for subtitles by duration, and maintains a token ledger and transaction log for each user.
[0055] like Figure 19As shown, based on the above modules, the end-to-end workflow of this embodiment of the invention is as follows: the source document enters the document skeleton decomposition module and is split into a format skeleton and translatable text runs; the translation memory loop module performs a precise and then a fuzzy search on translatable units, and reuses them if a match is found; those that are not found enter the hierarchical translation backtracking cascade module and are processed according to four layers of increasing strictness; each layer's output is gated line by line by the quality inspection gating module, and the blocking level units that fail are backtracked to the corresponding backtracking layer for retranslation; the source tracing marking module records the output level of each unit; after the translated text is verified by the tag topology preservation module to ensure the integrity of the format skeleton, it is backfilled and spliced into a format-accurate deliverable according to the original skeleton; the quality inspection passed units are written back to the translation memory; the entire process is presented in real time through phase band progress mapping and server push events, and is constrained by the cost limit and token budget modules. Therefore, the four elements of document skeleton decomposition (zero format loss), deterministic quality inspection gating (low-cost line-by-line quality inspection), layered rollback (translation bits are never empty), and traceability marking (audit) work together to form an end-to-end zero-format translation closed loop from the source document to the format-accurate deliverable. This comprehensively solves the problems of format destruction, echo and language residue, high quality inspection costs, and lack of traceability mentioned in the background technology.
[0056] In one embodiment, the translation system is configured with a deterministic quality inspection gating module. The decision logic of this module is implemented based on deterministic rule operations that do not rely on generative language models. The rule operations include regular expression matching, set operations, finite state automata, or any combination thereof. The deterministic quality inspection gates are stratified into blocking and non-blocking levels according to the severity of the detected quality problems, with the non-blocking level further divided into alarm and alert levels. Preferably, the total number of deterministic quality inspection gates deployed in the system is no less than twenty-six, and the decision latency of a single gate is in the microsecond range. This microsecond-level latency is achieved by pre-compiling the regular expressions required for each gate and combining them with set difference operations, thereby maintaining fine-grained hierarchical control while meeting the high throughput and low latency requirements of industrial translation scenarios.
[0057] Preferably, the system further includes a statistical guarantee authentication submodule, which is based on distribution-independent conformal calibration. Specifically, it calculates the quantile threshold q of the inconsistency score using a calibration set with objective manual judgment annotations; for a new translation unit to be authenticated, it obtains its critical error score f(x)∈[0,1] and compares f(x) with q to complete the authentication. This authentication mechanism provides statistical guarantees under finite sample conditions, that is, the critical error missed detection rate of the authenticated set has a statistical upper bound of P(authentication∧critical error)≤α. When this missed detection rate upper bound exceeds a preset safety threshold, the system triggers mandatory manual review or reinjects the corresponding unit into the rollback cascade process. Authenticated translation units are automatically locked (locked=true, or translate=no) in the exported SDLXLIFF or generated bilingual file, and an authentication certificate is attached. The authentication certificate records key information such as the number of authenticated units, authentication coverage, and upper bound of the false negative rate. Preferably, the authentication certificate is also bound to the cryptographic hash of the deliverable content and the content-addressed version identifier of the quality inspection scoring strategy, and is signed with an asymmetric private key and made available for independent verification by any third party through a public verification interface. When a change in the scoring strategy causes a change in the version identifier, the existing authentication certificate automatically becomes invalid and triggers a recalibration based on the new version identifier.
[0058] In one embodiment, the translation system operates in streaming mode, employing a sliding window or incremental parser to decompose the received ultra-large source documents into chunks and skeletons. In this mode, only the current processing window and the tag stack necessary to maintain contextual dependencies are retained in memory; for translation units that have completed translation backfilling and delivery, their occupied memory is released immediately. The system uses staged phase band mapping to generate quantifiable processing progress and outputs the translation progress and ready-to-ready translation fragments to the client in real time via server push events, thereby achieving near real-time streaming translation processing of ultra-large documents, significantly reducing peak memory usage and improving the perceived response speed for users.
[0059] In one embodiment, the translation system employs an edge-cloud collaborative architecture to achieve secure translation where sensitive data remains on the local terminal: skeleton stripping and the qualitative checks are performed on the local terminal, which is a native computing node equipped with an ARM architecture processor or a graphics processing unit. During the inference phase, techniques such as quantized local models, speculative decoding, and key-value caching reuse are used to accelerate processing. After skeleton stripping, only the pure translatable text run, stripped of all formatting and layout information, is transmitted to the remote inference interface. The translated text run returned from the remote terminal is then backfilled and spliced with the previously preserved format skeleton on the local side to restore the complete translation. Throughout the entire process, the original formatting and layout data remain on the local terminal, thus eliminating the risk of sensitive content being leaked via format channels, while simultaneously balancing the powerful inference capabilities of the cloud with the security and compliance requirements of local data.
[0060] This invention also provides a method for format-fidelity document translation and localization applied to the above-mentioned system, comprising the following steps: receiving a source document; the document skeleton decomposition module decomposes each translatable unit into a format skeleton and translatable text runs; and submits translation inference only for translatable text runs; the translation memory loop module performs an exact match query and then a fuzzy match query on the translatable units; if a match is found, the translation is reused and the inference is skipped; if no match is found, the unit enters the hierarchical translation backtracking cascade module, which processes the translation with increasing strictness through four layers: the skeleton translation main translation layer, the anti-echo strict retranslation layer, the avalanche cross-model layer, and the source text word-by-word preservation layer, to ensure the quality of the translation. The bit is never empty; the quality check gating module runs no less than twenty-six quality check gates on the translated unit, of which, except for the self-consistency gate and the no-reference quality estimation gate, the remaining gates are implemented by regular matching and set operations. If any blocking level gate fails, the unit is reinjected into the corresponding back-off layer of the hierarchical translation back-off cascade; the source tagging module records the output level of each unit. After the translated text is verified by the tag topology preservation module to be complete in terms of format skeleton, it is backfilled and spliced into a format-fidelity deliverable according to the original skeleton; the units that pass the quality check are written back to the memory bank by the translation memory ring module, and the output level sequence of each unit is persisted as translation source traceability evidence. The hierarchical translation back-off cascade processes multiple translatable units of the same document in parallel with no less than six times the effective throughput through multi-key polling avalanche parallelism. The fine-grained stage from receiving the source document to writing the format-fidelity deliverable is output in real time through phase band progress mapping and server push events. Apart from the self-consistency gate and the no-reference quality estimation gate, each deterministic quality check gate has a processing latency of less than 100 microseconds and is implemented using regular matching and set operations, without calling any large language models.
[0061] This invention also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the above-described method. The storage medium includes, but is not limited to, read-only memory, random access memory, magnetic disk, optical disk, or solid-state storage.
[0062] In this invention, unless otherwise explicitly specified and limited, the first feature above or below the second feature may be in direct contact with the first feature, or indirect contact via an intermediate medium. Furthermore, "above," "over," and "on top" of the first feature may mean the first feature is directly above or diagonally above the second feature, or simply indicates that the first feature is at a higher horizontal level than the second feature. "Below," "below," and "beneath" of the first feature may mean the first feature is directly below or diagonally below the second feature, or simply indicates that the first feature is at a lower horizontal level than the second feature.
[0063] In this invention, the terms "an embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to a specific feature, structure, material, or characteristic described in connection with that embodiment or example, which is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0064] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.
Claims
1. A system for translating and localizing format-accurate documents with skeleton decomposition quality inspection gating, characterized in that: It includes a document skeleton decomposition module, a layered translation backtracking cascade module, a deterministic quality inspection gating module, and a source tracing marking module; The document skeleton decomposition module is configured to receive a source document containing rich text format control codes, inline tags, or time code structures, and orthogonally decompose each translatable unit into two independent parts: a format skeleton and translatable text runs. The format skeleton retains the topological order and nesting relationship of all format control codes, inline tags, placeholders, and untranslatable symbols, while the translatable text runs only carry the natural language text fragments to be translated. The document skeleton decomposition module only submits the translatable text runs to the translation inference interface. After obtaining the translated text runs, it backfills and splices them according to the original positions of each text run in the format skeleton to reconstruct the translated unit containing complete format control codes. The deterministic property gate module is configured to run multiple deterministic property gates independently for each translated unit. The determination logic of the deterministic property gates is implemented by deterministic rule operations that do not rely on generative language models, including regular expression matching, set operations, or combinations thereof. The multiple deterministic property gates are divided into at least blocking and non-blocking levels according to their severity. The hierarchical translation back-off cascade module is configured to perform multi-level back-off cascade processing with increasing strictness on each translatable unit. Any unit that fails to pass any blocking gate is re-injected into the corresponding back-off layer of the hierarchical translation back-off cascade module. The source tracing and marking module is configured to record and persistently store the output level identifier of the final translation for each translation unit. The document skeleton decomposition module, the hierarchical translation backtracking cascade module, the deterministic quality check gating module, and the source tracing marking module work together to form an end-to-end format-fidelity translation closed loop from the source document to the format-fidelity deliverable. The closed loop ensures that the format information remains consistent before and after translation by topological consistency verification of the format control code, and ensures that the translation bit of each translatable unit is not empty at the time of delivery by the layer-by-layer backtracking processing of the hierarchical translation backtracking cascade module.
2. The skeleton decomposition quality inspection gating format-preserving document translation and localization system as described in claim 1, characterized in that, The document skeleton decomposition module supports source document types including rich text format RTF, Office Open XML document DOCX, portable document format PDF, spreadsheet XLSX, subtitle file SRT, and computer-aided translation exchange file SDLXLIFF and MQXLIFF.
3. The skeleton decomposition quality inspection gating format-preserving document translation and localization system as described in claim 2, characterized in that, For rich text bilingual files, the format skeleton preserves the format switches and their respective scopes, preserves inline tags and half tags, and automatically sets the language code according to the target language; the backfill splicing operation performs pairwise verification of the entry and exit tags for each format switch during translation backfilling, and performs consistency verification of the source tag count and the translation tag count for each inline tag.
4. The skeleton decomposition quality inspection gating format-preserving document translation and localization system as described in claim 1, characterized in that, The N deterministic quality inspection gates of the deterministic quality inspection gate control module are divided into three levels according to severity: blocking level, alarm level, and prompt level. A unit that fails any blocking level quality inspection gate is re-injected into the corresponding back-off layer of the hierarchical translation back-off cascade module. Each quality inspection gate scores the unit independently. If a unit fails the i-th gate, it continues to score the remaining gates, thereby outputting a complete quality inspection profile of passing or failing gate by gate.
5. The skeleton decomposition quality inspection gating format-preserving document translation and localization system as described in claim 4, characterized in that, The N definite property detection gates are divided into four families: structural class, authenticity class, semantic class, and language-specific class. The structural quality inspection gates include the inline label count consistency gate, the alphanumeric code retention gate, the numeric value and localization retention gate, the gate for not introducing numbers, the scientific notation leakage gate, the format switch parity gate, and the superscript and subscript retention gate. Authenticity-related quality control gates include the translation-equivalent source text gate, the translation-echo-source text gate, the source text being non-empty while the translation is empty gate, the control byte leakage gate, and the source text quality guard gate. Semantic quality control gates include content drift gate, named entity retention gate, length ratio out-of-bounds gate, language pair specific length ratio lookup table gate, term constraint satisfaction gate, numerical and entity illusion gate, self-consistency gate, and no-reference quality estimation gate. Language-specific quality control gates include source language character leakage gate, known Greek spelling gate, decimal localization gate, spacing between numbers and words gate, line continuation mark leakage gate, character spacing gate, and East Asian full-width punctuation leakage gate.
6. The skeleton decomposition quality inspection gating format-preserving document translation and localization system as described in claim 5, characterized in that, The self-consistency gate is configured to generate multiple translations with different temperatures or different prompts for units determined to have low confidence through the translation inference interface of the hierarchical translation backtracking cascade module, calculate the pairwise similarity between the multiple translations, and determine low confidence when the maximum pairwise similarity is lower than a preset threshold and trigger a review process; the self-consistency gate samples the units at a preset sampling ratio, and its inference call is undertaken by the hierarchical translation backtracking cascade module rather than initiated by the deterministic quality check gate itself.
7. The skeleton decomposition quality inspection gating format-preserving document translation and localization system as described in claim 1, characterized in that, The hierarchical translation backtracking cascade module comprises four layers: the skeleton translation master translation layer, the anti-echo strict retranslation layer, the avalanche cross-model layer, and the source text word-by-word preservation layer. These layers are arranged in ascending order of strictness. The skeleton translation master translation layer performs regular translation on the translatable text run. If all blocking gates pass, the unit is finalized and marked as "master translation." The anti-echo strict retranslation layer retranslates units that trigger blocking gates with explicit prompts in ascending retry sequence numbers. The avalanche cross-model layer switches units that still fail after the anti-echo strict retranslation layer to different models or different capability levels for retranslation. The source text word-by-word preservation layer backfills the translation position of the unit with the source text word-by-word and sets the unit to "pending review." 8. The skeleton decomposition quality inspection gating format-preserving document translation and localization system as described in claim 7, characterized in that, The layered translation backtracking cascade module constitutes a state machine with backtracking layers as states. The key operating rule of this state machine is that the state transitions between each backtracking layer driven by the blocking level quality inspection result, and it is prohibited to finalize the draft of the unit in any blocking level gate failure state.
9. The skeleton decomposition quality inspection gating format-preserving document translation and localization system as described in claim 1, characterized in that, It also includes a tag topology preservation module, which is configured to perform topology consistency checks on inline tags, half tags, field instructions and permutable tokens in computer-aided translation bilingual files. It requires that the inline tag count, nesting depth, pairing balance and arrangement order of the translation and the source text match one by one, and performs parity checks on the format switches of bold, italics, underline, superscript and subscript to ensure that the format switches appear in pairs in the translation. For bilingual paragraphs with a status of "locked" or "confirmed", the tag topology preservation module prohibits any rewriting operations.
10. The skeleton decomposition quality inspection gating format-preserving document translation and localization system as described in claim 1, characterized in that, It also includes a multi-key polling avalanche parallel module, which is configured to maintain a key pool consisting of M inference service keys, where M is no less than six. The multi-key polling avalanche parallel module uses a "take next key" function to poll and select keys at the entry point of concurrent translation requests, distributing concurrent translation requests for multiple translatable units of the same document to different keys, so that each key bears its own independent rate limit. The key pool supports two arrangement methods: comma-separated multi-account grouping configuration and single-account multi-key, with each account maintaining its own key subset. The multi-key polling avalanche parallel module maintains a chain exhaustion detection function, which sends a degradation signal to the deterministic quality check gating module and the front-end progress channel when all models in the locked chain member set fail consecutively within a preset time window.
11. The skeleton decomposition quality inspection gating format-preserving document translation and localization system as described in claim 1, characterized in that, It also includes a multi-agent translation pipeline module, which is configured to sequentially or in parallel schedule at least four of the following six agents for the same translatable unit: context extraction agent, translation agent, consistency check agent, quality review agent, back translation agent, and terminology check agent. The multi-agent translation pipeline module also includes a relay pipeline submodule, configured to schedule the aforementioned agents in a unit-by-unit relay manner for ultra-large-scale files and maintain a live heartbeat beacon.
12. The skeleton decomposition quality inspection gating format-preserving document translation and localization system as described in claim 11, characterized in that, The consistency checking agent maintains a cross-file terminology consistency tracking table, which forces the same translation to be used for the same source term appearing in multiple files of the same project.
13. The skeleton decomposition quality inspection gating format-preserving document translation and localization system as described in claim 1, characterized in that, It also includes a translation memory ring module, which is configured to perform an exact match query for each translatable unit by first using the 64-character cryptographic hash of the source text as the exact match key, and then perform a fuzzy match query by using the index based on the character triple similarity operator as the fuzzy match key. If a match is found, the stored translation is directly reused and the inference call is skipped. If a match is not found, the translation is obtained through inference and the "source text-translation text-metadata" triple is written back to the translation memory.
14. The skeleton decomposition quality inspection gating format-preserving document translation and localization system as described in claim 13, characterized in that, The translation memory establishes unique constraints at the project level, recording source text hash, source text normalized text, translation, language pairs, and hit count; the write-back operation is performed after quality inspection is passed; the translation memory ring module supports bidirectional import and export in two industry standard formats: Translation Memory Exchange Format TMX and Translation Memory Library Format SDLTM.
15. The skeleton decomposition quality inspection gating format-preserving document translation and localization system as described in claim 1, characterized in that, The source tracing and marking module records at least five values for the output level identifier of each translation unit: memory hit, main translator, strict retranslation, avalanche retranslation, and source text guarantee. The output level record of each unit includes unit number, source text content, translation content, output level identifier, and timestamp.
16. The skeleton decomposition quality inspection gating format-preserving document translation and localization system as described in claim 1, characterized in that, It also includes a multilingual localization rule engine module, which is configured to apply differentiated number and typesetting localization rules according to the target language, including decimal separator rules, thousands separator rules, language-to-specific length ratio lookup tables, and reading direction rules; the multilingual localization rule engine module supports no less than thirty target languages.
17. The skeleton decomposition quality inspection gating format-preserving document translation and localization system as described in claim 1, characterized in that, It also includes a statistical assurance authentication submodule, which is configured to be based on a distribution-independent conformal calibration framework. It uses calibration data with manual judgment annotations to construct an inconsistency measure and outputs an upper bound of the serious error missed detection rate with a preset statistical confidence level for the set of translated units that have passed the determination quality inspection gating module. When the upper bound exceeds a preset threshold, a forced manual review or re-injection of the hierarchical translation rollback cascade module is triggered. The certified unit is locked in the exported computer-aided translation bilingual file. The statistical guarantee certification submodule is also configured to calculate the version identifier of the implementation code and running behavior of the quality inspection scoring strategy in a content addressing manner. The calibration data and the upper bound of the serious error missed detection rate are both bound to the version identifier. When the scoring strategy changes and causes the version identifier to change, the existing certification results automatically become invalid and recalibration is triggered. An authentication record is issued for the authenticated deliverables. The authentication record is bound to the content hash of the deliverable and the version identifier, and can be verified by an independent verification terminal.
18. The skeleton decomposition quality inspection gating format-preserving document translation and localization system as described in claim 1, characterized in that, The document skeleton decomposition module and the deterministic quality inspection gating module support streaming processing mode. They are configured to perform block skeleton decomposition and pipeline quality inspection on ultra-large documents or real-time data streams using a sliding window or incremental parsing method. Only the current processing window and its context-dependent tag stack are retained in memory, and the memory occupied by the delivered unit is released after the translation is backfilled.
19. The skeleton decomposition quality inspection gating format-preserving document translation and localization system as described in claim 1, characterized in that, The system adopts a cloud-edge collaborative deployment. The document skeleton decomposition module and the deterministic quality inspection gating module are deployed on the local terminal device. The format skeleton stripping and deterministic quality inspection are completed on the terminal side. Only the run length of the translatable text after stripping the format information is transmitted to the translation inference interface on the remote end. The translation backfilling and splicing are completed on the terminal side, so that the format and layout data do not leave the local terminal.
20. A method for format-fidelity document translation and localization applied to the system described in any one of claims 1 to 19, characterized in that, Includes the following steps: S1, Receive the source document, and the document skeleton decomposition module decomposes each translatable unit into a format skeleton and translatable text run, and submits translation inference only for the translatable text run. S2, the translation memory ring module first performs an exact match query and then a fuzzy match query on the translatable unit. If a match is found, the translation is reused and the reasoning is skipped. S3, those that are not hit enter the hierarchical translation back-off cascade module, which processes the translation with increasing strictness in four layers: skeleton translation main translation layer, anti-echo strict retranslation layer, avalanche cross-model layer, and source text word-by-word preservation of the bottom layer. S4, the property check gating module performs multiple property check operations on the translation unit to implement property check. If any blocking level gate fails, the unit will be reinjected to the corresponding backoff layer in step S3. S5, the traceability tagging module records the output level of each unit. After the translation is verified by the tag topology preservation module to ensure the integrity of the format skeleton, it is backfilled and spliced according to the original skeleton to form a format-authentic deliverable. S6. Units that pass quality inspection are written back to the memory bank by the translation memory ring module, and the hierarchical sequence produced by each unit is persisted as translation source tracing evidence.
21. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the format-fidelity document translation and localization processing method as described in claim 20.