Game development text translation method based on artificial intelligence large language model
By combining the large language model based on artificial intelligence and the reflection model, the problem of low accuracy and high cost of game development text translation is solved, and efficient and accurate translation results are achieved in line with the language style of the target language.
Patent Information
- Application Number
- CN202510698714.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-28
- Publication Date
- 2025-07-04
AI Technical Summary
In the prior art, the translation of game development texts has low accuracy, high cost and cannot meet the language style requirements of target language types.
The artificial intelligence large language model is used for preliminary translation, and the corresponding reflection model is selected according to the target language type, and modification suggestions are generated. The preliminary translation results are modified through the reflection model to conform to the verbal style of the target language.
Improve translation accuracy, reduce translation costs, and achieve local-style translation results with target language types.
Smart Images

Figure CN120258013A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of intelligent translation, and particularly to a translation method for game development texts based on an artificial intelligence large language model. Background Art
[0002] In the related art, when a game is released in different countries, corresponding language translations of the game development texts involved in the game development need to be provided. Due to the game background, the usage habits of different languages, and the usage requirements of game users in different release regions of the same language, there will be different translation requirements for game development texts. Manual translation is limited by the translation level and knowledge field of translators, and it is often difficult to effectively and accurately translate game development texts, with not only low accuracy but also high costs.
[0003] There are also artificial intelligence translation technologies in the prior art, but such translation technologies generally only consider grammatical correctness, and often cannot perform well in terms of translation requirements for different story backgrounds and usage styles in different regions.
[0004] Aiming at the problems of low accuracy, high cost, and inability to meet the usage styles of target language types in manual translation of game development texts in the related art, no effective solution has been proposed yet. Summary of the Invention
[0005] The translation method for game development texts based on an artificial intelligence large language model provided by the embodiments of the present invention at least solves the problems of low accuracy, high cost, and inability to meet the usage styles of target language types in manual translation of game development texts in the related art.
[0006] According to one aspect of the embodiments of the present invention, a translation method for game development texts based on an artificial intelligence large language model is provided, including: obtaining game development texts that need to be translated into a target language type; sending the game development texts to a large language model for preliminary translation to obtain a preliminary translation result; selecting a corresponding reflection model according to the target language type, where there are multiple reflection models, each corresponding to a different language type, and the reflection model is trained based on translation data of the corresponding language type; inputting the preliminary translation result into the reflection model, and the reflection model outputs corresponding modification suggestions; modifying the preliminary translation result according to the modification suggestions to obtain a translation result with the usage style of the target language type.
[0007] As an alternative embodiment, obtaining game development text in a target language for which translation is required, including: extracting the game development text from a game development file by means of character extraction, wherein the game development text exists in the game development file in a fixed manner; displaying a translation interface to show a translation input box and translation options, wherein the translation input box is used to input the game development text that needs to be translated, and the translation options include a mandatory target language type, as well as optional source language types, regional information of the content to be translated; in response to an operation on the translation interface, receiving the game development text that needs to be translated into the target language of the target language type.
[0008] As an alternative embodiment, sending the game development text to a large language model for preliminary translation to obtain a preliminary translation result, including: generating a first prompt word according to the source language type and the information of the translation options; sending the first prompt word to the large language model, and having the large language model perform translation to obtain a preliminary translation result; in the case where the translation result indicates that the game development text contains blocked words of the large language model, selecting a backup model for translation; in the case where the translation results of the backup models all indicate that the game development text contains corresponding blocked words of the backup models, obtaining the preliminary translation result by means of blocked word replacement.
[0009] As an alternative embodiment, generating a first prompt word according to the language type of the game development text and the information of the translation options, including: generating corresponding first character setting prompt words and first action setting prompt words through the source language type and the target language type; generating a first additional prompt word according to the translation requirements, wherein the first additional prompt word includes: principle setting prompt words, logical reasoning prompt words, translation constraint prompt words; generating the first prompt word by combining punctuation marks according to the first character setting prompt words, the first action setting prompt words, and the first additional prompt words.
[0010] As an alternative embodiment, generating a first additional prompt word according to the translation requirements includes: generating principle setting prompt words for additional prompt words according to the efficiency principle; generating logical reasoning prompt words for additional prompt words according to translation examples of the target language; generating translation constraint prompt words for additional prompt words according to the translation requirements.
[0011] As an alternative embodiment, the preliminary translation result is obtained by means of blocked word replacement, including: determining the blocked words of the large language model by replacing text entities in the game development text one by one; determining the part of speech and context of the blocked words, and determining the replacement words corresponding to the blocked words, where the replacement words have the same part of speech as the blocked words and can be directly replaced in the context; replacing the blocked words in the game development text with the replacement words to modify the first prompt; inputting the modified first prompt into the large language model to obtain a replacement translation result; and replacing the translation of the target language type of the replacement words in the replacement translation result with the translation of the target language type of the corresponding blocked words to obtain the preliminary translation result.
[0012] As an alternative embodiment, before determining the corresponding reflection model according to the language type of the target language, the method further includes: obtaining a plurality of different large language models as candidate reflection models; testing the candidate reflection models with standard translation data of different language types of the same development text; selecting reflection models corresponding to different language types according to the test results; and training the corresponding reflection models with training data of different language types to obtain reflection models familiar with the usage style, where the training data is game development text with usage styles from different regions of the corresponding language type.
[0013] As an alternative embodiment, inputting the preliminary translation result into the reflection model, and the reflection model outputs corresponding modification suggestions, including: when the translation option includes regional information, generating a second prompt according to the regional information and the language type; inputting the second prompt and the preliminary translation result into the reflection model corresponding to the target language type, and the reflection model outputs corresponding modification opinions; when the translation option does not include regional information, generating a third prompt according to the language type; inputting the third prompt and the preliminary translation result into the enhanced reflection model corresponding to the reflection model, and the enhanced reflection model outputs corresponding modification opinions, where the enhanced reflection model is obtained by training the reflection model with translation example data of the regional information.
[0014] As an alternative embodiment, generating a second prompt word according to the regional information and the language type, or generating a third prompt word according to the language type, includes: generating corresponding second character setting prompt words and second action setting prompt words through the regional information, the original language type and the target language type; or generating corresponding third character setting prompt words and third action setting prompt words through the original language type and the target language type; generating a second additional prompt word according to the modification requirement, where the second additional prompt word includes: principle setting prompt words, logical reasoning prompt words, translation constraint prompt words, and logical constraint prompt words, and the logical constraint prompt words are generated according to the principle of logical consistency; generating the second prompt word by combining the second character setting prompt words, the second action setting prompt words, and the corresponding second additional prompt words with punctuation marks, or generating the third prompt word by combining the third character setting prompt words, the third action setting prompt words, and the corresponding second additional prompt words with punctuation marks.
[0015] As an alternative embodiment, modifying the preliminary translation result according to the modification suggestion to obtain a translation result with the language style of the target language type includes: generating corresponding fourth prompt words through the target language type, the source language type before translation, and the modification suggestion; inputting the fourth prompt words into the large language model, and the large language model outputs a translation result modified according to the modification suggestion.
[0016] According to one aspect of the embodiments of the present invention, an electronic device is provided, including: a processor and a memory storing a program, wherein the program includes instructions that, when executed by the processor, cause the processor to execute the above method.
[0017] The translation method provided by the embodiments of the present invention calls a large language model for preliminary translation, calls a corresponding reflection model according to the target language type to be translated, determines a modification suggestion that is more in line with the local language style of the target language type, and modifies the preliminary translation result according to the final modification suggestion to obtain a final translation result with the local style of the target language type. It achieves the technical effects of improving translation accuracy, reducing translation costs, and realizing a translation result with the local style of the target language type, thereby solving the problems of low accuracy, high cost, and inability to meet the language style of the target language type in manual translation of game development texts in the related art. Description of the Drawings
[0018] To more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other embodiments can also be obtained based on these drawings.
[0019] Figure 1 It is a flowchart of a translation method for game development texts based on an artificial intelligence large language model according to an embodiment of the present invention.
[0020] Figure 2 It is a schematic diagram of a translation interface according to an embodiment of the present invention.
[0021] Figure 3 It is a schematic diagram of selecting a reflection model according to the target language type according to an embodiment of the present invention.
[0022] Figure 4 It is a schematic diagram of the usage process of a reflection model with regional information according to an embodiment of the present invention.
[0023] Figure 5 It is a schematic diagram of the usage process of a reflection model without regional information according to an embodiment of the present invention.
[0024] Figure 6 It is a schematic diagram of optimizing the preliminary translation result according to the modification opinions according to an embodiment of the present invention.
[0025] Figure 7 It is a schematic diagram of the structure of an electronic device according to an embodiment of the present invention. Detailed implementation manners
[0026] The following will describe the embodiments of the present invention in more detail with reference to the drawings. Although some embodiments of the present invention are shown in the drawings, it should be understood that the present invention can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. On the contrary, these embodiments are provided to more thoroughly and completely understand the present invention. It should be understood that the drawings and embodiments of the present invention are only for exemplary purposes and are not used to limit the protection scope of the present invention.
[0027] In the related art, in the field of game development technology, for games that need to be launched in different countries and regions, development documents in different languages need to be provided to provide game interfaces in corresponding languages for users in that country and region. However, at present, most of them require manual translation, and there are the following problems: High cost: Manual translation requires paying the salary of translators, which may be very expensive in large-scale game projects. Especially for games with multiple language versions, this cost will increase significantly.
[0028] Inefficiency: Manual translation takes a lot of time for text translation and proofreading. This may delay the game release process, especially when the game content is updated frequently or needs to be launched quickly.
[0029] Limited human resources: High-quality translation requires experienced translators who not only need to be proficient in the source language and the target language but also have an in-depth understanding of the game content and its cultural background. It is not easy to find such professionals.
[0030] Consistency issues: Even the best translators may show inconsistent styles at different times or in different projects. This may lead to non-uniformity in the language style and word usage of game development texts, affecting the player experience.
[0031] Huge workload: Game development texts often contain a large amount of dialogue, descriptions, and documentation, which need to be translated and localized word by word, resulting in a very large workload and increasing the work pressure on translators.
[0032] Collaboration and communication issues: In large projects, multiple translators need to collaborate, which may lead to problems such as poor communication or inconsistent understanding of the translation content, further affecting the translation quality and project progress.
[0033] As Figure 1 shown, to solve the above technical problems, an embodiment of the present invention provides a method for translating game development texts based on an artificial intelligence large language model. The method includes the following steps:
[0034] Step S101, obtain game development texts that need to be translated into the target language type.
[0035] Step S102, send the game development texts to the large language model for preliminary translation to obtain a preliminary translation result.
[0036] Step S103, select the corresponding reflection model according to the target language type. Among them, there are multiple reflection models, which correspond to different language types respectively, and the reflection model is trained based on the translation data of the corresponding language type.
[0037] Step S104, input the preliminary translation result into the reflection model, and the reflection model outputs the corresponding modification suggestions.
[0038] Step S105, modify the preliminary translation result according to the modification suggestions to obtain a translation result with the language style of the target language type.
[0039] The above translation method provided by the embodiments of the present invention creates a call to a large language model for preliminary translation, and calls the corresponding reflection model according to the type of target language to be translated to determine modification suggestions that are more in line with the local language style of the target language type. The preliminary translation result is modified according to the final modification suggestions to obtain a final translation result with the local style of the target language type. The technical effects of improving translation accuracy, reducing translation costs, and achieving a translation result with the local style of the target language type are achieved.
[0040] The execution subject of the above steps can be a translation software or application, which can run on a controller, a server, a processor calculator, or other entities with program running functions.
[0041] The above game development text is the text that is edited by developers into the development file during game development and has a translation requirement. This kind of text is generally marked by special punctuation marks in the source code of the game. The game development text to be translated can be found from the code in the game development text by querying the marking symbols.
[0042] After extracting the game development text, it can be stored separately according to the paragraphs of the development text itself. After selecting the type of target language to be translated, the paragraphs of the game development text that can be translated once are obtained in sequence, and the game development text in the target language type is automatically obtained and automatically translated, improving the translation efficiency of the game development text.
[0043] The above large language model can be a trained large language model, which is an artificial intelligence model based on deep learning technology and has powerful language understanding and generation capabilities. Thus, it can better handle the translation of game development text. The game development text is translated based on the large language model to obtain a preliminary translation result. In order to improve the accuracy of the preliminary translation, more perfect prompt words can be generated from multiple perspectives, and the specific details will be described later.
[0044] Although more accurate and efficient prompt words are considered from multiple aspects, the preliminary translation result is ultimately directly translated by the large language model and generally can only reflect the semantics of the game development text. It cannot consider the different usage styles of the translation result in different countries and regions, and there are certain limitations. Therefore, in this embodiment, after obtaining the preliminary translation result, the corresponding reflection model is selected according to the type of target language, and the corresponding modification suggestions are output according to the reflection model.
[0045] There are multiple reflection models set up as above, and the multiple reflection models correspond to different language types respectively. This is because there are significant differences in grammar and usage habits among different language types. There are not many commonalities in the grammar and language logic of different language types. Therefore, the same reflection model cannot accurately understand the grammar and usage habits of all language types. Therefore, setting corresponding reflection models for different language types can give more accurate and reasonable modification suggestions for the preliminary translation results.
[0046] The reflection model can also be a large language model, which is trained based on the translation data of the corresponding language type. Specifically, it can include some translation examples. The large language model is trained through few-shot learning techniques to obtain the corresponding reflection model.
[0047] It should be noted that considering that there are also differences in different language types in different countries and regions. For example, the usage of English in the United States, the United Kingdom, and India is still different. In order to further improve the pertinence and adaptability of game development texts to users in the release region. In this embodiment, corresponding reflection models can also be set separately for different countries and regions of the same language type.
[0048] Since the reflection model has been trained specifically for the target language type, when the preliminary translation result is input into the reflection model, the corresponding modification suggestions can be output by the reflection model. Then, according to the modification suggestions, the preliminary translation result can be modified to obtain a translation result with the language style of the target language type.
[0049] Specifically, when making modifications, manual modification can be carried out according to the modification suggestions. In order to improve the modification efficiency and accuracy, the preliminary translation result and the above modification suggestions can be input into the large language model for translation above, and the large language model outputs a translation result with the language style of the target language type adjusted according to the modification suggestions.
[0050] Thus, the accuracy of game development text translation is improved, the translation cost is reduced, and the technical effect of a translation result with the local style of the target language type is achieved. It solves the problems in the related art that manual translation of game development texts has low accuracy, high cost, and cannot meet the language style of the target language type.
[0051] As an alternative embodiment, obtaining game development text that needs to be translated into the target language type, including: extracting game development text from the game development file by means of character extraction, where the game development text exists in the game development file in a fixed manner; displaying a translation interface to show a translation input box and translation options, where the translation input box is used to input the game development text that needs to be translated, and the translation options include the mandatory target language type, as well as the optional original language type of the content to be translated and regional information; responding to the operation of the translation interface and receiving the game development text that needs to be translated into the target language type.
[0052] The game development text exists in the game development file in a fixed manner, that is, in the game development file, the game development text usually exists in text form and is marked with special characters. For example, double quotes, square brackets, etc. The game development text can be obtained by means of character extraction, and the above character extraction can be implemented through code.
[0053] After the above game development text is extracted, it can be displayed through a display interface and verified through editing operations and confirmation operations. After the verification and confirmation, translation can be started by sending a translation instruction.
[0054] After entering the translation interface, a translation interface is displayed to show a translation input box and translation options. The translation input box is used to input the game development text that needs to be translated, and the input operation can be a manual operation or an import operation automatically called by a calling program from a corresponding storage location.
[0055] The translation options of the translation interface include the mandatory target language type, as well as the optional original language type of the content to be translated and regional information. It should be noted that the original language type is the language to which the input game development text belongs. It can be selected manually or automatically recognized. After selecting the translation options on the translation interface, respond to the operation of the translation interface and send the game development text that needs to be translated into the target language type and the selected translation options to the execution entity of the above steps for subsequent translation processes.
[0056] As an alternative embodiment, sending the game development text to a large language model for preliminary translation to obtain a preliminary translation result, including: generating a first prompt word according to the information of the original language type and translation options; sending the first prompt word to the large language model for translation to obtain a preliminary translation result; in the case where the translation result indicates that the game development text contains blocked words of the large language model, selecting a backup model for translation; in the case where the translation results of the backup models all indicate that the game development text contains blocked words of the corresponding backup model, obtaining a preliminary translation result by means of blocked word replacement.
[0057] Since large language models process problems and give answers based on natural language processing, in professional translation scenarios, reasonable and effective prompt words need to be provided to enable large language models to give more accurate translation results more stably.
[0058] To this end, when the game development text is sent to the large language model for preliminary translation in this embodiment, a first prompt word is generated according to the information of the source language type and translation options, and the first prompt word is sent to the large language model for translation by the large language model to obtain a preliminary translation result. The generation method and details of the first prompt word will be described later.
[0059] Since large language models have a censorship word mechanism, that is, when a censorship word exists in the prompt word, the corresponding protection mechanism will be triggered and the answer will be refused. In this way, the translation purpose cannot be achieved and the preliminary translation result cannot be obtained.
[0060] To this end, this embodiment adopts two aspects of processing methods to solve the problem of censorship words. On the one hand, when it is detected that the translation result indicates that there is a censorship word of the large language model in the game development text, a backup model is selected for translation. It should be noted that if the large language model does not return a preliminary translation result, it can generally be considered that the censorship word has been triggered. At this time, other large language models need to be selected for translation.
[0061] However, there are some common sensitive words. For example, swear words. Commonly used large language models will censor them, but they may still exist in the conversations of non-player characters (NPCs) in games to enhance character shaping. Therefore, when the translation results of the backup models all indicate that there is a corresponding censorship word of the backup model in the game development text, a preliminary translation result is obtained through the method of censorship word replacement. The principle of censorship word replacement is to replace the censorship word to avoid the censorship mechanism of the large language model.
[0062] As an optional embodiment, according to the language type of the game development text and the information of translation options, the generation of the first prompt word includes: generating corresponding first character setting prompt words and first action setting prompt words through the source language type and the target language type; generating a first additional prompt word according to the translation requirements, where the additional prompt word includes: principle setting prompt word, logical reasoning prompt word, translation constraint prompt word; generating the first prompt word by combining punctuation marks according to the first character setting prompt word, the first action setting prompt word, and the first additional prompt word.
[0063] The above first character setting prompt word is used to indicate that the translation result made by the large language model should start from the corresponding character perspective. The above first action setting prompt word is used to indicate that the large language model performs different actions from the perspective of the set character, and the above first action setting may include translation actions.
[0064] Specifically, the above first role-setting prompt words may include: setting the large language model as a linguistics expert proficient in the source language type and the target language type, specializing in the translation of game background literature. Here, both "proficient" and "specializing" are explicit words in natural language indicating degree or level, and the large language model can clearly understand according to this noun. The first action-setting prompt words include: Please translate the game development text from the source language type into the translation text of the target language type.
[0065] It can be seen from this that both the above first role-setting prompt words and the above first action-setting prompt words need to be determined according to the source language type and the target language type.
[0066] The above first additional prompt words can further limit the prompt words from different angles and principles to improve the large language model's understanding of the first prompt words and improve the accuracy and stability of translation. Specifically, it can include principle-setting prompt words, logical reasoning prompt words, and translation constraint prompt words, which will be elaborated in detail later.
[0067] According to the first role-setting prompt words, the first action-setting prompt words, and the first additional prompt words, combined with punctuation marks, generate the first prompt words. Thus, the accuracy of generating the preliminary translation result using the first prompt words is improved.
[0068] As an optional embodiment, generating the first additional prompt words according to the translation requirements includes: principle-setting prompt words for generating additional prompt words according to the efficiency principle; logical reasoning prompt words for generating additional prompt words according to the translation examples of the target language; translation constraint prompt words for generating additional prompt words according to the translation requirements.
[0069] The above efficiency principle means that the higher the efficiency, the better, and the faster the speed, the better. Generating principle-setting prompt words according to the efficiency principle may include: not providing any explanations or texts other than translations, and / or not translating texts other than game development texts.
[0070] The above generating logical reasoning prompt words according to the translation examples of the target language may include: giving translation examples from the source language type to the target language type, as well as the thinking logic and reasoning process of the translation examples. Here, the thinking logic and reasoning process may include first understanding the semantics of the game development text to be translated, which can be characterized by semantic features; then translating through semantics, and directly translating the entities of the game development text separately, and then connecting the text after semantic translation with the directly translated entities to regressively associate the final preliminary translation result with the text entities.
[0071] The translation idea of accurate translation can be reflected through the thinking logic and reasoning process, making the meaning of the preliminary translation result as accurate and faithful to the original text as possible, smoother and more in line with the target language habits in terms of language, and more elegant and in line with literary beauty in terms of diction.
[0072] The above translation constraint prompt words generated according to the translation requirements may include: considering the degree of style conformity, term professionalism, language fluency, and meaning accuracy based on expert suggestions. Due to the differences in language types and expression habits, it is often impossible to balance different aspects after translation. The translation that better meets the requirements can be selected according to the specific translation requirements of the game development text. Furthermore, the preliminary translation result can respond to the translation requirements more accurately.
[0073] It should be noted that the expert suggestions here can also be clearly understood by the large language model, which are translation requirements put forward for the large language model based on the above role settings.
[0074] According to the principle of the first role setting prompt word, the first action setting prompt word, the first additional prompt word, the logical reasoning prompt word, and the translation constraint prompt word, combined with punctuation marks, generate the first prompt word.
[0075] Thus, using the first prompt word, the role of the large language model can be set, and the translation of the set action can be carried out from the perspective of the set role. During the translation process, the set principles, translation logic, and translation constraints are considered, so that the preliminary translation result has higher accuracy and applicability.
[0076] As an optional embodiment, the preliminary translation result is obtained by means of blocked word replacement, including: determining the blocked words of the large language model by replacing text entities in the game development text one by one; determining the part of speech and context of the blocked words, and determining the replacement words corresponding to the blocked words, where the replacement words have the same part of speech as the blocked words and can be directly replaced in the context; replacing the blocked words in the game development text with the replacement words to modify the first prompt word; inputting the modified first prompt word into the large language model to obtain the replacement translation result; and replacing the translation of the replacement words in the replacement translation result with the translation of the corresponding blocked words in the target language type of the blocked words to obtain the preliminary translation result.
[0077] When obtaining the preliminary translation result by means of blocked word replacement, first determine the blocked words of the large language model by replacing text entities in the game development text one by one. This is because triggering the blocked words will cause the reply of the large language model not to belong to the preliminary translation result that should be obtained. By replacing text entities in the game development text one by one, including nouns, verbs, subjects, predicates, objects, etc., to determine the blocked words targeted by the large language model.
[0078] After obtaining the blocked words, determine whether they are nouns, verbs, or other parts of speech based on their parts of speech. Also, determine the connection between the blocked words and the context, and whether there is an association with the semantics of the context. Based on the above-mentioned parts of speech of the blocked words and the context, determine the replacement words corresponding to the blocked words. The replacement words have the same part of speech as the blocked words and can be directly replaced in the context.
[0079] For example, "eat bananas" is a typical predicate-object structure. At this time, the association between the object and the predicate is not close. If "bananas" is a blocked word, when replacing it, only consider replacing it with a noun that can be used with "eat", such as "eat apples". Another example is "very happy to play". This is a verb combined with an adverb of degree and an adjective. Especially when an adverb and an adjective are used together, the association is relatively strong. If "happy" is a blocked word, when replacing it at this time, it is necessary to consider the whole. It not only needs to be associated with "very" above, but also needs to be associated with the verb "play", and the semantics after replacement should not change significantly. For example, "very glad to play".
[0080] After confirming the blocked words and the replacement words, replace the blocked words in the game development text according to the replacement words, thereby modifying the game development text, and then modifying the first prompt word through the modified game development text.
[0081] Then input the modified first prompt word into the large language model to obtain the replacement translation result. Then, according to the translation of the blocked words in the target language type, replace the translation of the replacement words in the target language type in the replacement translation result with the translation of the corresponding blocked words in the target language type to obtain the preliminary translation result. Thus, the preliminary translation result is obtained by the method of replacing the blocked words. Effectively avoid the blocked word mechanism of the large language model.
[0082] As an optional embodiment, before determining the corresponding reflection model according to the language type of the target language, the method further includes: obtaining multiple different large language models as candidate reflection models; testing the candidate reflection models through standard translation data of different language types of the same development text; selecting the reflection models corresponding to different language types according to the test results; training the corresponding reflection models through training data of different language types to obtain reflection models familiar with the language style, where the training data is game development text with language styles from different regions in the corresponding language type.
[0083] The above-mentioned candidate reflection models can be multiple large language models for open source use. Due to differences in training methods, training data, or the models themselves, different large language models have different reflection effects on different language types. Therefore, in this embodiment, when determining the reflection models corresponding to each language type, through testing, the models with better reflection effects for each language type are determined to improve the reflection effect of the preliminary translation results, that is, the accuracy of the above-mentioned modification suggestions.
[0084] First, obtain multiple different large language models as candidate reflection models. To reflect the comparison effect, use the standard translation data of different language types of the same development text to test the candidate reflection models. The above-mentioned standard translation data can be the text translated by professional translators and modified according to the suggestions of native speakers of the corresponding language type.
[0085] Obtain the modification suggestions of different reflection models, and have the corresponding native speakers evaluate according to the modification suggestions to obtain the test results, so as to select the reflection models corresponding to different language types according to the test results.
[0086] After obtaining the reflection models with better performance, the corresponding reflection models can also be trained with the training data of different language types to obtain reflection models familiar with the language style. Among them, the training data is the game development text with the language styles of different regions corresponding to the language type. Thus, the reflection models have better translation performance in the field of game development text, and further make the modification suggestions output by the reflection models more reasonable and accurate.
[0087] As an alternative embodiment, input the preliminary translation result into the reflection model, and the reflection model outputs the corresponding modification suggestions, including: in the case where the translation option includes optional information, generate a second prompt word according to the region information and the language type; input the second prompt word and the preliminary translation result into the reflection model corresponding to the target language type, and the reflection model outputs the corresponding modification opinion; in the case where the translation option does not include optional information, generate a third prompt word according to the language type; input the third prompt word and the preliminary translation result into the enhanced reflection model corresponding to the reflection model, and the enhanced reflection model outputs the corresponding modification opinion, where the enhanced reflection model is obtained by training the reflection model with the translation example data of the region information.
[0088] Since the translation option includes optional country and region information, there is a more precise requirement for the modification suggestions. In the case where the translation option includes region information, generate a second prompt word according to the region information and the language type; input the second prompt word and the preliminary translation result into the reflection model corresponding to the target language type, and the reflection model outputs the corresponding modification opinion. The detailed content of the second prompt word will be described later.
[0089] When the translation option does not include regional information, generate a third prompt word according to the language type; input the third prompt word and the preliminary translation result into the enhanced reflection model of the corresponding reflection model, and the enhanced reflection model outputs the corresponding modification opinions.
[0090] The above enhanced reflection model is obtained by training the reflection model with translation example data of regional information. That is to say, after the reflection model is trained, it can also be trained for the translation examples of this regional information, so that the enhanced reflection model has better translation performance for this regional information.
[0091] As an optional embodiment, generate a second prompt word according to the regional information and the language type, or generate a third prompt word according to the language type, including: generate the corresponding second role setting prompt word and the second action setting prompt word through the regional information, the source language type and the target language type; or, generate the corresponding third role setting prompt word and the third action setting prompt word through the source language type and the target language type; generate a second additional prompt word according to the modification requirements, where the second additional prompt word includes: principle setting prompt word, logical reasoning prompt word, translation constraint prompt word, and logical constraint prompt word, and the logical constraint prompt word is generated according to the principle of logical consistency; generate the second prompt word according to the second role setting prompt word, the second action setting prompt word, and the corresponding second additional prompt word, combined with punctuation marks, or generate the third prompt word according to the third role setting prompt word, the third action setting prompt word, and the corresponding second additional prompt word, combined with punctuation marks.
[0092] The above generation of the second prompt word according to the regional information and the language type may include: generating the second role setting prompt word and the second action setting prompt word through the regional information, the source language type and the target language type. The second role setting prompt word is similar to the first role setting prompt word, and may include: setting the large language model as a linguistics expert proficient in the source language type and the target language type, specializing in translation proofreading in the field of game background literature.
[0093] The second action setting prompt word may include: Please proofread the text before and after the translation of the game development text from a professional perspective and give modification suggestions that are more in line with the language style of the regional information.
[0094] The principle setting prompt word of the corresponding second additional prompt word may generate the principle setting prompt word according to the efficiency principle, where the principle setting prompt word includes: providing explanations and usage methods of the modification suggestions, and / or not translating translations other than game development texts.
[0095] The logical reasoning prompt words for the corresponding second additional prompt words can generate logical reasoning prompt words based on the proofreading examples in the target language. Among them, the logical reasoning prompt words include: providing proofreading examples translated from the source language type to the target language type, as well as the thinking logic and reasoning process of the proofreading examples.
[0096] The translation constraint prompt words for the corresponding second additional prompt words can generate translation constraint prompt words according to translation requirements. Among them, the translation constraint prompt words include: requirements for ensuring the degree of style compliance, term professionalism, language fluency, and meaning accuracy based on expert suggestions.
[0097] It should be noted that the translation constraint prompt words can make the large language model pay more attention to certain aspects or several aspects of the translation result. Combining the corresponding role setting prompt words, action setting prompt words, and additional prompt words can enable the large language model to better give more reasonable and accurate modification suggestions.
[0098] The logical constraint prompt words for the corresponding second additional prompt words can generate corresponding logical constraint prompt words according to the principle of logical consistency. Among them, the logical constraint prompt words include: each suggestion should be checked to see if the modified translation is accurate and reasonable after modification.
[0099] Then, according to the principle setting prompt words, logical reasoning prompt words, translation constraint prompt words, and logical constraint prompt words of the second role setting prompt words, second action setting prompt words, and second additional prompt words, combined with punctuation marks, generate the second prompt words.
[0100] The above-mentioned generation of the third prompt words according to the language type can include: generating a third role setting prompt word and a third action setting prompt word through the source language type and the target language type. The third role setting prompt word can include: setting the large language model as a linguistics expert proficient in the source language type and the target language type, specializing in the translation and proofreading of game background literature.
[0101] The third action setting prompt word can include: please proofread the text before and after the translation of the game development text from a professional perspective and give modification suggestions that are more in line with the most common language style corresponding to the target language type.
[0102] The principle setting prompt words for the corresponding second additional prompt words can generate principle setting prompt words according to the efficiency principle. Among them, the principle setting prompt words include: providing explanations and usage methods of the modification suggestions, and / or not translating anything other than the game development text.
[0103] The logical reasoning prompt words for the corresponding second additional prompt words can generate logical reasoning prompt words based on the proofreading examples in the target language. Among them, the logical reasoning prompt words include: providing proofreading examples for translating from the original language type to the target language type, as well as the thinking logic and reasoning process of the proofreading examples.
[0104] The translation constraint prompt words for the corresponding second additional prompt words can generate translation constraint prompt words according to translation requirements. Among them, the translation constraint prompt words include: requirements for ensuring style compliance, term professionalism, language fluency, and meaning accuracy based on expert advice.
[0105] The logical constraint prompt words for the corresponding second additional prompt words can generate corresponding logical constraint prompt words according to the principle of logical consistency. Among them, the logical constraint prompt words include: each suggestion should be modified and then check whether the modified translation is accurate and reasonable.
[0106] Then, according to the third role setting prompt words, the third action setting prompt words, the principle setting prompt words, the logical reasoning prompt words, the translation constraint prompt words, and the logical constraint prompt words of the second additional prompt words, combined with punctuation marks, generate the third prompt words.
[0107] In the generation of the second prompt words and the third prompt words, the content and generation methods included in the second additional prompt words can be the same, and the corresponding additional prompt words finally obtained can also be the same.
[0108] As an optional embodiment, according to the modification suggestions, modify the preliminary translation result to obtain a translation result with the language style of the target language type, including: generating corresponding fourth prompt words through the original language type, the target language type, and the modification suggestions; inputting the fourth prompt words into the large language model, and the large language model outputs the translation result modified according to the modification suggestions.
[0109] The above-mentioned generation of corresponding fourth prompt words through the original language type, the target language type, and the modification suggestions can include: generating a fourth role setting prompt word and a fourth action setting prompt word through the original language type and the target language type. Among them, the fourth role setting prompt word includes: setting the large language model as a linguistics expert proficient in the original language type and the target language type, specializing in translation proofreading in the field of game background literature. The fourth action setting prompt word includes: please modify the preliminary translation result from a professional perspective according to the text before and after the game development text translation and the modification suggestions to obtain the modified translation result.
[0110] It is also possible to generate third additional prompt words, specifically including: generating principle setting prompt words according to the efficiency principle. Among them, the principle setting prompt words include: do not provide any explanations or texts other than translations, and / or do not translate texts other than game development texts.
[0111] Generate logical reasoning prompt words according to the modification examples in the target language. Among them, the logical reasoning prompt words include: providing modification examples for translating from the source language type to the target language type.
[0112] Generate translation constraint prompt words according to the translation requirements. Among them, the translation constraint prompt words include: ensuring the style compliance degree, term professionalism, language fluency, and meaning accuracy requirements based on expert suggestions.
[0113] Generate the fourth prompt word by combining the role setting prompt word, action setting prompt word, principle setting prompt word, principle setting prompt word, and translation constraint prompt word, together with punctuation marks.
[0114] Finally, input the fourth prompt word into the large language model, and the large language model will output the corresponding translation result. Compared with the manual modification method, it is more efficient and accurate.
[0115] It should be noted that this embodiment also provides an alternative implementation method, which specifically relates to an example of the above translation method for game development texts based on the artificial intelligence large language model in actual application. The following will explain this implementation method in detail.
[0116] The translation combined with the large language model in this embodiment can reduce the translation cost and improve the translation speed. Using the established dedicated term knowledge base can also improve the text consistency and further improve the text quality of the game.
[0117] The specific basic process is as follows: 1. Use the large language model to perform a preliminary translation of the game development text: Select the source language type and the target language type and input the game development text to be translated. The country and region are optional inputs, and their function is to consider the local spoken style expression during translation.
[0118] Figure 2 It is a schematic diagram of the translation interface of the embodiment of the present invention. As Figure 2 shown, splice the input game development text and other parameters to generate the first prompt word, and input the first prompt word into the large language model for translation. This first prompt word enables the large language model to translate the game development text, and only the translation result is returned after translation, so that subsequent steps can process the returned text without additional processing, making the operation smoother.
[0119] Specifically, the first prompt word can include: You are an expert proficient in linguistics, specializing in the translation of game background literature, and mainly good at translating from [source language type] to [target language type]. This is equivalent to the role setting prompt word.
[0120] This is a game development text [specific content]. Please provide the translation result of the game development text from [source language] to [target language]. This is equivalent to the prompt word for the first action setting.
[0121] Do not provide any explanation or text other than the translation of the game development text. This is equivalent to the principle setting prompt in the first additional prompt.
[0122] It should be noted that the first prompt words also include logical reasoning prompt words, translation constraint prompt words, etc., which are not shown in the attached drawings due to the length of the content.
[0123] Logical reasoning prompt words can be generated by professional translators by combining translation examples of the target language with the logical order of translation. For example, for a translation example: Game development text: Richard the Lionheart is one of the leaders of the Prairie Kingdom. His formidable combat prowess is enough to deter any aggressor. Directly translated into English: "Richard the Lionheart is one of the leaders of the Prairie Kingdom. His formidable combat prowess is enough to deter any aggressor."
[0124] First, we need to consider the physical translation in the game development text: the idiom “避其锋猛” is literally translated as “to deter any aggressor”, which loses the “sharp edge” image; it can be changed to “made any would-be invader think twice before crossing swords with him” or “…shy away from facing his blade”, etc., which are closer to the “sharp edge” and spoken style of the original sentence.
[0125] After the initial selection of translations for all entities, the language structure is determined. Considering that the semantics is historical narrative and the subject is the same, the language structure for the game text is "main clause past tense, + attributive clause". Based on the language structure, the expression of English translation is selected, and the result is: "Richard the Lionheart was one of the leaders of the Prairie Kingdom, whose formidable combat prowess is enough to deter any aggressor.".
[0126] Based on the consideration of language style and regional characteristics, "Prairie" easily reminds English readers of the North American prairie. "Steppe Kingdom" or "Grassland Kingdom" can be used to better fit the image of the Eurasian steppe and have a more epic feel. "One of the leaders" is a bit bland, so it can be changed to "a leading figure of the Steppe Kingdom" or "one of the realm's foremost leaders" to highlight the status. "Formidable combat prowess" is semantically correct but more formal. "Fearsome skill in battle" or "Fearsome fighting prowess" can be used to be more colloquial and in line with the European epic sense.
[0127] The above translation is thus corrected to: "Richard the Lionheart was a leading figure of the Prairie Kingdom, whose fearsome skill in battle made any would-be invader think twice before crossing swords with him."
[0128] The purpose of translation constraint prompts is to prevent the large language model from focusing more on expression and ignoring the entities in the original game development text during complex logical thinking. In some instances, after the large language model translates according to complex logic, although the semantics are more accurate and the style is more appropriate, the entities in the translation result become fewer and difficult to correspond to the original Chinese game development text. This may lead to deviation from the scope of translation, and the result may be more like a paraphrase in a different language.
[0129] In order to avoid the above problems, translation constraints can be added to the prompt words. For example, the translation results must have translation results of entities such as "避其锋茫", "草原王国", and "司令部". Of course, this is a negative constraint. Some positive constraints can also be set, for example, based on expert suggestions, considering the degree of style conformity, terminology professionalism, fluency of language, and accuracy of meaning.
[0130] The large language model will think according to the prompt words. Therefore, adding tendency prompts to the prompt words will also affect the thinking and processing of the large language model, and ultimately output a preliminary translation result that better meets the requirements.
[0131] The above large language model can be a GPT (Generative Pre-trained Transformer) model. Due to the censorship rules of the GPT model, the text in the game may be judged as unsafe. Therefore, when the initial translation result is blocked, another alternative translator will be called. The alternative translator can be other large language models, and multiple alternative large language models are used in sequence. The serial numbers 1, 2, and 3 of the code execution are necessary parameters for generating a call request to call the alternative translator to translate the game development text and obtain the above translation result.
[0132] If the alternative translator can translate the preliminary translation result, there is no need to use the method of replacing censorship words for translation. If all alternative translators are blocked, which is an extreme case, the method of replacing censorship words can be used for translation to obtain the above preliminary translation result.
[0133] 2. Use the large language model to think in combination with the original text of the game development text and the translation of the preliminary translation result, and give modification suggestions: Figure 3 It is a schematic diagram of selecting a reflection model according to the target language type in the embodiment of the present invention. As Figure 3 shown, after obtaining the initial translation result, it will be processed separately according to the target language type of the translation. Different language types will call different reflection large language models to think and put forward modification suggestions. The basis for selecting reflection models of different language types is to test through the same game development text and preliminary translation result, compare the modification suggestions of various large language models, and comprehensively judge to determine a large language model that is more suitable for the target language type as the corresponding reflection model.
[0134] In this embodiment, only Japanese, Korean, and others are distinguished. Others mainly apply to English, which is considered because most languages are homologous or similar to English, such as German, Spanish, Italian, French, etc. Moreover, it is mainly considered that there are only translation requirements for Japanese, Korean, and English in the game development text in this embodiment. In other embodiments, corresponding reflection models can be set separately for different language types, and the method and principle are the same as those of Japanese and Korean.
[0135] Taking English as an example, for quality analysis of the initial translation and putting forward modification suggestions, the gpt-o1 model can be used. If the option of country / region is set before the initial translation, variables will be added to the second prompt word in this step. Figure 4 It is a schematic diagram of the usage process of the reflection model with regional information in the embodiment of the present invention. As Figure 4 shown, the second prompt word with added country / region information can include:
[0136] Your task is to carefully read a source text and a translation from [source language] to [target language], and then give constructive criticism and useful suggestions to improve the translation. The translation style and tone should match the colloquial style of [language] in [country]. This is equivalent to the second action setting prompt.
[0137] The other parts of the above second prompt are similar to those of the first prompt. Even to improve efficiency and reduce the burden of data preparation, in translation examples, logical processes, or some constraints and principles can be kept consistent, as long as some expressions are adjusted to adapt to the scenario of the second prompt.
[0138] If there is no option to set country / region information before the initial translation, the third prompt will be generated based on the language type at this step. Figure 5 It is a schematic diagram of the usage process of the reflection model without regional information in the embodiments of the present invention, as Figure 5 shown. The third prompt without adding country / region can include:
[0139] Your task is to carefully read a source text and a translation from [source language] to [target language], and then give constructive criticism and useful suggestions to improve the translation. This is equivalent to the third action setting prompt.
[0140] The other parts of the above third prompt are similar to those of the first prompt.
[0141] 3. Optimize the quality of the translation according to the obtained modification suggestions: Figure 6 It is a schematic diagram of optimizing the preliminary translation result according to the modification opinions in the embodiments of the present invention, as Figure 6 shown. Splice the original game development text, the translation of the preliminary translation result, and the modification suggestions into the fourth prompt and submit them to the large language model for optimized translation to further improve the translation quality. Finally, obtain a translation result with the usage style of the target language or target region.
[0142] These game development texts are all character dialogues, skill descriptions, task introductions, etc. written by developers in game development files and will be presented in various parts of the game.
[0143] The translated texts are all written in advance by developers and will appear in various places in the game that require text descriptions. For example, the following three examples.
[0144] Example 1: The original text before translation: Richard the Lionheart (fictional character) is one of the leaders of the Grassland Kingdom. His powerful combat power is sufficient to make any invader avoid his edge. Thanks to Richard's ability to turn the tide, the Grassland Kingdom has continued for another century.
[0145] Original translation: "Richard the Lionheart is one of the leaders of the Prairie Kingdom. His formidable combat prowess is enough to deter any aggressor. Thanks to Richard's decisive actions, the Prairie Kingdom has endured foranother century.".
[0146] Optimization suggestions: 1. Tense selection: The original text is a historical narrative, and the past tense is more appropriate. Change "Richard the Lionheart is ..." to "Richard the Lionheart was ...".
[0147] 2. Proper nouns and cultural images: "Prairie" easily reminds English readers of the North American prairie. "Steppe Kingdom" or "Grassland Kingdom" are more in line with the image of the Eurasian steppe and have a more epic feel.
[0148] 3. Identity expression: “one of the leaders” is a bit bland and can be changed to “a leading figure of the Steppe Kingdom” or “one of the realm's foremost leaders” to highlight the status.
[0149] 4. Expression of combat prowess: “formidable combat prowess” is semantically correct but rather formal. You can use “fearsome skill in battle” or “fearsome fighting prowess” which are more colloquial and in line with the European epic language.
[0150] 5. Translate the idiom “避其锋猛”: The literal translation “to deter any aggressor” loses the “sharp edge” image; it can be changed to “made any would-be invader think twice before crossing swords with him” or “…shy away from facing his blade”, etc., which are closer to the “sharp edge” and spoken style of the original sentence.
[0151] 6. Translate the idiom “力翻狂浪”: It is recommended to replace “decisive actions” with “turn the tide” or “stem the tide”, which not only retains the meaning of the idiom but also is easy to understand.
[0152] 7. Sentence connection and rhythm: The last two sentences can be combined to improve fluency: "So fearsome was his skill in battle that any would-be invader thought twice, and by turning the tide in countless clashes, Richard kept the Steppe Kingdom alive for another century.".
[0153] 8. Detailed vocabulary: Replacing “endured” with “survived” or “thrived for anothercentury” can add an epic flavor; pay attention to the natural connection with the previous sentence.
[0154] According to the above modifications, the translation not only accurately reflects the meaning of the idiom, but also presents a more colloquial European epic style.
[0155] Final translation: "Richard the Lionheart was a leading figure of the Steppe Kingdom, whose fearsome skill in battle made any would-be invader think twicebefore crossing swords with him. By turning the tide at critical moments,Richard ensured that the Steppe Kingdom thrived for another century."
[0156] Example 2: Original text before translation: After a city is upgraded to level 4, an additional urban area of the same type can be built. However, the same ancillary buildings cannot be built in a city circle.
[0157] Initial translation: "After a city's level is upgraded to level four, anadditional district of the same type can be constructed, but identical subsidiary buildings cannot be built within the same city cluster. ".
[0158] Optimization suggestions: 1. "After a city's level is upgraded to level four" is too cumbersome and can be changed to "Once a city reaches level four", which is more colloquial and concise.
[0159] 2. “an additional district of the same type” does not reflect the meaning of “already existing”. It is suggested to change it to “one more district of an already existing type” to faithfully express “building an additional district of the same type”.
[0160] 3. "Subsidiary buildings" is not authentic enough and does not accurately correspond to the "subsidiary buildings" in the game context. It can be replaced by "supporting buildings" or "auxiliary structures".
[0161] 4. "City cluster" is not a common game term and can easily cause ambiguity; "city radius" or "cityarea" is closer to the meaning of "city circle".
[0162] 5. The exclusivity of “cannot build identical supporting buildings” needs to be emphasized. This can be achieved by adding “at the same time” at the end of the sentence or by using “no two identical … can be built”, for example: “but no two identical supporting buildings can be built within the same city radius.”.
[0163] 6. Adjust the overall word order to make the logic of the two parallel conditions clearer: first say buildable, then emphasize the restrictions.
[0164] Final translation: "Once a city reaches level four, you may build one more district of an already existing type, but no two identical supporting buildings can be constructed within the same city radius. ".
[0165] Example 3: Original text before translation: Thank you for your generous assistance. May the friendship between us last forever. My people and I will always remember your selfless help! Initial translation: "Thank you for your generous assistance. May the friendship between us last forever. My people and I will always remember your selfless help! ".
[0166] Optimization suggestions: 1. More colloquial tone: Change the first sentence to "Thank you so much for your generous help", using "so much" to make the gratitude more natural and with a stronger European colloquial feel.
[0167] 2. Remove repeated words: Although "assistance / help" are near-synonymous loops in Chinese, translating them separately as "assistance / help" in English would seem repetitive. They can be unified as "help" or "support".
[0168] 3. Make the wish sentence more idiomatic: Replace "May the friendship between us last forever." with "Here’s to a friendship that lasts!" or "Here’s to our enduring friendship." which is more in line with the toast and wish usage in European colloquial language.
[0169] 4. Balance formality and colloquialism: If keeping the "May …" structure, change "between us" to "between our peoples" to echo the later text, and at the same time change "forever" to "for many years to come" to avoid exaggeration.
[0170] 5. Third sentence order and verb choice: Change "My people and I will always remember yourselfless help!" to "My people and I will never forget your selfless support!". "Never forget" is more natural than "always remember", and "support" is consistent with the previous "help" / "support".
[0171] 6. Punctuation and coherence: Combine the three sentences into two, using commas or semicolons to enhance coherence. For example: "Thank you so much for your generous help; here’s to a friendship that lasts! My people and I will never forget your selfless support."
[0172] 7. Keep the exclamation mark: The original Chinese text ends with an exclamation sentence. An exclamation mark can be retained at the end of the English translation to emphasize the emotion, but avoid using it in every sentence.
[0173] Final translation: "Thank you so much for your generous help; here's to our enduring friendship! My people and I will never forget your selfless support."
[0174] In summary, the optimized translation is more concise, with more accurate word usage, and is more consistent and fluent in tone and grammatical structure compared to the original text. Moreover, it better fits the regional background and language style.
[0175] Using a large language model for translation in this embodiment can effectively reduce costs, greatly speed up the translation process, maintain the consistency of language style and terminology throughout the project, and continuously improve the translation quality through continuous learning and updating.
[0176] Based on the above translation method for game development texts based on an artificial intelligence large language model provided by the embodiments of the present invention, the embodiments of the present invention also provide a translation device for game development texts based on an artificial intelligence large language model, which is applied to the translation of game development texts. The device includes:
[0177] An acquisition module for acquiring game development texts that need to be translated into the target language types;
[0178] A preliminary translation module connected to the above acquisition module for sending the game development texts to a large language model for preliminary translation to obtain a preliminary translation result;
[0179] A selection module connected to the above preliminary translation module for selecting a corresponding reflection model according to the target language type. Among them, there are multiple reflection models, each corresponding to a different language type, and the reflection models are trained based on the translation data of the corresponding language types;
[0180] A reflection module connected to the above selection module for inputting the preliminary translation result into the reflection model, and the reflection model outputs corresponding modification suggestions;
[0181] A modification module connected to the above reflection module for modifying the preliminary translation result according to the modification suggestions to obtain a translation result with the language style of the target language type.
[0182] The above translation device provided by the embodiments of the present invention creates calls a large language model for preliminary translation, and calls a corresponding reflection model according to the target language type to be translated, determines modification suggestions that are more in line with the local language style of the target language type, and modifies the preliminary translation result according to the final modification suggestions to obtain a final translation result with the local style of the target language type. It achieves the technical effects of improving translation accuracy, reducing translation costs, and realizing a translation result with the local style of the target language type.
[0183] The embodiments of the present invention also provide a non-transitory machine-readable medium storing a computer program, wherein the above computer program, when executed by a processor of a computer, is used to cause the computer to execute the method of the embodiments of the present invention.
[0184] The embodiments of the present invention also provide a computer program product, including a computer program, wherein the computer program, when executed by a processor of a computer, is used to cause the computer to execute the method of the embodiments of the present invention.
[0185] The embodiments of the present invention also provide an electronic device, including: at least one processor; and a memory communicatively connected to the at least one processor. The above memory stores a computer program capable of being executed by the at least one processor, and the above computer program, when executed by the at least one processor, is used to cause the electronic device to execute the method of the embodiments of the present invention.
[0186] Reference Figure 7, the structural block diagram of an electronic device, which can be a server or a client and can be an example of a hardware device applicable to various aspects of the present invention, will now be described. The electronic device is intended to represent various forms of digital electronic computer devices, such as, laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as, personal digital processors, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or claimed herein.
[0187] As Figure 7 shown, the electronic device includes a computing unit 701, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 702 or a computer program loaded from a storage unit 708 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the electronic device can also be stored. The computing unit 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0188] Multiple components in the electronic device are connected to the I / O interface 705, including: an input unit 706, an output unit 707, a storage unit 708, and a communication unit 709. The input unit 706 can be any type of device capable of inputting information into the electronic device. The input unit 706 can receive input digital or character information and generate key signal inputs related to the user settings and / or function controls of the electronic device. The output unit 707 can be any type of device capable of presenting information and can include, but is not limited to, a display, a speaker, a video / audio output terminal, a vibrator, and / or a printer. The storage unit 708 can include, but is not limited to, magnetic disks and optical disks. The communication unit 709 allows the electronic device to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks and can include, but is not limited to, a modem, a network card, an infrared communication device, and / or a wireless communication transceiver, such as a Bluetooth device, a WiFi device, a WiMax device, a cellular communication device, and / or the like.
[0189] The computing unit 701 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 701 include, but are not limited to, a CPU, a graphics processing unit (GPU), various special artificial intelligence (AI) computing units, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 701 executes the various methods and processes described above. For example, in some embodiments, the method embodiments of the present invention can be implemented as a computer program tangibly embodied in a machine-readable medium, such as the storage unit 708. In some embodiments, part or all of the computer program can be loaded and / or installed onto the electronic device via the ROM 702 and / or the communication unit 709. In some embodiments, the computing unit 701 can be configured to execute the above methods in any other suitable manner (e.g., by means of firmware).
[0190] The computer program for implementing the method of the embodiments of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing devices, such that when the computer programs are executed by the processor or controller, the functions / operations specified in the flowchart and / or block diagram are implemented. The computer programs can be executed entirely on the machine, partially on the machine, as an independent software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0191] In the context of the embodiments of the present invention, the machine-readable medium can be a tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. The machine-readable signal medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, or infrared system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of the machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0192] It should be noted that the term "including" and its variants used in the embodiments of the present invention are open-ended, that is, "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The modifications of "one" and "a plurality" mentioned in the embodiments of the present invention are illustrative rather than restrictive. Those skilled in the art should understand that unless clearly stated otherwise in the context, it should be understood as "one or more".
[0193] The user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the embodiments of the present invention are all information and data authorized by the user or fully authorized by all parties. And the collection, use and processing of relevant data need to comply with the relevant laws, regulations and standards of relevant countries and regions, and corresponding operation entrances are provided for users to choose to authorize or refuse.
[0194] The various steps described in the method embodiments provided by the embodiments of the present invention can be executed in different orders and / or executed in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The protection scope of the present invention is not limited in this regard.
[0195] The term "embodiment" in this specification means that the specific features, structures or characteristics described in connection with the embodiment may be included in at least one embodiment of the present invention. The phrase appears in various positions in the specification does not necessarily mean the same embodiment, nor does it mean being independent or alternative to other embodiments and mutually exclusive. The various embodiments in this specification are all described in a related manner, and the same or similar parts between the various embodiments are referred to each other. In particular, for device, equipment, and system embodiments, since they are basically similar to method embodiments, the description is relatively simple, and the relevant parts refer to the partial description of the method embodiments.
[0196] The above-described embodiments only represent several implementation manners of the present invention, and the description is relatively specific and detailed, but it should not be construed as a limitation on the protection scope. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present invention, several deformations and improvements can still be made, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the present invention should be subject to the appended claims.
Claims
1. A translation method for game development texts based on artificial intelligence large language models, characterized in that, Including: Obtain game development text that needs to be translated into the target language type; Send the game development text to a large language model for preliminary translation to obtain a preliminary translation result; According to the target language type, select the corresponding reflection model. Among them, there are multiple reflection models, each corresponding to a different language type, and the reflection model is trained based on translation data of the corresponding language type; Input the preliminary translation result into the reflection model, and the reflection model outputs corresponding modification suggestions; Modify the preliminary translation result according to the modification suggestions to obtain a translation result with the language style of the target language type.
2. The method according to claim 1, characterized in that, Obtain game development text that needs to be translated into the target language, including: Extract the game development text from the game development file by character extraction. Among them, the game development text exists in the game development file in a fixed manner; Display a translation interface to show a translation input box and translation options. Among them, the translation input box is used to input game development text that needs to be translated, and the translation options include the mandatory target language type, as well as the optional original language type and regional information of the content to be translated; Respond to the operation of the translation interface and receive game development text that needs to be translated into the target language.
3. The method according to claim 2, wherein Send the game development text to a large language model for preliminary translation to obtain a preliminary translation result, including: Generate a first prompt word according to the original language type and the information of the translation options; Send the first prompt word to the large language model, and the large language model performs translation to obtain a preliminary translation result; When it is detected that the translation result indicates that the game development text contains blocked words of the large language model, select a backup model for translation; When the translation results of the backup models all indicate that the game development text contains blocked words corresponding to the backup models, obtain the preliminary translation result by means of blocked word replacement.
4. The method according to claim 3, wherein Generate a first prompt word according to the language type of the game development text and the information of the translation options, including: Generate corresponding first character setting prompt words and first action setting prompt words through the original language type and the target language type; Generate a first additional prompt word according to the translation requirements. Among them, the first additional prompt word includes: principle setting prompt word, logical reasoning prompt word, translation constraint prompt word; Generate the first prompt word by combining the first character setting prompt word, the first action setting prompt word, and the first additional prompt word with punctuation marks.
5. The method according to claim 4, characterized in that, Generate a first additional prompt word according to the translation requirements, including: Generate a principle setting prompt word for the additional prompt word according to the efficiency principle; Generate a logical reasoning prompt word for the additional prompt word according to the translation examples of the target language; Generate a translation constraint prompt word for the additional prompt word according to the translation requirements.
6. The method according to claim 3, wherein Obtain the preliminary translation result by means of blocked word replacement, including: Determine the blocked words of the large language model by replacing text entities in the game development text one by one; Determine the part of speech and context of the blocked word, and determine the replacement word corresponding to the blocked word, where the replacement word has the same part of speech as the blocked word and can be directly replaced in the context; Replace the blocked word in the game development text according to the replacement word to modify the first prompt; Input the modified first prompt into the large language model to obtain a replacement translation result; According to the translation of the blocked word in the target language type, replace the translation of the replacement word in the target language type in the replacement translation result with the translation of the corresponding blocked word in the target language type to obtain the preliminary translation result.
7. The method according to claim 1, characterized in that, Before determining the corresponding reflection model according to the language type of the target language, the method further includes: Obtain multiple different large language models as candidate reflection models; Test the candidate reflection models through standard translation data of different language types of the same development text; Select reflection models corresponding to different language types according to the test results; Train the corresponding reflection models through training data of different language types to obtain reflection models familiar with the language style, where the training data is game development text with language styles from different regions corresponding to the language type.
8. The method according to claim 2, wherein Input the preliminary translation result into the reflection model, and the reflection model outputs corresponding modification suggestions, including: When the translation option includes regional information, generate a second prompt according to the regional information and the language type; Input the second prompt and the preliminary translation result into the reflection model corresponding to the target language type, and the reflection model outputs corresponding modification opinions; When the translation option does not include regional information, generate a third prompt according to the language type; Input the third prompt and the preliminary translation result into the enhanced reflection model corresponding to the corresponding reflection model, and the enhanced reflection model outputs corresponding modification opinions, where the enhanced reflection model is obtained by training the reflection model with translation example data of the regional information.
9. The method according to claim 8, characterized in that Generating a second prompt according to the regional information and the language type, or generating a third prompt according to the language type, includes: Generate corresponding second character setting prompts and second action setting prompts through the regional information, the source language type and the target language type; or, generate corresponding third character setting prompts and third action setting prompts through the source language type and the target language type; Generate a second additional prompt according to the modification requirement, where the second additional prompt includes: principle setting prompt, logical reasoning prompt, translation constraint prompt, and logical constraint prompt, and the logical constraint prompt is generated according to the principle of logical consistency; Generate the second prompt according to the second character setting prompt, the second action setting prompt, and the corresponding second additional prompt, combined with punctuation marks, or generate the third prompt according to the third character setting prompt, the third action setting prompt, and the corresponding second additional prompt, combined with punctuation marks.
10. The method according to any one of claims 1 to 9, characterized in that, Modify the preliminary translation result according to the modification suggestions to obtain a translation result with the language style of the target language type, including: Generate a corresponding fourth prompt word through the target language type, the original language type before translation, and the modification suggestions; Input the fourth prompt word into the large language model, and the large language model outputs the translation result modified according to the modification suggestions.
11. An electronic device, comprising: A processor and a memory storing a program, wherein the program includes instructions that, when executed by the processor, cause the processor to execute the method according to any one of claims 1 to 10.
Citation Information
Patent Citations
Localization test inspection method and device, electronic equipment and readable storage medium
CN116384416A
Translation processing method and device under large model, storage medium and electronic equipment
CN117744670A
LLM-based text translation method and apparatus, and program product
CN118153587A
Game dialogue generation method and device, electronic equipment and storage medium
CN118304657A
Text generation system and method based on multi-agent cooperation mechanism MOPAR
CN119250033A
Cited By
Foreign language bill image translation method and device based on artificial intelligence and medium
CN120913229A