Neural network text translation enhancement method and system in multilingual cross-language environment
Through multi-dimensional feature extraction and adaptive weight adjustment mechanisms, combined with the reinforced pre-trained neural network translation model, the problem of insufficient quality of translation results in multilingual environments is solved, and a higher quality translation effect is achieved.
Patent Information
- Application Number
- CN202411535894.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-31
- Publication Date
- 2025-01-14
- Estimated Expiration
- 2044-10-31
AI Technical Summary
The existing text translation technology has problems such as incomplete feature extraction and poor fusion effect in multilingual environments, resulting in grammatical errors, semantic inaccuracy and insufficient fluency in translation results.
Multidimensional feature extraction and adaptive weight adjustment mechanisms are adopted to extract semantic, grammatical and contextual feature features of text vectors in different languages, and dynamically adjust the fusion weights according to the importance of features, and the depth is carried out by strengthening the pre-trained neural network translation model. Translation and post-processing to generate high-quality translation results.
By comprehensively extracting multi-dimensional features and dynamically adjusting the fusion weight, the quality of translation results is improved, grammatical accuracy, semantic accuracy and fluency are improved, and higher quality multilingual cross-language translation is provided.
Smart Images

Figure CN119047494B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of speech recognition, and in particular to a neural network text translation enhancement method and system in a multilingual cross-language environment. Background Art
[0002] As the demand for multilingual cross-language communication continues to grow, existing text translation technology shows many limitations in multilingual environments.
[0003] When processing multilingual speech data, traditional translation methods usually extract features from a single dimension, lack effective multi-dimensional extraction, and are unable to fully cover key elements such as semantics, grammar, and context, resulting in incomplete feature extraction.
[0004] When fusing text feature vectors of different languages, traditional technologies generally use fixed weights and cannot dynamically adjust according to the actual characteristics of different languages, resulting in poor fusion effects and failure to give full play to the advantages of each language. Existing neural network translation models have problems such as grammatical errors, inaccurate semantics, and lack of fluency in translated texts, and cannot provide high-quality translation results. Summary of the invention
[0005] The main purpose of the present invention is to provide a neural network text translation enhancement method and system in a multilingual cross-language environment, aiming to overcome the defects of incomplete feature extraction and poor effect of fusing text feature vectors of different languages.
[0006] To achieve the above object, the present invention provides a neural network text translation enhancement method in a multilingual cross-language environment, comprising the following steps:
[0007] Acquiring voice data in a multilingual cross-language environment, performing voice recognition on the voice data, and obtaining multilingual text data;
[0008] Performing intelligent language classification on the multilingual text data to obtain text sets in different languages; performing multidimensional feature extraction on the text sets in different languages to obtain text feature vectors;
[0009] Adopting an adaptive weight adjustment mechanism, dynamically adjusting the fusion weight according to the importance of features in different languages, and performing cross-language fusion processing on each of the text feature vectors based on the adjusted fusion weight to obtain a fusion feature vector;
[0010] Inputting the fused feature vector into a neural network translation model that has undergone enhanced pre-training to perform deep translation to obtain a preliminary translation text;
[0011] The preliminary translation text is post-processed to obtain a translation result.
[0012] Furthermore, the multi-dimensional feature extraction is performed on the text sets of different languages to obtain text feature vectors, including:
[0013] Semantic feature extraction is performed on text sets in different languages to obtain semantic feature vectors;
[0014] Perform grammatical feature extraction on text sets of different languages to obtain grammatical feature vectors;
[0015] Context features are extracted for text sets in different languages to obtain context feature vectors;
[0016] The semantic feature vector, the grammatical feature vector and the context feature vector are fused to obtain the text feature vector.
[0017] Furthermore, the fused feature vector is input into a neural network translation model that has undergone enhanced pre-training for deep translation to obtain a preliminary translation text, including:
[0018] The fused feature vector is encoded based on the multi-head attention mechanism through the enhanced pre-trained neural network translation model to obtain the encoded feature representation; the encoded feature representation is gradually decoded by a decoder, and the historical decoding information and the context information in the fused feature vector are combined in the decoding process to generate the translation result at the current moment; the decoding process is repeated until a complete preliminary translation text is generated.
[0019] Furthermore, the preliminary translation text is post-processed to obtain a translation result, including:
[0020] Performing grammar correction on the preliminary translated text to correct grammatical errors in the text and obtain a grammar-corrected text;
[0021] Perform semantic similarity calculation and vocabulary replacement on the grammatically corrected text to improve the semantic accuracy of the text and obtain a semantically polished text;
[0022] The text after semantic polishing is processed to improve fluency through language model evaluation and sentence structure adjustment to obtain the translation result.
[0023] Furthermore, the adaptive weight adjustment mechanism is used to dynamically adjust the fusion weight according to the feature importance of different languages, and the cross-language fusion processing is performed on each of the text feature vectors based on the adjusted fusion weight to obtain the fusion feature vector, including:
[0024] Analyze the language characteristics and usage frequency of each language in the text collection of different languages, and determine the initial weight of each language;
[0025] Calculating feature importance indexes of each text feature vector; the importance indexes include feature variance and information entropy;
[0026] Dynamically adjusting the initial weight of each language according to the feature importance index to obtain an adjusted fusion weight;
[0027] The text feature vectors are weighted and summed based on the adjusted fusion weights to obtain the fusion feature vector.
[0028] Furthermore, the acquiring of speech data in a multilingual cross-language environment includes:
[0029] Establishing a call connection between multiple user terminals; wherein each of the user terminals collects voice information of its corresponding user; each user communicates in a different language through the user terminal;
[0030] The voice information collected by each user terminal is arranged in sequence according to the time sequence, and combined to obtain the voice data in the multi-language cross-language environment.
[0031] Furthermore, the post-processing of the preliminary translation text to obtain the translation result includes:
[0032] Acquire the data volume and duration of the voice information collected by each of the user terminals;
[0033] Acquiring characteristic information of the translation result;
[0034] Generate a communication key according to the characteristic information, the data volume and duration of the voice information collected by each of the user terminals;
[0035] After the translation result is encrypted based on the communication key, it is distributed to each of the user terminals.
[0036] The present invention also provides a neural network text translation enhancement system in a multilingual cross-language environment, comprising:
[0037] An acquisition unit, used to acquire speech data in a multilingual cross-language environment, perform speech recognition on the speech data, and obtain multilingual text data;
[0038] A classification unit, used for performing intelligent language classification on the multilingual text data to obtain text sets in different languages; performing multidimensional feature extraction on the text sets in different languages to obtain text feature vectors;
[0039] A fusion unit, configured to adopt an adaptive weight adjustment mechanism to dynamically adjust the fusion weight according to the importance of features of different languages, and perform cross-language fusion processing on each of the text feature vectors based on the adjusted fusion weight to obtain a fused feature vector;
[0040] A translation unit, used for inputting the fused feature vector into a neural network translation model that has undergone enhanced pre-training to perform deep translation to obtain a preliminary translation text;
[0041] The processing unit is used to perform post-processing on the preliminary translation text to obtain a translation result.
[0042] The present invention also provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any one of the above methods when executing the computer program.
[0043] The present invention also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned methods are implemented.
[0044] The neural network text translation enhancement method and system in a multilingual cross-language environment provided by the present invention include: obtaining speech data in a multilingual cross-language environment, performing speech recognition on the speech data, and obtaining multilingual text data; performing intelligent language classification on the multilingual text data to obtain text sets in different languages; performing multidimensional feature extraction on the text sets in different languages to obtain text feature vectors; using an adaptive weight adjustment mechanism to dynamically adjust the fusion weight according to the feature importance of different languages, and performing cross-language fusion processing on each of the text feature vectors based on the adjusted fusion weight to obtain a fusion feature vector; inputting the fusion feature vector into a neural network translation model that has been enhanced and pre-trained for deep translation to obtain a preliminary translation text; post-processing the preliminary translation text to obtain a translation result. In the present invention, multidimensional feature extraction is performed on text sets in different languages to comprehensively extract features of each dimension; by using an adaptive weight adjustment mechanism, the fusion weight is dynamically adjusted according to the feature importance of different languages to improve the fusion effect, thereby improving the quality of subsequent translation results. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 It is a flowchart of a neural network text translation enhancement method in a multilingual cross-language environment in one embodiment of the present invention;
[0046] Figure 2 It is a schematic diagram of the steps of a neural network text translation enhancement method in a multilingual cross-language environment in one embodiment of the present invention;
[0047] Figure 3 It is a structural block diagram of a neural network text translation system in a multilingual cross-language environment in one embodiment of the present invention;
[0048] Figure 4It is a schematic block diagram of the structure of a computer device according to an embodiment of the present invention.
[0049] The implementation, functional features and advantages of the present invention will be further described in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0050] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0051] Reference Figure 1 as well as Figure 2 In one embodiment of the present invention, a neural network text translation enhancement method in a multilingual cross-language environment is provided, comprising the following steps:
[0052] Step S1, acquiring speech data in a multilingual cross-language environment, performing speech recognition on the speech data, and obtaining multilingual text data;
[0053] Step S2, performing intelligent language classification on the multilingual text data to obtain text sets in different languages; performing multidimensional feature extraction on the text sets in different languages to obtain text feature vectors;
[0054] Step S3, using an adaptive weight adjustment mechanism to dynamically adjust the fusion weight according to the importance of features in different languages, and performing cross-language fusion processing on each of the text feature vectors based on the adjusted fusion weight to obtain a fusion feature vector;
[0055] Step S4, inputting the fused feature vector into a neural network translation model that has undergone enhanced pre-training to perform deep translation to obtain a preliminary translation text;
[0056] Step S5, post-processing the preliminary translation text to obtain a translation result.
[0057] In this embodiment, as described in step S1 above: voice data in a multilingual cross-language environment is obtained, and voice recognition is performed on the voice data to obtain multilingual text data. In a globalized communication environment, multilingual cross-language scenarios are extremely common, such as international conferences, cross-border business negotiations, and multilingual social occasions. First, voice data in various languages are obtained from these complex environments through highly sensitive audio acquisition equipment, such as professional microphone arrays. These voice data contain interference factors such as different accents, speaking speeds, and background noise.
[0058] Next, the collected voice data is processed using speech recognition technology. In this process, the voice signal is preprocessed, including noise reduction, echo removal and other operations to improve the quality of the voice signal. Then, a deep learning-based speech recognition model is used. The model has been trained with a large amount of multilingual voice data and can recognize the voice features of different languages. The model extracts acoustic features from the voice signal, such as Mel-frequency cepstral coefficients (MFCC), and combines the language model and pronunciation dictionary to convert the above acoustic features into corresponding text content. By continuously optimizing and adjusting the model parameters, the accuracy and efficiency of speech recognition are improved, and text data containing multiple languages is finally obtained.
[0059] As described in step S2 above: intelligent language classification is performed on the multilingual text data to obtain text sets in different languages; multidimensional feature extraction is performed on the text sets in different languages to obtain text feature vectors. For the multilingual text data obtained in the above steps, intelligent language classification is required so that more accurate processing can be performed on different languages in the future. The intelligent language classification algorithm will comprehensively consider multiple factors to determine the language of the text. For example, based on the grammatical structure characteristics of different languages, the subject-verb-object structure of English is more obvious, while the sentence structure of Japanese is relatively flexible; in terms of vocabulary features, different languages have their own unique vocabulary, such as a large number of Latin-derived words in English and compound words in German; pronunciation rules are also different, such as the French uvular sound and the Chinese tone. By analyzing these features, using machine learning algorithms, such as support vector machines (SVM) or classification networks in deep learning, multilingual text data can be accurately divided into text sets in different languages.
[0060] Next, multi-dimensional feature extraction is performed for each text set in different languages. In the semantic dimension, a pre-trained semantic understanding model is used, which is a deep neural network trained based on large-scale text data, such as a language model with a Transformer architecture. It can analyze the meaning of words in the text and the overall semantics of the sentence. For each word, its semantic information is captured through word vector representation, while considering the impact of the context on the meaning of the word, so as to obtain a feature vector reflecting the semantic information. In the grammatical dimension, professional grammatical analyzers such as CoreNLP tools are used to identify grammatical information such as the part of speech and syntactic structure of the text. The parts of speech such as nouns, verbs, and adjectives in the sentence are analyzed, and the syntactic structures such as the subject, predicate, object, attributive, adverbial, and complement of the sentence are determined to obtain vectors that can reflect grammatical features. In the contextual dimension, features are extracted by combining the contextual information of the text and related background knowledge. For example, in a dialogue scene, the specific meaning of the current text is understood based on the relationship between the previous and next sentences and the background information such as the topic of the dialogue, and the contextual feature vector is obtained. Finally, the feature vectors of the three dimensions of semantics, grammar and context are fused, either by simple concatenation or by more complex weighted fusion methods, to obtain a text feature vector that fully reflects the characteristics of the language text.
[0061] As described in step S3 above, an adaptive weight adjustment mechanism is adopted to dynamically adjust the fusion weight according to the importance of features of different languages, and each of the text feature vectors is subjected to cross-language fusion processing based on the adjusted fusion weight to obtain a fusion feature vector. In a multilingual and cross-language environment, the importance of different languages may vary depending on the specific application scenario. First, the language characteristics and usage frequency of each language in the text collection of different languages are analyzed. Language characteristics may include aspects such as vocabulary richness and grammatical complexity, and the usage frequency may be determined by counting the number of times the language appears in a specific scenario. Based on this information, the initial weights of each language are preliminarily determined. Then, the feature importance index of each text feature vector is calculated. Variance can reflect the degree of discreteness of the feature, and features with larger variance play a more important role in the translation process; information entropy can measure the uncertainty of the feature, and features with higher information entropy carry more key information. By calculating these indicators, the importance of different features can be evaluated more objectively.
[0062] Next, the initial weights of each language are dynamically adjusted based on the feature importance index. For example, if the text feature vector of a certain language performs well in terms of variance and information entropy, it means that the features of this language are of high importance in translation, and its weight can be appropriately increased. Conversely, if the features of a certain language are of low importance, its weight can be reduced. The adjustment process can use optimization algorithms in machine learning, such as the gradient descent method, to continuously iterate and adjust the weights to make the weight distribution more reasonable.
[0063] Finally, the adjusted fusion weights are used to perform weighted summation on each text feature vector. Specifically, for each text feature vector, the value of each dimension is multiplied by the corresponding fusion weight, and then the values of all dimensions are added together to obtain the fusion feature value of the language. This operation is performed on all text feature vectors of different languages, and finally a fusion feature vector that combines the features of different languages is obtained.
[0064] As described in step S4 above: the fused feature vector is input into the neural network translation model that has been intensively pre-trained for deep translation to obtain a preliminary translated text. The neural network translation model that has been intensively pre-trained has more powerful translation capabilities and generalization performance. First, the model uses a multi-head attention mechanism to encode the fused feature vector. The multi-head attention mechanism consists of multiple attention heads, and each attention head can focus on the input fused feature vector from a different angle. For example, some attention heads focus on information at the vocabulary level, some focus on information at the sentence structure level, and some focus on the semantic relationship of the context, etc. In this way, richer and more comprehensive information can be extracted to obtain the encoded feature representation.
[0065] Then, the decoder is used to gradually decode the encoded feature representation. During the decoding process, the decoder combines the historical decoding information and the context information in the fused feature vector to generate the translation result at the current moment. The historical decoding information includes the part of the translation text that has been generated, and the context information is the information related to the current translation position extracted from the fused feature vector. The decoder gradually generates the complete translation text by continuously predicting the next word or character and adjusting its own state according to the prediction results.
[0066] In order to improve the accuracy and efficiency of translation, the model will use a large-scale multilingual parallel corpus for intensive pre-training during the training process. By continuously adjusting the model parameters, the model can better learn the translation rules and patterns between different languages. In the actual translation process, it can also be fine-tuned according to specific application scenarios and user needs to further optimize the translation effect.
[0067] As described in the above step S5: the preliminary translation text is post-processed to obtain a translation result. The above preliminary translation text may have some grammatical errors, inaccurate semantics and insufficient fluency, and needs to be post-processed to improve the translation quality. First, grammar correction is performed. The sentence structure in the preliminary translation text is analyzed to see if it meets the grammatical norms through the grammar rule checking algorithm. For example, problems such as subject-verb agreement, singular and plural nouns, and verb tenses are checked. For grammatical errors found, an error correction algorithm is used to correct them. The pre-built grammar rule library and language model can be used to automatically correct them according to context information and grammar rules. A grammatically corrected text is obtained.
[0068] Next, semantic polishing is performed. The semantic similarity calculation method is used to compare the semantic similarity between the words in the preliminary translation text and other words in the target language. If more accurate and appropriate words are found, the words can be replaced to improve the semantic accuracy of the text. At the same time, some language expression optimization strategies can also be adopted, such as adjusting sentence structure, adding modifiers, etc., to make the expression of the translated text more fluent and natural. The semantically polished text is obtained.
[0069] Finally, the fluency is improved. The fluency of the preliminary translation text is evaluated through the language model, such as calculating the perplexity of the text. If the fluency is not high, the sentence structure can be adjusted, such as adjusting the word order, merging short sentences, etc., to make the text more natural and smooth. After this series of post-processing operations, a high-quality translation result is finally obtained.
[0070] In one embodiment, the multi-dimensional feature extraction is performed on the text sets of different languages to obtain the text feature vectors, including:
[0071] Semantic feature extraction is performed on text sets in different languages to obtain semantic feature vectors;
[0072] Perform grammatical feature extraction on text sets of different languages to obtain grammatical feature vectors;
[0073] Context features are extracted for text sets in different languages to obtain context feature vectors;
[0074] The semantic feature vector, the grammatical feature vector and the context feature vector are fused to obtain the text feature vector.
[0075] In this embodiment, first, a pre-trained semantic understanding model is used. The above model is usually a deep neural network trained on large-scale text data, such as a language model based on the Transformer architecture. For each sentence in a given text collection, the model will split it into individual words and capture the semantic information of each word through word vector representation. Word vectors can map words to a high-dimensional space, so that words with similar semantics are closer in space.
[0076] At the same time, the model considers the impact of context on the meaning of words. In a sentence, the meaning of a word is often restricted and affected by the surrounding words. For example, the word "apple" may mean fruit or a technology company in different contexts. By analyzing contextual information, the model can more accurately determine the specific meaning of a word. After semantic analysis of each word and comprehensive consideration of the context of the entire sentence, a semantic feature vector that reflects the semantic information of the text of the language is finally obtained. This vector contains the semantic features of the words in the text and the overall semantic features of the sentence.
[0077] Grammatical features are also crucial for accurate understanding and translation of text. Different languages have different grammatical structures and rules, so it is necessary to extract grammatical features for each language's text collection. You can use a grammatical analyzer, such as the CoreNLP tool. For a given text collection, the grammatical analyzer will first identify the parts of speech in the text. Parts of speech include nouns, verbs, adjectives, adverbs, etc., to determine the grammatical role of each word in the sentence.
[0078] Next, analyze the syntactic structure of the sentence. The syntactic structure describes the grammatical relationship between the words in the sentence, such as subject, predicate, object, attributive, adverbial, complement, etc. By analyzing the syntactic structure, you can understand the basic framework and logical relationship of the sentence.
[0079] For example, in the English sentence "The cat is sleeping on the mat.", "cat" is the subject, "issleeping" is the predicate, and "mat" is the object. The parser will identify these grammatical relations and convert them into grammatical feature vectors. This vector contains the part-of-speech information and syntactic structure information of all sentences in the text collection, which can reflect the grammatical features of the text in the language.
[0080] Context plays an important role in understanding the true meaning of text. In a multilingual cross-language environment, the extraction of context features needs to consider the contextual information of the text and related background knowledge.
[0081] For a given text collection, its context information is first analyzed. The context can be the previous and next sentences in the text collection, or a larger text paragraph or chapter. By analyzing the context, we can understand the theme of the text, the emotional tendency, and the meaning of specific words in a specific context. For example, in a dialogue scene, the relationship between the previous and next sentences can help understand the specific meaning of the current sentence. If the previous sentence mentions "going to the supermarket to shop" and the following sentence mentions "buying fruit", it can be inferred that the "fruit" here is likely to be an item purchased in the supermarket. At the same time, it is also important to consider relevant background knowledge. Background knowledge can include cultural background, domain knowledge, etc. For example, when translating texts in the medical field, understanding medical terminology and related medical knowledge can help understand and translate the text more accurately. By comprehensively considering the context information and background knowledge, a context feature vector that can reflect the context characteristics of the text in the language is extracted. This vector contains various feature information of the text in a specific context, which helps to understand and translate the text more accurately.
[0082] Finally, the semantic feature vector, grammatical feature vector and context feature vector are fused to obtain a text feature vector that reflects the text features more comprehensively and accurately. There are many ways to fuse the vectors, such as simple concatenation. The three vectors are concatenated together in a specific order to form a longer vector. This method is simple and intuitive, but it may ignore the relationship between different features.
[0083] Another method is to use weighted fusion. According to the importance of different features, different weights are assigned to the semantic feature vector, grammatical feature vector and context feature vector, and then they are weighted summed. The weights can be determined by experiments or machine learning methods to automatically learn.
[0084] For example, a neural network can be used to learn the weights of different features. The semantic feature vector, grammatical feature vector, and contextual feature vector are used as inputs, and the weights are adjusted by training the neural network so that the fused text feature vector performs best in a specific task. By fusing these three vectors, the information of semantics, grammar, and context can be fully utilized to obtain a more comprehensive and richer text feature vector, providing stronger support for subsequent cross-language fusion and translation processes.
[0085] In one embodiment, the fused feature vector is input into a neural network translation model that has been pre-trained for deep translation to obtain a preliminary translation text, including:
[0086] The fused feature vector is encoded based on the multi-head attention mechanism through the enhanced pre-trained neural network translation model to obtain the encoded feature representation; the encoded feature representation is gradually decoded by a decoder, and the historical decoding information and the context information in the fused feature vector are combined in the decoding process to generate the translation result at the current moment; the decoding process is repeated until a complete preliminary translation text is generated.
[0087] In this embodiment, in the neural network translation in a multilingual cross-language environment, the neural network translation model that has undergone enhanced pre-training has stronger translation ability and adaptability. First, the fused feature vector is encoded using a multi-head attention mechanism.
[0088] The multi-head attention mechanism consists of multiple attention heads, each of which can focus on the input fused feature vector from different perspectives. For example, some attention heads may focus on information at the vocabulary level, focusing on analyzing the importance and mutual relationship of different words in the fused feature vector; some attention heads may focus on information at the sentence structure level, focusing on the overall grammatical structure and logical relationship of the sentence in the fused feature vector; and some attention heads may focus on the semantic relationship of the context, analyzing the semantic connection between different parts of the fused feature vector.
[0089] For each attention head, the calculation process usually includes the following steps: First, the query, key, and value vectors are calculated. The above vectors can be obtained by linearly transforming the fused feature vector. Then, the attention score is calculated, that is, the attention weight is obtained by calculating the dot product of the query vector and the key vector, and then scaling and softmax activation function are processed. Finally, the attention weight is multiplied by the value vector, and the results of all attention heads are concatenated or weighted summed to obtain the output of the multi-head attention mechanism.
[0090] By processing the fused feature vector through the multi-head attention mechanism, richer and more comprehensive information can be extracted, capturing the features of different levels and aspects in the fused feature vector. After encoding processing by the multi-head attention mechanism, the encoded feature representation is obtained, which contains the important information in the fused feature vector.
[0091] After obtaining the encoded feature representation, the decoder is used to gradually decode to generate the translation text. The decoder is used to gradually generate the complete translation text based on the encoded feature representation and the generated partial translation results.
[0092] The decoding process is a step-by-step iterative process. At each moment, the decoder combines historical decoding information and contextual information in the fusion feature vector to generate the translation result at the current moment. Historical decoding information includes some of the translated text that has been generated, which can provide context and semantic clues to help the decoder determine the next word or phrase.
[0093] At the same time, the context information in the fused feature vector is also very important. The decoder can extract context information related to the current decoding position from the fused feature vector, such as semantic, grammatical, and contextual features related to the current vocabulary. This context information can help the decoder more accurately determine the vocabulary or phrase that should be generated at the current moment.
[0094] During the decoding process, the decoder usually adopts a decoder structure similar to that in a recurrent neural network (RNN) or Transformer. The decoder predicts the probability distribution of the next word or phrase based on the current input state and historical information. Then, based on this probability distribution, the most likely word or phrase is selected as the translation result at the current moment.
[0095] The decoding process is a step-by-step iterative process that needs to be repeated until a complete preliminary translation text is generated. After a word or phrase is generated at each moment, it is added to the generated translation result and the state of the decoder is updated. Then, the decoding of the next moment is continued, and the above steps are repeated to generate the next word or phrase by combining the historical decoding information and the context information in the fused feature vector. The above process is repeated until the decoder generates a special end mark, indicating that the translation text has been completely generated. At this point, the translation result obtained is the preliminary translation text. The above preliminary translation text is generated through a step-by-step decoding process, combining the rich information in the fused feature vector as well as the historical decoding information and context information.
[0096] In one embodiment, the preliminary translation text is post-processed to obtain a translation result, including:
[0097] Performing grammar correction on the preliminary translated text to correct grammatical errors in the text and obtain a grammar-corrected text;
[0098] Perform semantic similarity calculation and vocabulary replacement on the grammatically corrected text to improve the semantic accuracy of the text and obtain a semantically polished text;
[0099] The text after semantic polishing is processed to improve fluency through language model evaluation and sentence structure adjustment to obtain the translation result.
[0100] In this embodiment, various grammatical errors may exist in the preliminary translation text because grammatical errors may occur during the translation process due to language differences, inaccurate models, and other reasons.
[0101] First, check for grammatical errors. You can use the grammar rule checking method to analyze the sentence structure, part of speech collocation, subject-verb agreement, etc. in the preliminary translation text according to the grammar rules of the target language. For example, check whether there is a missing subject, wrong verb tense, inconsistent noun singular and plural forms, etc.
[0102] Once a grammatical error is detected, it needs to be corrected. Pre-built grammar rule libraries and language models can be used to assist in correction. The grammar rule library contains various common grammatical error types and their correction methods. The language model can automatically correct according to contextual information and grammar rules. For example, if a verb tense error is detected in a sentence, the correct verb tense is selected for replacement by analyzing the time clues of the context and the tense rules of the target language. After grammar correction, a grammatically corrected text is obtained, which improves the grammatical accuracy of the text.
[0103] The semantic accuracy of the grammatically corrected text may need to be improved. The semantic expression of the text can be further optimized through semantic similarity calculation and vocabulary replacement.
[0104] Semantic similarity calculation is to compare the semantic similarity between words in the text and other words in the target language. You can use pre-trained word vector models or semantic networks to calculate the similarity between words. For example, for a translated word, if you find a word in the target language that is semantically closer and more accurate, you can consider replacing it.
[0105] The process of vocabulary replacement must ensure that the replaced vocabulary is not only more semantically accurate, but also in line with the context of the context. At the same time, the semantic coherence and fluency of the overall sentence can also be considered. For example, if a certain word in a sentence is not semantically accurate, but replacing it may affect the structure and logic of the entire sentence, then it is necessary to comprehensively consider whether to replace it and how to replace it. After semantic similarity calculation and vocabulary replacement, the semantically polished text is obtained, which improves the semantic accuracy and expression quality of the text.
[0106] After semantic polishing, the text may need further improvement in fluency. Fluency is very important for the readability and naturalness of the translation results.
[0107] First, the fluency of the text is evaluated using a language model. The language model can calculate indicators such as the perplexity of the text, which can reflect the fluency of the text. The lower the perplexity, the more the text conforms to the statistical laws of the language and the higher the fluency. According to the evaluation results, if the text fluency is found to be insufficient, the sentence structure can be adjusted. Sentence structure adjustment includes operations such as adjusting the word order, merging short sentences, and splitting long sentences. For example, if the word order of a sentence does not conform to the habits of the target language, it can be adjusted; if there are some short sentences, they can be merged into a more complex sentence to improve the coherence of the expression; if the long sentence is too complex, it can be split into multiple short sentences to make the expression clearer. Through language model evaluation and sentence structure adjustment, the text after semantic polishing is processed for fluency improvement, and finally a high-quality translation result is obtained. This result has been significantly improved in terms of grammatical accuracy, semantic accuracy and fluency, which can better meet the needs of users.
[0108] In one embodiment, the adaptive weight adjustment mechanism is used to dynamically adjust the fusion weight according to the importance of features in different languages, and the cross-language fusion processing is performed on each of the text feature vectors based on the adjusted fusion weight to obtain a fusion feature vector, including:
[0109] Analyze the language characteristics and usage frequency of each language in the text collection of different languages, and determine the initial weight of each language;
[0110] Calculating feature importance indexes of each text feature vector; the importance indexes include feature variance and information entropy;
[0111] Dynamically adjusting the initial weight of each language according to the feature importance index to obtain an adjusted fusion weight;
[0112] The text feature vectors are weighted and summed based on the adjusted fusion weights to obtain the fusion feature vector.
[0113] In this embodiment, in a multilingual cross-language environment, different languages have their own unique language characteristics. Language characteristics may include grammatical structure, vocabulary characteristics, pronunciation rules, etc. For example, the grammatical structure of English is more rigorous, with clear subject, predicate, and object; while the grammatical structure of Japanese is relatively flexible, and verbs are often placed at the end of a sentence. In terms of vocabulary characteristics, different languages have different sources of vocabulary, word formation methods, etc. In terms of pronunciation rules, some languages have characteristics such as stress and intonation.
[0114] At the same time, it is also important to consider the frequency of use of each language. The frequency of use can be determined by counting the number of times the language appears in a specific scenario. For example, in an international conference, if English is used more frequently, while French and German are used less frequently, this difference will be taken into account when determining the initial weight. By analyzing the language characteristics and frequency of use, the relative importance of each language in the entire multilingual text collection can be preliminarily determined, thereby assigning an initial weight to each language. The above initial weight is a numerical value that reflects the initial importance of the language in the fusion process.
[0115] For text collections in different languages, each text feature vector is obtained after multi-dimensional feature extraction. In order to more accurately determine the fusion weight, it is necessary to calculate the feature importance index of these text feature vectors.
[0116] Variance is a commonly used feature importance indicator. It reflects the degree of dispersion of feature values. If the variance of a feature is large, it means that the value of the feature in different samples varies greatly and may have higher importance. In a text feature vector, variance can measure the variation of a feature in different texts. For example, if a semantic feature has very different values in different texts, then this feature may have a greater impact on the translation result.
[0117] Information entropy is also an important indicator. Information entropy measures the uncertainty of a system. In a text feature vector, information entropy can reflect the amount of information carried by the feature. If the information entropy of a feature is high, it means that the feature contains more key information and may be more important in the translation process.
[0118] By calculating the above feature importance index, the importance of each feature in each text feature vector can be evaluated more objectively, providing a basis for subsequent weight adjustment.
[0119] After obtaining the feature importance index, the initial weight of each language can be dynamically adjusted according to these indicators. If the text feature vector of a certain language performs well in indicators such as variance and information entropy, it means that the features of this language are of high importance in the translation process. At this time, the weight of this language can be appropriately increased to make it play a greater role in the fusion process. For example, if the variance and information entropy of the English text feature vector are high, it means that English may contain more key information in the current multilingual environment, so the weight of English can be increased.
[0120] On the contrary, if the feature importance of a certain language is low, its weight can be reduced. The adjustment process can adopt the optimization algorithm in machine learning, such as gradient descent method, etc. By continuously iteratively adjusting the weight, the weight distribution is more reasonable and can better reflect the actual importance of different languages.
[0121] Finally, we get the adjusted fusion weight, which is the result of dynamic adjustment based on the feature importance of each language, and can more accurately reflect the importance of different languages in the fusion process.
[0122] After obtaining the adjusted fusion weights, the weighted sum of each text feature vector can be performed to obtain a fused feature vector. For each text feature vector, multiply the value of each dimension by the corresponding fusion weight. Then, add up the values of all dimensions to obtain the fusion feature value of the language. Perform this operation on the text feature vectors of all different languages, and sum them according to the adjusted weights to obtain a fused feature vector that integrates the features of each language. The above fused feature vector fully considers the differences in the importance of different languages and can better support the subsequent translation process.
[0123] In one embodiment, the acquiring of speech data in a multilingual cross-language environment includes:
[0124] Establishing a call connection between multiple user terminals; wherein each of the user terminals collects voice information of its corresponding user; each user communicates in a different language through the user terminal;
[0125] The voice information collected by each user terminal is arranged in sequence according to the time sequence, and combined to obtain the voice data in the multi-language cross-language environment.
[0126] In this embodiment, each user terminal has a voice collection function and can collect voice information of its corresponding user. These user terminals can be mobile phones, computers, intelligent voice devices, etc. When a user makes a call through a user terminal, the microphone on the terminal converts the user's voice into an electrical signal, and performs preliminary processing and storage.
[0127] Because it is a multilingual environment, each user uses different languages to communicate, which means that the voice information collected by different user terminals may come from different languages.
[0128] After establishing call connections of multiple user terminals and collecting voice information of each user, it is necessary to combine the voice information to obtain voice data in a multilingual cross-language environment.
[0129] Arranging in chronological order is an effective combination method. Because during a call, voice information is generated in chronological order. By arranging the voice information collected by each user terminal in chronological order, the chronological order and logical relationship of the call can be restored.
[0130] Specifically, a timestamp can be added to each voice message, and then the messages are sorted according to the order of the timestamps. This ensures that the combined voice data can accurately reflect the process and content of the call. During the arrangement process, attention should be paid to the clock synchronization of different user terminals to ensure the accuracy of the timestamps. By arranging and combining the voice messages collected by each user terminal in chronological order, complete voice data in a multilingual cross-language environment can be obtained.
[0131] In one embodiment, the post-processing of the preliminary translation text to obtain the translation result includes:
[0132] Acquire the data volume and duration of the voice information collected by each of the user terminals;
[0133] Acquiring characteristic information of the translation result;
[0134] Generate a communication key according to the characteristic information, the data volume and duration of the voice information collected by each of the user terminals;
[0135] After the translation result is encrypted based on the communication key, it is distributed to each of the user terminals.
[0136] In this embodiment, the data volume of the above-mentioned voice information can be determined by counting the size of the voice file collected by each user terminal. The length and complexity of the voice information of different users are different, which will lead to differences in the data volume. For example, if a user speaks more and speaks faster, the corresponding voice data volume may be relatively large. The above-mentioned duration refers to the duration of the voice information collected by each user terminal. It can be obtained by analyzing the time length of the voice file. For example, if a user's talk time is longer, the duration of his voice information will increase accordingly. Obtaining these data volume and duration information provides basic parameters for the subsequent generation of communication keys.
[0137] The characteristic information of the translation results is crucial for generating unique communication keys. The characteristic information may include the text length, vocabulary complexity, number of language types, etc. of the translation results.
[0138] The length of the text refers to the number of characters contained in the translated text. The vocabulary complexity can be determined by analyzing the difficulty and professionalism of the words in the text. For example, if the translation result contains many uncommon words or professional terms, the vocabulary complexity will be high. The number of languages refers to the number of different languages involved in the translation result in a multilingual cross-language environment. Obtaining these feature information can make the generated communication key more personalized and better adapt to different translation results and user needs.
[0139] The process of generating a communication key can use a variety of algorithms and techniques. For example, these parameters can be combined, hashed, or encrypted to generate a unique key. The specific algorithm can be selected based on security requirements and system performance.
[0140] By comprehensively considering the data volume and duration of the voice information and the characteristic information of the translation result, a communication key closely related to the specific call scenario and the translation result can be generated. The above key is highly personalized and secure, and can effectively protect the confidentiality of the translation result during the distribution process.
[0141] After the communication key is generated, the translation result can be encrypted. Encryption can be done using symmetric encryption algorithms or asymmetric encryption algorithms. Symmetric encryption algorithms are faster and suitable for encrypting large amounts of data; asymmetric encryption algorithms are more secure, but the computational complexity is also relatively large.
[0142] The translation results are encrypted with the communication key to ensure that they are difficult to decipher and understand even if intercepted by a third party during the distribution process. Then, the encrypted translation results are distributed to each user terminal. The distribution method can be achieved through network transmission, Bluetooth and other communication means.
[0143] After receiving the encrypted translation results, each user terminal can use the corresponding decryption method and communication key to decrypt them, thereby obtaining accurate translation results. This not only ensures the security of the translation results, but also realizes personalized distribution, meeting the security and convenience needs of users for translation results in a multilingual and cross-language environment.
[0144] In one embodiment, the characteristic information includes the amount of text data of the translation result;
[0145] Generating a communication key according to the characteristic information, the data volume and duration of the voice information collected by each of the user terminals, including:
[0146] The data volume and duration of the voice information collected by each of the user terminals are combined accordingly to obtain a data volume combination; the data volume combinations corresponding to each of the user terminals are sequentially concatenated and then concatenated with the text data volume to obtain a digital string;
[0147] Adding the digital characters in the digital string one by one in sequence to a data table with multiple rows and columns to obtain a digital data table;
[0148] De-duplicating the numeric characters in the numeric string to obtain a plurality of de-duplicated digits; and selecting a plurality of target digits from the de-duplicated digits;
[0149] Searching for each of the target numbers in the digital data table, and taking the cell where each of the target numbers is located as the target cell; wherein the cells other than the target cells in the digital data table are taken as key cells;
[0150] Connect the target cells in sequence to obtain multiple line segments and extend both ends of the line segments to the edge of the digital data table to obtain multiple extended line segments;
[0151] In the key cells, find all cells that are passed through by the extended line segment as target key cells;
[0152] Generates a communication key based on the numeric characters in the target key cell.
[0153] In this embodiment, first, for each user terminal, the data volume and duration of the voice information collected are combined. The data volume reflects the size of the voice information, and the duration reflects the duration of the voice. Through a specific combination method, such as simply splicing the data volume and duration or fusing them according to a preset algorithm, the data volume combination corresponding to each user terminal is obtained.
[0154] After obtaining the data volume combinations of each user terminal, these combinations are serially connected in a specific order. This order can be pre-set, such as sorting according to the number of the user terminal or other rules. Then, the result after serial connection is serially connected with the text data volume of the translation result. The text data volume is an important feature information of the translation result, which reflects the size of the translated text. Through such serial connection operation, a digital string containing the characteristics of the user terminal voice information and the characteristics of the translation result is obtained.
[0155] Next, the digital characters in the digital string are taken out one by one and added to a multi-row and multi-column data table according to preset rules. Starting from the upper left corner of the data table, digital characters can be filled in to the right and downward in sequence until all digital characters are added to the data table. Therefore, a digital data table can be obtained, and the digital distribution in the above data table reflects the structure and characteristics of the digital string.
[0156] The digital characters in the digital string are deduplicated, that is, repeated numbers are removed to obtain multiple different deduplicated numbers. Then, multiple target numbers are selected from these deduplicated numbers. The selection method can be random selection, selection according to preset rules, or screening according to a preset algorithm.
[0157] Then, each target number is searched in the digital data table, the cells where the target number is located are found, and these cells are marked as target cells. The target cells have specific positions in the digital data table, and they will serve as key positions for generating communication keys. At the same time, the cells other than the target cells in the digital data table are marked as key cells, and these cells will participate in the generation of communication keys in subsequent steps.
[0158] Connect each target cell in sequence, and you can connect them in the order of arrangement, such as connecting them in the order in which the target numbers appear in the number string. After connecting, you get multiple line segments, and then extend the ends of these line segments until they reach the edge of the digital data table. In this way, you get multiple extended line segments.
[0159] In the key cell, each cell is checked one by one to determine whether it is crossed by the extended line segment. If a key cell is crossed by the extended line segment, then this cell is marked as the target key cell. Finally, the communication key is generated according to the digital characters in the target key cell. These digital characters can be processed by a specific algorithm, such as hashing, encryption, or combining according to preset rules. The generated communication key is highly secure and personalized, and can effectively protect the confidentiality and integrity of the translation results during the distribution process.
[0160] In one embodiment, the characteristic information includes the amount of text data of the translation result;
[0161] Generating a communication key according to the characteristic information, the data volume and duration of the voice information collected by each of the user terminals, including:
[0162] Combining the data volume and duration of the voice information collected by each of the user terminals to obtain a data volume combination; sequentially concatenating the data volume combinations corresponding to each of the user terminals to obtain a first digital string;
[0163] Based on the numeric characters in the text data, three numbers are generated according to a rule, a first coordinate point and a second coordinate point are generated in a coordinate system based on the generated three numbers, and the first coordinate point and the second coordinate point are connected to generate a straight line;
[0164] De-duplicating the numeric characters in the first numeric string to obtain a plurality of de-duplicated numeric characters; and combining the plurality of de-duplicated numeric characters in sequence to obtain a first numeric character.
[0165] Taking the first number as the abscissa value, calculating the ordinate value corresponding to the abscissa value on the straight line;
[0166] The communication key is generated based on the ordinate value.
[0167] In this embodiment, first, for each user terminal, the data volume and duration of the voice information collected are combined in a specific manner. The above combination can be performed in a variety of ways, such as simply concatenating the data volume and duration, or fusing them through mathematical operations.
[0168] After obtaining the data volume combinations of each user terminal, the above combinations are serially connected in a certain order. The above order can be determined according to the number of the user terminal, time sequence or other rules. Through the serial connection operation, a first digital string containing the voice information characteristics of all user terminals is obtained.
[0169] For the text data volume of the translation result, digital characters are extracted from it and three numbers are generated according to a preset rule. The rule can be a mathematical operation, combination or a specific algorithm based on the digital characters. Then, two coordinate points, namely a first coordinate point and a second coordinate point, are determined in a coordinate system using these three numbers. In the coordinate system, these two coordinate points determine a straight line.
[0170] The digital characters in the first digital string are deduplicated to remove repeated digits to obtain multiple different deduplicated digits. These deduplicated digits represent unique information in the first digital string. Then, these deduplicated digits are combined in a certain order to obtain a new digit, namely the first digit. This first digit will be used as the input for the next step of calculation.
[0171] The first number obtained is used as the horizontal coordinate value, and then the vertical coordinate value corresponding to the horizontal coordinate value is calculated on the above-mentioned straight line generated previously. The above calculation process can be performed based on the equation of the straight line. The calculated vertical coordinate value will be used as an important parameter for generating the communication key.
[0172] Finally, the communication key is generated according to the calculated ordinate value. The communication key can be generated in a variety of ways, such as encrypting the ordinate value, performing hash operations, or converting and combining according to combination rules, or directly using the ordinate value as the communication key. The generated communication key is highly secure and personalized, and can effectively protect the confidentiality and integrity of the translation results during the distribution process.
[0173] Reference Figure 3 In another embodiment of the present invention, a neural network text translation enhancement system in a multilingual cross-language environment is provided, comprising:
[0174] An acquisition unit, used to acquire speech data in a multilingual cross-language environment, perform speech recognition on the speech data, and obtain multilingual text data;
[0175] A classification unit, used for performing intelligent language classification on the multilingual text data to obtain text sets in different languages; performing multidimensional feature extraction on the text sets in different languages to obtain text feature vectors;
[0176] A fusion unit, configured to adopt an adaptive weight adjustment mechanism to dynamically adjust the fusion weight according to the importance of features of different languages, and perform cross-language fusion processing on each of the text feature vectors based on the adjusted fusion weight to obtain a fused feature vector;
[0177] A translation unit, used for inputting the fused feature vector into a neural network translation model that has undergone enhanced pre-training to perform deep translation to obtain a preliminary translation text;
[0178] The processing unit is used to perform post-processing on the preliminary translation text to obtain a translation result.
[0179] In this embodiment, for the specific implementation of each unit in the above system embodiment, please refer to the above method embodiment, which will not be repeated here.
[0180] Reference Figure 4 In an embodiment of the present invention, a computer device is also provided. The computer device may be a server, and its internal structure may be as follows: Figure 4 As shown. The computer device includes a processor, a memory, a display screen, an input device, a network interface and a database connected through a system bus. Among them, the processor designed by the computer is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store the corresponding data in this embodiment. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, the above method is implemented.
[0181] Those skilled in the art will understand that Figure 4 The structure shown in the figure is merely a block diagram of a portion of the structure related to the solution of the present invention, and does not constitute a limitation on the computer device to which the solution of the present invention is applied.
[0182] An embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the above method is implemented. It can be understood that the computer-readable storage medium in this embodiment can be a volatile readable storage medium or a non-volatile readable storage medium.
[0183] In summary, the neural network text translation enhancement method and system in a multilingual cross-language environment provided in the embodiment of the present invention include: obtaining speech data in a multilingual cross-language environment, performing speech recognition on the speech data, and obtaining multilingual text data; performing intelligent language classification on the multilingual text data to obtain text sets in different languages; performing multidimensional feature extraction on the text sets in different languages to obtain text feature vectors; using an adaptive weight adjustment mechanism to dynamically adjust the fusion weight according to the feature importance of different languages, and performing cross-language fusion processing on each of the text feature vectors based on the adjusted fusion weight to obtain a fusion feature vector; inputting the fusion feature vector into a neural network translation model that has been enhanced and pre-trained for deep translation to obtain a preliminary translation text; post-processing the preliminary translation text to obtain a translation result. In the present invention, multidimensional feature extraction is performed on text sets in different languages to comprehensively extract features of each dimension; by using an adaptive weight adjustment mechanism, the fusion weight is dynamically adjusted according to the feature importance of different languages to improve the fusion effect, thereby improving the quality of subsequent translation results.
[0184] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media provided by the present invention and used in the embodiments may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double-speed data rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM.
[0185] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, device, article or method including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, device, article or method. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the presence of other identical elements in the process, device, article or method including the element.
[0186] The above description is only a preferred embodiment of the present invention, and does not limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made by using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A neural network text translation enhancement method in a multilingual cross-language environment, characterized in that: The following steps are involved: Acquiring voice data in a multilingual cross-language environment, performing voice recognition on the voice data, and obtaining multilingual text data; Performing intelligent language classification on the multilingual text data to obtain text sets in different languages; performing multidimensional feature extraction on the text sets in different languages to obtain text feature vectors; Adopting an adaptive weight adjustment mechanism, dynamically adjusting the fusion weight according to the importance of features in different languages, and performing cross-language fusion processing on each of the text feature vectors based on the adjusted fusion weight to obtain a fusion feature vector; Inputting the fused feature vector into a neural network translation model that has undergone enhanced pre-training to perform deep translation to obtain a preliminary translation text; Post-processing the preliminary translation text to obtain a translation result; The adaptive weight adjustment mechanism is adopted to dynamically adjust the fusion weight according to the importance of features of different languages, and each of the text feature vectors is cross-language fused based on the adjusted fusion weight to obtain a fused feature vector, including: Analyze the language characteristics and usage frequency of each language in the text collection of different languages, and determine the initial weight of each language; Calculating feature importance indexes of each text feature vector; the importance indexes include feature variance and information entropy; Dynamically adjusting the initial weight of each language according to the feature importance index to obtain an adjusted fusion weight; The text feature vectors are weighted and summed based on the adjusted fusion weights to obtain the fusion feature vector.
2. The neural network text translation enhancement method in a multilingual cross-language environment according to claim 1 is characterized in that: The multi-dimensional feature extraction is performed on the text sets of different languages to obtain text feature vectors, including: Semantic feature extraction is performed on text sets in different languages to obtain semantic feature vectors; Perform grammatical feature extraction on text sets of different languages to obtain grammatical feature vectors; Context features are extracted for text sets in different languages to obtain context feature vectors; The semantic feature vector, the grammatical feature vector and the context feature vector are fused to obtain the text feature vector.
3. The neural network text translation enhancement method in a multilingual cross-language environment according to claim 1 is characterized in that: The fused feature vector is input into the enhanced pre-trained neural network translation model for deep translation to obtain a preliminary translation text, including: The fused feature vector is encoded based on the multi-head attention mechanism through the enhanced pre-trained neural network translation model to obtain the encoded feature representation; the encoded feature representation is gradually decoded by a decoder, and the historical decoding information and the context information in the fused feature vector are combined in the decoding process to generate the translation result at the current moment; the decoding process is repeated until a complete preliminary translation text is generated.
4. The neural network text translation enhancement method in a multilingual cross-language environment according to claim 1 is characterized in that: Post-processing the preliminary translation text to obtain a translation result, including: Performing grammar correction on the preliminary translated text to correct grammatical errors in the text and obtain a grammar-corrected text; Perform semantic similarity calculation and vocabulary replacement on the grammatically corrected text to improve the semantic accuracy of the text and obtain a semantically polished text; The text after semantic polishing is processed to improve fluency through language model evaluation and sentence structure adjustment to obtain the translation result.
5. The neural network text translation enhancement method in a multilingual cross-language environment according to claim 1 is characterized in that: The acquiring of speech data in a multilingual cross-language environment includes: Establishing a call connection between multiple user terminals; wherein each of the user terminals collects voice information of its corresponding user; each user communicates in a different language through the user terminal; The voice information collected by each user terminal is arranged in sequence according to the time sequence, and combined to obtain the voice data in the multi-language cross-language environment.
6. The neural network text translation enhancement method in a multilingual cross-language environment according to claim 5 is characterized in that: After the preliminary translation text is post-processed to obtain the translation result, the following steps are included: Acquire the data volume and duration of the voice information collected by each of the user terminals; Acquiring characteristic information of the translation result; Generate a communication key according to the characteristic information, the data volume and duration of the voice information collected by each of the user terminals; After the translation result is encrypted based on the communication key, it is distributed to each of the user terminals.
7. A neural network text translation enhancement system in a multilingual cross-language environment, characterized in that: include: An acquisition unit, used to acquire speech data in a multilingual cross-language environment, perform speech recognition on the speech data, and obtain multilingual text data; A classification unit, used for performing intelligent language classification on the multilingual text data to obtain text sets in different languages; performing multidimensional feature extraction on the text sets in different languages to obtain text feature vectors; A fusion unit, configured to adopt an adaptive weight adjustment mechanism to dynamically adjust the fusion weight according to the importance of features of different languages, and perform cross-language fusion processing on each of the text feature vectors based on the adjusted fusion weight to obtain a fused feature vector; A translation unit, used for inputting the fused feature vector into a neural network translation model that has undergone enhanced pre-training to perform deep translation to obtain a preliminary translation text; A processing unit, used for post-processing the preliminary translation text to obtain a translation result; The adaptive weight adjustment mechanism is adopted to dynamically adjust the fusion weight according to the importance of features of different languages, and each of the text feature vectors is cross-language fused based on the adjusted fusion weight to obtain a fused feature vector, including: Analyze the language characteristics and usage frequency of each language in the text collection of different languages, and determine the initial weight of each language; Calculating feature importance indexes of each text feature vector; the importance indexes include feature variance and information entropy; Dynamically adjusting the initial weight of each language according to the feature importance index to obtain an adjusted fusion weight; The text feature vectors are weighted and summed based on the adjusted fusion weights to obtain the fusion feature vector.
8. A computer device comprising a memory and a processor, wherein a computer program is stored in the memory, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Multilingual text translation method and device, computer equipment and storage medium
CN113947095A
Multi-language speech recognition method, device and equipment based on emotion perception AI model
CN118675501A