Multi-dialect large model adaptation method and system oriented to Glucose language
By constructing a dialect mapping matrix and a hierarchical representation structure, identifying key semantic differences and adjusting their weights, the semantic conflict problem of the Portuguese large model in multi-dialect scenarios was solved, achieving accurate adaptation and performance balance for different Portuguese dialects.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHENYI FUTURE TECHNOLOGY (GUANGDONG HENGQIN) CO LTD
- Filing Date
- 2025-12-30
- Publication Date
- 2026-05-01
AI Technical Summary
Existing Portuguese large models suffer from insufficient coverage and semantic conflicts when dealing with semantic understanding between different dialects, making it difficult to meet the needs of accurate semantic processing in multi-dialect scenarios.
By constructing a dialect mapping matrix to identify key semantic differences, extracting representation offset features and constructing comparative training sample pairs, generating a hierarchical representation structure, determining the weight adjustment boundary, identifying negative migration nodes based on parameter distribution density and migration weights, constructing gradient propagation paths, and achieving multi-dialect adaptation.
It achieves accurate, stable, and efficient model support for different Portuguese dialects, solves the problems of semantic conflict and negative transfer between dialects in traditional methods, and ensures the performance balance and efficient adaptation of the model in multi-dialect scenarios.
Smart Images

Figure CN121960477A_ABST
Abstract
Description
A method and system for adapting large-scale multi-dialect models for Portuguese-speaking languages Technical Field
[0001] This invention relates to the field of natural language processing technology, and in particular to a method and system for adapting large multi-dialect models for Portuguese-speaking languages. Background Technology
[0002] Portuguese, the sixth most spoken language globally, has over 270 million speakers in countries and regions including Brazil, Portugal, Angola, and Mozambique. Portuguese-speaking languages exhibit significant dialectal differences across regions, encompassing vocabulary, syntax, and semantic expression. Brazilian Portuguese differs systematically from European Portuguese in verb conjugation and pronoun usage, while African Portuguese, influenced by the Bantu language family, has developed a unique hybrid grammatical structure. With the development of natural language processing technology, the demand for semantic processing of Portuguese-speaking languages is growing, making accurate semantic understanding in multi-dialect scenarios a crucial research direction in this field.
[0003] Existing Portuguese large-scale models are mainly pre-trained on high-resource dialects, resulting in insufficient coverage of low-resource dialects and performance degradation when processing dialect-specific expressions. Traditional multi-dialect adaptation methods employ simple data mixing or model fine-tuning strategies, neglecting semantic conflicts and negative transfer phenomena between dialects at the semantic processing level. Furthermore, they lack explicit modeling of dialect boundaries, failing to effectively isolate dialect-specific semantic features. This leads to mutual interference between the representations of different dialects, making it difficult to meet the refined requirements of multi-dialect semantic processing. Summary of the Invention
[0004] This invention discloses a method and system for adapting large-scale models of multiple dialects for Portuguese-speaking languages. The aim is to construct a dialect mapping matrix to identify key semantic differences, extract representation shift features, construct comparative training sample pairs to achieve semantic decoupling of homographs, generate a hierarchical representation structure and determine weight adjustment boundaries, identify negative migration nodes based on parameter distribution density and migration weights and convert them into dialect boundary markers, construct gradient propagation paths and execute representation decoupling configuration, and finally output a multi-dialect adaptation scheme, providing accurate, stable, and efficient model support for various Portuguese-speaking languages.
[0005] The first aspect of this invention proposes a method for adapting a large multi-dialect model to Portuguese-speaking languages, comprising the following steps: acquiring corpus data and model constraint information for each Portuguese dialect region; performing a dialect mapping matrix on the corpus data to generate priority coefficients; using the priority coefficients to locate key semantic difference points; extracting representational shift features around the key semantic difference points; identifying homographs from the key semantic difference points to construct contrastive training sample pairs; performing vector space analysis on the representational shift features and the contrastive training sample pairs to determine a priority adjustment layer; identifying dialectal difference features in the model constraint information to generate hierarchical coding parameters; and using the priority adjustment layer to... The hierarchical encoding parameters are collaboratively matched to generate a hierarchical representation structure, and the hierarchical representation structure is used to determine the weight adjustment boundary. The parameter distribution density is determined by combining the weight adjustment boundary and the priority coefficient. The optimal transfer weight is generated based on the capacity matching of the key semantic difference points and the parameter distribution density. Negative transfer nodes are extracted from the optimal transfer weight and converted into dialect boundary markers. A gradient propagation path is constructed based on the dialect boundary markers. Semantic processing is performed on the corpus data to detect the confused expression set. A representation decoupling configuration is generated according to the confused expression set. Based on the representation decoupling configuration and the gradient propagation path, a progressive collaborative optimization is performed to output a multi-dialect adaptation scheme.
[0006] The second aspect of this invention proposes a large-scale model adaptation system for Portuguese-speaking languages, comprising: a data acquisition module for acquiring corpus data and model constraint information of various Portuguese dialect regions, performing a dialect mapping matrix establishment on the corpus data to generate priority coefficients, and using the priority coefficients to locate key semantic difference points; a difference identification module for extracting representational shift features around the key semantic difference points, identifying homographs from the key semantic difference points to construct contrastive training sample pairs, and performing vector space analysis on the representational shift features and the contrastive training sample pairs to determine a priority adjustment layer; and a structure generation module for identifying dialectal difference features in the model constraint information to generate hierarchical coding parameters, and using the priority adjustment... A layer is generated by co-matching the layered encoding parameters to form a layered representation structure, and the layered representation structure is used to determine the weight adjustment boundary. A transfer optimization module is used to determine the parameter distribution density by combining the weight adjustment boundary and the priority coefficient, generate the optimal transfer weight based on the capacity matching of the key semantic difference points and the parameter distribution density, extract negative transfer nodes from the optimal transfer weight and convert them into dialect boundary markers, and construct a gradient propagation path based on the dialect boundary markers. A scheme output module is used to perform semantic processing to detect the confused expression set based on the corpus data, generate a representation decoupling configuration according to the confused expression set, and perform progressive co-optimization based on the representation decoupling configuration and the gradient propagation path to output a multi-dialect adaptation scheme.
[0007] The beneficial effects of this invention are reflected in the following points: 1. By establishing a quantitative association of cross-dialect features through a dialect mapping matrix, priority coefficients are calculated based on the number of high-discrepancy features and the distribution of corpus samples, enabling priority adaptation for low-resource dialects; comparative training sample pairs are constructed for homographs and semantic differentiation is measured using JS divergence, and the priority adjustment layer is accurately located through vector space analysis, enabling the model to effectively distinguish expressions with the same form but different meanings in different dialects, solving the problem of insufficient dialect semantic conflict recognition in traditional methods. 2. A hierarchical representation structure is constructed through the collaborative matching of the priority adjustment layer and hierarchical coding parameters. Based on the coordination coefficient, each layer of the model is divided into three functional positioning categories: a general basic layer, a dialect-shared layer, and a dialect-specific adaptation layer. With the setting of differentiated weight adjustment boundaries, the adjustment range is gradually widened from the general basic layer to the dialect-specific adaptation layer, realizing fine-grained control of parameter updates in multi-dialect joint optimization and avoiding model performance degradation caused by parameter conflicts. 3. Based on the capacity matching of parameter distribution density and migration weight, negative migration nodes are identified. Boundary characteristic parameters are calculated by fusing distance characteristic components, scheduling characteristic components and loss characteristic components and transformed into dialect boundary markers. Gradient propagation paths are constructed to achieve isolated propagation of dialect-specific gradients. Combined with representation decoupling configuration, confusion and disambiguation processing is performed within the representation fluctuation tolerance range. Through three stages of progressive collaborative optimization of preheating, separation and fusion, performance balance and efficient adaptation of each dialect are ensured under the shared model architecture. Attached Figure Description
[0008] The accompanying drawings illustrate specific examples of the technical solutions described in this invention and, together with the detailed embodiments, form part of the specification, serving to explain the technical solutions, principles, and effects of this invention.
[0009] Figure 1 is a flowchart illustrating the multi-dialect large model adaptation method for Portuguese-speaking languages according to the present invention.
[0010] Figure 2 is a structural block diagram of a multi-dialect large model adaptation system for Portuguese-speaking languages according to the present invention. Detailed Implementation
[0011] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.
[0012] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.
[0013] As used in this application specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if detected [the described condition or event]" may be interpreted, depending on the context, as meaning "once determined," "in response to determination," "once detected [the described condition or event]," or "in response to detection [the described condition or event]."
[0014] The technical solutions of the embodiments of this application will be described below.
[0015] As shown in Figure 1, this embodiment of the invention provides a method for adapting a large multi-dialect model for Portuguese-speaking languages, including the following steps S110-S150: Step S110: Obtain corpus data and model constraint information for each Portuguese dialect region, perform dialect mapping matrix establishment on the corpus data to generate priority coefficients, and use the priority coefficients to locate key semantic differences.
[0016] We acquired corpus data and model constraints for various Portuguese-speaking dialect regions. Multi-source corpus data was collected from major Portuguese-speaking regions including Brazil, Portugal, Angola, Mozambique, and Guinea-Bissau to construct dialect corpora. The corpus data for each dialect region includes information on three dimensions: text content, word frequency statistics, and syntactic structure features. The Brazilian corpus contains 3.2 million samples from news reports, social media conversations, and business documents from the three major cities of São Paulo, Rio de Janeiro, and Brasilia. The Portuguese corpus contains 1.8 million samples from government gazettes, literary works, and daily conversations from Lisbon and Porto. Due to lower levels of digitization, the corpus data for Portuguese-speaking African regions is relatively small; the corpora for Angola and Mozambique contain 450,000 and 380,000 samples, respectively. Simultaneously, we acquired model constraints for the large model, including constraints on model architecture parameters, pre-training corpus distribution, and target application scenarios. The model architecture parameters in the model constraint information include structural parameters such as the number of layers, the number of attention heads, and the dimension of hidden layers. The pre-training corpus distribution records the proportion of corpus data from various dialect regions during the pre-training phase.
[0017] Priority coefficients were generated by constructing a dialect mapping matrix from the corpus data. Differential analysis was performed on the corpus data from each dialect region at three levels: lexical, syntactic, and semantic. At the lexical level, the distribution of unique vocabulary and homonyms in each dialect region was statistically analyzed, including the distribution of words in Brazilian Portuguese. "(Bus) corresponds to the Portuguese word "autocarro". At the syntactic level, the differences in verb tense structures across different dialect regions are analyzed. Brazilian Portuguese uses the progressive tense structure "estar + verb -ndo", while Portuguese uses the structure "a + infinitive". At the semantic level, cross-dialect semantic drift is identified. For example, "rapariga" has a neutral meaning of "young girl" in Portuguese, but has drifted to a derogatory meaning in Brazilian corpus. Failure to identify this drift by the model will lead to communicative misunderstanding. The difference information from the three levels is integrated to construct a dialect mapping matrix. The matrix elements represent the similarity scores of source dialect features to target dialect features. Elements with similarity scores below 0.6 are marked as high-difference feature pairs. The number of highly dissimilar feature pairs in each dialect region was counted. There were 127 pairs between Brazil and Portugal, and 243 pairs between Brazil and Angola. Priority coefficients were calculated based on the difference analysis results using the formula: P = α × (D / D_max) + β × (1 - N / N_max) + γ × (F / F_max), where D represents the number of highly dissimilar feature pairs in the dialect region, N represents the number of corpus samples in the dialect region, F represents the cumulative frequency of occurrence of words involved in the highly dissimilar feature pairs in the corpus, D_max, N_max, and F_max represent the maximum values of the corresponding indicators in all dialect regions, and α, β, and γ are weighting coefficients satisfying α + β + γ = 1. Dialect regions with fewer corpus samples have higher priority to prioritize adaptation to low-resource dialects.
[0018] Key semantic differences are located using priority coefficients. Dialect regions are ranked according to their priority coefficients to generate a priority list for dialect adaptation. These regions are then sorted in descending order based on their priority coefficient P-values, and the top three regions with the highest coefficients are selected as the first batch of adaptation targets. A semantic difference significance threshold of 0.4 is set. For the first batch of adaptation targets, the top 20 feature pairs with similarity scores below this threshold are extracted from the dialect mapping matrix. These feature pairs represent the most significant semantic gaps between dialects. Semantic difference analysis is performed on each key feature pair. The specific location and scope of influence of the differences are determined using three techniques: lexical alignment detection, syntactic structure parsing, and semantic role labeling. The influence weight of each difference point is calculated, based on its frequency of occurrence in the target corpus and its impact on the model's inference accuracy. For Angolan Portuguese, the key semantic differences are concentrated in two aspects: semantic understanding of Bantu loanwords and sentence structure processing of colloquial expressions. For example, when an Angolan user uses "muxiluanda" to refer to a local resident of Luanda in a customer service conversation, an unadapted model will identify it as an unknown word or incorrectly associate it with a similarly pronounced Portuguese word, causing the dialogue understanding to deviate completely from the user's intent. These loanwords do not exist in the standard Portuguese vocabulary or have inaccurate semantic mapping, with an impact weight of 0.73. For Portuguese in general, the key semantic differences lie in the sentence complexity of formal language and the metaphorical understanding of literary expressions, with a corresponding impact weight of 0.68. The key semantic differences from each dialect region are ranked according to their impact weight, and priority is assigned based on the target application scenarios in the model constraint information. Differences for business communication scenarios have higher priority than those for everyday conversation scenarios, resulting in a list of semantic differences.
[0019] Step S120: Extract representation offset features around key semantic difference points, identify homonymous word sets from key semantic difference points to construct contrast training sample pairs, and perform vector space analysis on representation offset features and contrast training sample pairs to determine priority adjustment layers.
[0020] Specifically, representation shift features around key semantic difference points are extracted. For each key semantic difference point, its corresponding word vector representation is located in the model's embedding space. The change in the representation position of this word vector after training on different dialect corpora is calculated, and the degree of representation shift of the key semantic difference point is measured using the vector distance metric. For the Angolan Portuguese loanword "muxiluanda," the cosine distance between the vector representation of this key semantic difference point trained on the Brazilian Portuguese corpus and the vector representation trained on the Angolan local corpus reaches 0.73, indicating a significant representation shift feature. The spatial distribution characteristics of the representation shift of key semantic difference points are analyzed to identify the main directions and clustering regions of the representation shift features. Points exhibiting a shift exceeding a threshold of 0.6, along with their surrounding vocabulary, are marked as high-shift regions. For example, "muxiluanda" and its surrounding place names fall within a high-shift region. Without targeted adjustments, the model might misinterpret the phrase as a place name when processing inquiries from Angolan users about "what restaurants are near muxiluanda," leading to completely incorrect search results. These regions require focused adjustment during model adaptation. Cluster analysis is then performed on high-shift regions to identify groups of points with similar shift patterns for overall evaluation during vector space analysis. Finally, the shift quantification of each point and the high-shift region labeling are integrated to construct a complete data structure representing shift features.
[0021] In some embodiments, the step of identifying homographs from the key semantic difference points to construct a contrast training sample pair includes: identifying words with the same word form based on the key semantic difference points; performing semantic differentiation analysis on the words with the same word form to generate differentiation intensity features; capturing the word pairs with the strongest semantic conflict according to the differentiation intensity features and converting them into contrast enhancement sample pairs; and performing dialect contrast annotation on the contrast enhancement sample pairs to generate contrast training sample pairs.
[0022] This study identifies words with identical word forms based on key semantic differences. All word entries are extracted from the list of key semantic differences, and words appearing in different dialect regions are identified using a string matching algorithm. For each word in the key semantic difference list, its frequency and distribution in each dialect corpus are extracted. The frequency is calculated using word frequency statistics, and the distribution records the document type and register distribution of the word in the corpus. Based on the distribution characteristics of the key semantic differences, a cross-dialect word comparison table is established. The table records the literal form of the words and their frequency of use in each dialect region. The comparison table is sorted in descending order of the frequency of cross-dialect occurrence to prioritize high-frequency words. For example, the Portuguese word "rapariga" appears 32 times per million words in the Portuguese corpus and 18 times per million words in the Brazilian corpus. Although the word forms are identical, their usage scenarios differ significantly. In the Portuguese corpus, this word often appears in… The word "(friendly girl)" is used in positive descriptive scenarios, but in the Brazilian corpus, it appears more frequently in negative contexts. If the model generates content containing this word in formal business emails from Brazilian users, it will cause serious pragmatic errors. The vocabulary lookup table is filtered to remove words that are semantically identical across all dialects, retaining only words with the same form that have the potential for semantic differentiation. These identically formed words are then compiled into a set of homographs with different meanings. Each entry in this set includes three fields: the literal form of the word, its frequency in different dialects, and a preliminary semantic difference label.
[0023] Semantic differentiation analysis is performed on words with identical word forms to generate differentiation strength features. For each word in the set of words with identical word forms, its context window in each dialect corpus is extracted. The window size is set to 5 words before and after the word. Stop words and punctuation marks are excluded during the extraction of the context window to ensure the validity of semantic information. The probability distribution of context words for words with identical word forms is statistically analyzed, and a context probability distribution vector of the word in different dialects is constructed. The dimension of the probability distribution vector is consistent with the size of the corpus vocabulary, and the vector element value is the normalized frequency of the corresponding word appearing in the context window. The Jensen-Shannon Divergence (JS divergence) is used to measure the degree of difference in the context distribution of words with identical word forms in two dialects. The calculation formula is as follows: Here, P and Q represent the contextual probability distributions of words in the two dialect corpora, M is the average distribution of P and Q, and KL represents the KL divergence. For the word "rapariga," its JS divergence reaches 0.52 in both the Portuguese and Brazilian corpora, indicating a high degree of differentiation. The closer the JS divergence value is to 1, the more significant the semantic difference of the word is between the two dialects. Using JS divergence as the main metric, a differentiation strength feature vector is generated. Each element in the differentiation strength feature vector corresponds to a quantified value of the degree of differentiation of a word with the same word form.
[0024] The strongest semantically conflicting word pairs are captured based on differentiation intensity features and transformed into contrast-enhanced sample pairs. Based on differentiation intensity features, all words in the homograph candidate word set are sorted in descending order of the magnitude of the differentiation intensity feature vector. A differentiation intensity threshold of 0.4 is set, and words with a magnitude exceeding this threshold are selected as high-conflict words, which are the main source of cross-dialect semantic confusion. For each high-conflict word, five representative use cases are extracted from both the source and target dialects. The selection of use cases follows the principle of diversity coverage, ensuring coverage of different registers such as formal, informal, and spoken expressions. For example, the use cases for "rapariga" in the Portuguese corpus are... "(This girl won an award), the use case in the Brazilian corpus is a sentence with a clear derogatory context. The use case includes the complete sentence and paragraph context of the word to accurately determine the semantic meaning during subsequent annotation. Analyze the specific semantic meaning and usage scenarios of the word in the use case, clarify the core semantic differences of the word in different dialects, and record information in two dimensions: difference type and difference intensity. High-conflict words are transformed into contrast-enhanced sample pairs. Each contrast-enhanced sample pair contains two semantic representations of the word in the source dialect and the target dialect. For "rapariga", its contrast-enhanced sample pair is [rapariga_Portugal: "young girl", rapariga_Brazil: "derogatory meaning"].
[0025] Dialectal contrast annotation is performed on the contrast-enhanced sample pairs to generate contrast training sample pairs. Detailed dialectal contrast annotation is performed on each contrast-enhanced sample pair, including the typical usage, semantic range, and emotional tone of the vocabulary in each dialect. Typical usage is obtained by extracting high-frequency collocations and sentence templates from the corpus. High-frequency collocations are extracted using a mutual information algorithm to identify word combinations with significant co-occurrence relationships. Emotional tone is categorized into positive, neutral, and negative, and the determination of emotional tone is based on the overall semantic tendency of the sentence in which the vocabulary appears and the distribution of emotional words in the context. Contrast samples are constructed for the contrast-enhanced sample pairs. Each sample contains a triple [anchor word, positive example word, negative example word]. The anchor word is the vocabulary representation in a specific dialect, the positive example word is a semantically similar word in the same dialect, and the negative example word is a homograph representing a word from another dialect. The triple structure facilitates subsequent model training using a contrastive learning loss function. For "rapariga", the constructed contrastive samples are [rapariga_Portugal, moça_Portugal, rapariga_Brazil]. Through contrastive learning, the model can distinguish semantic differences in different dialects. After training, when the model receives input from a Portuguese user, it maps "rapariga" to a neutral semantic space. When it receives input from a Brazilian user, it automatically avoids the use of this word and recommends unambiguous expressions such as "moça" or "garota". All annotated contrastive enhancement sample pairs and their contrastive samples are aggregated to generate a contrastive training sample pair dataset. Each record in the dataset contains three components: contrastive enhancement sample pairs, triplet contrastive samples, and dialect annotation information.
[0026] Vector space analysis is performed on representation shift features and contrastive training sample pairs to determine the priority adjustment layers. The representation shift features and contrastive training sample pairs are input into each Transformer layer of the model, and the representation change trajectory of these features during forward propagation is tracked. The representation change trajectory is recorded in the form of a sequence of hidden state vectors for each layer. Based on the representation shift features, the distance between the hidden state output of each layer and the desired target representation is calculated. The desired target representation is determined based on dialect annotation information. The representation distance change rate is obtained by calculating the distance change between adjacent layers, reflecting the ability of each layer to correct representation shifts. Based on the contrastive training sample pairs, positive and negative example words from the sample pairs are input into the model separately. The attention weight matrix of each layer is extracted, and the standard deviation of the attention weight distribution between positive and negative example words within the same layer is calculated as the attention differentiation index. A higher attention differentiation index indicates a stronger ability of that layer to distinguish different dialect expressions. The sensitivity to representation shift and the degree of attentional differentiation are comprehensively scored using the following formula: S_layer = W1 × Δd_norm + W2 × σ_norm, where S_layer represents the score of the priority adjustment layer, Δd_norm represents the standardized rate of change of representation distance, σ_norm represents the standardized attentional differentiation index, and W1 and W2 are weighting coefficients satisfying W1 + W2 = 1. Based on the vector space analysis results, the layer with the highest score is determined as the priority adjustment layer, which will be prioritized for parameter adjustment in subsequent steps to achieve dialect adaptation.
[0027] Step S130: Identify dialect difference features in the model constraint information to generate hierarchical coding parameters, generate hierarchical representation structure by prioritizing the adjustment of the layer and the hierarchical coding parameters, and determine the weight adjustment boundary using the hierarchical representation structure.
[0028] Specifically, dialectal differences are identified within the model constraint information to generate hierarchical coding parameters. The hierarchical coding parameter matrix is organized in a two-dimensional structure with rows for hierarchical order and columns for dialect regions. Matrix elements represent the comprehensive coding strength of that layer for that dialect. Pre-training corpus distribution data is extracted from the model constraint information: Brazilian Portuguese accounts for 58%, Portuguese for 32%, and African Portuguese for only 10%. This uneven distribution results in a weaker representation ability of the model for low-representation dialects. Based on the distribution pattern of dialectal differences identified by the model constraint information, representative samples from each dialect are input into the model for forward propagation. Feature activation values of each layer are extracted. By comparing the feature activation strengths of each dialect at the lexical, syntactic, and semantic levels, it is determined which model layers are more sensitive to dialectal differences. Analysis of the model constraint information reveals that for Bantu loanwords in Angolan Portuguese, the activation strength of layers 6 to 10 is significantly lower than that of corresponding words in other dialects, indicating that these layers are insufficient in representing low-resource dialects. Each layer is assigned hierarchical coding parameters, which are calculated by combining the layer's sensitivity coefficient to each dialect and its representation sufficiency index. The sensitivity coefficient quantifies the layer's response strength to specific dialect features, ranging from 0 to 1. The representation sufficiency index measures the layer's representation quality for that dialect, obtained by constructing a dialect classifier and calculating the classification accuracy of the layer's output. The weighted average of the two indices is used as the coding strength value at the corresponding position in the hierarchical coding parameter matrix.
[0029] In some embodiments, generating a hierarchical representation structure by coordinating the priority adjustment layer with the hierarchical coding parameters includes: identifying conflict regions in the priority adjustment layer to generate constraint conflict parameters; using the constraint conflict parameters and the hierarchical coding parameters to perform conflict coordination processing to generate coordination coefficients; using the coordination coefficients to perform hierarchical allocation on the hierarchical coding parameters to generate hierarchical allocation configurations; and embedding the hierarchical allocation configurations into the hierarchical coding parameters to generate a hierarchical representation structure.
[0030] Conflict region identification is performed on the priority adjustment layers to generate constraint conflict parameters. For the identified priority adjustment layers, their gradient update behavior on different dialect training samples is analyzed. During model fine-tuning, the parameter gradient update magnitude of the priority adjustment layers is recorded, and the statistical characteristics of the parameter gradients of each priority adjustment layer are calculated, including the mean, variance, and maximum value of the gradient. For the attention weight matrix of layer 8, its gradient mean is 0.0032 and variance is 0.0018. These statistics reflect the update activity of this layer in the current training state. The contradictory relationship between the priority adjustment layers under different constraints is detected. Some layers require a large gradient update magnitude to adapt to low-resource dialects, but also require strict gradient constraints to maintain performance on high-resource dialects. This contradiction constitutes a conflict region. For example, layer 9 needs to significantly adjust the attention weights when learning Bantu loanwords in Angolan Portuguese, but this adjustment will disrupt the Brazilian Portuguese colloquial sentence patterns already learned by this layer, causing the model to have comprehension biases when dealing with the daily conversation of Brazilian users, "Tudo bem?" (How are you?). For each layer, the cosine similarity of its gradient direction on different dialect training samples is calculated. When the gradient direction similarity between Brazilian Portuguese and Angolan Portuguese samples in the same layer is less than 0.3, the layer is marked as having gradient conflict between dialects. The conflict intensity is calculated by combining the gradient direction difference angle and the gradient magnitude ratio. Layer 9 has a gradient direction angle of 112 degrees and a gradient magnitude ratio of 3.8 when processing Brazilian Portuguese and Angolan Portuguese, indicating that this layer has significant constraint conflict. Layers that show conflict between multiple dialect pairs are identified as high-conflict layers. The constraint conflict parameter table records all layers in the model with adjustment contradictions and their conflict characteristics, including conflict layer index and conflict intensity score.
[0031] Conflict coordination coefficients are generated by using constraint conflict parameters and hierarchical coding parameters. For each conflict layer in the constraint conflict parameter table, a conflict coordination strategy is designed based on the coding strength of that layer for each dialect in the hierarchical coding parameter matrix. If the coding strength of a layer for low-resource dialects is significantly lower than that for high-resource dialects in the hierarchical coding parameters, the gradient update requirements of low-resource dialects are prioritized, and the coordination strategy tends to relax the gradient constraints of that layer. If the coding strength of a layer for multiple dialects is high in the hierarchical coding parameters, a gradient projection method is used to project the gradient updates of different dialects into a common optimization subspace, reducing mutual interference between dialects. Based on the conflict constraint parameters and hierarchical coding parameters, the reconciliation coefficient is calculated by comprehensively considering two factors: the ratio of coding intensity for low-resource dialects to high-resource dialects in that layer, and the conflict intensity score. The calculation formula is: λ=(E_low / E_high)×(1+α×C), where λ represents the reconciliation coefficient, E_low and E_high represent the coding intensity for low-resource and high-resource dialects, respectively, C represents the conflict intensity score, and α is an adjustment parameter, typically ranging from 0.5 to 2.0. The reconciliation coefficient calculated for layer 9 is 2.3, meaning that the adjustment range for Angolan Portuguese in this layer should be significantly higher than that for Brazilian Portuguese. The reconciliation coefficient vector quantitatively describes the attention paid to different dialects by each conflict layer during fine-tuning; a larger reconciliation coefficient indicates that the layer should pay more attention to the adaptation needs of low-resource dialects.
[0032] Layered allocation configurations are generated by hierarchically assigning hierarchical encoding parameters using reconciliation coefficients. Based on these reconciliation coefficients, the model layers are functionally localized and resource-allocated. Layers with reconciliation coefficients above a threshold of 1.5 are designated as dialect-specific adaptation layers. These layers are primarily responsible for capturing unique features specific to a particular dialect. For example, layer 9 is designated as the Angolan Portuguese-specific adaptation layer. This layer specifically learns the semantic representation of Bantu loanwords. When an Angolan user inputs a sentence containing "kamba" (friend), this layer can accurately activate the corresponding semantic features without confusion with "amigo" in Brazilian Portuguese. Layers with reconciliation coefficients between 0.8 and 1.5 are designated as dialect-shared layers. These layers learn universal semantic representations across dialects. Layers with reconciliation coefficients below 0.8 are designated as general foundation layers. These layers retain their original pre-trained weights to maintain the model's basic language understanding capabilities. Higher learning rates and more frequent parameter updates are assigned to dialect-specific adaptation layers, while lower learning rates or even freezing of some parameters are used for general foundation layers. Based on the hierarchical encoding parameter matrix, each layer is assigned a functional positioning label, a learning rate scaling factor, and a parameter update frequency. For layer 9, its functional positioning is a dedicated adaptation layer for Angola Portuguese, with a learning rate scaling factor of 2.3 and a parameter update frequency of once per batch. The hierarchical allocation configuration table integrates the three key configurations of each layer: functional positioning, learning rate scaling factor, and parameter update frequency.
[0033] A hierarchical representation structure is generated by embedding the hierarchical allocation configuration into the hierarchical coding parameters. This structure is organized as a three-dimensional tensor with dimensions of [layer index, dialect index, configuration parameters]. The configuration parameter dimension includes the learning rate scaling factor, parameter update frequency, gradient pruning threshold, and functional positioning label. The configuration information from the hierarchical allocation configuration table is fused with the hierarchical coding parameter matrix, expanding its dimensions by adding a configuration parameter dimension to the original layer-dialect two-dimensional matrix. The learning rate scaling factor uses the reconciliation coefficient value. The parameter update frequency is determined based on the functional positioning: dialect-specific adaptation layers are updated once per batch, dialect-shared layers are updated once every two batches, and general base layers are updated once every four batches. The gradient pruning threshold is positively correlated with the reconciliation coefficient to allow for more significant parameter adjustments in layers with high reconciliation coefficients. Based on the hierarchical allocation configuration, the expanded hierarchical representation structure not only includes the coding strength of each layer for each dialect but also the functional positioning and configuration parameters of each layer. Taking the combination of layer 9 and Angolan Portuguese as an example, the corresponding layered representation structure tensor elements include configuration information such as the learning rate scaling factor of 2.3, the parameter update frequency of once per batch, the gradient clipping threshold of 1.5, and exclusive adaptation function labels.
[0034] A hierarchical representation structure is used to determine the weight adjustment boundaries. Based on the configuration information in the hierarchical representation structure, adjustment boundaries are set for each parameter matrix of each layer, defining the allowed range of parameter updates. Functional localization information is extracted from the hierarchical representation structure. For the general base layer, the base boundary ratio is set to ±5% to ensure that the parameters of these layers do not deviate too far from the pre-training state, maintaining the model's performance on general tasks. For example, if the boundary of the general base layer is set to ±30%, the model may lose its grasp of basic Portuguese grammar rules after over-adapting to Angolan Portuguese, leading to basic grammatical errors such as subject-verb disagreement and tense confusion when generating text in any dialect. For the dialect-sharing layer, the base boundary ratio is relaxed to ±15%, allowing for moderate parameter adjustments to balance the needs of different dialects. For the dialect-specific adaptation layer, the base boundary ratio is further relaxed to ±30%, providing sufficient adjustment space to learn dialect-specific features. The weight adjustment boundary B = B_base × (1 + β × λ) is calculated based on the functional positioning and coordination coefficient in the hierarchical representation structure. Here, B_base represents the basic boundary ratio determined by the functional positioning, β is the boundary adjustment coefficient ranging from 0.1 to 0.5, and λ is the coordination coefficient of that layer in the hierarchical representation structure. This weight adjustment boundary constraint set ensures that parameter updates remain within a reasonable range, avoiding overfitting to specific dialects and compromising the model's generalization ability.
[0035] Step S140: Combine the weight adjustment boundary and priority coefficient to determine the parameter distribution density, generate the optimal migration weight based on the capacity matching of key semantic difference points and parameter distribution density, extract negative migration nodes from the optimal migration weight and convert them into dialect boundary markers, and construct gradient propagation paths based on the dialect boundary markers.
[0036] The parameter distribution density is determined by combining the weight adjustment boundary and priority coefficients. The weight adjustment boundary defines the upper limit of the parameter update magnitude: ±5% for the general base layer, ±15% for the dialect-sharing layer, and ±30% for the dialect-specific adaptation layer. The priority coefficients are derived from the dialect adaptation priority list generated in step S110, such as 2.3 for Angolan Portuguese, 1.5 for Portuguese in Portugal, and 0.8 for Portuguese in Brazil. Based on the weight adjustment boundary, the total number of adjustable parameters is calculated for each layer. Layer 9 contains 4.8 million trainable parameters, including the attention weight matrix and feedforward network parameters. Theoretically, 1.44 million parameters can be significantly adjusted within the ±30% adjustment boundary. Combining the priority coefficients for each dialect in this layer, the effective parameter capacity for a specific dialect is calculated. The effective parameter capacity for Angolan Portuguese is a weighted result of 1.44 million × 2.3. Similar calculations are performed on all layers of the model to construct a parameter distribution density map, where the horizontal axis represents the layer index and the vertical axis represents the effective parameter capacity for each dialect. The parameter distribution density map reveals the differences in the model's adaptability to different dialects at different depths. The parameter distribution density is usually lower in the shallow and deep layers, while the intermediate layer has a higher parameter distribution density because it carries more semantic conversion functions.
[0037] In some embodiments, generating optimal migration weights based on matching the key semantic difference points with the parameter distribution density capacity includes: identifying migration path characteristics from the key semantic difference points to the parameter distribution density to generate path characteristic data; extracting low-capacity segments from the path characteristic data and converting them into feature migration parameters; collaboratively screening migration path groups based on the feature migration parameters and a preset capacity threshold to generate preferred migration paths; and performing parameter migration through the preferred migration paths to generate optimal migration weights.
[0038] This study identifies the characteristics of the transfer path from key semantic differences to parameter distribution density, generating path characteristic data. For key semantic differences, such as Bantu loanwords in Angolan Portuguese and formal Portuguese register structures, the study analyzes the representation flow path of these key semantic differences in the model. Key semantic differences are first encoded as initial vectors in the embedding layer, then transformed layer by layer through multiple Transformer layers, finally producing prediction results in the output layer. This complete forward propagation process constitutes the semantic information transfer path. Tracing the activation patterns of key semantic differences such as the Bantu loanword "muxiluanda" in the model's forward propagation, the activation magnitude of this word in layers 6 to 10 is significantly higher than in other layers, indicating that these layers are the main processing areas for this key semantic difference. The transmission efficiency is calculated for each transfer path. The transmission efficiency is determined by the path length and the parameter distribution density of the intermediate layers; the shorter the path and the higher the parameter distribution density, the higher the transmission efficiency. The path characteristic data records the path information and transmission efficiency of each migration path. The path characteristic data is stored in the form of a graph structure, where nodes represent the layers of the model, edges represent the semantic transmission relationships between layers, and edge weights represent the corresponding transmission efficiency values.
[0039] Low-capacity segments are extracted from pathway characteristic data and transformed into feature transfer parameters. Low-capacity segments refer to segments in the pathway characteristic data where the parameter distribution density is below average and becomes a bottleneck in transmission. These segments limit the effective representation of semantic differences. By traversing all transfer paths in the pathway characteristic data, segments with parameter distribution density below the global median are identified. Layers 2 and 3, being functionally positioned as general foundation layers, have an effective parameter capacity of only 180,000 for Angolan Portuguese, far lower than the 1.44 million of the intermediate layers. Based on the analysis of pathway characteristic data, low-capacity segments are prone to information loss during transfer, leading to incomplete or distorted semantic signals received by downstream layers. For example, when the Angolan Portuguese loanword "kamba" (friend) passes through low-capacity segments in layers 2 and 3, its Bantu semantic features are compressed and lost. This results in downstream layers only receiving a general semantic similar to the standard Portuguese "amigo," unable to distinguish the local Angolan cultural connotations of "kamba." Ultimately, the model simply equates it with "amigo" in translation scenarios, losing the dialectal characteristics. Low-capacity segments identified in the pathway characteristic data are subjected to characteristic analysis to calculate their detour feasibility and congestion risk scores. The congestion risk score is calculated based on the capacity gap ratio of the segment and the number of downstream dependent layers. The location index, detour feasibility, and congestion risk score of the low-capacity segments are integrated into feature transfer parameters, which are organized in list form, with each element corresponding to a complete characteristic description of a low-capacity segment.
[0040] Preferred migration paths are generated by collaboratively selecting migration path groups based on feature transfer parameters and a preset capacity threshold. The preset capacity threshold is determined based on the complexity and representation requirements of semantic differences. For lexical differences such as Bantu loanwords, the capacity threshold is set at 500,000 parameters; for syntactic differences in formal languages, the capacity threshold is increased to 1 million parameters. Based on the bottleneck location information provided by the feature transfer parameters, a capacity check is performed on all migration paths in the path characteristic data, and paths with parameter distribution density below the capacity threshold in any segment are eliminated. For paths containing low-capacity segments but with detour feasibility, alternative paths are constructed based on detour information provided by the feature transfer parameters. Using the blocking risk score of the feature transfer parameters, a comprehensive score is calculated for each candidate path, and the path with the highest score is selected first. For semantic differences in Angolan Portuguese, three preferred migration paths are selected, passing through layers 6-8, 7-10, and 8-11, respectively. The parameter distribution density of these preferred migration paths all exceed the capacity threshold and have high transmission efficiency. The preferred migration paths are represented in the form of path sequences, with each path recording the index information of the starting layer, ending layer, and intermediate layers.
[0041] Optimal transfer weights were generated by performing parameter transfer through optimized transfer pathways. For each optimized transfer pathway, the transfer process of parameters from the source dialect (high-resource dialect) to the target dialect (low-resource dialect) was simulated. Parameter features were extracted from the high-quality representation of Brazilian Portuguese and transferred to the representation space of Angolan Portuguese through the optimized transfer pathways. The parameter responses at each layer were monitored during the transfer process, and the performance changes and transfer stability of the target dialect on the validation set before and after transfer were recorded. For the optimized transfer pathways through layers 6-8, the BLEU score of Angolan Portuguese increased from 32.5 to 38.2 after transfer, an improvement of 5.7. For the optimized transfer pathways through layers 7-10, the BLEU score increased to 39.1, an improvement of 6.6. For the optimized transfer pathways through layers 8-11, the BLEU score increased to 37.8, an improvement of 5.3. The optimal transfer weights for each pathway are calculated based on the performance improvement and transfer stability obtained during the transfer process. The calculation formula is: T = W1 × (ΔP / ΔP_max) + W2 × S, where T represents the optimal transfer weights, ΔP / ΔP_max represents the standardized performance improvement, S represents the transfer stability score, which is determined by the dispersion of performance fluctuations in multiple transfer experiments; the smaller the fluctuation, the higher the score. W1 and W2 are weight coefficients. The optimal transfer weights serve as weight factors for each pathway, and training resources are allocated according to the weight ratio during actual fine-tuning.
[0042] In some embodiments, the step of extracting negative migration nodes from the optimal migration weights and converting them into dialect boundary markers includes: identifying negative migration segments from the optimal migration weights; performing boundary characteristic analysis on the negative migration segments to generate boundary characteristic parameters; converting the boundary characteristic parameters into boundary reinforcement factors; and generating dialect boundary markers based on the boundary reinforcement factors.
[0043] Identify negative transfer segments from the optimal transfer weights. Negative transfer segments refer to segments or parameter groups that cause a decline in target dialect performance during parameter transfer. The root cause of negative transfer segment phenomena lies in the fundamental conflict between the source and target dialects on certain semantic dimensions, such as the handling of colloquial abbreviations in Brazilian Portuguese. ( The transfer of parameters (of the abbreviation) to Angolan Portuguese will interfere with the preservation of complete verb forms in Angolan Portuguese. The processing logic caused the model to incorrectly generate colloquial abbreviations when Angolan users input formal text, reducing the formality of the output. Analysis of the optimal transfer weight distribution for each preferred transfer pathway revealed that for pathways with high overall optimal transfer weights, further examination of the local transfer effects within each layer was conducted to identify segments with local transfer weights significantly lower than the pathway average. For pathways in layers 7-10, although the overall optimal transfer weight was 0.85, some parameter sub-regions in the attention weight matrix of layer 8 showed negative local transfer effects, indicating that these parameters had a negative effect when transferred from Brazilian Portuguese to Angolan Portuguese. Ablation experiments were used to verify the impact of negative transfer segments. After freezing the parameters of these negative transfer segments, the performance of the target dialect was re-evaluated. If the performance improved, it confirmed that the segment indeed had negative transfer. The number and distribution density of negative transfer segments in each layer were statistically analyzed. Layer 8 contained 127 negative transfer parameter groups, accounting for 2.6% of the total parameters in this layer. Negative transfer segments were labeled by parameter group, and each negative transfer segment recorded its layer position and parameter index range.
[0044] For example, the step of performing boundary characteristic analysis on the negative migration segment to generate boundary characteristic parameters includes: obtaining the semantic distance features of the negative migration segment to generate a distance characteristic component; identifying parameter sharing conflicts in the negative migration segment and converting them into conflict indication signals to generate a scheduling characteristic component; capturing the migration loss features of the negative migration segment to generate a loss characteristic component; and fusing the distance characteristic component, the scheduling characteristic component, and the loss characteristic component to generate boundary characteristic parameters.
[0045] Semantic distance features of negative transfer segments are used to generate distance characteristic components. For each segment in the negative transfer segment, activation vectors are extracted from the source and target dialect corpora. These activation vectors are obtained by inputting dialect corpus samples into the model and recording the output responses of the segment parameters. For the negative transfer segment parameter group at layer 8, the average activation vector dimension on the Brazilian Portuguese corpus is 768, and the average activation vector on the Angolan Portuguese corpus is also 768-dimensional. These two activation vectors represent the response patterns of the parameter group to the two dialect inputs, respectively. The cosine similarity between the two activation vectors in the negative transfer segment is calculated; a lower similarity indicates a greater semantic distance. The cosine similarity between Brazilian Portuguese and Angolan Portuguese in this negative transfer segment parameter group is 0.32, and the corresponding cosine distance is 0.68. The distance feature component uses the standardized cosine distance as the main indicator, with a value range between 0 and 1. The closer the distance feature component value is to 1, the more significant the semantic difference. The distance feature component quantifies the degree of semantic separation between the source dialect and the target dialect in the negative migration segment representation space.
[0046] Parameter sharing conflicts in negative transfer segments are identified and transformed into conflict indication signals to generate scheduling characteristic components. When the model processes training samples from multiple dialects simultaneously, the parameters of certain negative transfer segments need to respond to the semantic requirements of different dialects at the same time. When these requirements contradict each other, parameter sharing conflicts arise. For example, the parameter of a certain attention head in layer 8 needs to learn to associate "rapariga" with the negative semantic space when processing Brazilian Portuguese, but needs to associate the same word with the neutral semantic space when processing Portuguese. These two opposing learning signals directly antagonize the same parameter, causing the parameter to oscillate repeatedly and fail to converge during training. Occupation conflict detection is performed on the parameter group of the negative transfer segment in layer 8, and the gradient update direction of this parameter group when processing Brazilian Portuguese and Angolan Portuguese samples is statistically analyzed. If the angle between the gradient directions of the two dialects in the negative transfer segment exceeds 90 degrees, it indicates a direct conflict; an angle close to 180 degrees indicates a strong adversarial conflict. The angle between the gradient directions of this negative transfer segment parameter group when processing the two dialects is 135 degrees, which falls into the category of strong conflict. The scheduling characteristic component is generated by combining the conflict intensity index and the conflict frequency. The conflict indication signal is standardized to a value between 0 and 1. The higher the value of the scheduling characteristic component, the more serious the scheduling conflict. Segments with scheduling characteristic component values exceeding 0.7 need to adopt a gradient isolation strategy during training.
[0047] The migration loss features of negative transfer segments are captured to generate loss characteristic components. A comparative analysis of grouped training of negative transfer segments is conducted. The first training configuration allows the negative transfer segment to participate in cross-dialect transfer, while the second training configuration freezes the parameters of the negative transfer segment and only performs intra-dialect training. The comparison of the two configurations quantifies the additional cost brought by cross-dialect transfer. Comparing the convergence speed and final performance of the two training configurations, the first training configuration requires an additional 1200 iterations to converge when adapting the parameter group of the negative transfer segment at layer 8 to both Brazilian Portuguese and Angolan Portuguese, while the second training configuration only requires 800 iterations. The performance degradation of the negative transfer segment is evaluated. The first training configuration achieves a BLEU score of 37.2 on the Angolan Portuguese validation set, while the second training configuration reaches 39.1, a performance decrease of 1.9 points. The migration loss feature integrates the two dimensions of increased training cost and performance degradation, and the loss index is calculated by weighted averaging. The loss characteristic component maps the loss index to the range of 0 to 1. The higher the value of the loss characteristic component, the greater the cost of migrating the negative migration segment. Segments with a loss characteristic component value exceeding 0.6 should be set as dialect-specific areas to avoid cross-dialect interference.
[0048] Boundary characteristic parameters are generated by fusing distance characteristic components, scheduling characteristic components, and loss characteristic components. For the negative transfer parameter set at layer 8, the calculated distance characteristic component D_dist, scheduling characteristic component D_sche, and loss characteristic component D_loss are extracted. The distance characteristic component reflects the semantic representation gap between Brazilian Portuguese and Angolan Portuguese on this parameter set, which is crucial when the model attempts to simultaneously represent the semantic differences between the two languages using the same set of parameters. "(Brazilian colloquial abbreviation) and" "(In the Angolan formal form), a larger distance characteristic component indicates that the two representations inevitably distort each other. The scheduling characteristic component reflects the degree of gradient conflict during parameter updates; a higher value indicates that the parameter set frequently encounters opposing gradient signals from different dialects during training. The loss characteristic component reflects the performance cost of forcibly sharing the parameter set; a higher value indicates that the model will incorrectly insert Brazilian colloquial expressions when processing formal documents input by Angolan users. The formula for calculating the boundary characteristic parameter is: H = W_d × D_dist + W_s × D_sche + W_l × D_loss, where H represents the boundary characteristic parameter, and W_d, W_s, and W_l are the weight coefficients of the three components, satisfying W_d + W_s + W_l = 1. The weight coefficients are determined according to business priorities; if performance loss is avoided first, W_l is increased; if dialect independence is maintained first, W_d is increased."
[0049] Boundary characteristic parameters are transformed into boundary reinforcement factors. These factors are added to the loss function as regularization weights to enhance the discriminative power of dialect boundaries during training. Higher boundary reinforcement factors result in stronger dialect isolation constraints for the corresponding segments. The scalar values of the boundary characteristic parameters are nonlinearly mapped to the boundary reinforcement factor F, with the formula: F = exp(k × (H - H_th)), where H represents the boundary characteristic parameter, H_th represents the boundary characteristic threshold, and k is the mapping slope coefficient. When the boundary characteristic parameter exceeds the threshold, the boundary reinforcement factor increases exponentially, ensuring stronger isolation protection for segments with high boundary characteristics. For example, this applies to processing the Brazilian Portuguese abbreviation "". "Formal form of Angolan Portuguese" "For conflicting parameter sets, those with boundary characteristic parameters exceeding a threshold have higher calculated boundary reinforcement factors. During training, these parameter sets are subject to strong isolation constraints to ensure that the model does not incorrectly insert Brazilian colloquial abbreviations when processing formal business emails from Angolan users. A higher boundary reinforcement factor indicates more significant boundary characteristics in that segment, requiring stronger isolation protection. Boundary reinforcement factors are calculated for all segments within the negative migration segment, and a boundary reinforcement factor distribution map is constructed, marking high boundary reinforcement factor regions requiring focused protection. The boundary reinforcement factor acts as a constraint during model fine-tuning, limiting cross-dialect parameter sharing in these segments."
[0050] Dialect boundary markers are generated based on boundary reinforcement factors. Threshold segmentation is applied to the boundary reinforcement factor distribution map, marking segments with boundary reinforcement factors higher than 1.5 as strong boundary regions, indicating significant semantic conflicts between different dialects. Segments with boundary reinforcement factors between 0.8 and 1.5 are marked as weak boundary regions, which, while showing differences, still possess some transfer feasibility. Segments with boundary reinforcement factors lower than 0.8 are marked as shared regions, whose semantic representations are largely consistent across different dialects, allowing for free parameter transfer. Dialect affiliation labels are assigned to each marked segment; strong boundary regions typically belong to a single dialect, weak boundary regions can belong to similar dialect groups, and shared regions are not subject to dialect affiliation restrictions. The negative transfer parameter group at layer 8 is marked as a strong boundary region for Angolan Portuguese. This label prohibits parameter transfer from Brazilian Portuguese to this region. After setting the boundary markers, this parameter group is specifically used to learn Bantu loanword features in Angolan Portuguese. When an Angolan user inputs " When the phrase "(Luanda people are very hospitable)" is displayed, the parameters in this region can accurately identify the semantics of "muxiluandas" without being affected by Brazilian Portuguese representations, resulting in a significant improvement in output quality. Dialect boundary markers are implemented in the training configuration as a mask matrix, indicating which parameters belong to dialect-specific regions and should not be affected by cross-dialect migration. The elements of the dialect boundary marker mask matrix are 0 or 1, where 1 indicates that migration is allowed and 0 indicates that migration is prohibited.
[0051] In some embodiments, constructing a gradient propagation path based on the dialect boundary markers includes: locating key gradient adjustment nodes from the dialect boundary markers; identifying the sparse connectivity characteristics between the key gradient adjustment nodes and converting them into boundary isolation markers; establishing gradient transfer paths between nodes based on the boundary isolation markers; and generating a gradient propagation path based on the gradient transfer paths.
[0052] Key nodes for gradient adjustment are located using dialect boundary markers. These key nodes isolate dialects by adjusting gradient flow direction and are core control points in the gradient propagation path. The dialect boundary marker mask matrix is traversed to identify parameter locations marked as strong or weak boundaries. Based on the dialect boundary marker information, the connectivity pattern of each boundary parameter location in the computational graph is analyzed. Parameter nodes with high in-degree or high out-degree have a greater impact on gradient propagation, and these high-influence nodes are the preferred targets for gradient adjustment. The negative transfer parameter group in layer 8 contains weight parameters for 32 attention heads. These parameters receive input from layer 7 during forward propagation and pass gradients to layer 7 during backpropagation. The gradient flow of each parameter node is calculated; gradient flow is defined as the cumulative gradient norm passing through that node. A larger gradient flow indicates a more critical role for that node in gradient propagation. Parameter nodes whose gradient flow exceeds the threshold and are located in the dialect boundary marker region are selected as key nodes for gradient adjustment. The 8th layer identifies 12 key nodes for gradient adjustment. These 12 nodes are distributed in 8 different attention heads, covering the main parameter regions for dialect differences processed by this layer.
[0053] Identifying the sparse connectivity characteristics between key nodes in gradient regulation is transformed into boundary isolation markers. Sparse connectivity reflects the gradient propagation density between key nodes, and it facilitates dialect isolation. A connection graph of key nodes in gradient regulation is constructed, where nodes represent key parameters, edges represent gradient propagation paths, and edge weights represent gradient propagation strengths. The sparsity characteristics of the connection graph are analyzed, and the edge density and node degree distribution are calculated. For key nodes in layers 8 and 9, if there are dense connections between them, gradient signals from different dialects will interfere with each other, weakening the boundary isolation effect. If the connections between key nodes are sparse, the gradient of each dialect mainly propagates within its own parameter subspace, achieving effective isolation. A connection sparsity index is calculated, defined as the ratio of the actual number of edges to the maximum possible number of edges. The connection sparsity of key nodes in layers 8 to 9 is 0.18, indicating that only 18% of the possible connections actually exist, indicating relatively sparse connectivity. Sparse connection regions are marked, and connections with a sparsity higher than a threshold of 0.5 are marked as boundary isolation regions. Boundary isolation markers are stored in Boolean matrix form, with rows and columns corresponding to key nodes. An element value of 1 in the boundary isolation marker matrix indicates that the connection needs enhanced isolation.
[0054] Gradient propagation paths between nodes are established based on boundary isolation markers. A gradient routing strategy is designed based on the boundary isolation marker matrix and the dialect affiliation of key nodes. This strategy determines how gradient signals from different dialects flow between layers of the model. For gradient adjustment key nodes belonging to the same dialect, gradients are allowed to propagate freely between them, constructing intra-dialect propagation paths. These intra-dialect propagation paths ensure that semantic features of the same dialect can fully interact and be enhanced between relevant layers. For gradient adjustment key nodes belonging to different dialects, the boundary isolation marker determines whether gradient propagation is allowed. If marked as enhanced isolation, gradient propagation is blocked; if marked as weak isolation, a decay coefficient is applied to reduce cross-dialect interference. A direct gradient propagation path is established between the Angolan Portuguese key node in layer 8 and the Angolan Portuguese key node in layer 9, with a gradient propagation coefficient of 1.0, ensuring lossless transmission of Angolan Portuguese semantic information. Between the Angolan Portuguese key node in layer 8 and the Brazilian Portuguese key node in layer 9, due to the limitations of the boundary isolation markers, the gradient propagation coefficient of the gradient propagation path is set to 0.1, achieving strong isolation. The gradient propagation path is represented in the form of a directed graph, where the edge weights are the gradient propagation coefficients and the direction of the edges indicates the gradient flow direction, ensuring that dialect-specific gradients do not leak into the parameter regions of other dialects.
[0055] Gradient propagation paths are generated based on gradient transfer paths. These paths record the connections and transfer coefficients between key gradient control nodes. This scattered path information needs to be integrated into a unified gradient control mechanism. All gradient transfer paths are traversed and grouped according to dialect affiliation. Gradient transfer paths within the same dialect are merged into an intra-dialect propagation subgraph, while gradient transfer paths between different dialects are merged into a cross-dialect propagation subgraph. The intra-dialect and cross-dialect propagation subgraphs are then merged to construct a complete gradient propagation path. The gradient propagation path is implemented as a data structure, comprising a key node list, a transfer path graph, and a transfer coefficient matrix. The key node list records the parameter indices and dialect affiliations of all key gradient control nodes. The transfer path graph records the connections between nodes in a directed graph form. The transfer coefficient matrix stores the gradient transfer coefficients for each connection, where the transfer coefficient for intra-dialect connections is 1.0, and the transfer coefficient for cross-dialect connections is set to a decay value between 0.1 and 0.5 based on boundary isolation markers. The gradient propagation path is invoked during model training through a custom backpropagation hook function. The hook function dynamically adjusts the gradient values of each node based on the propagation path graph and the propagation coefficient matrix, controlling the isolated propagation of gradients from different dialects.
[0056] Step S150: Perform semantic processing based on the corpus data to detect the set of confused expressions, generate a representation decoupling configuration according to the set of confused expressions, and perform progressive collaborative optimization based on the representation decoupling configuration and gradient propagation path to output a multi-dialect adaptation scheme.
[0057] Specifically, semantic processing was performed on the corpus data to detect the set of confusing expressions. Semantic interference scanning was conducted on the corpus data from various dialect regions to identify expressions that are similar in form but different in meaning across multiple dialects. The Portuguese word "apanhar o autocarro" (to catch a bus) was extracted from the corpus data. While this word means "to take a bus" in Portuguese, in the Brazilian Portuguese corpus data, "apanhar" carries the ambiguity of "to be beaten," easily causing semantic confusion. Semantic processing was performed at three levels: lexical, phrase, and sentence structure. The lexical level focused on the semantic differentiation of homonyms and pseudo-semantic words; the phrase level focused on dialectal differences in fixed collocations; and the sentence structure level focused on conflicts in word order and clause structure. For each candidate confusing expression, its semantic consistency score across different dialects was calculated. Expressions with scores below a threshold of 0.4 were included in the confusing expression set. The sentence structure of Angolan Portuguese, which incorporates Bantu grammar, was also analyzed. (I am doing) with standard Portuguese "Sentences that are similar in form but different in grammatical rules are prone to causing recognition interference in the model. Such sentence structures are included in the confusion expression set. The confusion expression set is organized into three levels: lexical level, phrase level, and sentence structure level. The lexical level has the most confusion items, followed by the phrase level, while the sentence structure level has relatively fewer."
[0058] In some embodiments, generating a representation decoupling configuration based on the obfuscated expression set includes: monitoring the obfuscated expression set to generate a representation separation response; extracting obfuscation patterns from the obfuscated expression set and converting them into distinguishing markers; setting a representation fluctuation tolerance range based on the representation separation response and the distinguishing markers; and performing obfuscation disambiguation processing within the representation fluctuation tolerance range to generate a representation decoupling configuration.
[0059] A monitoring mechanism is implemented to generate representation separation response scores for the obfuscated expression set. This mechanism tracks the activation patterns of each obfuscated expression during model forward propagation. For each expression in the obfuscated expression set, samples from different dialect versions are input, and the hidden states of each layer of the model are recorded. For the word "apanhar" in the obfuscated expression set, the Portuguese version is input. "and the Brazilian version" The model compares the representation differences of two samples at each layer, reflecting the strength of the representation separation response. The Euclidean distance of the representation differences in representation separation response is calculated; a larger distance indicates a stronger dialect discrimination ability for the confused expression, corresponding to a higher representation separation response. The representation distance between the Portuguese and Brazilian versions of "apanhar" at layer 10 is 5.8, indicating strong isolation ability and a high representation separation response value. The representation distances of all confused expressions in the confused expression set at each layer are statistically analyzed to generate a representation separation response matrix. The matrix columns represent the confused expressions, the columns represent the model layers, and the element values represent the representation separation response of that layer for that expression. The representation separation response is normalized and mapped to the 0-1 range to quantify the model's ability to distinguish dialects from confused expressions; values close to 1 indicate strong isolation ability, while values close to 0 indicate insufficient isolation ability.
[0060] Confusion patterns in the set of confused expressions are extracted and transformed into distinguishing tags. Common patterns in the set of confused expressions are analyzed to identify the linguistic roots of confusion. Some confusion stems from lexical borrowing, such as words borrowed from Bantu in Angolan Portuguese that do not have corresponding semantics in other dialects. Some confusion stems from grammatical evolution, such as the difference between simplified verb conjugation rules in Brazilian Portuguese and standard rules in European Portuguese. Some confusion stems from pragmatic habits, such as formal honorifics retained in Portuguese being simplified to informal expressions in Brazilian Portuguese. Feature signatures are extracted for each confusion pattern. Features for lexical borrowing patterns include etymological markers and phonological features; features for grammatical evolution patterns include syntactic tree structure and morphological change rules; and features for pragmatic habits patterns include register labels and sentiment polarity. These feature signatures are encoded into distinguishing tag vectors, the magnitude of which reflects the overall distinguishability difficulty of the confused expression. The distinguishing tag vectors serve as additional input features, providing dialectal attribution information when the model processes confused expressions, ensuring that the distinguishing tags effectively guide the model's dialectal discrimination decisions.
[0061] For example, the step of setting the characterization fluctuation tolerance range based on the characterization separation responsivity and the distinguishing marker includes: detecting the synergistic characteristics of the characterization separation responsivity and the distinguishing marker to generate characterization fluctuation features and identify fluctuation-sensitive stages; performing boundary perturbation tests on the characterization fluctuation features during the fluctuation-sensitive stages to generate a boundary stability recovery period; adaptively adjusting the characterization separation responsivity based on the boundary stability recovery period to generate an adjusted responsivity; and determining the characterization fluctuation tolerance range based on the adjusted responsivity.
[0062] This study detects the synergistic properties of representation separation response and distinguishing markers to generate representation fluctuation features and identify fluctuation-sensitive stages. Representation fluctuation features capture the dynamic fluctuation patterns of representations through time-series analysis, and fluctuation-sensitive stages mark key periods of representation instability during model training. Synergistic analysis of the representation separation response matrix and distinguishing marker vectors reveals that when a confusing representation has a high representation separation response at a specific layer, but its distinguishing marker shows high cross-dialect semantic overlap, the representation at that layer is prone to generating representation fluctuation features. For "rapariga" at layer 9, the representation separation response is 0.78, but the distinguishing marker shows a semantic overlap of 0.52 in Portugal and Brazil. This combination of high representation separation response and moderate overlap easily leads to representation instability due to fluctuation features. The study records the trajectory of the representation vector changes at each layer throughout the training process, calculates the vector distance between consecutive time steps to form a fluctuation curve, which directly reflects the dynamic changes of representation fluctuation features. The peak of the fluctuation curve corresponds to periods of intense fluctuation, and the trough corresponds to periods of stable representation. Analysis of representation fluctuation features allows for accurate identification of fluctuation-sensitive stages. The triggering conditions for the fluctuation-sensitive phase were identified. Learning rate decay was a common trigger; when the learning rate decreased from 0.001 to 0.0001, the frequency of fluctuation features in the representations of multiple confused expressions increased significantly. Introducing new dialect data also triggered the fluctuation-sensitive phase. When Angolan Portuguese samples were first added to the training, confused expressions involving Bantu loanwords showed frequent fluctuation features in their representations over the subsequent 200 training steps.
[0063] In the volatility-sensitive phase, boundary perturbation tests are performed on the representation volatility features to generate boundary stability recovery cycles. During the identified volatility-sensitive phase, boundary perturbations are applied to the representation volatility features of the target obfuscated expression. Perturbation methods include temporarily increasing the training weights of the expression samples, introducing adversarial examples, and adjusting the learning rate. For the expression "rapariga," which exhibits significant volatility, the weights of samples containing this word are increased from 1.0 to 2.5 during the volatility-sensitive phase after learning rate decay, and this is maintained for 50 training steps. Changes in the model's representation volatility features are monitored during and after perturbation in the volatility-sensitive phase, and the deviation distance of the expression representation vector from the pre-perturbation steady state is calculated. The perturbation causes the representation volatility feature vector of "rapariga" at layer 9 to deviate from the steady state by 3.2 units, reaching a peak deviation before gradually regressing. The number of training steps required to recover from the peak deviation to near the steady state (deviation distance less than 0.5) is recorded; this number of steps is the boundary stability recovery cycle. The boundary stability recovery cycle for "rapariga" is 50 training steps, indicating that the model has moderate control over this expression. Boundary perturbation tests were performed on all high-frequency obfuscated terms in the obfuscated expression set, and the boundary stability recovery period data of each expression were summarized. Expressions with short boundary stability recovery periods indicate that the model has established a robust dialect differentiation mechanism, while expressions with long boundary stability recovery periods indicate that the differentiation mechanism is not yet mature and requires further optimization and adjustment.
[0064] An adaptive adjustment of the representation separation response is performed based on the boundary stabilization recovery period to generate an adjusted response. A mapping relationship is established between the boundary stabilization recovery period and the response adjustment: a short boundary stabilization recovery period indicates strong model control, and the representation separation response of that expression should be increased; a long boundary stabilization recovery period indicates weak control, and the representation separation response should be decreased. An adjustment function is defined, calculated as: R_adj = R_init × (1 + α × log(T_ref / T_actual)), where R_adj represents the adjusted response, R_init represents the initial representation separation response, T_actual represents the actual boundary stabilization recovery period, T_ref represents the reference boundary stabilization recovery period (set as the median of the boundary stabilization recovery periods of all confused expressions), and α is the adjustment strength coefficient. When the actual boundary stabilization recovery period is shorter than the reference value, the logarithmic term is positive, and the representation separation response is increased, resulting in a higher adjusted response; when the actual boundary stabilization recovery period is longer than the reference value, the logarithmic term is negative, and the representation separation response is decreased. For "rapariga", the initial characterization separation responsivity is 0.78, the actual boundary stable recovery period is 50 steps, the reference boundary stable recovery period is set to 60 steps, and the adjustment intensity coefficient is 0.15. The adjusted responsivity is then calculated. The responsivity is adjusted for all expressions in the confused expression set, and the characterization separation responsivity matrix is updated to the adjusted responsivity distribution.
[0065] The tolerance interval for representation fluctuations is determined based on the adjusted responsivity. For representations with high adjusted responsivity, a narrower tolerance interval is set to maintain their stable dialect discrimination state. For representations with low adjusted responsivity, a wider tolerance interval is set to allow the model to continue exploring a better representation space. The adaptive standard deviation is calculated based on the adjusted responsivity using the formula: σ_adj = σ_base × (2 - R_adj), where σ_base represents the base standard deviation and is set to an empirical value of 0.1, representing the amplitude of fluctuation in the confusion representation vector, and R_adj represents the adjusted responsivity. When the adjusted responsivity is close to 1, the adaptive standard deviation is close to the base standard deviation; when the adjusted responsivity is close to 0, the adaptive standard deviation can reach twice the base standard deviation. The tolerance interval for representation fluctuations is determined based on the adaptive standard deviation, and the width of the tolerance interval is proportional to the adaptive standard deviation. For "rapariga" at layer 9, based on its adjusted responsivity, its tolerance interval for representation fluctuations is relatively narrow, limiting the representational changes of this representation in the later stages of training and ensuring that the established dialect discrimination is not destroyed. The tolerance intervals for all obfuscated representations are summarized into an interval configuration table, which provides precise interval parameters for representation decoupling.
[0066] Within the representation fluctuation tolerance interval, obfuscation disambiguation is performed to generate a representation decoupling configuration. The obfuscation disambiguation employs a contrastive learning strategy, training different dialect versions of the same obfuscated expression as positive and negative sample pairs. This strategy is integrated into the core algorithm of the representation decoupling configuration. For "apanhar," the Portuguese version forms positive sample pairs with other Portuguese samples and negative sample pairs with the Brazilian version. Within the representation fluctuation tolerance interval, the degree of closeness or distance between sample pairs is adjusted. Representations of positive sample pairs should be brought closer to each other within the tolerance interval, while representations of negative sample pairs should be pushed to the boundaries of the tolerance interval or even outside the interval. A contrastive loss function is calculated, penalizing cases where the distance between positive sample pairs is too large or the distance between negative sample pairs is too small, ensuring that the sample pair relationships meet the constraints of the representation fluctuation tolerance interval. A decoupling constraint is applied to layer 10, requiring that the distance between the Portuguese and Brazilian representations of "apanhar" is no less than a threshold of 6.0, ensuring sufficient separation of the two semantics in the vector space. Similar decoupling constraints are applied to all obfuscated expressions, with the constraint strength dynamically adjusted according to the degree of obfuscation. The representation decoupling configuration is output as a configuration file, containing the target layer for each obfuscated representation, the representation fluctuation tolerance interval parameter, the list of contrast sample pairs, and the decoupling constraint threshold. The representation decoupling configuration is loaded during model training and uses a custom loss term to implement obfuscation and disambiguation processing, ensuring the effective execution of the representation decoupling configuration.
[0067] A progressive collaborative optimization approach based on representation decoupling configuration and gradient propagation path is used to output a multi-dialect adaptation scheme. The gradient propagation path and representation decoupling configuration are integrated. The gradient propagation path controls the isolation propagation of gradients across different dialects, while the representation decoupling configuration handles the semantic separation of confusing expressions. Together, they achieve progressive optimization of dialects. The progressive collaborative optimization is divided into three stages: warm-up, separation, and fusion. In the warm-up stage, a large learning rate and relaxed constraints are used to allow the model to learn the shared vocabulary and grammatical structures of all dialects. In the separation stage, the gradient isolation and decoupling constraints are gradually strengthened to separate the semantics of different dialects into independent representation subspaces. In the fusion stage, a very small learning rate and the strictest constraints are used to ensure that the model does not produce dialect confusion when handling boundary cases. After optimization, the final model is generated. The model achieves the preset performance targets for Brazilian Portuguese, Portuguese-Portuguese Portuguese, and Angolan Portuguese. The BLEU score is 42.3 for Brazilian Portuguese, 40.7 for Portuguese-Portuguese Portuguese, and improved from 32.5 to 38.9 for Angolan Portuguese. The core components of the multi-dialect adaptation scheme are exported, including hierarchical representation structure configuration, gradient propagation path definition, representation decoupling configuration, and dialect boundary marking. These components are organized modularly, allowing for rapid expansion based on the framework for scenarios requiring support for new dialects, reusing established gradient adjustment mechanisms and decoupling strategies. The scheme includes descriptions of applicable scenarios for each dialect: Brazilian Portuguese is suitable for social media conversations and business communication; Portuguese is suitable for formal document translation and literary processing; and Angolan Portuguese is suitable for spoken conversations and understanding local cultural content. As the final output of the system, the multi-dialect adaptation scheme achieves comprehensive coverage and refined adaptation of Portuguese-speaking languages.
[0068] To implement the above-described method embodiments, a multi-dialect large-scale model adaptation method for Portuguese-speaking languages is proposed to achieve the corresponding functions and technical effects. Referring to Figure 2, Figure 2 shows a structural block diagram of a multi-dialect large-scale model adaptation system 200 for Portuguese-speaking languages provided in this application embodiment. For ease of explanation, only the parts relevant to this embodiment are shown. The multi-dialect large-scale model adaptation system 200 for Portuguese-speaking languages provided in this application embodiment includes: a data acquisition module 201, used to acquire corpus data and model constraint information of various Portuguese dialect areas, perform dialect mapping matrix establishment on the corpus data to generate priority coefficients, and use the priority coefficients to locate key semantic difference points; a difference identification module 202, used to extract representational offset features around the key semantic difference points, identify homographs from the key semantic difference points to construct contrast training sample pairs, and perform vector space analysis on the representational offset features and the contrast training sample pairs to determine the priority adjustment layer; and a structure generation module 203, used to identify dialectal difference features in the model constraint information to generate a structure. The layer coding parameters are used to generate a layered representation structure through collaborative matching between the priority adjustment layer and the layer coding parameters, and the layered representation structure is used to determine the weight adjustment boundary; the migration optimization module 204 is used to determine the parameter distribution density by combining the weight adjustment boundary and the priority coefficient, generate the optimal migration weight based on the capacity matching of the key semantic difference points and the parameter distribution density, extract negative migration nodes from the optimal migration weight and convert them into dialect boundary markers, and construct a gradient propagation path based on the dialect boundary markers; the scheme output module 205 is used to perform semantic processing to detect the confused expression set according to the corpus data, generate a representation decoupling configuration according to the confused expression set, and perform progressive collaborative optimization based on the representation decoupling configuration and the gradient propagation path to output a multi-dialect adaptation scheme.
[0069] The aforementioned multi-dialect large-scale model adaptation system 200 for Portuguese-speaking languages can implement the multi-dialect large-scale model adaptation method for Portuguese-speaking languages described in the above-described method embodiments. The options in the above method embodiments are also applicable to this embodiment and will not be detailed here. The remaining content of this application's embodiments can be referred to the content of the above method embodiments, and will not be repeated in this embodiment.
[0070] The above embodiments are not an exhaustive list based on the present invention, and there may be many other embodiments not listed. Any substitutions and improvements made without departing from the concept of the present invention are within the protection scope of the present invention.
Claims
1. A method for adapting a large multi-dialect model to Portuguese-speaking languages, characterized in that, include: The process involves acquiring corpus data and model constraint information from various Portuguese dialect regions. A dialect mapping matrix is established on the corpus data to generate priority coefficients, which are then used to locate key semantic difference points. Representational shift features are extracted from the vicinity of these key semantic difference points. Homographs and antonyms are identified from these key semantic difference points to construct comparative training sample pairs. Vector space analysis is performed on the representational shift features and the comparative training sample pairs to determine a priority adjustment layer. Dialectal difference features are identified in the model constraint information to generate hierarchical coding parameters. A hierarchical representation structure is generated through collaborative matching between the priority adjustment layer and the hierarchical coding parameters. The hierarchical representation structure is used to determine the weight adjustment boundary. The parameter distribution density is determined by combining the weight adjustment boundary and the priority coefficients. Optimal transfer weights are generated based on capacity matching between the key semantic difference points and the parameter distribution density. Negative transfer nodes are extracted from the optimal transfer weights and converted into dialect boundary markers. A gradient propagation path is constructed based on the dialect boundary markers. Semantic processing is performed on the corpus data to detect a set of confused expressions. A representational decoupling configuration is generated according to the set of confused expressions. A progressive collaborative optimization is performed based on the representational decoupling configuration and the gradient propagation path to output a multi-dialect adaptation scheme.
2. The method according to claim 1, characterized in that, The step of identifying homographs from the key semantic differences and constructing contrast training sample pairs includes: identifying words with the same word form based on the key semantic differences; performing semantic differentiation analysis on the words with the same word form to generate differentiation intensity features; capturing the word pairs with the strongest semantic conflict based on the differentiation intensity features and converting them into contrast enhancement sample pairs; and performing dialect contrast annotation on the contrast enhancement sample pairs to generate contrast training sample pairs.
3. The method according to claim 1, characterized in that, The step of generating a hierarchical representation structure by coordinating the priority adjustment layer with the hierarchical coding parameters includes: identifying conflict regions in the priority adjustment layer to generate constraint conflict parameters; using the constraint conflict parameters and the hierarchical coding parameters to perform conflict coordination processing to generate coordination coefficients; using the coordination coefficients to perform hierarchical allocation of the hierarchical coding parameters to generate hierarchical allocation configurations; and embedding the hierarchical allocation configurations into the hierarchical coding parameters to generate a hierarchical representation structure.
4. The method according to claim 1, characterized in that, The step of generating optimal migration weights based on matching the key semantic difference points with the parameter distribution density capacity includes: identifying migration path characteristics from the key semantic difference points to the parameter distribution density to generate path characteristic data; extracting low-capacity segments from the path characteristic data and converting them into feature migration parameters; collaboratively screening migration path groups based on the feature migration parameters and a preset capacity threshold to generate preferred migration paths; and performing parameter migration through the preferred migration paths to generate optimal migration weights.
5. The method according to claim 1, characterized in that, The step of extracting negative migration nodes from the optimal migration weights and converting them into dialect boundary markers includes: identifying negative migration segments from the optimal migration weights; performing boundary characteristic analysis on the negative migration segments to generate boundary characteristic parameters; converting the boundary characteristic parameters into boundary reinforcement factors; and generating dialect boundary markers based on the boundary reinforcement factors.
6. The method according to claim 1, characterized in that, The step of constructing a gradient propagation path based on the dialect boundary markers includes: locating key nodes for gradient adjustment from the dialect boundary markers; identifying the sparse connectivity characteristics between the key nodes for gradient adjustment and converting them into boundary isolation markers; establishing gradient transfer paths between nodes based on the boundary isolation markers; and generating a gradient propagation path based on the gradient transfer paths.
7. The method according to claim 1, characterized in that, The step of generating a representation decoupling configuration based on the obfuscated expression set includes: monitoring the obfuscated expression set to generate a representation separation response; extracting obfuscation patterns from the obfuscated expression set and converting them into distinguishing markers; setting a representation fluctuation tolerance range based on the representation separation response and the distinguishing markers; and performing obfuscation disambiguation processing within the representation fluctuation tolerance range to generate a representation decoupling configuration.
8. The method according to claim 5, characterized in that, The step of performing boundary characteristic analysis on the negative migration segment to generate boundary characteristic parameters includes: obtaining the semantic distance features of the negative migration segment to generate a distance characteristic component; identifying parameter sharing conflicts in the negative migration segment and converting them into conflict indication signals to generate a scheduling characteristic component; capturing the migration loss features of the negative migration segment to generate a loss characteristic component; and fusing the distance characteristic component, the scheduling characteristic component, and the loss characteristic component to generate boundary characteristic parameters.
9. The method according to claim 7, characterized in that, The step of setting a characterization fluctuation tolerance range based on the characterization separation responsivity and the distinguishing marker includes: detecting the synergistic characteristics of the characterization separation responsivity and the distinguishing marker to generate characterization fluctuation features and identify fluctuation-sensitive stages; performing boundary perturbation tests on the characterization fluctuation features during the fluctuation-sensitive stages to generate a boundary stability recovery period; adaptively adjusting the characterization separation responsivity based on the boundary stability recovery period to generate an adjusted responsivity; and determining the characterization fluctuation tolerance range based on the adjusted responsivity.
10. A large-scale multi-dialect model adaptation system for Portuguese-speaking languages, characterized in that, include: The data acquisition module is used to acquire corpus data and model constraint information of each Portuguese dialect area, perform dialect mapping matrix establishment on the corpus data to generate priority coefficients, and use the priority coefficients to locate key semantic difference points; the difference recognition module is used to extract representation offset features around the key semantic difference points, identify homographs from the key semantic difference points to construct contrast training sample pairs, and perform vector space analysis on the representation offset features and the contrast training sample pairs to determine the priority adjustment layer; The structure generation module is used to identify dialect difference features in the model constraint information to generate hierarchical coding parameters, generate a hierarchical representation structure by co-matching the priority adjustment layer with the hierarchical coding parameters, and use the hierarchical representation structure to determine the weight adjustment boundary. The migration optimization module is used to determine the parameter distribution density by combining the weight adjustment boundary and the priority coefficient, generate the optimal migration weight based on the capacity matching of the key semantic difference points and the parameter distribution density, extract negative migration nodes from the optimal migration weight and convert them into dialect boundary markers, and construct a gradient propagation path based on the dialect boundary markers. The scheme output module is used to perform semantic processing to detect the confused expression set based on the corpus data, generate a representation decoupling configuration according to the confused expression set, and perform progressive collaborative optimization based on the representation decoupling configuration and the gradient propagation path to output a multi-dialect adaptation scheme.