Language translation library updating method and device, electronic equipment, and storage medium
By automatically generating target translation results and updating the language translation database, the problem of low efficiency in traditional translation methods is solved, and efficient and low-cost translation capabilities are optimized.
Patent Information
- Application Number
- CN202410378668.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-29
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2044-03-29
AI Technical Summary
Traditional translation methods are inefficient, have a high error rate, cannot meet the needs of rapid technological development, and have huge management costs and low communication efficiency.
By retrieving the content to be translated from a preset format table, if no translation result exists in the language translation database, the target translation result is automatically generated, additional translation entries are created, the language translation database is updated, and translation capabilities are optimized.
It improved translation efficiency, enhanced the diversity of business types in the language translation database, reduced translation costs, and improved communication efficiency.
Smart Images

Figure CN118194886B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of language processing of artificial intelligence, in particular to a language translation library updating method and device, electronic equipment, and computer readable storage medium. BACKGROUND
[0002] With the increasingly frequent scientific and technological exchanges worldwide, for people who do not understand the language of the other party, accurate translation between different languages is an important guarantee for understanding the technical solutions and intentions of both parties and for communication and cooperation. With the expansion of business scope, language communication challenges have arisen, and many enterprises have found that the original business system cannot meet the multilingual environment and requires a large amount of translation and localization work.
[0003] However, the traditional translation method not only has low communication efficiency and high translation error rate, but also brings about great management costs, making it difficult to meet the needs of the rapid development of technology. The communication process between the demand side and the translation support side is long, inefficient, and time-consuming and labor-intensive. SUMMARY
[0004] To solve the above technical problems, embodiments of the present application provide a language translation library updating method and device, electronic equipment, and computer readable storage medium.
[0005] According to an aspect of an embodiment of the present application, a language translation library updating method is provided, including: obtaining a to-be-translated content in a preset format table, the to-be-translated content including a to-be-translated text and a corresponding translation language, wherein the to-be-translated text includes at least one to-be-translated term; if a translation result corresponding to the to-be-translated term translation text does not exist in a language translation library, outputting a target translation result of the to-be-translated term translation text based on the translation language, and creating an added translation term of the language translation library based on the target translation result; updating the language translation library based on the added translation term to obtain an updated language translation library.
[0006] According to an aspect of an embodiment of the present application, the method further includes: parsing the to-be-translated text, determining at least one to-be-translated term based on the parsing result, and judging whether a target translation term corresponding to the to-be-translated text term exists in the language translation library based on the parsing result; if it exists, judging whether a translation result corresponding to the translation language exists in the target translation term; if it does not exist, outputting a target translation result corresponding to the to-be-translated content term based on the translation language, and updating the target translation term based on the target translation result.
[0007] According to an aspect of an embodiment of the present application, the method further includes: if the translation result corresponding to the translation language exists in the target translation term, querying the target translation result matching the content term to be translated from the language translation library.
[0008] According to an aspect of an embodiment of the present application, the querying of the target translation result matching the content term to be translated from the target translation term includes: querying at least one language translation result corresponding to the content term to be translated from the target translation term; and determining the target translation result matching the content term to be translated from the at least one language translation result based on the translation language.
[0009] According to an aspect of an embodiment of the present application, the updating of the target translation term based on the target translation result includes: extracting at least one language translation result corresponding to the content term to be translated in the target translation term; merging the at least one language translation result and the target translation result, establishing a mapping relationship between the merged result and the content term to be translated, and updating the target translation term based on the mapping relationship.
[0010] According to an aspect of an embodiment of the present application, the updating of the language translation library based on the additional translation term to obtain an updated language translation library includes: obtaining a semantic feature in the additional translation term; if a translation term with a similarity to the semantic feature reaching a preset threshold exists in the language translation library, merging the additional translation term and the translation term to obtain an updated translation term; if a translation term with a similarity to the semantic feature reaching a preset threshold does not exist in the language translation library, constructing configuration information of the additional translation term in the language translation library to obtain a newly created translation term; and obtaining the updated language translation library based on the updated translation term and / or the newly created translation term.
[0011] According to an aspect of an embodiment of the present application, before the obtaining of the content to be translated in the preset format table, the method further includes: obtaining a preset file generated in real time in the language translation library; and generating a preset format table recognizable by the language translation library based on the preset file.
[0012] According to an aspect of an embodiment of the present application, a language translation library updating apparatus is provided, the apparatus comprising: an acquisition module configured to acquire to-be-translated content in a preset format table, the to-be-translated content comprising to-be-translated text and a corresponding translation language, wherein the to-be-translated text comprises at least one to-be-translated term; a creation module configured to, if a translation result corresponding to the to-be-translated term does not exist in a language translation library, output a target translation result of the to-be-translated term based on the translation language, and create an added translation term of the language translation library based on the target translation result; and an updating module configured to update the language translation library based on the added translation term, to obtain an updated language translation library.
[0013] According to an aspect of an embodiment of the present application, an electronic device is provided, comprising: one or more processors; a storage device configured to store one or more programs, which, when executed by the one or more processors, cause the electronic device to implement the language translation library updating method as described above.
[0014] According to an aspect of an embodiment of the present application, a computer-readable storage medium is provided, which stores computer-readable instructions, which, when executed by a processor of a computer, cause the computer to perform the language translation library updating method as described above.
[0015] In the technical solutions provided in the embodiments of the present application, by acquiring to-be-translated content in a preset format table, the normalization of the input to-be-translated format is ensured, and the efficiency of translating the to-be-translated content is improved. If a translation result corresponding to the translation language of the to-be-translated term does not exist in an existing language translation library, a target translation result corresponding to the to-be-translated term can be generated automatically, and then an added translation term of the language translation library can be generated according to the target translation result. The language translation library can be updated according to the added translation term, the translation capability of the language translation library is optimized, the translation efficiency is improved, and the diversity of the business types of the language translation library is improved.
[0016] It should be understood that the general description above and the following detailed description are only exemplary and explanatory, and cannot limit the present application. BRIEF DESCRIPTION OF DRAWINGS
[0017] The drawings incorporated in the specification and constituting a part of the specification illustrate embodiments consistent with the present application and, together with the specification, serve to explain the principles of the present application. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor on the basis of these drawings. In the drawings:
[0018] Figure 1Fig. 1 is a schematic diagram of an implementation environment for updating a language translation library according to an example embodiment of the present application;
[0019] Figure 2 Fig. 2 is a flowchart of a method for updating a language translation library according to an example embodiment of the present application;
[0020] Figure 3 Fig. 3 is a schematic diagram of a preset format table according to an example embodiment of the present application;
[0021] Figure 4 Fig. 4 is a flowchart of a method for updating a language translation library according to another example embodiment of the present application;
[0022] Figure 5 Fig. 5 is a flowchart of a method for updating a language translation library according to another example embodiment of the present application;
[0023] Figure 6 Fig. 6 is a flowchart of a method for updating a language translation library according to another example embodiment of the present application;
[0024] Figure 7 Fig. 7 is a schematic diagram of a translation entry according to an example embodiment of the present application;
[0025] Figure 8 Fig. 8 is a flowchart of a method for updating a language translation library according to another example embodiment of the present application;
[0026] Figure 9 Fig. 9 is a flowchart of a method for updating a language translation library according to another example embodiment of the present application;
[0027] Figure 10 Fig. 10 is a schematic diagram of a brief flow for updating a language translation library in an example application scenario;
[0028] Figure 11 Fig. 11 is a block diagram of a language translation library updating apparatus according to an example embodiment of the present application;
[0029] Figure 12 Fig. 12 is a schematic diagram of a computer system of an electronic device suitable for implementing embodiments of the present application. DETAILED DESCRIPTION
[0030] The example embodiments will now be described in detail with reference to the accompanying drawings. If the description of the example embodiments refers to additional drawings, then the accompanying drawings show schematic cross-sectional and / or plan views of the example embodiments. In the description of the example embodiments, common features are designated by common reference numerals. The following description of the example embodiments is not to be read as a restriction of the scope of the present application. Rather, the description is to be read as an illustration of the example embodiments in accordance with the present application, in which the application can be practiced in various embodiments.
[0031] The block diagrams shown in the drawings are merely functional entities, and do not necessarily have to correspond to physically independent entities. That is, the functional entities can be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.
[0032] The flowcharts shown in the drawings are merely exemplary illustrations, and do not necessarily include all contents and operations / steps, nor are they necessarily executed in the order described. For example, some operations / steps can be further decomposed, and some operations / steps can be combined or partially combined, so the actual execution order can be changed according to actual conditions.
[0033] In this application, "multiple" refers to two or more. The association between the associated objects described by "and / or" can represent three relationships, for example, A and / or B can represent three cases: A exists alone, A and B exist together, and B exists alone. The character " / " generally represents an "or" relationship between the associated objects before and after it.
[0034] First of all, it needs to be pointed out that the language translation database is a system for storing and managing multilingual translation data, which usually contains a large number of vocabulary, phrases, sentences and related translation information. These databases are crucial for machine translation systems, language learning tools, dictionary compilation, etc. The design and implementation of language translation databases may involve multiple aspects, including: data collection: collecting vocabulary, phrases and sentences in various languages, as well as their translations in different contexts. This may require data from multiple sources, such as dictionaries, corpora, web resources, etc.; data cleaning and arrangement: clean the collected data, remove duplicates, errors or irrelevant information, and arrange it appropriately for subsequent use; data storage: choose appropriate database management systems and storage structures to store translation data. This may involve designing a reasonable database schema to efficiently store and retrieve data; data query and retrieval: provide efficient data query and retrieval functions to allow users or applications to easily obtain the required translation information; data update and maintenance: regularly update and maintain the database to ensure the accuracy and timeliness of the translation data. This may involve adding new vocabulary, phrases and sentences, updating old translations, and handling errors and inconsistencies in the data.
[0035] The technical scheme of the embodiment of the present application specifically relates to the updating technology of the existing language translation database, specifically updating and optimizing the existing language translation library during the retrieval and translation process using the language translation library, thereby improving the translation efficiency and improving the translation capability of the language translation library. The technical scheme of the embodiment of the present application is described in detail as follows:
[0036] Please refer to Figure 1 , Figure 1 is a schematic diagram of an implementation environment involved in the present application. The implementation environment includes a terminal 10 and a server 20.
[0037] The terminal 10 is configured to obtain the to-be-translated content in the preset format table and send the to-be-translated content to the server 20, or directly send the preset format table carrying the to-be-translated content to the server 20.
[0038] The server 20 is configured to obtain the to-be-translated content in the preset format table, wherein the to-be-translated content includes to-be-translated text and a corresponding translation language, wherein the to-be-translated text includes at least one to-be-translated term, if the translation result corresponding to the to-be-translated term does not exist in the pre-stored language translation library, a target translation result of the to-be-translated term is generated based on the translation language, and an incremental translation term of the language translation library is created, and then the language translation library can be updated based on the incremental translation term to obtain an updated language translation library.
[0039] In some implementable embodiments, the server 20 can send the target translation result to the terminal 10, and the terminal 10 can perform downstream tasks based on the target translation result, such as training a downstream language translation model, or outputting the target translation result to a user.
[0040] In some implementable embodiments, the server 20 can also obtain the to-be-translated content in the preset format table by itself, and then compare with the language translation library, and when there is no matching translation result in the language translation library, the corresponding target translation result is generated by itself, so as to perform subsequent processing based on the target translation result.
[0041] In some implementable embodiments, the terminal 10 can also obtain the to-be-translated content in the preset format table by itself, and then compare with the language translation library, and when there is no matching translation result in the language translation library, the corresponding target translation result is generated by itself, so as to perform subsequent processing based on the target translation result.
[0042] Wherein, the aforementioned terminal 10 can be any electronic device capable of obtaining target video and to-be-processed image, such as smart phone, tablet, notebook computer, computer, smart voice interaction device, smart home appliance, vehicle-mounted terminal, aircraft, etc., the server 20 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud service, cloud database, cloud computing, cloud function, cloud storage, network service, cloud communication, middleware service, domain name service, security service, CDN (Content Delivery Network), and basic cloud computing services such as big data and artificial intelligence platform, etc., which is not limited herein.
[0043] Terminal 10 and server 20 establish a communication connection via a network beforehand, enabling them to communicate with each other. The network can be a wired network or a wireless network, and this is not a limitation.
[0044] It should be noted that the embodiments of the present invention can translate various languages and can be applied to various scenarios.
[0045] It should also be noted that in the specific implementation of this application, the content to be translated involves object-related matters. When the embodiments of this application are applied to specific products or technologies, permission or consent from the object is required, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0046] The following details the various implementation details of the technical solutions in the embodiments of this application:
[0047] like Figure 2 As shown, Figure 2 This is a flowchart illustrating a language translation library update method according to an embodiment of this application. This method can be applied to... Figure 1 In the implementation environment shown, this method can be executed by a terminal or a server, or by both a terminal and a server. In this embodiment, the method is described using the server as an example. The language translation library update method may include steps S210 to S230, which are detailed below:
[0048] Step S210: Obtain the content to be translated from the preset format table. The content to be translated includes the text to be translated and the corresponding translation language. The text to be translated includes at least one term to be translated.
[0049] In this embodiment, a preset format table refers to a table set according to a certain format, which includes editable items for user input and fixed items that the user cannot modify. For example... Figure 3 As shown, Figure 3 This is an illustration of a preset format table shown in an exemplary embodiment of this application. Figure 3 In the translation, the translation text, language, and requirements are modifiable items that users can edit themselves, while the text status and translation results are fixed items that need to be filled in by the server or terminal and cannot be modified by the user.
[0050] For example, by directly reading the content to be translated from a preset table, such as... Figure 3The translation text, the translation language, the translation requirement, and the translation text to be translated are included in the translation text input by the user, so as to constitute the content to be translated. For example, "the translation text 1, the translation language is Arabic, and the translation requirement is applied to the new energy vehicle industry", and the translation text 1 includes "the translation item-1, the translation item-2, and the like", and the content to be translated can be directly obtained from the preset format table, and the application scenario corresponding to the content to be translated can be determined through the translation requirement.
[0051] In step S220, if the translation result corresponding to the translation item to be translated does not exist in the language translation library, the target translation result of the translation item to be translated is output based on the translation language, and the incremental translation item of the language translation library is created based on the target translation result.
[0052] After determining the content to be translated, it is determined whether the translation result corresponding to the translation item to be translated exists in the existing language translation library. For example, if the translation text to be translated is Chinese, it is determined whether the translation item corresponding to the "Chinese root" in the translation item to be translated exists in the existing language translation library. The matching can be completely the same or semantically similar. If it is determined that the translation result corresponding to the translation item to be translated does not exist in the existing language translation library, the target translation result corresponding to the translation item to be translated is output according to the translation language included in the translation content.
[0053] For example, if it is determined that the translation result corresponding to the content to be translated does not exist in the existing language translation library, the corresponding search item is generated according to the translation item to be translated and the corresponding translation language, and the search item is input to other servers or browsers. Then, the target translation result is obtained through the server or the browser, and the mapping relationship between the target translation result, the translation item to be translated, and the translation language to be translated is established, and the incremental translation item of the existing language translation library is created based on the mapping relationship.
[0054] In some embodiments, if the translation result corresponding to the content to be translated does not exist in the existing language translation library, the corresponding search item is generated according to the translation item to be translated and the translation language corresponding to the translation text to be translated, and the search item is searched through the corresponding interface to select the translation result most suitable for the application scenario of the translation item from the corresponding search result as the target translation result. Then, the mapping relationship between the target translation result, the translation item to be translated, and the translation language to be translated is established, and the incremental translation item of the existing language translation library is created based on the mapping relationship.
[0055] In step S230, the language translation library is updated based on the incremental translation item, and the updated language translation library is obtained.
[0056] Specifically, after generating the added translation term, the added translation term can be further processed, for example, generating the identity information corresponding to the added translation term, and retrieving the creation time, the creator, the character set code, the corresponding translation language list, the translation state, the translated content, the translation batch number, etc. of the added translation term, and then updating the existing language translation library.
[0057] For example, after detecting the added translation term, the added translation term can be detected to determine whether it is a term composed of Chinese roots. If it is determined to be a term composed of Chinese roots, the added translation term is stored. If it is not determined to be a term composed of Chinese roots, the added translation term needs to be processed subsequently until the character set code of the added translation term is determined to be a term composed of Chinese roots.
[0058] In this embodiment, by obtaining the content to be translated in the preset format table, the standardization of the input translation format is ensured, and the efficiency of extracting the content to be translated is improved. If there is no translation agency for the translation language corresponding to the translation text in the existing language translation library, the target translation result corresponding to the translation text can be generated, and the added translation term of the language translation library can be generated based on the target translation result. The language translation library can be updated based on the added translation term, the translation capability of the language translation library is optimized, the translation efficiency is improved, and the diversity of the business types of the language translation library is improved.
[0059] Further, based on the above embodiments, please refer to Figure 4 In one of the example embodiments provided in the present application, the specific implementation process of the language translation library updating method further includes steps S410 to S430, which are described in detail as follows.
[0060] Step S410: Analyze the translation text, determine at least one translation term based on the analysis result, and determine whether the target translation term corresponding to the translation term exists in the language translation library.
[0061] It should be noted that the analysis of the text to be translated is also a text analysis process, and text analysis is a natural language processing technology aimed at extracting useful information and knowledge from text data. This process involves multiple aspects, including but not limited to the following: text preprocessing: This is the initial step of text analysis, the main purpose of which is to clean and standardize text data for subsequent analysis. Preprocessing may include removing punctuation, stop words (such as "of", "of" and other commonly used but meaningless words), and text segmentation (segmenting sentences into individual words or phrases). Lexical analysis: Analyze the use of words in the text, including word frequency statistics, lexical diversity, keyword extraction, etc. This helps to understand the theme and content of the text. Part-of-speech tagging: Assign each word its corresponding part of speech (such as noun, verb, adjective, etc.), which helps to understand the function and role of the word in the sentence. Named entity recognition: Identify specific types of entities in the text, such as names, places, organization names, etc. This is very useful for information extraction and relationship extraction. Sentiment analysis: Analyze the sentiment expressed in the text, such as positive, negative or neutral. This helps to understand the reader's or author's attitude towards a particular topic; topic analysis: Determine the main theme or topic of the text; this is usually achieved by extracting keywords, building topic models or using clustering algorithms. Information extraction: Extract structured information from text, such as events, relationships, etc. This helps to convert unstructured text data into structured data that can be used for further analysis; correlation analysis: Analyze the correlation between different texts or text elements, such as the co-occurrence of words, the similarity between texts, etc.; visualization analysis: Use visualization techniques to present text analysis results in the form of graphs or images, which helps to visually understand and interpret the analysis results. In summary, text analysis covers multiple aspects from text preprocessing to visualization analysis, aiming to extract useful information and knowledge from text data to support decision-making and business innovation. In practical applications, appropriate text analysis techniques and methods can be selected according to specific needs.
[0062] Specifically, in step S410, the corresponding analysis result is obtained by analyzing the text to be translated, and then the analysis result is used to query whether the target translation term corresponding to the term to be translated exists in the existing language translation library. The target translation term can be an integrated term information including the "term to be translated" and its corresponding multiple language translation results, that is, the mapping relationship between the "term to be translated" and the multiple language translation results is included in the target translation term. The "term to be translated" included in the translation term and the term to be translated can be completely the same or similar, for example, in technical exchanges, industry standardization of words or standardized translation in specific scenarios is used.
[0063] Step S420, if it exists, it is determined whether the translation result corresponding to the translation language exists in the target translation term.
[0064] According to the above embodiment, if the query result of the to-be-translated text in the existing language translation library shows that there is a target translation term matching the to-be-translated term, the target translation term can be extracted, and it is determined whether the target translation term contains the translation result corresponding to the translation language of the to-be-translated term. For example, the to-be-translated content contains “translation term-001X, translation language-Arabic”, the corresponding target translation term-XX can be queried according to “001X”, and it is further determined whether the target translation term-XX contains the translation result in Arabic.
[0065] For example, after the target translation term matching the to-be-translated term is queried in the existing language translation library, at least one language translation result in the target to-be-translated text can be queried, and it is detected whether the translation language in the user input to-be-translated content exists in the at least one language.
[0066] If not, the target translation result corresponding to the to-be-translated term is output based on the translation language, and the translation term is updated based on the target translation result.
[0067] Specifically, if the translation term matching the to-be-translated term is queried in the existing language translation library, but the translation result corresponding to the translation language does not exist in the translation term, the corresponding search term can be generated based on the to-be-translated term and the corresponding translation language, and the corresponding search engine is called to obtain the target translation result corresponding to the to-be-translated term.
[0068] In some implementable embodiments, when the translation result corresponding to the translation language does not exist in the target translation term, the target translation result of the to-be-translated term in the translation language can be manually input by the user, so as to realize the update and optimization of the translation term. Of course, the target translation term in the existing language translation library can be updated according to the to-be-translated text, the translation language and the target translation result, so as to avoid generating a new translation term, and the existing translation language library can be updated and optimized.
[0069] In the embodiment, when the translation term corresponding to the to-be-translated term exists in the existing language translation library, the mapping relationship between the translation language and the translation result can be updated in the translation term, the business capability of the language translation library is improved, and the translation efficiency is improved.
[0070] Further, in one of the example embodiments provided in the present application, the specific implementation method of the above language translation library updating method further includes the following steps, which are described in detail as follows.
[0071] If the target translation term has a translation result corresponding to the translation language, the target translation result matching the term to be translated is queried from the language translation library.
[0072] According to the above embodiment, if the target translation term matching the term to be translated is found in the existing language translation library through the analysis result of the text to be translated, the target translation term can be extracted. After the target translation term matching the term to be translated is found in the existing language translation library, at least one language translation result in the text to be translated can be queried, and it can be detected whether the translation language in the user input content to be translated exists in the at least one language. If the translation language in the content to be translated exists, the translation result corresponding to the translation language is obtained from the target translation term, and the translation result is output.
[0073] In the embodiment, the corresponding translation result is directly queried from the existing translation database, which avoids manual input, reduces translation cost, and improves translation efficiency.
[0074] Further, based on the above embodiment, please refer to Figure 5 In one of the example embodiments provided in the application, the specific implementation process of querying the target translation result matching the term to be translated from the target translation term can further include steps S510 and S520, which are described in detail as follows:
[0075] Step S510: querying at least one language translation result corresponding to the term to be translated from the target translation term;
[0076] Step S520: determining the target translation result matching the term to be translated from the at least one language translation result based on the translation language.
[0077] According to the above embodiment, the corresponding analysis result is obtained by analyzing the text to be translated, and then it is queried whether the target translation term corresponding to the text to be translated exists in the existing language translation library based on the analysis result. The target translation term can be integrated term information including the "term to be translated" and the corresponding multiple language translation results, that is, the mapping relationship between the "term to be translated" and the multiple language translation results is included in the target translation term. The "term" included in the translation term can be completely the same as the text to be translated or similar, for example, the standardized translation in the technical exchange using the industry standardized words or in the specific scene.
[0078] Specifically, the corresponding target translation result can be selected from the translation term in the existing language translation library according to the corresponding translation language in the content to be translated, for example, if the translation language is German, the translation result corresponding to "German" can be extracted from the existing language translation library.
[0079] Optionally, in some feasible embodiments, the target translation result corresponding to the term to be translated can be selected according to the specific application scenario. For example, in the automotive industry, the German translation of the term to be translated can be extracted to meet the specific scenario of the translation, thereby further improving the accuracy of the target translation result and improving communication efficiency.
[0080] In this embodiment, by identifying the target translation result that matches the target translation content from at least one language translation result in the translation entry, not only is the translation efficiency improved, but the translation cost is also reduced.
[0081] Furthermore, based on the above embodiments, please refer to... Figure 6 In one exemplary embodiment provided in this application, the specific implementation process of updating the translated term based on the target translation result may further include steps S610 and S620, which are described in detail below:
[0082] Step S610: Extract at least one language translation result corresponding to the term to be translated from the target translation term;
[0083] Step S620: Merge the translation results of at least one language with the target translation results, establish a mapping relationship between the merged results and the terms to be translated, and update the target translation terms based on the mapping relationship.
[0084] like Figure 7 As shown, Figure 7 This is a schematic diagram of a translation entry shown in an exemplary embodiment of this application. The translation entry includes corresponding identity information, Chinese word roots, entry content corresponding to the Chinese word roots, translation language, and translation results corresponding to the translation language. However, when dealing with multiple translation languages and their corresponding translation results, adjustments need to be made to the storage location, module affiliation, mapping relationship, etc. of the translation results.
[0085] Specifically, the translation results for at least one language corresponding to the translated text (i.e., the "Chinese root word") in the translation entry can be obtained, and these at least one language translation results can be merged with the newly added target translation results. A mapping relationship between the merged result and the text to be translated can be established, and then the translation entry can be updated based on the mapping relationship.
[0086] Exemplarily, the translation entries stored in the existing language translation library have corresponding English translation results, German translation results, Arabic translation results, French translation results, etc. of the Chinese roots in the translation entries, and then the target translation results corresponding to the text to be translated can be merged, wherein the target translation results are translation results that do not exist in the entries, and the merging process can include adjusting the order of the translation results in the translation entries according to the language used, the scene applied, etc. Moreover, the mapping relationship between the Chinese roots in the entries and the translation results of different translation languages needs to be embodied in the translation entries, and the translation entries are updated according to the mapping relationship, so that the target translation results can be directly obtained next time the translation entries are used, and the search task is avoided.
[0087] In the embodiment, by merging the at least one language translation result of the translation text in the translation entry with the target translation result, and then establishing the mapping relationship between the merging result and the text to be translated, the standardization between the translation text and the translation result in the translation entry is ensured, the query of the translation result is facilitated, and the translation efficiency is improved.
[0088] Further, based on the above embodiment, please refer to Figure 8 In one of the example embodiments provided in the present application, the specific implementation process of updating the language translation library based on the added translation entry to obtain the updated language translation library can further include steps S810 to S840, which are described in detail as follows:
[0089] Step S810: Obtain the semantic features in the added translation entry.
[0090] It should be noted that the semantic features of the text refer to the meaning and characteristics contained in the text, which can be extracted by in-depth analysis of the text. These features not only reflect the basic meaning of the text, but also reveal the relationship between the texts and the context information. Specifically, the semantic features of the text can include the following aspects: theme and concept: the core theme and the concept involved in the text are important parts of the semantic features. Emotional tendency: the emotional color expressed in the text is also one of the semantic features. Emotional analysis technology can help identify the emotional tendency in the text, such as positive, negative or neutral. Entity and relationship: the entities mentioned in the text (such as names, places, organizations, etc.) and the relationships between these entities are also important semantic features. These entities and relationships help understand the content and background of the text. Syntax and syntax structure: the syntax and syntax structure of the text reflect the composition of the sentence and the relationship between the words, which is also part of the semantic features. For example, the subject-predicate-object structure, the modification relationship between sentence components, etc. can be used as semantic features. In order to extract these semantic features, natural language processing techniques and machine learning algorithms are usually used. For example, the bag-of-words model or TF-IDF model can be used to extract keywords and phrases in the text; named entity recognition technology is used to identify entities in the text; sentiment analysis algorithms are used to determine the emotional tendency of the text, etc.
[0091] Exemplarily, the generated additional translation term can be subjected to semantic feature analysis to obtain semantic features in the additional translation term.
[0092] In step S820, if there is a translation term in the language translation library with a semantic feature similar to the additional translation term reaching a preset threshold, the additional translation term and the translation term are merged to obtain an updated translation term.
[0093] Specifically, if there is a translation term in the existing language translation library with a semantic feature similar to the additional translation term reaching a preset threshold, it means that the additional translation term is new information of the translation term, and then the newly generated additional translation term can be merged with the translation term for easy management, thereby updating the translation term. The translation script corresponding to the translation term may not be the same as the translation script in the additional translation term, but may be similar in semantics.
[0094] Optionally, the merging process of the additional translation term and the translation term can include extracting the translation script and the translation language in the additional translation term, and storing the mapping relationship between the translation script and the translation language in the translation term corresponding to the existing language translation library.
[0095] Step S830, if there is no translation entry in the language translation library with a semantic feature similarity reaching a preset threshold, configuration information of the added translation entry in the language translation library is constructed to obtain a newly created translation entry.
[0096] Specifically, after obtaining the semantic feature in the added translation entry, if there is no translation entry in the existing language translation library with a semantic feature similarity reaching a preset threshold, configuration information of the added translation entry in the language translation library is constructed to obtain a newly created translation entry in the existing language translation library. The configuration information can include the creator, Chinese, creation time, corresponding translation language list, creation batch number, translation status, translated content, and language name of the added translation entry, and the newly created translation entry is generated according to the configuration information, to facilitate next-time retrieval and use.
[0097] Step S840, an updated language translation library is obtained based on the updated translation entry and / or the newly created translation entry.
[0098] Specifically, if the added translation entry is generated according to the to-be-translated content in the preset format table input by the user, the updated translation entry or the newly created translation entry updates the existing language translation library, and the updating process includes storing the newly created translation entry in the existing language translation library, replacing the translation entry before updating based on the updated translation entry, and the like.
[0099] In the embodiment, by comparing the semantic feature similarity of the added translation entry and the translation entry in the existing language translation library, on the one hand, the semantic feature similarity of the translation entries can be merged to improve the standardization of the language translation library, and the subsequent translation efficiency is improved; on the other hand, by constructing the configuration information of the added translation entry, subsequent use is facilitated, the translation business of the language translation library is expanded, and the translation efficiency is improved.
[0100] Further, based on the above embodiment, please refer to Figure 9 In one of the example embodiments provided in the present application, before obtaining the to-be-translated content in the preset format table, the specific implementation process of the language translation library updating method can further include steps S910 and S920, which are described in detail as follows.
[0101] Step S910, a preset file generated in real time in the language translation library is obtained.
[0102] Step S920, a preset format table recognizable by the language translation library is generated based on the preset file.
[0103] Specifically, the language translation library corresponding to the pre-prepared file can be generated according to the latest translation information in the existing language translation library, wherein the format of the pre-prepared file is fixed, and the preset format table in the language translation library can be generated according to the pre-prepared file. For example, an excel file with a fixed format is provided for the user to input the content to be translated.
[0104] For example, the user uses the template export function given by the server system background. The system first queries all the current translatable languages, and after all the configuration module options are selected, it is used as a drop-down option and as a parameter to call the Java API interface of the open source tool kit Apache POI project to generate Excel verification rules and drop-down list content. An excel file with a drop-down option is automatically generated by the program. The excel template file is verified by matching the existing selected configuration rules to avoid non-standard user input parameters. Then it is downloaded to the user's local computer through the cloud interface. The advantage here is that the template language and other options downloaded each time are dynamically read from the latest configuration data in the database. As the business changes, the system can also continuously add and maintain new translation languages and new business areas. The user fills in the content to be translated according to the currently exported excel file. After filling in, the excel file is imported through the web system interface.
[0105] In addition, after receiving the content to be translated filled in according to the preset format table, the translation text in the content to be translated is processed for deduplication, which includes using the full Chinese sentence of the current term to perform a complete matching search in the existing term library according to the full Chinese sentence. If the current term does not exist in the term library, a new Chinese root is created, and then a data record of the current translation language is created and the subsequent translation process is completed. If the current Chinese root library already has a Chinese translation, it is queried whether the current translation language already exists under the translation set of the Chinese root. If it already exists, a repeated translation is prompted and the process is terminated; otherwise, the translation language is added to the current root, and the subsequent translation process is entered.
[0106] In this embodiment, by generating a preset format table for user input, not only the tamper resistance and standardization of the input content to be translated are ensured, but also the subsequent extraction rate of the content to be translated using the language translation library is improved, the translation efficiency is improved, and the translation effect is guaranteed.
[0107] Figure 10This is a simplified flowchart illustrating the process of updating a language translation library in an exemplary application scenario. In the application scenario shown in 10, the content to be translated is obtained from a preset format table. The content to be translated includes the text to be translated and the corresponding translation language. The text to be translated is parsed, and based on the parsing results, at least one term to be translated is determined. Based on the parsing results, it is determined whether a target translation term corresponding to the term to be translated exists in the language translation library. If it exists, it is determined whether a translation result corresponding to the translation language exists in the target translation term. If it does not exist, the target translation result corresponding to the translation term is output based on the translation language, and the target translation term is updated based on the target translation result. If no translation result exists for the term to be translated in the language translation library, the target translation result for the term to be translated is output based on the target language, and an additional translation term is created in the language translation library based on the target translation result; the semantic features of the additional translation term are obtained; if a translation term with a semantic feature similarity reaching a preset threshold exists in the language translation library, the additional translation term is merged with the original translation term to obtain an updated translation term; if no translation term with a semantic feature similarity reaching a preset threshold exists in the language translation library, the configuration information of the additional translation term in the language translation library is constructed to obtain a new translation term; the updated language translation library is obtained based on the updated translation term and / or the new translation term. For detailed implementation processes, please refer to the descriptions in the aforementioned embodiments, which will not be repeated here.
[0108] Figure 11 This is a block diagram illustrating a language translation database updating apparatus according to an exemplary embodiment of this application. The apparatus can be applied to... Figure 1 The implementation environment shown is specifically configured in terminal 10 or server 20. This device can also be applied to other exemplary implementation environments and specifically configured in other devices. This embodiment does not limit the implementation environment to which the device is applicable.
[0109] like Figure 11 As shown, the exemplary language translation library update device includes: an acquisition module 1110, used to acquire the content to be translated in a preset format table, the content to be translated including the text to be translated and the corresponding translation language, wherein the text to be translated includes at least one term to be translated; a creation module 1120, used to output the target translation result of the term to be translated based on the translation language if there is no translation result corresponding to the term to be translated in the language translation library, and create an additional translation term in the language translation library based on the target translation result; and an update module 1130, used to update the language translation library based on the additional translation term to obtain the updated language translation library.
[0110] According to an aspect of the embodiments of the present application, the device further comprises: a parsing module, configured to parse the text to be translated, determine at least one word to be translated based on the parsing result, and determine whether the target translation word corresponding to the word to be translated exists in the language translation library; a judging module, configured to, if the target translation word exists, determine whether the translation result corresponding to the translation language exists in the target translation word; and a word updating module, configured to, if the target translation result corresponding to the translation language does not exist, output the target translation result corresponding to the word to be translated based on the translation language, and update the target translation word based on the target translation result.
[0111] According to an aspect of the embodiments of the present application, the device further comprises: a querying module, configured to, if the translation result corresponding to the translation language exists in the target translation word, query the target translation result matching the word to be translated from the language translation library.
[0112] According to an aspect of the embodiments of the present application, the querying module comprises: a querying unit, configured to query at least one language translation result corresponding to the word to be translated from the target translation word; and a determining unit, configured to determine the target translation result matching the word to be translated from the at least one language translation result based on the translation language.
[0113] According to an aspect of the embodiments of the present application, the word updating module further comprises: an extracting unit, configured to extract at least one language translation result corresponding to the word to be translated from the target translation word; and an updating unit, configured to merge the at least one language translation result and the target translation result, establish a mapping relationship between the merging result and the word to be translated, and update the target translation word based on the mapping relationship.
[0114] According to an aspect of the embodiments of the present application, the updating module comprises: an obtaining unit, configured to obtain the semantic feature in the incremental translation word; a merging unit, configured to, if the translation word with the semantic feature similar to the preset threshold exists in the language translation library, merge the incremental translation word and the translation word to obtain the updated translation word; a new building unit, configured to, if the translation word with the semantic feature similar to the preset threshold does not exist in the language translation library, construct the configuration information of the incremental translation word in the language translation library to obtain the newly built translation word; and a model updating unit, configured to obtain the updated language translation library based on the updated translation word and / or the newly built translation word.
[0115] According to an aspect of the embodiments of the present application, the device further comprises: a configuration obtaining module, configured to obtain the configuration information in the language translation library, the configuration information comprising the fixed information item and the personalized information item in the language translation database; and a processing module, configured to perform preset format processing on the fixed information item and the personalized information item to obtain a preset format table.
[0116] It should be noted that the language translation library updating apparatus provided in the above embodiments and the language translation library updating method provided in the above embodiments belong to the same concept, and the specific manner in which various modules and units perform operations has been described in detail in the method embodiments, which will not be described here. The language translation library updating apparatus provided in the above embodiments can be used in actual applications, and the above functions can be completed by different functional modules according to needs, that is, the internal structure of the apparatus is divided into different functional modules to complete all or part of the functions described above, and this is not limited herein.
[0117] Embodiments of the present application also provide an electronic device, comprising: one or more processors; a storage device configured to store one or more programs, when the one or more programs are executed by the one or more processors, the electronic device is enabled to implement the language translation library updating method provided in each of the above embodiments.
[0118] Figure 12 The structural schematic diagram of a computer system of an electronic device suitable for implementing embodiments of the present application is shown. It should be noted that, Figure 12 The computer system 1200 of the electronic device shown is only an example, and should not impose any limitation on the functions and use range of the embodiments of the present application.
[0119] As Figure 12 shown, the computer system 1200 includes a central processing unit (CPU) 1201, which can perform various appropriate actions and processes according to programs stored in a read-only memory (ROM) 1202 or programs loaded from a storage portion 1208 into a random access memory (RAM) 1203, such as performing the method in the above embodiments. In the RAM 1203, various programs and data required for system operation are also stored. The CPU 1201, the ROM 1202, and the RAM 1203 are connected to each other through a bus 1204. An input / output (I / O) interface 1205 is also connected to the bus 1204.
[0120] The following components are connected to the I / O interface 1205: an input part 1206 including a keyboard, a mouse, etc.; an output part 1207 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), etc., and a speaker, etc.; a storage part 1208 including a hard disk, etc.; and a communication part 1209 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication part 1209 performs communication processing via a network such as the Internet. A drive 1210 is also connected to the I / O interface 1205 as necessary. A removable media 1211 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc. is attached to the drive 1210 as necessary, so that a computer program read therefrom is installed in the storage part 1208 as necessary.
[0121] In particular, the processes described above with reference to the flowcharts can be implemented as a computer software program according to embodiments of the present application. For example, embodiments of the present application include a computer program product comprising a computer program carried on a computer readable medium, the computer program containing a computer program for executing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via the communication part 1209, and / or installed from the removable media 1211. When the computer program is executed by the central processing unit (CPU) 1201, various functions defined in the system of the present application are executed.
[0122] It should be noted that the computer-readable medium in the embodiments shown in the present application can be a computer-readable signal medium or a computer-readable storage medium or any combination of the two. The computer-readable storage medium may, for example, be an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or component, or any combination of the above. More specific examples of computer-readable storage media can include, but are not limited to, an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (Compact Disc Read-Only Memory, CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, the computer-readable signal medium can include a data signal propagating in a baseband or as a carrier wave in a propagated data signal, in which the computer-readable computer program is carried. Such a propagated data signal can take various forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer-readable signal medium can also be any computer-readable medium other than the computer-readable storage medium, which can send, propagate or transmit programs for use by or in connection with an instruction execution system, device or component. The computer program contained on the computer-readable medium can be transmitted by any suitable medium, including but not limited to wireless, wired, or the like, or any suitable combination of the above.
[0123] The flowcharts and block diagrams in the drawings illustrate the possible implementation architectures, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. In the flowcharts or block diagrams, each block can represent a module, a program segment or a part of code, which contains one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions noted in the blocks can occur in different order than that shown in the drawings. For example, two blocks represented in succession can actually be executed substantially in parallel, and sometimes they can be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagram or flowchart, and the combination of blocks in the block diagram or flowchart, can be implemented by a dedicated hardware-based system that performs the specified functions or operations, or can be implemented by a combination of special-purpose hardware and computer instructions.
[0124] The units described in the embodiments of the present application can be implemented in the form of software, or can be implemented in the form of hardware, and the described units can also be arranged in a processor. In some cases, the names of the units do not constitute a limitation on the units themselves.
[0125] Another aspect of the present application also provides a computer readable storage medium, which stores a computer program. The computer program is executed by a processor to implement the language translation library updating method as described above. The computer readable storage medium can be included in the electronic device described in the above embodiments, or can exist separately and not be assembled into the electronic device.
[0126] Another aspect of the present application also provides a computer program product or a computer program, which includes computer instructions stored in a computer readable storage medium. A processor of a computer device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions to enable the computer device to perform the language translation library updating method provided in each of the above embodiments.
[0127] The above is only a preferred exemplary embodiment of the present application, and is not intended to limit the implementation of the present application. Those skilled in the art can easily make corresponding modifications or changes according to the main concept and spirit of the present application, and the protection scope of the present application should be subject to the protection scope required by the claims.
Claims
1. A language translation library updating method characterized by comprising: The method comprises: obtaining to-be-translated content in a preset format table, the to-be-translated content comprising to-be-translated text and a corresponding translation language, wherein the to-be-translated text comprises at least one to-be-translated term; if the language translation library does not comprise a translation result corresponding to the to-be-translated term, outputting a target translation result of the to-be-translated term based on the translation language, and creating an incremental translation term of the language translation library based on the target translation result; updating the language translation library based on the incremental translation term to obtain an updated language translation library, comprising: if the language translation library comprises a translation term similar to semantic features of the incremental translation term by a preset threshold, storing a mapping relationship between translation content and the translation language in the incremental translation term in the translation term, and adjusting the order of the target translation result in the translation term according to the used language and the applied scenario to obtain an updated translation term; if the language translation library does not comprise a translation term similar to the semantic features by the preset threshold, and the incremental translation term is not a term composed of Chinese roots, converting the incremental translation term into a term composed of Chinese roots for storage to obtain a newly created translation term; and obtaining the updated language translation library according to the updated translation term and / or the newly created translation term.
2. The method of claim 1, wherein, The method further comprises: parsing the to-be-translated text, determining at least one to-be-translated term based on the parsing result, and determining whether the language translation library comprises a target translation term corresponding to the to-be-translated term; if yes, determining whether the target translation term comprises a translation result corresponding to the translation language; if no, outputting a target translation result corresponding to the to-be-translated term based on the translation language, and updating the target translation term based on the target translation result.
3. The method of claim 2, wherein, The method further comprises: if the target translation term comprises a translation result corresponding to the translation language, querying the language translation library for a target translation result matching the to-be-translated term.
4. The method of claim 3, wherein, The querying the target translation term for a target translation result matching the to-be-translated term comprises: querying at least one language translation result corresponding to the to-be-translated term from the target translation term; determining a target translation result matching the to-be-translated term from the at least one language translation result based on the translation language.
5. The method of claim 4, wherein, The updating the target translation term based on the target translation result comprises: extracting at least one language translation result corresponding to the to-be-translated term from the target translation term; merging the at least one language translation result and the target translation result, establishing a mapping relationship between a merged result and the to-be-translated term, and updating the target translation term based on the mapping relationship.
6. The method of claim 1, wherein, Before the obtaining to-be-translated content in a preset format table, the method further comprises: obtaining a preset file generated in real time in the language translation library; generating a preset format table recognizable by the language translation library based on the preset file.
7. A language translation library updating apparatus characterized by comprising: The device comprises: An acquisition module is configured to acquire to-be-translated content in a preset format table, the to-be-translated content including to-be-translated text and a corresponding translation language, wherein the to-be-translated text includes at least one to-be-translated term; A creation module is configured to output a target translation result of the to-be-translated term based on the translation language if the translation result corresponding to the to-be-translated term does not exist in a language translation library, and create an incremental translation term of the language translation library based on the target translation result. An update module is configured to update the language translation library based on the incremental translation term to obtain an updated language translation library, including: if a translation term with a semantic feature similarity reaching a preset threshold exists in the language translation library, storing a mapping relationship between a translation script and a translation language in the incremental translation term into the translation term, and adjusting a sequence of the target translation result in the translation term according to a used language and an applied scenario to obtain an updated translation term; if the translation term with the semantic feature similarity reaching the preset threshold does not exist in the language translation library, and the incremental translation term is not a term composed of Chinese roots, converting the incremental translation term into a term composed of Chinese roots for storage to obtain the updated language translation library.
8. An electronic device, comprising: comprise: one or more processors; a storage device for storing one or more programs, which, when executed by the one or more processors, cause the electronic device to implement the language translation library updating method of any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, computer-readable instructions stored thereon, which, when executed by a processor of a computer, cause the computer to perform the language translation library updating method of any one of claims 1 to 6.
Citation Information
Patent Citations
Language translation processing method and device, electronic equipment and medium
CN111652003A
Front-end multi-language translation method and device, equipment and storage medium
CN115828937A
Cross-platform internationalized file generation method and device and electronic equipment
CN116011466A