Tibetan language multi-dialect real-time semantic conversion method based on cross-language BERT model
Through cross-language BERT model and transfer learning combined with semantic alignment and adversarial optimization mechanisms, the semantic conversion problem between Tibetan multi-dialects is solved, and efficient, accurate and real-time semantic conversion under low resource conditions is achieved. It is suitable for scenarios such as voice assistants and subtitle generation.
Patent Information
- Application Number
- CN202510667160.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-22
- Publication Date
- 2025-08-15
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The prior art has problems such as semantic inconsistency, insufficient generation quality and poor real-time performance when dealing with semantic conversion between Tibetan multi-dialects, especially in the low resource conditions, which are difficult to achieve accurate semantic conversion and real-time response.
The cross-language BERT model is adopted to combine transfer learning, semantic alignment and adversarial optimization mechanisms, and through tag-guided decoding and syntax consistency correction strategies, a real-time semantic transformation method suitable for Tibetan multi-dialects is constructed, including dialect category annotation, syntactic structure analysis, word shape normalization, semantic coding and generation correction steps, to improve the accuracy and fluency of semantic transformation.
It realizes semantic alignment and expression unification between different dialects under low resource conditions, improves the accuracy and fluency of the conversion results, and has the characteristics of strong real-time, high adaptability and flexible deployment. It is suitable for complex language processing scenarios such as voice assistants and subtitle generation.
Smart Images

Figure CN120493954A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of multilingual modeling, and in particular to a real-time semantic conversion method for Tibetan multi-dialects based on a cross-language BERT model. Background Art
[0002] At present, Tibetan, as an important branch of China's ethnic minority language system, is widely distributed in the Qinghai-Tibet Plateau and its surrounding areas. There is a significant dialect differentiation phenomenon within it, mainly including the dialect areas of U-Tsang, Kham, and Amdo. These dialects have a lot of differences in phonetics, vocabulary, word order, and syntactic structure, forming a variant system within the language. As a result, the same semantic content is expressed inconsistently in different dialects, and there are significant communication barriers. Although the country has made certain progress in promoting the informatization of ethnic minority languages, the semantic conversion and intelligent processing between multiple Tibetan dialects are still in their infancy, and the relevant intelligent conversion system has not yet formed a mature technical path.
[0003] In the existing technology, traditional Tibetan dialect conversion methods are mainly based on vocabulary mapping, statistical machine translation (SMT) or rule template replacement. These methods usually rely on manually constructed dialect word pairs, grammatical rules or corpus alignment samples. The conversion ability is heavily dependent on high-quality dictionary resources, and cannot cope with the large number of non-standard expressions, low-frequency words and context-dependent expressions in dialects. Such technologies perform poorly when dealing with dialect features such as flexible word order, complex sentence patterns and subject-verb omission, have weak semantic retention capabilities, and are prone to semantic distortion or distortion. At the same time, since Tibetan is a low-resource language and training data is scarce, traditional neural machine translation models have problems of model overfitting and weak semantic generalization capabilities in the task of internal Tibetan dialect migration.
[0004] In recent years, the rise of cross-language pre-training models has provided a new direction for low-resource language modeling. By constructing a multi-language shared word vector space, different languages or dialects can be compared and reasoned in the embedding space, and have a certain cross-language semantic transfer capability. However, existing cross-language pre-training models focus on tasks such as machine translation, cross-language question answering, or information retrieval between mainstream languages. Research on dialect conversion tasks such as Tibetan, which has significant structural differences and highly sparse corpus, is still insufficient. On the one hand, although mBERT has the ability to capture multi-language semantics, it lacks a special adaptation strategy when faced with dialect-specific structures; on the other hand, the lack of semantic consistency modeling mechanism and decoding guidance control in the conversion process makes the generated results have large differences in semantic correctness and expression consistency.
[0005] In addition, there is currently a lack of a Tibetan dialect semantic conversion system that can support real-time response. Traditional deep models consume a lot of computing resources and are unable to be deployed on edge or lightweight terminals. They are difficult to meet the requirements of low-latency interactive scenarios such as voice assistants and real-time subtitle translation. Therefore, there is an urgent need to propose an innovative method that can adapt to the structural differences of multiple Tibetan dialects, accurately model semantic consistency under low-resource conditions, and support real-time semantic conversion, so as to solve the bottleneck problems of existing technologies in terms of inconsistent structural expression, poor real-time performance, and insufficient semantic generation quality.
[0006] Based on the above background, the present invention proposes a deep learning method system suitable for real-time semantic conversion of multiple Tibetan dialects by integrating mBERT model transfer learning, semantic alignment and adversarial optimization mechanism, dialect label-guided decoding control mechanism, and combining contextual semantic completion and syntactic consistency correction strategy. It aims to overcome the limitations of existing technologies such as semantic instability, low generation quality and poor response efficiency. Summary of the Invention
[0007] One purpose of the present invention is to propose a real-time semantic conversion method for Tibetan multi-dialects based on a cross-language BERT model. The present invention integrates cross-language BERT modeling, transfer learning, and semantic adversarial optimization mechanisms to construct a real-time semantic conversion method for Tibetan multi-dialects. The method can achieve semantic alignment and expression unification between different dialects under low-resource conditions. By introducing label-guided decoding, position control signals, and syntactic correction mechanisms, the accuracy, fluency, and structural consistency of the conversion results are improved. The method has the advantages of strong real-time performance, high adaptability, and flexible deployment, and is suitable for complex language processing scenarios such as voice assistants, subtitle generation, and multimodal interaction.
[0008] According to an embodiment of the present invention, a method for real-time semantic conversion of Tibetan multi-dialects based on a cross-language BERT model includes the following steps:
[0009] S1. Collect original text corpora of Tibetan dialects, perform dialect category annotation, syntactic structure analysis and word form normalization, and construct a standardized training corpus;
[0010] S2. Based on the standardized training corpus, load the mBERT model, initialize the parameters of the mBERT model through transfer learning, and preliminarily train the mBERT model;
[0011] S3. Use the preliminarily trained mBERT model as the semantic modeling model and fine-tune the semantic modeling model;
[0012] S4, receiving a text input to be converted, identifying the dialect category of the text to be converted, encoding the text to be converted, and generating an input vector and a mask vector;
[0013] S5. Input the input vector and mask vector into the semantic encoding submodule to obtain the intermediate semantic representation vector of the text;
[0014] S6. Input the intermediate semantic representation vector into the semantic generation submodule according to the dialect category to generate the target text output that conforms to the expression rules of the target dialect;
[0015] S7. Perform syntactic consistency correction and language fluency correction on the target text output to generate the final semantic conversion result.
[0016] Optionally, the standardized training corpus includes normalized text and dialect labels.
[0017] Optionally, the S2 specifically includes:
[0018] S21. Define the overall structure of the mBERT model:
[0019]
[0020] in, Represents the overall structure of the mBERT model, L emb represents the multilingual word embedding layer, L enc represents the set of Transformer encoder layers, and P represents the set of pre-trained weight parameters;
[0021] S22. Generate an embedding representation tensor for each normalized text in the standardized training corpus, construct an attention mask matrix, and use the embedding representation tensor and attention mask matrix as the forward reasoning interface input of the mBERT model;
[0022] S23, mapping the pre-trained weight parameter set to each weight tensor in the overall structure of the mBERT model to form initialization parameters;
[0023] S24. Based on the requirements of transfer learning, the structure of the Transformer encoder layer is frozen in layers, and the set of common language layers is set as:
[0024]
[0025] in, represents a frozen set of Transformer encoder layers, represents the set of remaining Transformer encoder layers participating in training, Indicates "include", L enc represents the set of all Transformer encoder layers, and \ represents the set difference operation;
[0026] Extract the subset of optimized parameters corresponding to the Transformer encoder layer participating in the training:
[0027]
[0028] Among them, θ represents the optimization parameter subset, W k represents the kth parameter, θ0 represents the initialization parameter;
[0029] S25. For each set of input pairs and dialect labels, define a supervised training objective function;
[0030] S26. Perform iterative optimization on the optimization parameter subset and calculate the updated result:
[0031]
[0032] Among them, θ t+1 represents the updated parameters, θ t represents the current round parameter, η(t) represents the learning rate of the tth round, Represents the gradient of the supervised training objective function to the current parameters, represents the supervised training objective function;
[0033] S27. Repeat steps S25 to S26 until the loss function meets the convergence condition or reaches the preset iteration upper limit to obtain the final training parameters.
[0034] Optionally, the S22 specifically includes:
[0035] S221. Perform one-hot encoding on each normalized text in the standardized training corpus to generate a word unit tensor;
[0036] S222. Extract word embedding matrix from multilingual embedding layer parameters:
[0037] E=[e1,e2,…,e |V| ];
[0038] Among them, E represents the word embedding matrix, e k represents the embedding vector of the kth word, |V| represents the number of words;
[0039] S223. For a subword set with insufficient frequency in multiple Tibetan dialects, a semantic context vector set with a context window size of w is constructed:
[0040]
[0041] Among them, C k represents the set of semantic context vectors extracted from the context of the embedding vector, x m Represents the vector representation of each context word, Context represents the context window of the embedding vector, Represents a set of low-frequency words, ∈ represents “belongs to”;
[0042] S224. Calculate the average cluster center of the semantic context vector set to obtain the context cluster center vector corresponding to each low-frequency word:
[0043]
[0044] Among them, μ k represents the context cluster center vector of the embedding vector, |C k | represents the number of context vectors;
[0045] S225. Fuse the context cluster center vector into the original embedding vector to generate the completed embedding representation:
[0046] E k ←λ·μ k +(1-λ)·E k ;
[0047] Among them, E k represents the kth embedded vector after completion, and λ represents the balance coefficient;
[0048] S226. Apply the completed embedding matrix to one-hot encoding to generate the embedding representation tensor:
[0049] X i,j =E·OneHot(t′ i,j );
[0050] Among them, X i,j Represents the embedding representation tensor of the normalized text, E represents the completed embedding matrix, OneHot represents the unique hot encoding, t′ i,j Represents normalized text;
[0051] S227. To match the attention mechanism requirements of the mBERT model, an attention mask is constructed based on the input valid bits, and a valid word meta-mask sequence is extracted for each normalized text:
[0052] M={m1,m2,…,m t};
[0053] Among them, M represents the valid word mask sequence, m t Indicates whether the tth word is valid (1 for valid, 0 for padding);
[0054] S228, construct the attention mask matrix and convert the input pair (X i,j ,A i,j ) as the forward inference interface input of the mBERT model:
[0055] A i,j [p,q]=m p·m q ;
[0056] Among them, A i,j represents the attention mask matrix, A i,j [p,q] indicates whether the attention between the pth and qth words is turned on, m p Indicates whether the pth word is valid, m q Indicates whether the qth word is valid.
[0057] Optionally, the supervised training objective function uses a cross entropy loss function.
[0058] Optionally, the S3 specifically includes:
[0059] S31. Use the initially trained mBERT model as a semantic modeling model;
[0060] S32, input the embedding representation tensor and the attention mask matrix into the semantic encoding submodule to obtain the intermediate semantic representation;
[0061] S33. In order to address the differences in the word order of multiple Tibetan dialects, we introduce a position-invariant regularization term and construct a semantic projection loss function:
[0062]
[0063] in, represents the semantic projection loss function, y i,j represents the dialect label of the i,jth normalized text, represents the intermediate semantic representation of the t-th position, Indicates the i ′ ,j ′ Normalized text t ′ The intermediate semantic representation of the positions, l, l ′ Represents the normalized text i, j and i respectively ′ ,j ′ The sequence length, represents the square of the Euclidean distance;
[0064] S34. Input the intermediate semantic representation into the language discriminator, introduce the category balance entropy enhancement mechanism into the language discriminator, and define the original language discrimination loss function:
[0065]
[0066] in, represents the original language discrimination loss function, Indicates dialect tag l i,j The training frequency, l i,j Indicates the dialect tag, p d (l i,j∣z i,j θ d ) indicates that the discriminator has parameters θ d Next predict dialect label l i,j The probability of d Represents the parameters of the language discriminator;
[0067] In language adversarial training, the parameters of the language discriminator are updated according to the reverse gradient of the language adversarial loss:
[0068]
[0069] in, Indicates language resistance loss, represents the gradient of the language adversarial loss with respect to the intermediate semantic representation, represents the gradient reversal coefficient, represents the gradient of the original language discriminative loss function with respect to the intermediate semantic representation;
[0070] S35. Combine the semantic projection loss function with the language adversarial loss to construct the joint training total loss function:
[0071]
[0072] in, represents the total loss function of joint training, represents the semantic projection loss of the i,j-th normalized text, represents the language adversarial loss of the i,j-th normalized text, α and β represent the loss weights, and B represents the number of batch normalized texts;
[0073] S36: Execute parameter update to minimize the total loss function of joint training and complete the training of the semantic encoding submodule;
[0074] S37, obtaining an embedding representation of the target dialect label through table lookup embedding, and combining it with the intermediate semantic representation to form a guided semantic vector;
[0075] S38. Constructing a position control signal sequence:
[0076] ρ={ρ1,ρ2,…,ρ t};
[0077] Among them, ρ represents the position control signal sequence, ρ t represents the control vector for the t-th decoding time step;
[0078] The guided semantic representation and position control signal sequence are input into the semantic generation submodule to generate the target dialect text sequence.
[0079] Optionally, the semantic modeling model includes a semantic encoding submodule, a language discriminator module and a semantic generation submodule, the semantic encoding submodule is composed of a multi-layer shared Transformer network, the language discriminator module is composed of a three-layer feedforward neural network, and the semantic generation submodule is composed of a Transformer decoding network.
[0080] Optionally, the semantic encoding submodule is composed of a multi-layer shared Transformer network, the language discriminator module is composed of a three-layer feedforward neural network, and the semantic generation submodule is composed of a Transformer decoding network.
[0081] Optionally, the fine-tuning includes:
[0082] Construct a semantic projection loss function to minimize the embedding distance between different dialects with the same semantics;
[0083] Adversarial training is performed jointly by the language discriminator and the gradient reversal mechanism to suppress the explicit expression of dialect-specific features in the shared representation.
[0084] Optionally, the position control signal sequence dynamically models the order sensitivity of the language generation step during the decoding process, adapting to the structural expression rules of Tibetan dialects with significant differences in word order.
[0085] The beneficial effects of the present invention are:
[0086] First, the present invention proposes a real-time semantic conversion method for Tibetan multi-dialects based on the cross-lingual BERT model. To address the problems existing in the prior art, such as large differences in dialect structures, difficulty in semantic alignment, low generation accuracy, and system response delay, a multi-level, trainable, and deployable semantic modeling and conversion mechanism is designed, which significantly improves the dialect semantic conversion capability under low-resource conditions. By introducing the mBERT model as the basic framework and combining it with a transfer learning strategy, the present invention can make full use of existing multi-language pre-trained weights, avoid the data dependence and computational cost problems brought about by training from scratch, and at the same time possess a certain cross-language semantic generalization capability in the model initialization stage.
[0087] Secondly, in the semantic modeling process, the present invention introduces a position-invariant semantic alignment mechanism and a language discrimination adversarial optimization structure, so that different dialects can obtain consistent expression representation in a shared semantic embedding space, effectively alleviating the semantic mapping confusion problem caused by multi-dimensional differences in word order, syntax, and vocabulary within Tibetan. In particular, the category-balanced entropy enhancement mechanism introduced in the language discrimination submodule significantly enhances the model's learning stability for samples with unbalanced dialect categories, thereby improving the robustness and generalization ability of semantic modeling.
[0088] Finally, in the semantic generation stage, the present invention designs a conditional decoding mechanism that integrates dialect label embedding and position control signals, so that the generated text not only has the language style of the target dialect, but also maintains a high degree of structural consistency with the original semantic content. In the post-processing stage, the readability and expression accuracy of the generated results are further enhanced through the combined action of syntactic consistency correction and language fluency repair modules, making it suitable for terminal presentation scenarios such as subtitle generation and voice broadcasting. BRIEF DESCRIPTION OF THE DRAWINGS
[0089] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0090] Figure 1 This is a flowchart of a method for real-time semantic conversion of Tibetan multi-dialects based on a cross-language BERT model proposed by the present invention;
[0091] Figure 2 This is a schematic diagram of the structure initialization and transfer learning training process of a Tibetan multi-dialect real-time semantic conversion method based on the cross-lingual BERT model proposed in the present invention;
[0092] Figure 3 This is a structural diagram of the target dialect-guided decoding and position control signal generation mechanism of the Tibetan multi-dialect real-time semantic conversion method based on the cross-lingual BERT model proposed in the present invention. DETAILED DESCRIPTION
[0093] The present invention will now be described in further detail with reference to the accompanying drawings, which are simplified schematic diagrams that illustrate the basic structure of the present invention in a schematic manner.
[0094] refer to Figure 1-3 A real-time semantic conversion method for Tibetan multi-dialects based on a cross-lingual BERT model is proposed, comprising the following steps:
[0095] S1. Collect original text corpora of Tibetan dialects, perform dialect category annotation, syntactic structure analysis and word form normalization, and construct a standardized training corpus;
[0096] S2. Based on the standardized training corpus, load the mBERT model, initialize the parameters of the mBERT model through transfer learning, and preliminarily train the mBERT model;
[0097] S3. Use the preliminarily trained mBERT model as the semantic modeling model and fine-tune the semantic modeling model;
[0098] S4, receiving a text input to be converted, identifying the dialect category of the text to be converted, encoding the text to be converted, and generating an input vector and a mask vector;
[0099] S5. Input the input vector and mask vector into the semantic encoding submodule to obtain the intermediate semantic representation vector of the text;
[0100] S6. Input the intermediate semantic representation vector into the semantic generation submodule according to the dialect category to generate the target text output that conforms to the expression rules of the target dialect;
[0101] S7. Perform syntactic consistency correction and language fluency correction on the target text output to generate the final semantic conversion result.
[0102] This paper introduces a Tibetan multi-dialect semantic conversion framework based on the cross-lingual BERT model, constructs a full-process method from corpus collection, model initialization, semantic modeling to generation and correction, effectively solving the problem of large expression differences among Tibetan dialects and difficulty in maintaining semantic consistency. The method supports end-to-end training and reasoning, can achieve high-precision, controllable real-time semantic conversion under low-resource conditions, has strong language adaptability and cross-structural robustness, and provides a complete, efficient and deployable technical solution for minority language information processing.
[0103] In this embodiment, the standardized training corpus includes normalized text and dialect labels.
[0104] By combining normalized Tibetan text from multiple dialects with their dialect category labels to construct a standardized training corpus, the model can accurately understand the linguistic differences between different dialects and capture their semantic commonalities. This standardization process strengthens the model's ability to recognize language structure at the input level, providing a unified input semantic foundation for subsequent transfer learning and semantic modeling. This effectively improves the alignment of multi-dialect input samples and the model's robustness and generalization capabilities in diverse language environments.
[0105] In this embodiment, S2 specifically includes:
[0106] S21. Define the overall structure of the mBERT model:
[0107]
[0108] in, Represents the overall structure of the mBERT model, L emb represents the multilingual word embedding layer, L enc represents the set of Transformer encoder layers, and P represents the set of pre-trained weight parameters;
[0109] S22. Generate an embedding representation tensor for each normalized text in the standardized training corpus, construct an attention mask matrix, and use the embedding representation tensor and attention mask matrix as the forward reasoning interface input of the mBERT model;
[0110] S23, mapping the pre-trained weight parameter set to each weight tensor in the overall structure of the mBERT model to form initialization parameters;
[0111] S24. Based on the requirements of transfer learning, the structure of the Transformer encoder layer is frozen in layers, and the set of common language layers is set as:
[0112]
[0113] in, represents a frozen set of Transformer encoder layers, represents the set of remaining Transformer encoder layers participating in training, Indicates "include", L enc represents the set of all Transformer encoder layers, and \ represents the set difference operation;
[0114] Extract the subset of optimized parameters corresponding to the Transformer encoder layer participating in the training:
[0115]
[0116] Among them, θ represents the optimization parameter subset, W k represents the kth parameter, θ0 represents the initialization parameter;
[0117] S25. For each set of input pairs and dialect labels, define a supervised training objective function;
[0118] S26. Perform iterative optimization on the optimization parameter subset and calculate the updated result:
[0119]
[0120] Among them, θ t+1 represents the updated parameters, θ t represents the current round parameter, η(t) represents the learning rate of the tth round, Represents the gradient of the supervised training objective function to the current parameters, represents the supervised training objective function;
[0121] S27. Repeat steps S25 to S26 until the loss function meets the convergence condition or reaches the preset iteration upper limit to obtain the final training parameters.
[0122] By explicitly defining the mBERT structure during the model loading phase and combining it with a transfer learning strategy for parameter initialization and layer freezing, this approach enables the model to inherit multilingual knowledge while retaining the necessary fine-tuning space. This strategy significantly reduces the reliance on the amount of training data and improves the model's adaptability in low-resource environments for the Tibetan language. By rationally dividing frozen and adjustable layers, semantic alignment is effectively improved, and the semantic modeling process's ability to capture dialect diversity and structural complexity is enhanced.
[0123] In this embodiment, the S22 specifically includes:
[0124] S221. Perform one-hot encoding on each normalized text in the standardized training corpus to generate a word unit tensor;
[0125] S222. Extract word embedding matrix from multilingual embedding layer parameters:
[0126] E=[e1,e2,…,e |V| ];
[0127] Among them, E represents the word embedding matrix, e k represents the embedding vector of the kth word, |V| represents the number of words;
[0128] S223. For a subword set with insufficient frequency in multiple Tibetan dialects, a semantic context vector set with a context window size of w is constructed:
[0129]
[0130] Among them, C k represents the set of semantic context vectors extracted from the context of the embedding vector, x m Represents the vector representation of each context word, Context represents the context window of the embedding vector, Represents a set of low-frequency words, ∈ represents “belongs to”;
[0131] S224. Calculate the average cluster center of the semantic context vector set to obtain the context cluster center vector corresponding to each low-frequency word:
[0132]
[0133] Among them, μ k represents the context cluster center vector of the embedding vector, |C k | represents the number of context vectors;
[0134] S225. Fuse the context cluster center vector into the original embedding vector to generate the completed embedding representation:
[0135] Ek ←λ·μ k +(1-λ)·E k ;
[0136] Among them, E k represents the kth embedded vector after completion, and λ represents the balance coefficient;
[0137] S226. Apply the completed embedding matrix to one-hot encoding to generate the embedding representation tensor:
[0138] X i,j =E·OneHot(t′ i,j );
[0139] Among them, X i,j Represents the embedding representation tensor of the normalized text, E represents the completed embedding matrix, OneHot represents the unique hot encoding, t′ i,j Represents normalized text;
[0140] S227. To match the attention mechanism requirements of the mBERT model, an attention mask is constructed based on the input valid bits, and a valid word meta-mask sequence is extracted for each normalized text:
[0141] M={m1,m2,…,m t};
[0142] Among them, M represents the valid word mask sequence, m t Indicates whether the tth word is valid (1 for valid, 0 for padding);
[0143] S228, construct the attention mask matrix and convert the input pair (X i,j ,A i,j ) as the forward inference interface input of the mBERT model:
[0144] A i,j [p,q]=m p ·m q ;
[0145] Among them, A i,j represents the attention mask matrix, A i,j [p,q] indicates whether the attention between the pth and qth words is turned on, m p Indicates whether the pth word is valid, m q Indicates whether the qth word is valid.
[0146] This paper designs a special embedding representation construction process for the mBERT model input structure, which solves the problem of insufficient representation of low-frequency subwords in multiple Tibetan dialects. By introducing context clustering vectors for semantic completion, the original embedding expression is made more semantically complete and can more accurately reflect the dialect text context. The high-quality construction of embedding tensors and attention masks ensures the validity and coherence of model input, providing a strong semantic representation foundation for accurate reasoning in subsequent semantic modeling modules.
[0147] In this embodiment, the supervised training objective function uses a cross entropy loss function.
[0148] In this embodiment, S3 specifically includes:
[0149] S31. Use the initially trained mBERT model as a semantic modeling model;
[0150] S32, input the embedding representation tensor and the attention mask matrix into the semantic encoding submodule to obtain the intermediate semantic representation;
[0151] S33. In order to address the differences in the word order of multiple Tibetan dialects, we introduce a position-invariant regularization term and construct a semantic projection loss function:
[0152]
[0153] in, represents the semantic projection loss function, y i,j represents the dialect label of the i,jth normalized text, represents the intermediate semantic representation of the t-th position, Indicates the i ′ ,j ′ Normalized text t ′ The intermediate semantic representation of the positions, l, l ′ Represents the normalized text i, j and i respectively ′ ,j ′ The sequence length, represents the square of the Euclidean distance;
[0154] S34. Input the intermediate semantic representation into the language discriminator, introduce the category balance entropy enhancement mechanism into the language discriminator, and define the original language discrimination loss function:
[0155]
[0156] in, represents the original language discrimination loss function, Indicates dialect tag l i,j The training frequency, l i,j Indicates the dialect tag, p d (li,j ∣z i,j θ d ) indicates that the discriminator has parameters θ d Next predict dialect label l i,j The probability of d Represents the parameters of the language discriminator;
[0157] In language adversarial training, the parameters of the language discriminator are updated according to the reverse gradient of the language adversarial loss:
[0158]
[0159] in, Indicates language resistance loss, represents the gradient of the language adversarial loss with respect to the intermediate semantic representation, represents the gradient reversal coefficient, represents the gradient of the original language discriminative loss function with respect to the intermediate semantic representation;
[0160] S35. Combine the semantic projection loss function with the language adversarial loss to construct the joint training total loss function:
[0161]
[0162] in, represents the total loss function of joint training, represents the semantic projection loss of the i,j-th normalized text, represents the language adversarial loss of the i,j-th normalized text, α and β represent the loss weights, and B represents the number of batch normalized texts;
[0163] S36: Execute parameter update to minimize the total loss function of joint training and complete the training of the semantic encoding submodule;
[0164] S37, obtaining an embedding representation of the target dialect label through table lookup embedding, and combining it with the intermediate semantic representation to form a guided semantic vector;
[0165] S38. Constructing a position control signal sequence:
[0166] ρ={ρ1,ρ2,…,ρ t};
[0167] Among them, ρ represents the position control signal sequence, ρ t represents the control vector for the t-th decoding time step;
[0168] The guided semantic representation and position control signal sequence are input into the semantic generation submodule to generate the target dialect text sequence.
[0169] The present invention forms a complete semantic modeling system by integrating a semantic encoding submodule, a language discriminator module and a semantic generation submodule, and realizes an encoding-discrimination-generation closed loop in structural design. Each module is optimized based on the structural characteristics of Tibetan dialects. The Transformer encoder adapts the structural modeling, the feedforward discriminator enhances the dialect classification ability, and the conditional decoder supports guided generation control. The collaborative work of the three modules significantly improves the accuracy, controllability and language style retention ability of semantic conversion, meeting the requirements of high-quality semantic transfer.
[0170] In this embodiment, the semantic modeling model includes a semantic encoding submodule, a language discriminator module and a semantic generation submodule. The semantic encoding submodule is composed of a multi-layer shared Transformer network, the language discriminator module is composed of a three-layer feedforward neural network, and the semantic generation submodule is composed of a Transformer decoding network.
[0171] In this embodiment, the semantic encoding submodule is composed of a multi-layer shared Transformer network, the language discriminator module is composed of a three-layer feedforward neural network, and the semantic generation submodule is composed of a Transformer decoding network.
[0172] In this embodiment, the fine-tuning includes:
[0173] Construct a semantic projection loss function to minimize the embedding distance between different dialects with the same semantics;
[0174] Adversarial training is performed jointly by the language discriminator and the gradient reversal mechanism to suppress the explicit expression of dialect-specific features in the shared representation.
[0175] The present invention jointly constructs a semantic projection loss function and a language adversarial loss function to simultaneously optimize semantic consistency and language unrecognizableness during the training phase, effectively improving the model's ability to normalize the expression of inputs from different dialects. This joint optimization mechanism guides the model to suppress dialect feature interference through gradient reversal technology, while strengthening semantic backbone alignment to ensure that synonymous sentences can obtain consistent semantic representations in different dialects, thereby significantly improving the semantic stability and conversion versatility during the dialect conversion process.
[0176] In this embodiment, the position control signal sequence dynamically models the order sensitivity of the language generation step during the decoding process, and adapts to the structural expression rules of Tibetan dialects with significant differences in word order.
[0177] By introducing a position control signal sequence, the present invention realizes dynamic sequential modeling between decoding steps in the semantic generation stage, effectively coping with structural characteristics such as flexible and unstable word order in multiple Tibetan dialects. The control mechanism can adjust the generation path according to the expression rules of the target dialect, improve the generation ability of the decoder in structure-sensitive contexts, and ultimately achieve target text output with precise content expression, good structural matching, and consistent style, thereby enhancing the system's adaptability and expression ability in actual diverse language scenarios.
[0178] Example 1:
[0179] In order to verify the feasibility of the present invention in implementation, the present invention was applied to the semantic conversion system of a Tibetan digital information processing laboratory. The system is deployed in a multilingual voice interaction platform located in Lhasa, Tibet, and is mainly used in multilingual interaction scenarios such as daily office work, tourism consultation, and medical reception. Since most platform users come from different dialect areas, such as Nagqu (Amdo dialect), Chamdo (Khampa dialect) and Lhasa (U-Tsang dialect), problems such as inconsistent semantic communication and communication misunderstandings often occur in actual use, seriously affecting the accuracy of voice recognition and terminal interaction efficiency.
[0180] After being deployed on the platform, the present invention uses standardized training corpus collected from the above three dialect areas, combined with the mBERT multilingual model for transfer training, and introduces a semantic adversarial mechanism and a dialect label-guided generation control strategy in the semantic modeling stage. The natural language sentence input by the user is first automatically identified by the dialect recognition module for its language category, and then converted into an embedding vector and input into the semantic encoding submodule. The decoding module then generates a target expression that conforms to the semantic and grammatical specifications based on the target dialect structure.
[0181] Using typical daily communication sentences such as "What's his name?", "I'm going to Tibet", and "He is Tibetan" as the test set, the original expressions were extracted from the three dialects of Amdo, Kham, and U-Tsang, and the target dialect was specified for conversion to perform real-time semantic conversion. After the conversion results were verified by native Tibetan speakers, the overall BLEU score remained stable between 79.2 and 84.7, the semantic consistency scores were all above 90 points, and the average delay of the conversion response was controlled within 150ms, meeting the interaction needs of low latency and high expression consistency in office scenarios.
[0182] For example, when inputting the Kham dialect phrase "kho rang gi ming su" (what's his name?), the system accurately converts it into the U-Tsang expression "kho rang gi ming yin," which is structurally consistent with the manual reference translation and semantically complete. In tests converting the U-Tsang dialect to the Kham dialect, despite changes in word order and particles, the present invention maintained semantic stability through an intermediate semantic alignment mechanism, demonstrating its technical advantages of strong cross-dialect semantic mapping capabilities, consistent expression style, and excellent model robustness.
[0183] Table 1 Comparative performance evaluation of Tibetan multi-dialect semantic conversion methods
[0184]
[0185]
[0186] In terms of BLEU scores, the present invention achieved an average score of 81.6 by relying on the cross-language semantic representation capability of mBERT and the semantic alignment and language discrimination adversarial mechanism, which is significantly higher than the statistical translation method (65.1) and the seq2seq method (72.8), and far superior to the traditional dictionary replacement method (52.3), reflecting the significant improvement of the present invention in maintaining semantic accuracy. At the same time, the average semantic consistency score reached 92.2, and the ability to maintain the original semantic backbone was stronger during the conversion process of different dialects, ensuring the understandability, controllability and contextual coherence of the generated results.
[0187] Secondly, in terms of response latency, the present invention achieves an average low-latency processing of 145ms by introducing lightweight structural optimization and edge deployment strategies. Compared with the high latency characteristics of statistical translation and seq2seq structures (230ms and 195ms, respectively), it is more suitable for scenarios with high real-time requirements such as government inquiries and voice interaction. Although the dictionary replacement method has the lowest latency, its conversion accuracy is extremely low and cannot meet practical requirements.
[0188] In terms of multi-dialect adaptability, the present invention effectively models and guides the expression differences of different language areas by introducing label embedding and structure-guided generation mechanisms. The adaptability score is as high as 94.7, which is much higher than other methods. In particular, in terms of expression style retention and the ability to process complex sentences with high word order, it reaches 89.3 and 84.1 respectively, which fully demonstrates the advantages of this method in maintaining the semantic backbone and language style consistency.
[0189] In addition, the present invention introduces a contextual semantic completion mechanism for low-frequency subwords, which makes the low-frequency word recognition accuracy reach 87.5, which is significantly better than the traditional method (22.4~68.2), effectively alleviating the instability problem of model training in the context of sparse Tibetan corpus.
[0190] In terms of deployability, the present invention takes into account resource efficiency while maintaining performance advantages, supports edge deployment, and is suitable for actual terminal environments that are sensitive to power consumption, latency, and computing power.
[0191] Overall, the present invention not only excels in the accuracy and consistency of semantic conversion, but also has strong adaptability and low-latency deployment capabilities. It is particularly suitable for promotion and application in multilingual mixed interaction and minority language digitization scenarios, and is superior to the current mainstream technical path.
[0192] The above description is only a preferred specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any technician familiar with the technical field, within the technical scope disclosed by the present invention, who makes equivalent replacements or changes based on the technical solution and inventive concept of the present invention, should be covered by the scope of protection of the present invention.
Claims
1. A real-time semantic conversion method for Tibetan multi-dialects based on a cross-lingual BERT model, characterized by: The steps include: S1. Collect original text corpora of Tibetan dialects, perform dialect category annotation, syntactic structure analysis and word form normalization, and construct a standardized training corpus; S2. Based on the standardized training corpus, load the mBERT model, initialize the parameters of the mBERT model through transfer learning, and preliminarily train the mBERT model; S3. Use the preliminarily trained mBERT model as the semantic modeling model and fine-tune the semantic modeling model; S4, receiving a text input to be converted, identifying the dialect category of the text to be converted, encoding the text to be converted, and generating an input vector and a mask vector; S5. Input the input vector and mask vector into the semantic encoding submodule to obtain the intermediate semantic representation vector of the text; S6. Input the intermediate semantic representation vector into the semantic generation submodule according to the dialect category to generate the target text output that conforms to the expression rules of the target dialect; S7. Perform syntactic consistency correction and language fluency correction on the target text output to generate the final semantic conversion result.
2. The method for real-time semantic conversion of Tibetan multi-dialects based on a cross-language BERT model according to claim 1, characterized in that: The standardized training corpus includes normalized text and dialect labels.
3. The method for real-time semantic conversion of Tibetan multi-dialects based on a cross-language BERT model according to claim 1, characterized in that: The S2 specifically includes: S21. Define the overall structure of the mBERT model; S22. Generate an embedding representation tensor for each normalized text in the standardized training corpus, construct an attention mask matrix, and use the embedding representation tensor and attention mask matrix as the forward reasoning interface input of the mBERT model; S23, mapping the pre-trained weight parameter set to each weight tensor in the overall structure of the mBERT model to form initialization parameters; S24. Based on the requirements of transfer learning, the structure of the Transformer encoder layer is frozen in layers, and the set of common language layers is set as: in, represents a frozen set of Transformer encoder layers, represents the set of remaining Transformer encoder layers participating in training, Indicates "include", L enc represents the set of all Transformer encoder layers, and \ represents the set difference operation; Extract the subset of optimized parameters corresponding to the Transformer encoder layers participating in the training; S25. For each set of input pairs and dialect labels, define a supervised training objective function; S26. Perform iterative optimization on the optimization parameter subset and calculate an updated result; S27. Repeat steps S25 to S26 until the loss function meets the convergence condition or reaches the preset iteration upper limit to obtain the final training parameters.
4. The method for real-time semantic conversion of Tibetan multi-dialects based on a cross-language BERT model according to claim 3 is characterized in that: The S22 specifically includes: S221. Perform one-hot encoding on each normalized text in the standardized training corpus to generate a word unit tensor; S222, extracting a word embedding matrix from the multilingual embedding layer parameters; S223, constructing a semantic context vector set with a context window size of w for a set of subwords with insufficient frequency in multiple Tibetan dialects; S224, performing average cluster center calculation on the semantic context vector set to obtain a context cluster center vector corresponding to each low-frequency word; S225. Fuse the context cluster center vector into the original embedding vector to generate the completed embedding representation: E k ←l·m k +(1-λ)·E k ; Among them, E k represents the kth embedded vector after completion, and λ represents the balance coefficient; S226. Apply the completed embedding matrix to one-hot encoding to generate an embedding representation tensor; S227. To match the attention mechanism requirements of the mBERT model, an attention mask is constructed based on the input valid bits, and a valid word-meta mask sequence is extracted for each normalized text. S228, construct the attention mask matrix and convert the input pair (X i,j ,A i,j ) as the forward inference interface input of the mBERT model.
5. The method for real-time semantic conversion of Tibetan multi-dialects based on a cross-language BERT model according to claim 3, characterized in that: The supervised training objective function uses a cross entropy loss function.
6. The method for real-time semantic conversion of Tibetan multi-dialects based on a cross-language BERT model according to claim 1, characterized in that: The S3 specifically includes: S31. Use the initially trained mBERT model as a semantic modeling model; S32, input the embedding representation tensor and the attention mask matrix into the semantic encoding submodule to obtain the intermediate semantic representation; S33. In order to address the differences in word order among Tibetan dialects, a position-invariant regularization term is introduced to construct a semantic projection loss function. S34. Input the intermediate semantic representation into the language discriminator, introduce the category balance entropy enhancement mechanism into the language discriminator, and define the original language discrimination loss function: in, represents the original language discrimination loss function, Indicates dialect tag l i,j The training frequency, l i,j Indicates the dialect tag, p d (l i,j ∣z i,j θ d ) indicates that the discriminator has parameters θ d Next predict dialect label l i,j The probability of d Represents the parameters of the language discriminator; In language adversarial training, the parameters of the language discriminator are updated according to the reverse gradient of the language adversarial loss: in, Indicates language resistance loss, represents the gradient of the language adversarial loss with respect to the intermediate semantic representation, represents the gradient reversal coefficient, represents the gradient of the original language discriminative loss function with respect to the intermediate semantic representation; S35. Combine the semantic projection loss function with the language adversarial loss to construct the joint training total loss function: in, represents the total loss function of joint training, represents the semantic projection loss of the i,j-th normalized text, represents the language adversarial loss of the i,j-th normalized text, α and β represent the loss weights, and B represents the number of batch normalized texts; S36: Execute parameter update to minimize the total loss function of joint training and complete the training of the semantic encoding submodule; S37, obtaining an embedding representation of the target dialect label through table lookup embedding, and combining it with the intermediate semantic representation to form a guided semantic vector; S38, constructing a position control signal sequence; The guided semantic representation and position control signal sequence are input into the semantic generation submodule to generate the target dialect text sequence.
7. The method for real-time semantic conversion of Tibetan multi-dialects based on a cross-language BERT model according to claim 6, characterized in that: The semantic modeling model includes a semantic encoding submodule, a language discriminator module and a semantic generation submodule. The semantic encoding submodule is composed of a multi-layer shared Transformer network, the language discriminator module is composed of a three-layer feedforward neural network, and the semantic generation submodule is composed of a Transformer decoding network.
8. The method for real-time semantic conversion of Tibetan multi-dialects based on a cross-language BERT model according to claim 7, characterized in that: The semantic encoding submodule is composed of a multi-layer shared Transformer network, the language discriminator module is composed of a three-layer feedforward neural network, and the semantic generation submodule is composed of a Transformer decoding network.
9. The method for real-time semantic conversion of Tibetan multi-dialects based on a cross-language BERT model according to claim 1, characterized in that: The fine-tuning includes: Construct a semantic projection loss function to minimize the embedding distance between different dialects with the same semantics; Adversarial training is performed jointly by the language discriminator and the gradient reversal mechanism to suppress the explicit expression of dialect-specific features in the shared representation.
10. The method for real-time semantic conversion of Tibetan multi-dialects based on a cross-language BERT model according to claim 6, characterized in that: The position control signal sequence dynamically models the order sensitivity of the language generation step during the decoding process, and adapts to the structural expression rules with significant word order differences in multiple Tibetan dialects.
Citation Information
Cited By
Multi-source heterogeneous code conversion method and device for cross-language development
CN121143797A
Text classification method based on large model
CN121256048A
A large model-based text classification method
CN121256048B
Method and system for constructing and interacting Yao language corpus based on artificial intelligence
CN121833926A
Data dynamic balance Tibetan multi-dialect speech large model training method and device
CN122201263A