Language translation method and device, storage medium and computer equipment

The source language text information is segmented and noise-corrected and encoded through the language translation model, which solves the problems of low human-computer interaction efficiency and noise impact in the existing technology, achieves more efficient and accurate translation results, and improves user experience.

CN118690757APending Publication Date: 2024-09-24TCL TECHNOLOGY GROUP CORPORATION
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310296617.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-03-22
Publication Date
2024-09-24

AI Technical Summary

Technical Problem

The existing human-computer interaction method is single and inefficient. Especially when noise is present, machine translation is less robust, resulting in poor user experience.

Method used

The language translation model is used to segment and translate the source language text information. The word segmentation model and noise correction coding network are used to improve the accuracy and robustness of translation and achieve automated acquisition of target language text information.

Benefits of technology

It improves the efficiency of human-computer interaction, enhances the robustness and accuracy of machine translation, and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118690757A
    Figure CN118690757A
Patent Text Reader

Abstract

The invention discloses a language translation method and device, a storage medium and computer equipment, and the method is applied to the computer equipment, and comprises the steps: obtaining source language text information, carrying out word segmentation processing on the source language text information to obtain a word segmentation sequence, and carrying out translation processing on the word segmentation sequence by utilizing a language translation model, according to the embodiment of the invention, the target language text information is obtained by utilizing the language translation model, the target language text information of the source language text information is automatically determined, and the man-machine interaction efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and in particular to a language translation method, apparatus, storage medium and computer equipment. Background Art

[0002] In human-computer interaction, for example, the interaction between a user and a television, current interactions are still mainly manual interactions such as remote control, which has a single interaction method and low interaction efficiency, thus reducing the efficiency of human-computer interaction. Summary of the invention

[0003] The embodiments of the present application provide a language translation method, apparatus, storage medium and computer equipment, which can improve the efficiency of human-computer interaction.

[0004] The present application embodiment provides a language translation method, including:

[0005] Obtain source language text information;

[0006] Performing word segmentation processing on the source language text information to obtain a word segmentation sequence;

[0007] The word segmentation sequence is translated using a language translation model to obtain target language text information after the source language text information is translated.

[0008] The present application also provides a language translation device, including:

[0009] A first acquisition module, used to acquire source language text information;

[0010] A first word segmentation module is used to perform word segmentation processing on the source language text information to obtain word segmentation features;

[0011] The translation module is used to translate the word segmentation features using a language translation model to obtain target language text information after the source language text information is translated.

[0012] An embodiment of the present application further provides a computer-readable storage medium, in which a plurality of instructions are stored, and the instructions are suitable for being loaded by a processor to execute the steps in any of the above methods.

[0013] An embodiment of the present application further provides a computer device, including a processor and a memory, wherein the processor is electrically connected to the memory, the memory is used to store instructions and data, and the processor is used to perform the steps in any of the methods described above.

[0014] The language translation method, apparatus, storage medium and computer equipment provided by the present application obtain source language text information, perform word segmentation processing on the source language text information to obtain a word segmentation sequence, and use a language translation model to translate the word segmentation sequence to obtain target language text information. In the embodiment of the present application, the language translation model is used to obtain the target language text information, so as to automatically determine the target language text information of the source language text information and improve the efficiency of human-computer interaction. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] The technical solution and other beneficial effects of the present application will be made apparent by describing in detail the specific implementation methods of the present application in conjunction with the accompanying drawings.

[0016] Figure 1 A schematic diagram of an application scenario provided for an embodiment of the present application.

[0017] Figure 2 This is an example flowchart of the language translation method provided in the embodiment of the present application.

[0018] Figure 3 A flowchart of a method for training a language translation model provided in an embodiment of the present application.

[0019] Figure 4 A schematic diagram of preliminary training and deep training provided in an embodiment of the present application.

[0020] Figure 5 A schematic diagram of the encoding part in the deep training provided in an embodiment of the present application.

[0021] Figure 6 A schematic diagram of the structure of a language translation device provided in an embodiment of the present application.

[0022] Figure 7 A schematic diagram of the structure of a training device for a language translation model provided in an embodiment of the present application.

[0023] Figure 8 A schematic diagram of the structure of the deep training module provided in an embodiment of the present application.

[0024] Fig. 9 A schematic diagram of the structure of a computer device provided in an embodiment of the present application.

[0025] Fig.10 Another structural schematic diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0026] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.

[0027] The embodiments of the present application provide a language translation method, device, storage medium and computer equipment. Any method and / or any device provided in the embodiments of the present application can be integrated in a computer device, which may include devices such as a mobile terminal and a server, wherein the mobile terminal includes a smart phone, a Pad (tablet computer), a handheld computer, a wearable device, a robot, a smart TV, a smart air conditioner, a smart curtain, a smart sweeper, a smart fan, a smart vehicle-mounted device, a mobile phone, a camera, a printer and other devices that can interact with people. The server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms.

[0028] The role of machine translation is to translate the directive language information manually or by voice input by the user into natural language to facilitate the machine to execute the corresponding instructions, thereby meeting the various needs of users and providing users with a convenient intelligent interactive experience. Because it involves human-computer interaction, there will always be some noise in the process of human-computer interaction. For example, the order of the manually input directive language information is wrong, or there is a lot of noise when the voice input is mixed, which makes the machine translation process of converting human-computer interaction information such as directive voice information into natural language sentences. Translation errors occur, making the robustness of machine translation poor, resulting in the inability to recognize the corresponding instructions, affecting the user experience.

[0029] In order to solve the above problems, this application provides the following technical solutions.

[0030] In specific implementation, the language translation model and / or word segmentation model in this application can be installed / integrated in a computer device, and the computer device can be used to obtain source language text information, and the word segmentation model can be used to perform word segmentation processing to obtain word segmentation features, and the word segmentation features can be translated and processed using a language translation model (the language translation model can learn noise data) to obtain target language text information, and corresponding operations can be performed according to the target language text information.

[0031] For example, the computer device may be a smart TV, which obtains source language text information (the source language text information may be directly input or obtained by converting speech to text via input voice data), such as switching to channel 1, and then translating to obtain target language text information, and executing the operation of switching the current TV station to channel 1 according to the target language text information.

[0032] For example, Figure 1 As shown, source language text information is input through a computer device such as a smart TV (the source language text information can be directly input or obtained by voice-to-text conversion through input voice data). If the channel is switched to channel 1, the smart TV sends the source language text information to another computer device such as a server of the smart TV. The language translation model and word segmentation model in the present application are installed or integrated in the server of the smart TV. Corresponding processing is performed in the server of the smart TV to obtain target language text information after the source language text information is translated, and then the target language text information is sent to the smart TV. The smart TV executes the operation of switching the current TV station to channel 1 according to the target language text information.

[0033] Figure 2 It is a flow chart of a language translation method provided in an embodiment of the present application. The language translation method is applied in a computer device and includes the following steps.

[0034] 101, obtaining source language text information.

[0035] The source language text information includes multiple texts corresponding to the source language, and the multiple texts can exist in the form of sentences (including long words). Therefore, the source language text information can also be understood as source language sentences. The source language can be any language, such as Chinese, English, French, etc. The source language is a language that can be recognized in the language translation model. The source language text information may include noise data or may not include noise data. Whether it includes noise data or not, the language translation model can perform accurate translation processing.

[0036] 102, performing word segmentation processing on the source language text information to obtain a word segmentation sequence.

[0037] The word segmentation model can be used to perform word segmentation processing on the source language text information. The word segmentation model can be any existing word segmentation model, such as the word2vec model, etc. The word segmentation model can also be a word segmentation model trained using the data set / corpus of the solution in the present application, and the corresponding data set dictionary / corpus dictionary is obtained.

[0038] The word segmentation model and the dataset dictionary of the corresponding dataset or the corpus dictionary of the corresponding corpus can be obtained by following the following steps. For example, a source language clean text corpus, a target language clean text corpus and a source language noise text corpus are obtained, wherein each source language noise text in the source language noise text corpus is obtained by adding noise data to the corresponding source language clean text in the source language clean text corpus, and each target language clean text in the target language clean text corpus corresponds to each source language clean text in the source language clean text corpus; the source language clean text corpus, the target language clean text corpus and the source language noise text corpus are used to train the initial word segmentation model to obtain the final word segmentation model and the corpus dictionary obtained after the word segmentation model. Among them, each source language clean text refers to each source language clean sentence, the corresponding each source language noise text refers to each source language noise sentence, and each target language clean text refers to each target language clean sentence.

[0039] Among them, first, the expected corpus dictionary size M is set according to the size of the source language clean text corpus or the target language clean text corpus or the source language noisy text corpus, that is, the expected corpus dictionary size M is set according to the size of the corresponding corpus. Then, the frequency of each word is counted, and then all words / pinyin in the source language clean text corpus, the target language clean text corpus and the source language noisy text corpus are split into single characters, and the initial corpus dictionary is established with all characters, and the frequency of each character is counted, that is, the subword granularity in the initial stage is a character. Then, the character pair with the highest frequency is determined, such as er composed of e and r, and the new character is added to the vocabulary, and then all the character pairs in the source language clean text corpus, the target language clean text corpus and the source language noisy text corpus are melted, that is, all e and r are merged into er, and all the original e and r are eliminated. Finally, repeat the above operations until the number of words in the vocabulary reaches the set number M or the next highest frequency number is 1. If the set number M has been reached, the remaining words are discarded, and the obtained word segmentation model is used as the trained word segmentation model, and the final vocabulary is used as the final corpus dictionary.

[0040] Among them, the corpus dictionary is divided into different styles according to its size. For example, for “I love my hometown”, if the corpus dictionary is small, it may be divided into “I love” and “hometown”; if the corpus dictionary is large, it may be divided into “I”, “love”, “home”, “township”, etc.

[0041] After obtaining the word segmentation model, obtain the data set dictionary corresponding to the data set in the word segmentation model or the corpus dictionary corresponding to the corpus, and use the word segmentation model to perform word segmentation processing on the source language text information according to the data set dictionary / corpus dictionary to obtain a word segmentation sequence, wherein a word segmentation sequence includes at least one word segmentation.

[0042] For example, the source language text information is "Please turn off the music", and the word segmentation sequence obtained after word segmentation is "please", "turn off", "close", "music", and "music". Each element in the word segmentation sequence corresponds to a token (or called a segmentation), that is, "Please turn off the music" corresponds to five tokens. The obtained word segmentation sequence is input into the language translation model in this application to perform translation processing using the language translation model.

[0043] 103 , using a language translation model to translate the word segmentation sequence to obtain target language text information after the source language text information is translated.

[0044] Among them, a language translation model can also be obtained. The language translation model is obtained by adding a noise correction coding network and then training the initial language translation model after preliminary training.

[0045] The language translation model is used to translate the word segmentation sequence corresponding to the source language text information to obtain the target voice text information. The target language is a language that can be well recognized by the system of the computer device. For example, if the source language is French, the target language can be English, etc. The target language text information includes at least one text corresponding to the target language, which can also be understood as a target language sentence.

[0046] Among them, the initial language translation model includes a feature extraction network, an encoder network and a decoder network. There is a feature extraction network before the encoder network and the decoder network. The encoder network and the decoder network exist in series, that is, data such as word segmentation sequence first passes through the feature extraction network for feature extraction processing, and then the extracted word segmentation features are input into the encoder network for processing, and then the results of the encoder network processing are input into the decoder network for processing. This application takes this case as an example for explanation. In some cases, the initial language translation model may not include a feature extraction network, then the corresponding data input into the initial language translation model is the word segmentation features corresponding to the word segmentation sequence.

[0047] The network structure of the encoder network includes A (A>=1, for example, A=6) encoding blocks stacked together. Each encoding block is structurally identical, but they do not share parameters. The input of each encoding block is the output of the previous encoding block. The input of the first encoding block is the word segmentation feature. Each encoding block can be decomposed into two sublayers, the self-attention layer and the feedforward neural network. The word segmentation feature of the source language sentence input from the encoder will first pass through the self-attention layer. The self-attention layer helps the encoder to focus on other word segments of the input source language sentence when encoding each word in each source language sentence. Then the output of the self-attention layer is passed to the feedforward neural network to output the encoding feature of the source language sentence. The encoding feature can also be understood as a sentence representation, a representation vector, or a sentence representation vector, etc.

[0048] The decoder network also has a corresponding self-attention layer (involving Masked) and a feedforward layer in its network structure. In addition, there is a cross-attention layer between these two layers to focus on the relevant parts of the input source language sentence.

[0049] The initial language translation model may be any model including the feature extraction network, encoder network, and decoder network described above. For example, the initial language translation model may be a transformer model or a series of models thereof. In some cases, when the initial language translation model does not include a feature extraction network, the initial language translation model includes any model including the encoder network and the decoder network described above.

[0050] After the initial language translation model is determined, the initial language translation model is preliminarily trained. The preliminary training means that the training is not completed, but only part of the complete training is completed. If the training time is used to describe the entire training process, the preliminary training means that the training has been completed for a period of time, such as the preset time, and the total training time has not yet been reached. If the number of training rounds is used to describe the entire training process, the preliminary training means that the preset number of rounds has been trained, and the total number of training rounds has not yet been reached. Among them, adding the noise correction coding network after the preliminary training can also be understood as adding the noise correction coding network after the initial language translation model has been trained for a preset time / preset number of rounds. Deep training refers to the subsequent training of the model with the noise correction coding network added to reach the total training time / total number of training rounds, or meet the preset conditions to obtain a language translation model.

[0051] The added noise correction coding network has the same structure as the encoder network in the initial language translation model. The noise correction coding network and the encoder network exist in parallel. When the noise correction coding network is added, the parameters of the encoder network after the initial language translation model is preliminarily trained are assigned to the noise correction coding network, and during the training process, the parameters of the noise correction coding network and the encoder network are always shared. During the training process, the noise correction coding network and the encoder network learn from each other to correct the corresponding parameters.

[0052] Among them, the purpose of adding the noise correction coding network after the initial language translation model is initially trained can be understood from the opposite side. For example, the common practice in the current translation method of adding additional prior information is to jointly train the original model with the added information model. However, for the noisy scene in this application, the initial language translation model initially has neither the translation ability nor the sentence representation ability of the encoder, nor the ability to learn noise correction translation results. If joint training is used at the beginning, learning noise correction when the encoder of the initial language translation model has not yet obtained the sentence representation ability will make model learning difficult, which will not only not improve the model robustness but also affect the translation ability of the model. Therefore, after the initial training, the present application adds the noise correction coding network, and uses a training method of progressively adding training to avoid the implicit conflict between the translation training task and the learning correction task caused by adding the noise correction coding network at the beginning of the training, and effectively control the process of the model learning two abilities. On the other hand, adding the noise correction coding network can make it possible to learn the noise correction translation results during the training process, improve the accuracy and robustness of the translation results, and improve the user experience.

[0053] Specifically, the language translation model obtained by training will be described in detail later and will not be repeated here.

[0054] After the training is completed, the trained language translation model has two networks with the same structure and parameters, namely the noise correction coding network and the encoder network. When using the language translation model or after obtaining the trained language translation model, the noise correction coding network in the language translation model can be shielded or deleted to obtain the final speech translation model, and the final language translation model is used for subsequent translation processing.

[0055] When using the fisheye translation model for translation processing, first obtain the word segmentation features of each word in the word segmentation sequence. Among them, the feature extraction network can be used to perform feature extraction processing on each word in the word segmentation sequence to obtain the word segmentation features of each word segmentation. Among them, in addition to extracting the embedding features of each word segmentation, the feature extraction processing also extracts the position features of the position of each word segmentation in the word segmentation sequence, and determines the word segmentation features of each word segmentation according to the embedding features and position features. For example, assuming that the word segmentation sequence is 1*5, that is, there are 5 tokens, feature extraction processing is performed on each token to obtain the embedding features of each word segmentation 1*512 dimensions and the position features of each word segmentation 1*512 dimensions, and then the embedding features and position features are fused to obtain the word segmentation features of each word segmentation 1*512 dimensions, then the word segmentation features in the word segmentation sequence are 5*512 dimensions. The obtained word segmentation features of the word segmentation sequence 5*512 dimensions are input into the language translation model.

[0056] Afterwards, the encoder network of the language translation model is used to encode the word segmentation features to obtain the encoded features. Since the encoder network has learned the noise data during the training phase, it can identify the noise data of the source language text information, and input the word segmentation features into A encoding blocks in the encoder network for processing to obtain the encoded features. The dimension of the encoded features is the same as the dimension of the input word segmentation features, that is, 5*512 dimensions.

[0057] Finally, the encoded features and the text features of the predicted target text currently predicted by the language translation model are input into the decoder network of the language translation model for decoding to predict the next predicted target text until all predictions are completed and the target language text information is obtained.

[0058] Among them, in the first time step, that is, when the decoder network is input for the first time, the text features of the currently predicted predicted target text are the features of the start descriptor of the target language text information (for example, including the embedded features and position features of the start descriptor), and the encoded features output by the encoder network and the features of the start descriptor are input into the decoder network for decoding processing to obtain the probability of the next predicted target text in the dataset dictionary / corpus dictionary, and the target text with the largest probability is used as the next predicted target text.

[0059] In the second time step, the encoding features, the features of the start descriptor, and the text features of the first predicted target text (for example, including the embedding features and position features of the first predicted target text) are input into the decoder network for decoding processing to obtain the probability of the next predicted target text, and the target text with the highest probability is used as the next predicted target text. It can be understood that the i+1th target text will be predicted based on the 1 to i target texts obtained by the current decoding process until all predictions are completed, and all predicted target texts are determined as target language text information.

[0060] In this embodiment, a language translation model obtained by adding a noise correction coding network during the training process and then training is used to translate the word segmentation sequence corresponding to the source language text information. Since the noise correction coding network is added during the training process, a training method of adding training in a progressive manner is used to avoid the implicit conflict between the translation training task and the learning correction task caused by adding the noise correction coding network at the beginning of training, thereby improving the accuracy of the language translation model. On the other hand, since the language translation model obtained by training can identify the noise data in the source language text information, the obtained target language text information is more accurate, thereby improving the accuracy and robustness of language translation.

[0061] Figure 3 It is a flowchart of training a language translation model provided in an embodiment of the present application. The obtained language translation model is used to translate word segmentation sequences. Specifically, training the language translation model includes the following steps.

[0062] 201 , obtaining a first data set and a second data set, wherein the second data set is obtained by adding noise data to the first data set.

[0063] A source language clean text data set, a source language noisy text data set, and a target language clean text data set can be obtained. Among them, each source language noisy text data in the source language noisy text data set is obtained by adding noise data to the corresponding source language clean text data in the source language clean text data set, and each target language clean text data in the target language clean text data set corresponds to each source language clean text data in the source language clean text data set. Among them, each source language clean text data can also be understood as a source language clean sentence, each source language noise text data can also be understood as a source language noise sentence, and each target language clean text data can also be understood as a target language clean sentence.

[0064] It should be noted that the source language noisy text dataset is obtained by adding noise data to the corresponding source language clean text data in the source language clean text dataset. Noise data can be determined according to the specific application scenario. Common noise types include: handwriting omissions, handwriting errors, typing repetitions, typing disorder, typing omissions, speech recognition omissions, speech recognition disorder, speech recognition repetitions, etc., including three scenarios: handwriting, typing, and speech. For these noise types, a certain random probability is set to randomly add each type of noise data to each source language clean text data / source language noise sentence in the source language clean text dataset to generate a source language noisy text dataset. Since the three scenarios of handwriting, typing, and speech will not appear at the same time, noise data is dynamically added by setting a random number μ [0,1].

[0065] For example, a random number μ is generated. If 0<μ≤0.3, the noise data is determined to be handwriting noise, and handwriting noise is set for the source language clean sentence to be added. Handwriting omission errors and handwriting errors are randomly added to the source language clean sentence for the handwriting noise; if 0.3<μ≤0.6, the noise data is determined to be typing noise, and handwriting noise is set for the source language clean sentence to be added. Typing repetition errors, typing disorder errors, and typing omission errors are randomly added to the typing noise; if 0.6<μ≤0.9, the noise data is determined to be speech recognition noise, and speech recognition noise is set for the source language clean sentence to be added. Speech recognition omission errors, speech recognition disorder errors, and speech recognition repetition errors are randomly added to the speech recognition noise. In this way, a source language noise text dataset can be obtained.

[0066] The source language clean text dataset and the target language clean text dataset are used as the first dataset; the source language clean text dataset, the source language noisy text dataset and the target language clean text dataset are used as the second dataset.

[0067] 202 , preliminarily train the initial language translation model using the first data set to obtain an intermediate language translation model.

[0068] The initial language translation model may be as described above and will not be described in detail here. For example, it may be a transformer model or a series of models thereof.

[0069] In one embodiment, if the entire training process is described by time such as training time, then the initial language translation model is preliminarily trained using the first data set, including: using the first data set to train the initial language translation model, and the model obtained after training for a period of time such as the round of training when the preset time is completed is the intermediate language translation model, and the preset time is less than the total training time; or between the start of training and the completion of the round of training when the preset time is completed, the initial language translation model is trained using the first data set, and the model obtained by training is the intermediate language translation model. It should be noted that the training is stopped after the round of training when the preset time is completed, rather than stopping the training just when the preset time is reached (unless a round of training is also completed when the preset time is reached), and the training needs to be stopped only after the round of training when the preset time is completed. For example, when the preset time is reached, it is just the 32nd round of training, then it is necessary to wait until the 32nd round of training is completed before stopping the training, and the model that has completed 32 rounds of training is used as the intermediate language translation model.

[0070] Among them, 20%×total training time <= preset time <= 80%×total training time. In order to achieve better training results, in some cases, 40%×total training time <= preset time <= 60%×total training time can be further set. In this case, the intermediate language translation model already has a good translation ability. On top of this translation ability, the noise correction coding network is added to allow the model to further learn language correction ability.

[0071] In one embodiment, if the entire training process is described in terms of rounds, then the initial language translation model is preliminarily trained using the first data set, including: the initial language translation model is trained using the first data set, and the model obtained after a preset number of training rounds is an intermediate language translation model, the preset number of rounds and the total number of training rounds are positive integers and are not equal to one, and the preset number of rounds is less than the total number of training rounds; or from the beginning to the preset number of training rounds, the initial language translation model is trained using the first data set, and the model obtained by training is an intermediate language translation model.

[0072] Among them, 20%×total number of training rounds <=preset number of rounds <=80%×total number of training rounds. In order to achieve better training effect, in some cases, it can be further set that 40%×total number of training rounds <=preset number of rounds <=60%×total number of training rounds. If the total number of training rounds is 70 rounds, the preset number of rounds can be set to 35 rounds.

[0073] Regardless of whether the entire training process is described by the number of training rounds or the training time, during the initial training, multiple batches of partial data sets are obtained from the first data set. Usually, the first data set can be divided into multiple batches of partial data sets, and each batch of partial data sets includes multiple source language clean text data (source language clean sentences) and corresponding multiple target language clean text data (target language clean sentences).

[0074] The multiple source language clean text data in a batch of partial data sets are segmented to obtain the corresponding clean source text segmentation sequence, and each clean source text segmentation sequence is input into the feature extraction network for feature extraction to obtain the corresponding clean source text segmentation feature, each clean source text segmentation feature includes an embedding feature and a position feature. The clean source text segmentation feature is input into the encoder network for encoding to obtain the clean text encoding feature.

[0075] For the decoder network, the target language clean text data corresponding to the source language clean text data is segmented to obtain a clean target text word segmentation sequence, and the clean target text word segmentation sequence is input into the feature extraction network for feature extraction processing to obtain the corresponding clean target text word segmentation features.

[0076] In the first time step, the word segmentation feature of the first predicted target text in the clean target text word segmentation feature (such as the word segmentation feature of the start descriptor, which includes the embedding feature and the position feature) and the clean text encoding feature are input into the decoder network for decoding to obtain the prediction probability of the next predicted target text. In other time steps, the word segmentation features of the 1st to i-th target texts in the clean target text word segmentation feature (including the embedding feature and the position feature) and the clean text encoding feature are input into the decoder network for decoding to obtain the prediction probability of the next predicted target text i+1, until the prediction of the target language clean sentence corresponding to the source language clean sentence is completed, and then the loss value is determined according to the prediction probability of each predicted target text corresponding to the target language clean sentence and the true probability of each clean target text in the target language clean sentence. Then, the parameters of the initial language translation model are updated by back propagation according to the loss value.

[0077] For example, a tokenized sequence of a clean source text is "Please", "turn", "off", "the", "music", and the corresponding tokenized sequence of the clean target text is "please", "turn", "off", "the", "music". Generally, start and end descriptors are also added. The input to the encoder network includes the 5 * 512 encoding features corresponding to "Please", "turn", "off", "the", "music". At the first time step, the input to the decoder network includes the 5 * 512 encoding features and also the tokenized features of the first predicted target text in the clean target text tokenized features, such as the tokenized features of the start descriptor. The decoder network performs decoding processing to obtain the predicted probability of the next predicted target text, corresponding to the predicted probability of the target text at the position where "please" is located. At the second time step, the input to the decoder network includes the 5 * 512 encoding features, the tokenized features of the start descriptor, and the tokenized features of "please", which include embedding features and position features. The decoder network performs decoding processing to obtain the predicted probability of the next predicted target text, such as the predicted probability of the target text at the position where "turn" is located, and so on until the prediction of the clean sentence in the target language is completed. Then, according to the predicted probabilities of each predicted target text corresponding to the clean sentence in the target language, such as the predicted probabilities of the target text at the positions where "please", "turn", "off", "the", "music" are located, and the true probabilities of each clean target text in the clean sentence in the target language, such as the true probabilities of "please", "turn", "off", "the", "music", the loss value is determined. For example, for the clean target text corresponding to "please", the true probability of the clean target text corresponding to "please" in the dataset dictionary / corpus dictionary is 1, and the others are 0, etc. The parameters of the initial language translation model are updated according to the loss value.

[0078] The preliminary training can be as Figure 4 shown. During the preliminary training process, the loss value L NMT of the initial language translation model can be determined using the first loss function (which can also be called the translation loss function), and the first loss function is shown in formula (1).

[0079]

[0080] Among them, N represents the total number of samples in the first dataset, which is the same as the number of clean source language sentences in the batch source language clean text dataset. i represents the i-th sample, q(x) represents the predicted probability of the predicted target text, and p(x) represents the true probability of the clean target text.

[0081] The above-mentioned preliminary training process of the initial language translation model is only an example. To facilitate understanding, the specific preliminary training process is consistent with the training of the current initial language translation model.

[0082] When the round of training that reaches the preset time is completed, the preliminary training is stopped and the obtained model is the intermediate language translation model, or when the preset number of rounds is reached, the preliminary training is stopped and the obtained model is the intermediate language translation model.

[0083] In other embodiments, the entire training process may be described in other ways. Therefore, other ways other than training time and number of training rounds may be used to determine when to stop preliminary training or when to join the noise correction coding network.

[0084] 203, adding a noise correction coding network to the intermediate language translation model.

[0085] If the entire training process is described in terms of training time, the step of adding a noise correction coding network to the intermediate language translation model includes: adding a noise correction coding network to the intermediate language translation model before the next round of training begins after the training time reaches a preset time.

[0086] If the whole training process is described by the number of training rounds, the adding of the noise correction coding network into the intermediate language translation model includes: before the next round of training of the preset number of rounds begins, adding the noise correction coding network into the intermediate language translation model.

[0087] Among them, a noise correction coding network is added to the intermediate language translation model. Specifically, a noise correction coding network for correcting the coded sentences is added to the encoder network end of the intermediate language translation model. The added noise correction coding network and the encoder network form a parallel network structure. The network structure of the noise correction coding network is the same as the network structure of the encoder network, and the parameters of the encoder network in the intermediate language translation model obtained by preliminary training are assigned to the noise correction coding network. In the training process after adding the noise correction coding network, the parameters of the noise correction coding network and the encoder network are always shared, and the noise correction coding network and the encoder network learn from each other to correct the corresponding parameters, such as Figure 4 and Figure 5 shown.

[0088] 204 , using the second data set to perform deep training on the intermediate language translation model to which the noise correction coding network is added, to obtain a trained language translation model.

[0089] If the entire training process is described in terms of training time, step 204 includes: using the second data set to train the intermediate language translation model to which the noise correction coding network is added, so that the training time reaches the total training time, to obtain a trained language translation model. It should be noted that the model obtained after the round of training when the training time just reaches the total training time is the language translation model.

[0090] If the whole training process is described by the number of training rounds, step 204 includes: using the second data set to train the intermediate language translation model with the noise correction coding network added, and training to the total number of training rounds to obtain a trained language translation model.

[0091] Regardless of whether the entire training process is described in terms of training time or the number of training rounds, in one embodiment, step 204 further includes: using the second data set to continue training the intermediate language translation model to which the noise correction coding network is added, until the intermediate language translation model converges to obtain a trained language translation model.

[0092] In one embodiment, if Figure 5 As shown, the above step 204 also includes the following steps.

[0093] 301 , obtaining a clean source text word segmentation feature corresponding to each source language clean text data, a noisy source text word segmentation feature corresponding to each source language noisy text data, and a clean target text word segmentation feature corresponding to each target language clean text data in a second data set.

[0094] Among them, each source language clean text data corresponds to a source language noisy text data and a target language clean text data.

[0095] Among them, multiple batches of partial data sets are obtained from the second data set. Usually, the second data set can be divided into multiple batches of partial data sets, and each batch of partial data sets includes multiple source language clean text data (source language clean sentences), corresponding multiple target language clean text data (target language clean sentences) and corresponding multiple source language noisy text data (source language noisy sentences).

[0096] The source language clean text data in a batch of partial data sets are segmented to obtain the corresponding clean source text segmentation sequence, and each clean source text segmentation sequence is input into the feature extraction network for feature extraction processing to obtain the corresponding clean source text segmentation features, each clean source text segmentation feature includes an embedding feature and a position feature. Similarly, the noisy source text segmentation features corresponding to the source language noisy text data in the batch, and the clean target text segmentation features corresponding to the target language clean text data are obtained. Among them, whether it is the clean source text segmentation feature, the noisy source text segmentation feature or the clean target text segmentation feature, they all include embedding features and position features, which will not be repeated in the following text.

[0097] Among them, the input of the initial language translation model during training is a partial data set corresponding to a batch at a time, which is also the case during the initial training mentioned above.

[0098] 302, inputting the clean source text word segmentation features into the encoder network in the intermediate language translation model for encoding processing to obtain clean text encoding features.

[0099] The clean source text word segmentation features in a batch are input into the intermediate language translation model, and the encoder network in the intermediate language translation model is used to perform encoding processing to obtain the clean text encoding features corresponding to each clean source text word segmentation feature in the batch.

[0100] Here, multiple source language clean text data (multiple source language clean sentences) in a batch are recorded as X = {x1,...,x n}, for x i After encoding by the encoder network, the corresponding clean text encoding feature (or the sentence representation of the clean sentence of the source language) is obtained as z i .

[0101] 303, input the noise source text segmentation feature corresponding to the clean source text segmentation feature into the noise correction encoder network for encoding processing to obtain the noise text encoding feature.

[0102] The noisy source text segmentation features corresponding to the clean source text segmentation features in the same batch are input into the intermediate language translation model, and the encoder network in the intermediate language translation model is used to perform encoding processing to obtain the noisy text encoding features corresponding to each noisy source text segmentation feature in the batch.

[0103] The multiple source language noisy text data (multiple source language noisy sentences) corresponding to the multiple source language clean text data in the batch are recorded as X′={x1′,...,x n ′}. For xi After being encoded by the noise correction coding network, the corresponding noise text encoding feature (or understood as the sentence representation of the source language noise sentence) is obtained as z i .

[0104] Among them, step 302 and step 303 can be executed in parallel to save time.

[0105] 304, determining a noise loss value according to the clean text encoding feature and the noisy text encoding feature.

[0106] During the training process, we expect that two corresponding sentences that are encoded in parallel, such as a clean source language sentence and a noisy source language sentence, can learn and correct each other, so that the sentence representations of the two corresponding sentences in the semantic space become closer and closer to meet the purpose of correction.

[0107] Among them, the closeness of two corresponding sentences in the semantic space is recorded as ω i , then the degree of closeness ω i It can be calculated by the following formula (2).

[0108]

[0109] At the same time, the noise text encoding features of other source language noise sentences in the same batch as the source language clean sentence (or understood as the sentence representation of other source language noise sentences) are also taken together with z i Determine the degree of closeness, based on the intuition that the sentence representations of other source language noise sentences should be not close to each other so that these source language noise sentences are close to z i The distance in semantic space is getting bigger and bigger.

[0110] Therefore, step 304 includes: determining the degree of proximity in semantic space between the source language clean text data (source language clean sentences) corresponding to the clean text coding features and the source language noisy text data (source language noisy sentences) corresponding to the noise text coding features based on the clean text coding features and the corresponding noise text coding features; determining the similarity in semantic space between the source language clean text data (source language clean sentences) and other source language noisy text data (other source language noisy sentences) corresponding to other noise text coding features based on the clean text coding features and other noise text coding features of the same batch currently being trained; and determining the noise loss value based on the degree of proximity and similarity.

[0111] Therefore, a second loss function (also called a correction loss function) is set at the output end of the noise correction coding network and the encoder network to perform correction learning training. The second loss function is used to determine the noise loss value. The second loss function is shown in formula (3).

[0112]

[0113] Where τ represents the model hyperparameter temperature coefficient, z′ j It represents the noisy text encoding features of other source language noisy text data (other source language noisy sentences) in the same batch (or understood as the sentence representation of other source language noisy sentences), n represents the number of samples in a batch, which is the same as the number of source language clean text data in the batch, and sim represents the similarity.

[0114] 305 , inputting the clean target text segmentation features and the clean text encoding features corresponding to the clean source text segmentation features into a decoder network in the intermediate language translation model for decoding processing to obtain predicted target language text information.

[0115] The target language clean text data corresponding to the source language clean text data in the same batch, as well as the clean target text segmentation features and clean text encoding features corresponding to the target language clean text data are obtained and input into the intermediate language translation model, and the decoder network in the intermediate language translation model is used to perform decoding processing to obtain the prediction probability of each predicted target text in the target language clean text data (target language clean sentences) in the batch, and the prediction probability of each predicted target text in the target language clean text data (target language clean sentences) is used as the predicted target language text information.

[0116] 306 , determining a translation loss value according to the clean target text information corresponding to the predicted target language text information and the clean target text features.

[0117] The clean target text information refers to the true probability of each clean target text in the target language clean text data (target language clean sentences). The translation loss value L is determined based on the predicted probability of each predicted target text in the target language clean text data (target language clean sentences) and the true probability of the corresponding clean target text. NMT , the translation loss value L NMT The determination process of can be shown in formula (1), except that N is replaced by n, which will not be repeated here.

[0118] 307 , updating the intermediate language translation model according to the noise loss value and the translation loss value to obtain a trained language translation model.

[0119] Among them, step 307 includes: determining a correction loss penalty value according to the noise loss value; determining an overall loss value according to the noise loss value, the translation loss value and the correction loss penalty value; and updating the intermediate language translation model according to the overall loss value to obtain a trained language translation model.

[0120] Since the ability to learn translation through the first loss function and the ability to learn correction through the second loss function may be out of sync during the training process, the model will tend to learn the simpler ability first and the other ability will be difficult to learn fully, so the correction loss penalty term is set to control the learning speed. The correction loss penalty value corresponding to the correction loss penalty term can be determined according to the noise loss value.

[0121] The loss function in the deep training process is determined based on the noise loss value, the translation loss value and the correction loss penalty value. The loss function is shown in formula (4).

[0122]

[0123] Among them, α, β, and γ are all hyperparameters, and the last one The corresponding value is the corrected loss penalty value.

[0124] The overall loss value in the deep training process is determined according to the loss function, and the intermediate language translation model is updated according to the overall loss value until the training is stopped when the preset conditions are met to obtain the trained language translation model. The preset conditions may be reaching the total number of training rounds, reaching the total training time, or the overall loss value converges.

[0125] The above describes in detail the training process of the language translation model. Since the training is carried out in a progressively added training method, the implicit conflict between the translation training task and the learning correction task caused by adding the noise correction coding network at the beginning of training is avoided, and the process of the model learning two capabilities is effectively controlled. At the same time, by setting the correction loss penalty item to control the learning speed, both the translation training task and the learning correction task can be fully learned, thereby improving the robustness of the language translation model.

[0126] According to the method described in the above embodiment, this embodiment will be further described from the perspective of a device. The device can be implemented as an independent entity or integrated in a computer device.

[0127] See also Figure 6 , Figure 6 The language translation device provided in the embodiment of the present application is specifically described, and is applied in a computer device. The language translation device 400 may include: a first acquisition module 401 , a first word segmentation module 402 , and a translation module 403 .

[0128] The first acquisition module 401 is used to acquire source language text information.

[0129] The first acquisition module 401 is also used to acquire a language translation model, wherein the language translation model is obtained by adding a noise correction coding network to the initial language translation model after preliminary training and then training it.

[0130] The first word segmentation module 402 is used to perform word segmentation processing on the source language text information to obtain word segmentation features.

[0131] The translation module 403 is used to translate the word segmentation features using a language translation model to obtain target language text information after the source language text information is translated.

[0132] The translation module 403 includes a feature acquisition module, an encoding module and a decoding module. The feature acquisition module is used to obtain the segmentation features of each segmentation in the segmentation sequence. The encoding module is used to encode the segmentation features using the encoder network of the language translation model to obtain the encoding features. The decoding module is used to input the encoding features and the text features of the predicted target text currently predicted by the language translation model into the decoder network of the language translation model for decoding, so as to predict the next predicted target text, until all predictions are completed to obtain the target language text information.

[0133] In one embodiment, the language translation device 400 may further include a training module 404. For details of the training module, please refer to Figure 7 The content will not be repeated.

[0134] In one embodiment, the language translation device 400 may further include a masking and deleting module 405, wherein the masking and deleting module 405 is used to mask or delete the noise correction coding network in the language translation model after training the language translation model to obtain a final speech translation model.

[0135] The present application also provides a training device for a language translation model. Figure 7 As shown, the training device 500 or training module 404 of the language translation model may further include a second acquisition module 501 , a preliminary training module 502 , an adding module 503 and a deep training module 504 .

[0136] The second acquisition module 501 is used to acquire a first data set and a second data set, wherein the second data set is obtained by adding noise data to the first data set.

[0137] In one embodiment, the second acquisition module 501 is specifically used to acquire a source language clean text dataset, a source language noisy text dataset and a target language clean text dataset, wherein each source language noise text data in the source language noise text dataset is obtained by adding noise data to the corresponding source language clean text data in the source language clean text dataset, and each target language clean text data in the target language clean text dataset corresponds to each source language clean text data in the source language clean text dataset; the source language clean text dataset and the target language clean text dataset are used as the first dataset; the source language clean text dataset, the source language noise text dataset and the target language clean text dataset are used as the second dataset.

[0138] The preliminary training module 502 is used to perform preliminary training on the initial language translation model using the first data set to obtain an intermediate language translation model.

[0139] The adding module 503 is used to add a noise correction coding network into the intermediate language translation model.

[0140] The deep training module 504 is used to perform deep training on the intermediate language translation model to which the noise correction coding network is added using the second data set to obtain a trained language translation model.

[0141] In one embodiment, if the entire training process is described in terms of time, correspondingly, the preliminary training module 502 is specifically used to train the initial language translation model using the first data set from the start of training to a preset number of rounds to obtain an intermediate language translation model. The adding module 503 is specifically used to add a noise correction coding network to the intermediate language translation model before the start of the next round of training of the preset number of rounds. The deep training module 504 is specifically used to use the second data set to continue training the intermediate language translation model to which the noise correction coding network is added, and train to the total number of training rounds to obtain a trained language translation model; wherein the preset number of rounds and the total number of training rounds are positive integers and neither is equal to one, and the preset number of rounds is less than the total number of training rounds.

[0142] In one embodiment, if the entire training process is described in terms of the number of training rounds, correspondingly, the preliminary training module 502 is specifically used to train the initial language translation model using the first data set, and the model obtained after the round of training when the training time reaches the preset time is determined as the intermediate language translation model. The adding module 503 is specifically used to add a noise correction coding network to the intermediate language translation model before the next round of training after the training time reaches the preset time. The deep training module 504 is specifically used to continue to train the intermediate language translation model to which the noise correction coding network is added using the second data set, so that the training time reaches the total training time to obtain the trained language translation model; wherein the preset time is less than the total training time.

[0143] In one embodiment, if Figure 8 As shown, the deep training module 504 also includes a word segmentation feature acquisition module 5041, a training encoding module 5042, a noise encoding module 5043, a first determination module 5044, a training decoding module 5045, a second determination module 5046 and an update module 5047.

[0144] The word segmentation feature acquisition module 5041 is used to obtain the clean source text word segmentation feature corresponding to each source language clean text data in the second data set, the noisy source text word segmentation feature corresponding to each source language noisy text data, and the clean target text word segmentation feature corresponding to each target language clean text data.

[0145] The training encoding module 5042 is used to input the clean source text word segmentation features into the encoder network in the intermediate language translation model for encoding processing to obtain clean text encoding features.

[0146] The noise encoding module 5043 is used to input the noise source text segmentation feature corresponding to the clean source text segmentation feature into the noise correction encoder network for encoding processing to obtain the noise text encoding feature.

[0147] The first determination module 5044 is used to determine the noise loss value according to the clean text encoding feature and the noisy text encoding feature.

[0148] The training decoding module 5045 is used to input the clean target text segmentation features corresponding to the clean source text segmentation features and the clean text encoding features into the decoder network in the intermediate language translation model for decoding processing to obtain predicted target language text information.

[0149] The second determination module 5046 is configured to determine a translation loss value according to the predicted target language text information.

[0150] The updating module 5047 is used to update the intermediate language translation model according to the noise loss value and the translation loss value to obtain a trained language translation model.

[0151] During specific implementation, the above modules can be implemented as independent entities, or can be arbitrarily combined to be implemented as the same or several entities. The specific implementation of the above modules can refer to the previous method embodiments. The specific beneficial effects that can be achieved can also refer to the beneficial effects in the previous method embodiments, which will not be repeated here.

[0152] In addition, the present application also provides a computer device, such as Fig. 9 As shown, the computer device 600 includes a processor 601 and a memory 602. The processor 601 is electrically connected to the memory 602.

[0153] The processor 601 is the control center of the computer device 600. It uses various interfaces and lines to connect the various parts of the entire computer device. By running or loading applications stored in the memory 602 and calling data stored in the memory 602, it executes various functions of the computer device and processes data, thereby monitoring the computer device as a whole.

[0154] In this embodiment, the processor 601 in the computer device 600 will load instructions corresponding to one or more application processes into the memory 602 according to the following steps, and the processor 601 will run the application / computer program stored in the memory 602 to implement various functions, such as:

[0155] Obtain source language text information;

[0156] Performing word segmentation processing on the source language text information to obtain a word segmentation sequence;

[0157] Using a language translation model to translate the word segmentation sequence to obtain target language text information after the source language text information is translated; and / or,

[0158] Acquire a first data set and a second data set, wherein the second data set is obtained by adding noise data to the first data set;

[0159] Using the first data set to preliminarily train the initial language translation model to obtain an intermediate language translation model;

[0160] Adding a noise correction coding network to the intermediate language translation model;

[0161] The second data set is used to perform deep training on the intermediate language translation model to which the noise correction coding network is added to obtain a trained language translation model.

[0162] The computer device can implement the steps in any embodiment of the speech translation method provided in the embodiments of the present application, and therefore can achieve the beneficial effects that can be achieved by any speech translation method provided in the embodiments of the present invention. For details, please refer to the previous embodiments and will not be repeated here.

[0163] Fig.10 The specific structural block diagram of the computer device provided in the embodiment of the present invention is shown, and the computer device can be used to implement the speech translation method in any of the above embodiments. The computer device includes the following modules / units.

[0164] The RF circuit 710 is used to receive and send electromagnetic waves, realize the mutual conversion between electromagnetic waves and electrical signals, and thus communicate with a communication network or other devices. The RF circuit 710 may include various existing circuit elements for performing these functions, such as antennas, radio frequency transceivers, digital signal processors, encryption / decryption chips, user identity module (SIM) cards, memories, etc. The RF circuit 710 can communicate with various networks such as the Internet, corporate intranets, wireless networks, or communicate with other devices through wireless networks. The above-mentioned wireless networks may include cellular telephone networks, wireless local area networks, or metropolitan area networks. The above-mentioned wireless networks can use various communication standards, protocols and technologies, including but not limited to Global System for Mobile Communication (GSM), Enhanced Data GSM Environment (EDGE), Wideband Code Division Multiple Access (WCDMA), Code Division Multiple Access (CDMA), Time Division Multiple Access (TDMA), Wireless Fidelity (Wi-Fi) (such as Institute of Electrical and Electronics Engineers standards IEEE 802.11a, IEEE 802.11b, IEEE802.11g and / or IEEE802.11n), Voice over Internet Protocol (VoIP), Worldwide Interoperability for Microwave Access (Wi-Max), other protocols for email, instant messaging and short messages, and any other suitable communication protocols, even those that have not yet been developed.

[0165] The memory 720 can be used to store software programs (computer programs) and modules, such as the corresponding program instructions / modules in the above embodiments, and the processor 780 executes various functional applications and data processing by running the software programs and modules stored in the memory 720. The memory 720 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 720 may further include a memory remotely arranged relative to the processor 780, and these remote memories may be connected to the computer device 700 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0166] The input unit 730 can be used to receive input digital or character information, and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control. Specifically, the input unit 730 may include a touch-sensitive surface 731 and other input devices 732. The touch-sensitive surface 731, also known as a touch display screen (touch screen) or a touch pad, can collect user touch operations on or near it (such as operations performed by users using fingers, styluses, or any other suitable objects or accessories on or near the touch-sensitive surface 731), and drive corresponding connection devices according to a pre-set program. Optionally, the touch-sensitive surface 731 may include a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into touch point coordinates, and then sends it to the processor 780, and can receive and execute commands sent by the processor 780. In addition, the touch-sensitive surface 731 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch-sensitive surface 731, the input unit 730 may further include other input devices 732. Specifically, the other input devices 732 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.

[0167] The display unit 740 can be used to display information input by the user or information provided to the user and various graphical user interfaces of the computer device 700, which can be composed of graphics, text, icons, videos and any combination thereof. The display unit 740 may include a display panel 741. Optionally, the display panel 741 may be configured in the form of LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), etc. Further, the touch-sensitive surface 731 may cover the display panel 741. When the touch-sensitive surface 731 detects a touch operation on or near it, it is transmitted to the processor 780 to determine the type of touch event, and then the processor 780 provides corresponding visual output on the display panel 741 according to the type of touch event. Although in the figure, the touch-sensitive surface 731 and the display panel 741 are implemented as two independent components to implement input and output functions, it can be understood that the touch-sensitive surface 731 is integrated with the display panel 741 to implement input and output functions.

[0168] The computer device 700 may also include at least one sensor 750, such as a light sensor, a direction sensor, a proximity sensor, and other sensors. As a type of motion sensor, a gravity acceleration sensor can detect the magnitude of acceleration in all directions (generally three axes), and can detect the magnitude and direction of gravity when stationary, and can be used for applications that recognize the posture of the mobile phone, vibration recognition related functions (such as pedometer, knocking), etc. As for other sensors that can be configured in the computer device 700, such as a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, etc., they will not be described in detail here.

[0169] The audio circuit 760, the speaker 761, and the microphone 762 can provide an audio interface between the user and the computer device 700. The audio circuit 760 can transmit the received audio data to the speaker 761 after converting the received audio data into an electrical signal, which is converted into a sound signal for output; on the other hand, the microphone 762 converts the collected sound signal into an electrical signal, which is received by the audio circuit 760 and converted into audio data, and then the audio data is processed by the output processor 780 and sent to, for example, another computer device through the RF circuit 710, or the audio data is output to the memory 720 for further processing. The audio circuit 760 may also include an earplug jack to provide communication between an external headset and the computer device 700.

[0170] The computer device 700 can help users receive requests, send information, etc. through a transmission module 770 (such as a Wi-Fi module), which provides users with wireless broadband Internet access. Although the transmission module 770 is shown in the figure, it is understandable that it does not belong to the necessary components of the computer device 700 and can be omitted as needed without changing the essence of the invention.

[0171] The processor 780 is the control center of the computer device 700. It uses various interfaces and lines to connect various parts of the entire mobile phone. By running or executing software programs (computer programs) and / or modules stored in the memory 720, and calling data stored in the memory 720, it executes various functions of the computer device 700 and processes data, thereby monitoring the computer device as a whole. Optionally, the processor 780 may include one or more processing cores; in some embodiments, the processor 780 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, etc., and the modem processor mainly processes wireless communications. It can be understood that the above-mentioned modem processor may not be integrated into the processor 780.

[0172] The computer device 700 also includes a power supply 790 (such as a battery) for supplying power to various components. In some embodiments, the power supply can be logically connected to the processor 780 through a power management system, so that the power management system can manage charging, discharging, and power consumption management. The power supply 790 can also include any components such as one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, and power status indicators.

[0173] Although not shown, the computer device 700 also includes a camera (such as a front camera, a rear camera), a Bluetooth module, etc., which will not be described in detail here. Specifically in this embodiment, the display unit of the computer device is a touch screen display, and the computer device also includes a memory, and one or more programs (computer programs), wherein one or more programs are stored in the memory, and are configured to be executed by one or more processors to include the steps in the language translation method in any of the above embodiments.

[0174] In specific implementation, the above modules can be implemented as independent entities, or can be arbitrarily combined and implemented as the same or several entities. The specific implementation of the above modules can be found in the previous method embodiments, which will not be repeated here.

[0175] Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments can be completed by instructions (computer programs) or by controlling related hardware through instructions, and the instructions can be stored in a computer-readable storage medium and loaded and executed by a processor. To this end, an embodiment of the present invention provides a storage medium in which a plurality of instructions are stored, and the instructions can be loaded by a processor to execute the steps of any embodiment of the language translation method provided in the embodiment of the present invention.

[0176] The storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0177] Since the instructions stored in the storage medium can execute the steps in any embodiment of the language translation method provided in the embodiments of the present invention, the beneficial effects that can be achieved by the language translation method provided in the embodiments of the present invention can be achieved. Please refer to the previous embodiments for details and will not be repeated here.

[0178] The above is a detailed introduction to a language translation method, device, storage medium and computer device provided in the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the ideas of the present application, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A language translation method, characterized in that: include: Obtain source language text information; Performing word segmentation processing on the source language text information to obtain a word segmentation sequence; The word segmentation sequence is translated using a language translation model to obtain target language text information.

2. The method according to claim 1, characterized in that The step of using a language translation model to translate the word segmentation sequence to obtain target language text information includes: Obtaining a segmentation feature of each segmentation in the segmentation sequence; Encoding the word segmentation features using the encoder network of the language translation model to obtain encoding features; The encoding features and the text features of the predicted target text currently predicted by the language translation model are input into the decoder network of the language translation model for decoding processing to predict the next predicted target text until all predictions are completed to obtain the target language text information.

3. The method according to claim 1, characterized in that The language translation model is trained by the following steps: Acquire a first data set and a second data set, wherein the second data set is obtained by adding noise data to the first data set; Using the first data set to preliminarily train the initial language translation model to obtain an intermediate language translation model; Adding a noise correction coding network to the intermediate language translation model; The second data set is used to perform deep training on the intermediate language translation model to which the noise correction coding network is added to obtain a trained language translation model.

4. The method according to claim 3, characterized in that The step of obtaining the first data set and the second data set comprises: Acquire a source language clean text dataset, a source language noisy text dataset, and a target language clean text dataset, wherein each source language noisy text data in the source language noisy text dataset is obtained by adding noise data to the corresponding source language clean text data in the source language clean text dataset, and each target language clean text data in the target language clean text dataset corresponds to each source language clean text data in the source language clean text dataset; Taking the source language clean text dataset and the target language clean text dataset as a first dataset; The source language clean text dataset, the source language noisy text dataset and the target language clean text dataset are used as the second dataset.

5. The method according to claim 3, characterized in that: The step of using the first data set to preliminarily train the initial language translation model to obtain an intermediate language translation model includes: During the training from the beginning to the preset number of rounds, the initial language translation model is trained using the first data set to obtain an intermediate language translation model, or the initial language translation model is trained using the first data set, and a model obtained after the round of training when the training time reaches the preset time is determined as the intermediate language translation model; The step of adding a noise correction coding network to the intermediate language translation model includes: Before the next round of training of a preset number of rounds begins, a noise correction coding network is added to the intermediate language translation model, or before the next round of training begins after the training time reaches a preset time, a noise correction coding network is added to the intermediate language translation model.

6. The method according to claim 3, characterized in that The step of using the second data set to perform deep training on the intermediate language translation model to which the noise correction coding network is added to obtain a trained language translation model comprises: Obtaining a clean source text word segmentation feature corresponding to each source language clean text data, a noisy source text word segmentation feature corresponding to each source language noisy text data, and a clean target text word segmentation feature corresponding to each target language clean text data in the second data set; Inputting the clean source text word segmentation features into an encoder network in an intermediate language translation model for encoding processing to obtain clean text encoding features; Inputting the noise source text segmentation feature corresponding to the clean source text segmentation feature into the noise correction encoder network for encoding processing to obtain the noise text encoding feature; Determine a noise loss value according to the clean text encoding feature and the noisy text encoding feature; Inputting the clean target text segmentation features corresponding to the clean source text segmentation features and the clean text encoding features into a decoder network in an intermediate language translation model for decoding processing to obtain predicted target language text information; Determining a translation loss value according to the predicted target language text information; The intermediate language translation model is updated according to the noise loss value and the translation loss value to obtain a trained language translation model.

7. The method according to claim 6, characterized in that The step of determining the noise loss value according to the clean text encoding feature and the noisy text encoding feature comprises: Determining, according to the clean text encoding feature and the noise text encoding feature, the proximity in the semantic space between the source language clean text data corresponding to the clean text encoding feature and the source language noise text data corresponding to the noise text encoding feature; Determine the similarity in semantic space between the source language clean text data and other source language noisy text data corresponding to the other noisy text encoding features according to the clean text encoding features and other noisy text encoding features in the same batch of current training; A noise loss value is determined based on the proximity and the similarity.

8. A language translation device, characterized in that: include: A first acquisition module, used to acquire source language text information; A first word segmentation module is used to perform word segmentation processing on the source language text information to obtain word segmentation features; The translation module is used to translate the word segmentation features using a language translation model to obtain target language text information after the source language text information is translated.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute the steps in any one of the methods of claims 1 to 7.

10. A computer device, characterized in that: It comprises a processor and a memory, wherein the processor is electrically connected to the memory, the memory is used to store instructions and data, and the processor is used to execute the steps in the method described in any one of claims 1 to 7.