Multi-language corpus automatic construction and translation optimization system
Through the automatic multilingual corpus construction system, the problem of low automation in multilingual corpus construction has been solved, efficient corpus coverage and translation model optimization have been achieved, and the translation quality and semantic consistency of the corpus have been improved.
Patent Information
- Application Number
- CN202510584797.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-07
- Publication Date
- 2025-09-19
AI Technical Summary
In the existing technology, the construction of multilingual corpora has the problems of low automation, limited language coverage, insufficient update frequency, and lack of deep semantic alignment algorithms for multilingual corpus alignment, resulting in insufficient generalization ability of translation systems for low-resource languages.
A multilingual corpus automatic construction system is adopted, including corpus collection, language identification and grouping, semantic alignment and translation optimization modules. By automatically collecting multilingual text data, format cleaning, language identification and group storage are performed, and semantic vector alignment and translation model optimization are used, combined with corpus quality assessment and screening, a complete automatic construction process is formed.
It achieves efficient and automated construction of multilingual corpora, improves the coverage and update efficiency of corpora, enhances the generalization and adaptability of translation models, ensures the semantic consistency and usability of corpus quality, and improves the quality of cross-language translation.
Smart Images

Figure CN120671690A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to natural language processing and multilingual data processing technology, in particular to a multilingual corpus automatic construction and translation optimization system, belonging to the field of artificial intelligence and machine translation technology. Background Art
[0002] With the multilingual distribution of global information resources, machine translation and cross-language semantic understanding face challenges with limited corpus availability and uneven quality. High-quality multilingual parallel corpora are crucial for training translation models and improving their performance. However, current manually curated or semi-automatically constructed corpora suffer from low automation, limited language coverage, and infrequent updates.
[0003] Existing technologies often rely on static resource packages or open-source datasets, making it difficult to continuously update and adapt to emerging languages or domains. While some systems have crawler and language recognition capabilities, they lack a complete, closed-loop collection-recognition-alignment-training-screening process, making it difficult to ensure the quality, stability, and usability of the constructed corpus.
[0004] In addition, in the process of multilingual corpus alignment, simple sentence length or keyword matching methods are generally used for alignment. There is a lack of deep alignment algorithms based on semantic vectors and context structures, which leads to insufficient semantic consistency of the corpus and limits the translation system's generalization ability for low-resource languages. Summary of the Invention
[0005] In order to achieve the above-mentioned purpose, the present invention provides the following technical solution: a multilingual corpus automatic construction and translation optimization system, comprising the following modules:
[0006] Corpus collection module, used to automatically collect multilingual text data from the Internet and open data sources, and perform format cleaning and structure conversion on it;
[0007] Language identification and grouping module, used to identify the language of the collected text and store it in structured groups according to language categories;
[0008] Semantic alignment module, used to align the semantics of texts in different languages and generate multilingual parallel sentence pairs;
[0009] The translation optimization module is used to train and optimize the existing translation model based on the aligned corpus to improve the quality of cross-language translation;
[0010] The corpus quality assessment and screening module is used to evaluate the semantic consistency and translation rationality of the constructed corpus and to filter out data that does not meet the standards.
[0011] Preferably, the corpus collection module includes:
[0012] A text collection unit is used to automatically capture multilingual text content from the internet based on pre-defined data source links. The data sources include multilingual news websites, international organization document platforms, and transnational technology communities. The collection process sequentially completes URL extraction, page parsing, and text extraction through a batch scheduling strategy.
[0013] The content cleaning unit processes the collected text into a unified format, removing redundant tags, special characters, and advertising interference, and re-structuring the paragraphs to ensure the linguistic legibility and semantic integrity of the text. The cleaned text is stored by language and annotated with source and timestamp information.
[0014] Preferably, the language identification and grouping module includes:
[0015] The language recognition unit is used to automatically identify the language of the collected text, analyze the character and phrase features of the text using a multilingual language model, output the corresponding language identifier, and add recognition confidence to each text segment;
[0016] The classification storage unit is used to store recognized multilingual texts by language into corresponding corpus collections and establish a language-data index relationship to support subsequent cross-language calls and alignment operations. The storage structure includes fields for text content, language label, source address, and unique number.
[0017] Preferably, the semantic alignment module includes:
[0018] A semantic encoding unit, which is used to convert multilingual text into semantic vector representations of equal dimensions. The semantic vectors are generated by a unified cross-language pre-training model and encode each sentence;
[0019] The similarity matching unit is used to calculate the cross-language alignment score between sentence pairs based on the semantic vectors and word mapping relationships of sentences in different languages. The alignment score is defined by the following composite function:
[0020]
[0021] in:
[0022] V s 、V t are the semantic vectors of the source language and target language sentences respectively;
[0023] is the standard cosine similarity, indicating overall semantic similarity;
[0024] To score word-level alignment, calculate for each source word The most similar word to the target word set Similarity And multiply by a relative position attenuation factor a ij , N is the number of words in the source language;
[0025] λ1 and λ2 are weight coefficients, which are used to adjust the weight ratio between overall semantics and word-level alignment;
[0026] When S align When it is greater than 0, the sentence pair is considered to be semantically equivalent and is stored in the system as aligned corpus.
[0027] Preferably, the translation optimization module includes:
[0028] A training update unit is used to incrementally update the existing translation model based on the aligned corpus. The update operation loads the pre-trained model parameters and performs fine-tuning training in combination with the new corpus to improve the translation effect of the target language pair.
[0029] The language control unit is used to dynamically adjust the input frequency of different language data during model training based on the proportion of each language in the current corpus data, ensuring that the model can balance the processing of high-frequency languages and low-resource languages, and achieve translation optimization between multiple languages.
[0030] Preferably, the corpus quality assessment and screening module includes:
[0031] The scoring calculation unit is used to automatically score the multiple sentence pairs generated by the system. The scoring dimensions include language fluency, syntactic completeness, and semantic consistency. The scoring is quantified based on the output of the language model.
[0032] The screening output unit is used to summarize and analyze the scoring results, set the screening threshold, eliminate sentence pairs with scores below the threshold, and simultaneously output the retained high-quality corpus to the training library service module.
[0033] Compared with the prior art, the present invention has the following beneficial effects:
[0034] Achieve efficient and automated construction of multilingual corpora: This invention integrates modules such as corpus collection, language identification, and semantic alignment to form a complete automatic construction process, which can continuously acquire and process multilingual text data, significantly improving the coverage and update efficiency of the corpus.
[0035] Improving the generalization and adaptability of the translation model: This paper uses structured parallel sentence pairs to dynamically optimize the translation model. Combined with the language ratio control mechanism, it takes into account the translation effects of both high-frequency languages and low-resource languages, enhancing the robustness and practicality of the model in a multilingual environment.
[0036] Ensuring semantic consistency and usability of corpus quality: This paper introduces a composite scoring function combining semantic similarity and word-level alignment, combined with automatic quality assessment and screening strategies, to effectively filter out data with semantic deviations or structural anomalies, ensuring that the corpus used for translation optimization has high consistency and linguistic fluency. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 A schematic diagram of the system module flow provided for this application;
[0038] Figure 2 Schematic diagram of the corpus collection module provided for this application;
[0039] Figure 3 Schematic diagram of the language identification and grouping module provided for this application;
[0040] Figure 4 Schematic diagram of the semantic alignment module provided for this application;
[0041] Figure 5 Schematic diagram of the translation optimization module provided for this application;
[0042] Figure 6 Schematic diagram of the corpus quality assessment and screening module provided for this application. DETAILED DESCRIPTION
[0043] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.
[0044] refer to Figures 1-6 The embodiment of the present invention provides a multilingual corpus automatic construction and translation optimization system, including the following modules:
[0045] The corpus collection module is used to automatically collect multilingual text data from the Internet and open data sources, and perform format cleaning and structure conversion on it.
[0046] In the corpus collection module, we first configure a list of data source links to establish multiple collection portals. These links can come from news websites, institutional document platforms, and technical communication communities. The system then sets up automatic scheduling rules to periodically schedule calls to the link list. During these calls, we first perform batch URL extraction, verify accessibility, and preview the extracted links, eliminating blank pages, jump pages, and non-text-dominated pages. An adaptive page parsing engine then identifies the page structure and locates the text area, enabling structured extraction of multilingual webpage content.
[0047] After the body text is extracted, the content will enter the content cleaning unit for processing. This unit first performs HTML tag stripping and special symbol removal operations, such as removing <script>、<style>、广告标记、社交插件等无关元素,同时移除不可见字符、换行异常等干扰信息。接着,系统通过规则与语言模型联合方式,对文本段落进行重整与语义分段,避免句子断裂或语段混合,提高后续语义识别与处理的精度。清洗后的文本统一转码为UTF-8编码格式,并依据页面语言初步判断结果进行初步语种划分。
[0048] 处理完成后,系统将每条清洗后的文本数据保存至初步语料数据库中,并自动附加三类元数据字段:其一为原始采集源链接地址,便于溯源与校验;其二为文本语言初步判断标签;其三为采集时间戳,用于后续的更新判断与数据版本管理。数据按语种进行分类归档,支持后续语言识别与语义对齐模块的统一调用和处理。
[0049] 语言识别与分组模块,用于识别采集文本所属的语言,并根据语言类别进行结构化分组存储。
[0050] 在语言识别与分组模块中,首先接收由内容清洗单元输出的结构化文本数据。语种识别单元基于训练好的多语言语言模型进行自动识别处理,该模型具备对字符层级、词组层级及上下文语义结构的综合分析能力。识别过程中,系统提取文本中的字母分布、标点使用模式、常见词频及语言特有短语作为输入特征,通过与已知多语语料样本进行比对,输出最可能的语言类别。例如,对于形态结构相近的语言组合(如西班牙语与葡萄牙语),系统采用字符共现矩阵进一步细化判断。每段文本识别结果均附带置信度评分,用于衡量识别结论的可靠性。
[0051] 置信度评分通过模型内部的多分类softmax输出层实现,系统设定阈值,如识别置信度低于设定阈值的文本将被标记为待确认,由人工校验接口进行后处理,确保语种划分准确率维持在高标准。对于置信度高的文本段,系统自动附加语言标识,并进入下一步分组流程。
[0052] 分类存储单元根据识别结果,将文本按语种标签分发至相应的语料库集合中,每个语种对应一套逻辑独立的存储分区。系统同时建立语种-数据索引映射表,并生成唯一编号作为文本主键。每条存储记录中包括:清洗后的文本内容字段、语言标识字段、源链接地址字段及时间戳信息字段,支持通过语种及其他元数据字段进行高效检索。该模块设计支持多语种并发处理,保证系统在大规模语料采集中可实现高效、稳定的语种自动识别与分组存储任务。
[0053] 语义对齐模块,用于对不同语言的文本语义进行等值对齐,生成多语言并列句对。
[0054] 在语义对齐模块中,语义编码单元首先将输入的多语言文本句子转换为统一维度的语义向量表示。每个语言的文本句子通过跨语言预训练模型进行编码,该模型使用了大规模并行语料库进行训练,能够捕捉不同语言之间的深层次语义关系。对于每个句子,系统首先对其进行分词处理,然后通过神经网络模型将每个词转化为低维度的词向量,再对整句的词向量进行聚合,生成一个全局语义向量表示。该语义向量能够有效地捕捉句子的语义信息,消除语言之间的差异,使得来自不同语言的句子可以在相同的语义空间中进行对比和匹配。
[0055] 接下来,相似度匹配单元基于语义向量对不同语种句子之间的跨语言对齐得分进行计算。对齐得分Salign通过一个复合函数进行计算,其中,第一部分是标准余弦相似度计算公式:表示源语言句子Vs和目标语言句子Vt的整体语义相似度。第二部分是基于词级对齐的加权相似度,计算源语言每个词与目标语言中所有词的相似度,通过最大值匹配,并乘以相对位置衰减因子aij,最终结果在整个句子级别进行求和平均。该加权相似度通过以下公式实现:
[0056]
[0057] 其中,λ1和λ2是调整整体语义相似度与词级对齐之间权重比例的系数,n为源语言句子的词数,为源词与目标词之间的相似度。
[0058] 最终,通过计算出的对齐得分Salign,系统判定当得分大于0时,该句对即被认为是语义等价,符合语义对齐的标准。符合条件的语句对被存入对齐语料库中,供后续的翻译模型训练与优化使用。若对齐得分低于阈值,系统会将其标记为不合格,并进行人工或算法修正。
[0059] 翻译优化模块,用于基于对齐语料对现有翻译模型进行训练优化,以提升跨语言翻译质量。
[0060] 在翻译优化模块中,首先,系统从对齐语料库中提取出最新的源语言与目标语言句对,通过加载现有的预训练翻译模型参数,结合新的语料数据,进行微调训练。更新的过程以小批量梯度下降算法进行,优化目标是最小化源语言与目标语言之间的翻译损失函数。训练过程中,通过动态更新模型的权重,确保新引入的语料能够有效地改善翻译质量,特别是在目标语种上提升翻译的流畅性和准确度。随着更多的多语言语料的输入,系统的翻译效果逐步得到优化,特别是在低资源语种的表现上也得到显著提升。
[0061] 语种调控单元的作用是确保在训练过程中,模型能够适应不同语种的翻译需求,尤其是在处理高频语种和低资源语种时。系统会实时监控当前语料数据中各语种的比例,并动态调整模型训练时不同语种数据的输入频率。例如,对于包含大量高频语种(如英语、中文)的数据集,系统会相应减少该语种的输入频率,避免模型过度依赖这些语言,从而导致翻译性能在低资源语言上的下降。相反,低资源语言的数据输入频率会被适当提高,确保模型能够均衡地学习各语种的翻译特性。该调控机制有效避免了翻译优化过程中出现偏向某一语种的情况。
[0062] 在更新和调控过程中,系统通过持续监控模型的性能,根据翻译质量反馈进一步调整训练策略。具体来说,系统会根据翻译结果的BLEU分数自动调节更新步长和学习率,以优化训练过程。经过一段时间的增量更新与语种调控后,系统能够实现多语种的翻译优化,提升了整体翻译质量,尤其在少语种翻译效果上取得显著的突破。
[0063] 语料质量评估与筛选模块,用于对构建的语料进行语义一致性、翻译合理性评估,并筛除不符合标准的数据。
[0064] 在语料质量评估与筛选模块中,首先通过评分计算单元对系统已生成的跨语种句对数据进行自动化评分处理。评分维度包括语言通顺性、句法完整性与语义一致性三项内容。具体地,语言通顺性指标基于多语语言模型的困惑度进行打分,模型越容易预测目标语言文本,困惑度越低,得分越高;句法完整性通过依存句法分析工具分析句子结构的完整性与合法性;而语义一致性则基于前述语义对齐模块中生成的句对语义向量,利用余弦相似度进行计算。系统将三项得分进行归一化处理,并设定加权系数形成综合评分。
[0065] 评分完成后,系统进入筛选输出单元的处理阶段。该单元对所有句对的评分结果进行批量统计和分布分析,依据设定的评分阈值(例如0.75)进行筛选。所有低于阈值的句对将被标记为低质量样本并剔除出训练语料池。对于评分高于阈值的句对,系统将其归入"高质量语料库”并按语种分组,同时打包同步推送至训练使用库服务模块,供翻译优化模块使用。为了进一步增强系统鲁棒性,筛选输出单元还支持评分历史追溯与人工干预机制,允许在特定场景下人工校准筛选结果或调整阈值策略。
[0066] 在实际运行过程中,该模块通过周期性触发的批量评估任务,对新增语料实时进行质量检测与动态更新,使训练数据保持高一致性和语言规范性。随着语料规模的扩大,该模块对系统整体翻译性能的提升起到关键性保障作用,避免了因低质量数据引入而导致的模型退化风险。
[0067] 需要说明的是,在不冲突的情况下,本发明中的实施例及实施例中的特征和技术方案可以相互组合。
[0068] 显然,以上所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例,附图中给出了本发明的较佳实施例,但并不限制本发明的专利范围。本发明可以以许多不同的形式来实现,相反地,提供这些实施例的目的是使对本发明的公开内容的理解更加透彻全面。尽管参照前述实施例对本发明进行了详细的说明,对于本领域的技术人员来而言,其依然可以对前述各具体实施方式所记载的技术方案进行修改,或者对其中部分技术特征进行等效替换。凡是利用本发明说明书及附图内容所做的等效结构,直接或间接运用在其他相关的技术领域,均同理在本发明专利保护范围之内。< / script>
Claims
1. A multilingual corpus automatic construction and translation optimization system, characterized by: Includes the following modules: Corpus collection module, used to automatically collect multilingual text data from the Internet and open data sources, and perform format cleaning and structure conversion on it; Language identification and grouping module, used to identify the language of the collected text and store it in structured groups according to language categories; Semantic alignment module, used to align the semantics of texts in different languages and generate multilingual parallel sentence pairs; The translation optimization module is used to train and optimize the existing translation model based on the aligned corpus to improve the quality of cross-language translation; The corpus quality assessment and screening module is used to evaluate the semantic consistency and translation rationality of the constructed corpus and to filter out data that does not meet the standards.
2. The multilingual corpus automatic construction and translation optimization system according to claim 1 is characterized in that: The corpus collection module includes: A text collection unit is used to automatically capture multilingual text content from the internet based on pre-defined data source links. The data sources include multilingual news websites, international organization document platforms, and transnational technology communities. The collection process sequentially completes URL extraction, page parsing, and text extraction through a batch scheduling strategy. The content cleaning unit processes the collected text into a unified format, removing redundant tags, special characters, and advertising interference, and re-structuring the paragraphs to ensure the linguistic legibility and semantic integrity of the text. The cleaned text is stored by language and annotated with source and timestamp information.
3. The multilingual corpus automatic construction and translation optimization system according to claim 1 is characterized in that: The language identification and grouping module includes: The language recognition unit is used to automatically identify the language of the collected text, analyze the character and phrase features of the text using a multilingual language model, output the corresponding language identifier, and add recognition confidence to each text segment; The classification storage unit is used to store recognized multilingual texts by language into corresponding corpus collections and establish a language-data index relationship to support subsequent cross-language calls and alignment operations. The storage structure includes fields for text content, language label, source address, and unique number.
4. The multilingual corpus automatic construction and translation optimization system according to claim 1 is characterized in that: The semantic alignment module includes: A semantic encoding unit, which is used to convert multilingual text into semantic vector representations of equal dimensions. The semantic vectors are generated by a unified cross-language pre-training model and encode each sentence; The similarity matching unit is used to calculate the cross-language alignment score between sentence pairs based on the semantic vectors and word mapping relationships of sentences in different languages. The alignment score is defined by the following composite function: in: V s 、V t are the semantic vectors of the source language and target language sentences respectively; is the standard cosine similarity, indicating overall semantic similarity; To score word-level alignment, calculate for each source word The most similar word to the target word set Similarity And multiply by a relative position attenuation factor a ij , n is the number of words in the source language; λ1 and λ2 are weight coefficients, which are used to adjust the weight ratio between overall semantics and word-level alignment; When S align When it is greater than 0, the sentence pair is considered to be semantically equivalent and is stored in the system as aligned corpus.
5. The multilingual corpus automatic construction and translation optimization system according to claim 1 is characterized in that: The translation optimization module includes: A training update unit is used to incrementally update the existing translation model based on the aligned corpus. The update operation loads the pre-trained model parameters and performs fine-tuning training in combination with the new corpus to improve the translation effect of the target language pair. The language control unit is used to dynamically adjust the input frequency of different language data during model training based on the proportion of each language in the current corpus data, ensuring that the model can balance the processing of high-frequency languages and low-resource languages, and achieve translation optimization between multiple languages.
6. The multilingual corpus automatic construction and translation optimization system according to claim 1 is characterized in that: The corpus quality assessment and screening module includes: The scoring calculation unit is used to automatically score the multiple sentence pairs generated by the system. The scoring dimensions include language fluency, syntactic completeness, and semantic consistency. The scoring is quantified based on the output of the language model. The screening output unit is used to summarize and analyze the scoring results, set the screening threshold, eliminate sentence pairs with scores below the threshold, and simultaneously output the retained high-quality corpus to the training library service module.
Citation Information
Cited By
Multi-language real-time semantic alignment translation system based on cross-language pre-training model
CN121835707A
Automatic Method, Apparatus, and System for Multilingual Machine Translation Based on LLM
CN122491302A