A multi-language translation method, device, equipment, and storage medium
By encoding the translated text and querying the corresponding translation results from the preset translation dictionary, the problem that existing translation software cannot accurately translate professional terms is solved, and the translation consistency of professional terms in various systems is achieved and the accurate translation of production system menus and key production professional terms is achieved, which simplifies the maintenance of international application languages and improves translation efficiency.
Patent Information
- Application Number
- CN202210528368.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-16
- Publication Date
- 2025-04-15
- Estimated Expiration
- 2042-05-16
AI Technical Summary
Existing translation software cannot accurately translate professional terms, and the translation method is word by word, sentence by word, and cannot quickly provide relevant translation content based on the user's scenario, resulting in complex and unfriendly operations.
By encoding the translated text and using the encoding to query the corresponding translation results from the preset translation dictionary, the translation consistency of professional terms in each system and the accurate translation of the production system menu and key production professional terms are achieved.
It achieves the consistency of translations of professional terms in various systems, improves the accuracy of translation of production system menus and key production professional terms, simplifies the maintenance of international application languages, and improves translation efficiency.
Smart Images

Figure CN114925707B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer translation technology, and in particular to a multi-language translation method, device, equipment and storage medium. Background Art
[0002] With the development of international production, more and more foreign employees are joining the team, and the demand for language diversity in the system is becoming stronger. During the development process, some menus, buttons and other functional operations in professional software need to be translated before they can be used by foreign employees. Currently, the translation software on the market only translates vocabulary and cannot provide accurate translation based on some industry professional terms. Moreover, the translation method is word by word and sentence by sentence, and it cannot quickly provide relevant translation content based on the scenario the user wants.
[0003] The existing translation methods on the market are to use translation software to translate one by one or to ask translators to translate to form language pre-made files. Translating one by one causes a certain degree of operational complexity for translators, and each additional language requires repeated search and translation, which is very unfriendly in operation.
[0004] In summary, how to achieve consistency in the translation of professional terms in various systems and ensure the accuracy of the translation of production system menus and key production professional terms is a problem to be solved in this field. Summary of the invention
[0005] In view of this, the purpose of the present invention is to provide a multi-language translation method, device, equipment, and storage medium, which can achieve consistency in the translation of professional terms in various systems and ensure the accuracy of the translation of production system menus and key production professional terms. The specific scheme is as follows:
[0006] In a first aspect, the present application discloses a multilingual translation method, comprising:
[0007] Obtaining a translation request including the text to be translated and the target language sent by the user terminal;
[0008] Encoding the text to be translated to obtain the encoding of the text to be translated;
[0009] Based on the encoding of the text to be translated and the target language, a corresponding translation result is searched from a preset translation dictionary, and the target language text is fed back to the user terminal.
[0010] Optionally, before searching for a corresponding translation result from a preset translation dictionary based on the encoding of the text to be translated and the target language, the method further includes:
[0011] Encode the professional vocabulary to obtain the code corresponding to the professional vocabulary;
[0012] Recording translation results of multiple language texts corresponding to the codes, and saving the translation results of the multiple language texts in a preset translation dictionary;
[0013] A correspondence between the codes and the corresponding translation results of the multi-language texts in the preset translation dictionary is constructed.
[0014] Optionally, after encoding the text to be translated to obtain the encoding of the text to be translated, the method further includes:
[0015] It is determined whether there is a translation result of the target language in the translation request in the preset translation dictionary to obtain a corresponding determination result.
[0016] Optionally, the determining whether there is a translation result of the target language in the translation request in the preset translation dictionary to obtain a corresponding determination result includes:
[0017] If the judgment result is that the translation result of the target language in the translation request does not exist in the preset translation dictionary, the translation result of the target language is recorded in the preset translation dictionary and / or in the pre-translation system scenario pool.
[0018] Optionally, recording the translation result of the target language in the preset translation dictionary and / or the pre-translation system scene pool includes:
[0019] If the translation result of the target language is recorded in the pre-translation system scene pool, whether to synchronize the translation result in the pre-translation scene pool to the preset translation dictionary is selected according to the preset text storage condition.
[0020] Optionally, before searching for a corresponding translation result from a preset translation dictionary based on the encoding of the text to be translated and the target language, the method further includes:
[0021] Professional vocabulary in different system scenarios is encoded in advance, and the encoding is stored in a pre-translated system scenario pool corresponding to the system scenario.
[0022] Optionally, the process of searching a preset translation dictionary for a corresponding translation result based on the encoding of the text to be translated and the target language, and feeding back the target language text to the user terminal, further includes:
[0023] Based on the encoding of the text to be translated and the target language, query the corresponding translation result from the preset translation dictionary, and synchronize the translation result to the pre-translation system scene pool;
[0024] A language file format is selected, a target language text is generated from the translation result according to the language file format, and the target language text is fed back to the user terminal.
[0025] In a second aspect, the present application discloses a multi-language translation device, comprising:
[0026] A request acquisition module, used to acquire a translation request including a text to be translated and a target language sent by a user terminal;
[0027] A text encoding module, used for encoding the text to be translated to obtain the encoding of the text to be translated;
[0028] The text acquisition module is used to query the corresponding translation result from a preset translation dictionary based on the encoding of the text to be translated and the target language, and feed back the target language text to the user terminal.
[0029] In a third aspect, the present application discloses an electronic device, comprising:
[0030] Memory, used to store computer programs;
[0031] The processor is used to execute the computer program to implement the steps of the multi-language translation method disclosed above.
[0032] In a fourth aspect, the present application discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the steps of the multi-language translation method disclosed above are implemented.
[0033] It can be seen that the present application discloses a multilingual translation method, including: obtaining a translation request containing a text to be translated and a target language sent by a user terminal; encoding the text to be translated to obtain the encoding of the text to be translated; based on the encoding of the text to be translated and the target language, querying the corresponding translation result from a preset translation dictionary, and feeding back the target language text to the user terminal. It can be seen that the present application encodes the text to be translated in the translation request sent by the user terminal to obtain the corresponding encoding, and then uses the encoding and the target language to query the corresponding translation result from the preset translation dictionary. The preset translation dictionary can centrally manage the language texts contained in different menus and buttons in professional software, which is conducive to the centralized management of translation, so as to achieve consistency in the translation of professional terms in each system and improve the translation accuracy of production system menus and key production professional terms. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0035] Figure 1 A flow chart of a multilingual translation method disclosed in this application;
[0036] Figure 2 A multi-language system flow chart disclosed in this application;
[0037] Figure 3 A flowchart of a specific multilingual translation method disclosed in this application;
[0038] Figure 4 A synchronous translation flow chart disclosed in this application;
[0039] Figure 5 A user viewing pre-translation pool sequence diagram disclosed in this application;
[0040] Figure 6 A prefabricated coding translation flow chart disclosed in this application;
[0041] Figure 7 Generate a flow chart for a language file disclosed in this application;
[0042] Figure 8 A prefabricated coded simulation diagram of a system scenario disclosed in this application;
[0043] Fig. 9 A system scenario translation interface of a converted target language disclosed in this application;
[0044] Fig.10 This is a schematic diagram of the structure of a multi-language translation device disclosed in this application;
[0045] Fig.11 This is a structural diagram of an electronic device disclosed in this application. DETAILED DESCRIPTION
[0046] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0047] Currently, the existing translation methods on the market are to use translation software to translate one by one or to ask translators to translate to form language pre-made files. Translating one by one causes a certain degree of operational complexity for translators, and each additional language requires repeated search and translation, which is very unfriendly in operation.
[0048] To this end, the present invention provides a corresponding multi-language translation solution to achieve consistency in the translation of professional terms in each system and ensure the accuracy of the translation of the production system menu and key production professional terms.
[0049] Reference Figure 1 As shown, the embodiment of the present invention discloses a multi-language translation method, comprising:
[0050] Step S11: obtaining a translation request including the text to be translated and the target language sent by the user terminal.
[0051] In this embodiment, a translation request sent by a user terminal is first obtained, wherein the translation request specifically includes information such as the translation content of this translation and the target translation language; for example: Figure 2 As shown, when the translation request sent by the user terminal is a target request to translate the Chinese "delete button" information on the sub-interface delivery interface in the order system into English, the current translation request sent by the user terminal includes: the content to be translated is the delete button, and the target language is English.
[0052] Step S12: Encode the text to be translated to obtain the encoding of the text to be translated.
[0053] In this embodiment, the text to be translated is encoded so that the corresponding multilingual text content can be queried using the encoding. It can be understood that the text to be translated is encoded to obtain the encoding, and the translation contents of the same professional vocabulary in various languages are associated with each other using the encoding. In this way, by associating the translation contents of each language with the encoding in advance, subsequent system query work is greatly facilitated.
[0054] Step S13: Based on the encoding of the text to be translated and the target language, a corresponding translation result is searched from a preset translation dictionary, and the target language text is fed back to the user terminal.
[0055] In this embodiment, the corresponding translation result is queried from a preset translation dictionary based on the encoding of the text to be translated and the target language, and then the target language text is output and compressed according to the language file format selected by the user, and is downloaded locally or uploaded to the cloud according to user needs.
[0056] In this embodiment, before searching for the corresponding translation result from the preset translation dictionary based on the encoding of the text to be translated and the target language, it also includes: encoding the professional vocabulary to obtain the encoding corresponding to the professional vocabulary; recording the translation results of the multiple language texts corresponding to the encoding, and saving the translation results of the multiple language texts in the preset translation dictionary; constructing the corresponding relationship between the encoding and the corresponding translation results of the multiple language texts in the preset translation dictionary. It can be understood that, referring to Figure 2 As shown, users maintain system scenarios and system sub-node scenarios in a multilingual system as needed, and associate them through a tree structure. The maintenance of the system scenarios is specifically manifested in pre-maintaining the professional terms in the sub-system scenarios in each system scenario, wherein the professional term maintenance is specifically encoding the professional terms and associating the encoding with text content in different languages. In order to facilitate the translation of professional vocabulary in similar system scenarios later and avoid re-retrieval, the present application forms a tree-shaped translation document based on the software scenario. In this way, when similar system scenarios appear, they can be reused, and the language of the software interface is centrally managed, which is conducive to the centralized management of translation.
[0057] In this embodiment, based on the encoding of the text to be translated and the target language, before querying the corresponding translation result from the preset translation dictionary, it also includes: pre-encoding the professional vocabulary located in different system scenarios, and saving the encoding in the pre-translation system scenario pool corresponding to the system scenario. It can be understood that by pre-encoding the professional vocabulary in the system scenario, and associating the encoding with the corresponding multilingual translation content, then saving the encoding of the professional vocabulary belonging to the same system scenario in the same pre-translation system scenario pool, and then the pre-translation system scenario pool associated with the encoding of the professional vocabulary in the subsystem scenario contained in the parent node system scenario and the same parent node system scenario is associated again, and a tree-shaped pre-translation document is formed. For example: "Order system" is the parent node of the order scenario, "order interface", "scheduling interface", and "delivery interface" are child nodes of "order system", each child node system scenario is associated with a pre-translation scenario pool, and then the order system is associated with the pre-translation scenario pool associated with all child node scenarios again, so as to form a tree-shaped pre-translation document; the content of the pre-translation scenario pool is a pre-made encoding, which is used to associate with the preset translation dictionary. The tree-shaped pre-translation document is established to speed up the retrieval and export of translation terms in similar system scenarios.
[0058] In this embodiment, based on the encoding of the text to be translated and the target language, the corresponding translation result is queried from the preset translation dictionary, and the translation result is synchronized to the pre-translation system scene pool; the language file format is selected, the translation result is generated into the target language text according to the language file format, and the target language text is fed back to the user terminal. It is understandable that when the user completes the preparation of the pre-translation system scene pool, the translation file can be generated according to the demand. Figure 3 As shown, users can use the system language requirements of the translation file as needed and select the language they want. After selecting the language, the system will automatically obtain the corresponding translation content, and the user will select the language file format they want to generate. The three common formats are yml, json, and xml. After the user selects the language file format, the translation content of the corresponding language in the pre-translation system scene pool will be generated by the system in the corresponding language and format file and compressed. After the compression is completed, the user can choose to download it to the computer or upload it to the cloud resource pool as needed; among them, downloading to the computer is mainly used in the client or the terminal that cannot connect to the Internet; uploading to the cloud can obtain the latest translation content in a more real-time manner.
[0059] It can be seen that the present application discloses a multilingual translation method, including: obtaining a translation request containing a text to be translated and a target language sent by a user terminal; encoding the text to be translated to obtain the encoding of the text to be translated; based on the encoding of the text to be translated and the target language, querying the corresponding translation result from a preset translation dictionary, and feeding back the target language text to the user terminal. It can be seen that the present application encodes the text to be translated in the translation request sent by the user terminal to obtain the corresponding encoding, and then uses the encoding and the target language to query the corresponding translation result from the preset translation dictionary. The preset translation dictionary can centrally manage the language texts contained in different menus and buttons in professional software, which is conducive to the centralized management of translation, so as to achieve consistency in the translation of professional terms in each system and improve the translation accuracy of production system menus and key production professional terms.
[0060] Reference Figure 4 As shown, the embodiment of the present invention discloses a specific multi-language translation method. Compared with the previous embodiment, this embodiment further illustrates and optimizes the technical solution. Specifically:
[0061] Step S21: obtaining a translation request including the text to be translated and the target language sent by the user terminal.
[0062] Step S22: Encode the text to be translated to obtain the encoding of the text to be translated.
[0063] The specific implementation process of step S21 and step S22 refers to the specific embodiment disclosed above, which will not be described again here.
[0064] Step S23: determining whether there is a translation result of the target language in the translation request in the preset translation dictionary to obtain a corresponding determination result.
[0065] In this embodiment, it is determined whether there is a translation result of the target language in the translation request in the preset translation dictionary to obtain a corresponding judgment result. It can be understood that due to user personalization, it is possible that the language translation content of the target language does not exist in the preset translation dictionary. If the judgment result is that the language translation content of the target language exists in the preset translation dictionary, refer to Figure 5 As shown, in this system, if the translation content of the language corresponding to the encoding has been maintained in the preset translation dictionary, the pre-translation system scene pool will automatically associate the content in the preset translation dictionary and synchronize it to the pre-translation system scene pool for presentation, refer to Figure 6 As shown, the user can open the pre-translation system scene pool for direct viewing, which eliminates the need for manual retrieval translation or translation using translation software. By continuously maintaining the translation content in the preset translation dictionary, the preset translation dictionary can be connected to multiple software systems to keep the translation of professional terms in each software system consistent, thereby ensuring the accuracy of the translation of the production system menu and key production professional terms.
[0066] Step S24: If the judgment result is that the translation result of the target language in the translation request does not exist in the preset translation dictionary, the translation result of the target language is recorded in the preset translation dictionary and / or the pre-translation system scenario pool.
[0067] In this embodiment, when the judgment result is that the translation result of the target language in the translation request does not exist in the preset translation dictionary, it is necessary to choose to maintain the translation content of the target language in the preset translation dictionary according to the translation request, or to maintain the translation content of the target language in the pre-translation system scene pool.
[0068] In a specific implementation, if there is universal untranslated content, it is translated in the pre-translation system scenario pool, and the translation result is associated with a preset translation dictionary. The translation result can be synchronized to the translation dictionary for use in other system scenarios.
[0069] In another specific implementation, if there is a personalized demand, that is, the pre-translation system scenario pool allows personalized adjustment, but the translated content does not need to be provided for use in other system scenarios, then only the translation result of the target language is recorded in the pre-translation system scenario pool.
[0070] like Figure 7 As shown, the user can maintain the translation value of the language corresponding to this code in the preset translation dictionary. It can also be maintained in the translation scene pool. When the user maintains in the scene pool, he can choose whether to synchronize to the preset translation dictionary. If not synchronized, the translation content will only remain in the scene pool. It will not enter the preset translation dictionary of the multilingual system. Through the adjustment of the above-mentioned synchronous translation, it can adapt to the addition and modification of different software languages, so that the flexibility of the multilingual system is improved.
[0071] Step S24: Based on the encoding of the text to be translated and the target language, the corresponding translation result is queried from the preset translation dictionary and / or the pre-translation system scene pool, and the target language text is fed back to the user terminal.
[0072] In this embodiment, the user terminal obtains the recognized system scene translation. When the user actually uses the multilingual translation system with the imported language file, the target language needs to be selected first. After the user selects the language, the multilingual translation system will automatically open the corresponding language file of the corresponding language to replace the precompiled code in the system. Finally, a functional interface that the user can understand is formed. Figure 8 A pre-coded simulation diagram of a system scenario, such as Fig. 9 Translate the system scenario interface for the converted target language.
[0073] It can be seen that this application can simplify the difficulty of maintaining the international application language of each system and improve translation efficiency; through the multilingual translation system established by this application, the translation of professional terms in each software system can be kept consistent, ensuring the accuracy of the translation of production system menus and key production professional terms. And by establishing a translation scene tree, the speed of retrieval and export of translation terms in similar scenes is accelerated, and whether the translation content in the pre-translation system scene pool in this application is synchronized with the preset translation dictionary can adapt to the addition and modification of different software languages, thereby improving the flexibility of the multilingual translation system.
[0074] Reference Fig.10 As shown, the embodiment of the present invention discloses a multi-language translation device, comprising:
[0075] A request acquisition module 11, used to acquire a translation request including a text to be translated and a target language sent by a user terminal;
[0076] A text encoding module 12, used for encoding the text to be translated to obtain the encoding of the text to be translated;
[0077] The text acquisition module 13 is used to query the corresponding translation result from a preset translation dictionary based on the encoding of the text to be translated and the target language, and feed back the target language text to the user terminal.
[0078] It can be seen that the present application discloses a multilingual translation method, including: obtaining a translation request containing a text to be translated and a target language sent by a user terminal; encoding the text to be translated to obtain the encoding of the text to be translated; based on the encoding of the text to be translated and the target language, querying the corresponding translation result from a preset translation dictionary, and feeding back the target language text to the user terminal. It can be seen that the present application encodes the text to be translated in the translation request sent by the user terminal to obtain the corresponding encoding, and then uses the encoding and the target language to query the corresponding translation result from the preset translation dictionary. The preset translation dictionary can centrally manage the language texts contained in different menus and buttons in professional software, which is conducive to the centralized management of translation, so as to achieve consistency in the translation of professional terms in each system and improve the translation accuracy of production system menus and key production professional terms.
[0079] In some specific embodiments, the text acquisition module 13 may specifically include:
[0080] The relationship building unit is used to encode professional vocabulary to obtain a code corresponding to the professional vocabulary; record the translation results of multiple language texts corresponding to the code, and save the translation results of the multiple language texts in a preset translation dictionary; and build a corresponding relationship between the code and the corresponding translation results of the multiple language texts in the preset translation dictionary.
[0081] In some specific embodiments, the text encoding module 12 may specifically include:
[0082] The result judgment unit is used to judge whether there is a translation result of the target language in the translation request in the preset translation dictionary, so as to obtain a corresponding judgment result.
[0083] In some specific embodiments, the text encoding module 12 may specifically include:
[0084] The result recording unit is configured to record the translation result of the target language in the preset translation dictionary and / or the pre-translation system scenario pool if the judgment result is that the translation result of the target language in the translation request does not exist in the preset translation dictionary.
[0085] In some specific embodiments, the text encoding module 12 may specifically include:
[0086] A result synchronization unit is used to select whether to synchronize the translation results in the pre-translation scene pool to the preset translation dictionary according to the preset text storage conditions if the translation results of the target language are recorded in the pre-translation system scene pool.
[0087] In some specific embodiments, the text acquisition module 13 may specifically include:
[0088] The pre-coding unit is used to pre-code professional vocabulary in different system scenarios and save the codes in a pre-translation system scenario pool corresponding to the system scenario.
[0089] In some specific embodiments, the text acquisition module 13 may specifically include:
[0090] The text generation unit is used to query the corresponding translation result from the preset translation dictionary based on the encoding of the text to be translated and the target language, and synchronize the translation result to the pre-translation system scene pool; select the language file format, generate the target language text according to the language file format, and feed back the target language text to the user terminal.
[0091] Furthermore, the present application also discloses an electronic device. Fig.11 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content in the diagram cannot be regarded as any limitation on the scope of use of the present application.
[0092] Fig.11 The present invention provides a schematic diagram of the structure of an electronic device 20 provided in an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the multilingual translation method disclosed in any of the aforementioned embodiments. In addition, the electronic device 20 in this embodiment may specifically be an electronic computer.
[0093] In this embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.
[0094] Among them, the processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 21 can be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 21 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 21 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 21 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
[0095] In addition, the memory 22, as a carrier for storing resources, can be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon can include an operating system 221, a computer program 222, etc., and the storage method can be temporary storage or permanent storage.
[0096] Among them, the operating system 221 is used to manage and control the hardware devices and computer programs 222 on the electronic device 20, so as to realize the operation and processing of the processor 21 on the massive data 223 in the memory 22, which can be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program that can be used to complete the multi-language translation method performed by the electronic device 20 disclosed in any of the aforementioned embodiments, the computer program 222 can further include a computer program that can be used to complete other specific tasks. In addition to data received by the electronic device and transmitted from an external device, the data 223 can also include data collected by its own input and output interface 25, etc.
[0097] Furthermore, the present application also discloses a computer-readable storage medium for storing a computer program; wherein the computer program, when executed by a processor, implements the multilingual translation method disclosed above. The specific steps of the method can refer to the corresponding contents disclosed in the above embodiments, and will not be repeated here.
[0098] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0099] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented with electronic hardware, computer software or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to the function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application. The steps of the method or algorithm described in conjunction with the embodiments disclosed herein can be directly implemented with a software module executed by a hardware or processor, or a combination of the two. The software module can be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the technical field.
[0100] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0101] The above is a detailed introduction to a multilingual translation method, device, equipment, and storage medium provided by the present invention. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for a person skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as limiting the present invention.
Claims
1. A multilingual translation method, characterized in that: include: Obtaining a translation request including the text to be translated and the target language sent by the user terminal; Encoding the text to be translated to obtain the encoding of the text to be translated; Based on the encoding of the text to be translated and the target language, query the corresponding translation result from a preset translation dictionary, and feed back the target language text to the user terminal; Wherein, before searching for corresponding translation results from a preset translation dictionary based on the encoding of the text to be translated and the target language, the method further includes: Pre-encode professional vocabulary in different system scenarios, and save the codes in a pre-translated system scenario pool corresponding to the system scenarios; The step of storing the code in a pre-translated system scenario pool corresponding to the system scenario includes: The codes of professional vocabulary belonging to the same system scenario are stored in the same pre-translation system scenario pool, and the associated pre-translation system scenario pools in the subsystem scenarios contained in the same parent node system scenario are associated again to form a tree-shaped pre-translation document; the tree-shaped pre-translation document contains the association relationship between the codes of all subsystem scenarios of the parent node system scenario and the corresponding translation results in the preset translation dictionary; The querying of corresponding translation results from a preset translation dictionary based on the encoding of the text to be translated and the target language includes: determining a target system scenario to which the encoding of the text to be translated belongs, and retrieving corresponding translation results from a tree-shaped pre-translation document corresponding to the target system scenario.
2. The multilingual translation method according to claim 1, characterized in that: Before searching for corresponding translation results from a preset translation dictionary based on the encoding of the text to be translated and the target language, the method further includes: Encode the professional vocabulary to obtain the code corresponding to the professional vocabulary; Recording translation results of multiple language texts corresponding to the codes, and saving the translation results of the multiple language texts in a preset translation dictionary; A correspondence between the codes and the corresponding translation results of the multi-language texts in the preset translation dictionary is constructed.
3. The multilingual translation method according to claim 1, characterized in that: After encoding the text to be translated to obtain the encoding of the text to be translated, the method further includes: It is determined whether there is a translation result of the target language in the translation request in the preset translation dictionary to obtain a corresponding determination result.
4. The multilingual translation method according to claim 3, characterized in that: The determining whether there is a translation result of the target language in the translation request in the preset translation dictionary to obtain a corresponding determination result includes: If the judgment result is that the translation result of the target language in the translation request does not exist in the preset translation dictionary, the translation result of the target language is recorded in the preset translation dictionary and / or in the pre-translation system scenario pool.
5. The multilingual translation method according to claim 4, characterized in that: The recording of the translation result of the target language in the translation dictionary and / or the pre-translation system scene pool includes: If the translation result of the target language is recorded in the pre-translation system scene pool, whether to synchronize the translation result in the pre-translation scene pool to the preset translation dictionary is selected according to the preset text storage condition.
6. The multilingual translation method according to any one of claims 1 to 5, characterized in that: The process of searching for corresponding translation results from a preset translation dictionary based on the encoding of the text to be translated and the target language, and feeding back the target language text to the user terminal, further includes: Based on the encoding of the text to be translated and the target language, query the corresponding translation result from the preset translation dictionary, and synchronize the translation result to the pre-translation system scene pool; A language file format is selected, a target language text is generated from the translation result according to the language file format, and the target language text is fed back to the user terminal.
7. A multi-language translation device, characterized in that: include: A request acquisition module, used to acquire a translation request including a text to be translated and a target language sent by a user terminal; A text encoding module, used for encoding the text to be translated to obtain the encoding of the text to be translated; A text acquisition module, used to query the corresponding translation result from a preset translation dictionary based on the encoding of the text to be translated and the target language, and feed back the target language text to the user terminal; A pre-coding unit, used to pre-code professional vocabulary in different system scenarios, and save the codes in a pre-translation system scenario pool corresponding to the system scenario; The pre-coding unit is specifically used to save the codes of professional vocabulary belonging to the same system scenario in the same pre-translation system scenario pool, re-associate the associated pre-translation system scenario pools in the subsystem scenarios contained in the same parent node system scenario, and form a tree-shaped pre-translation document; the tree-shaped pre-translation document contains the association relationship between the codes of all subsystem scenarios of the parent node system scenario and the corresponding translation results in the preset translation dictionary; The text acquisition module is specifically used to determine the target system scenario to which the encoding of the text to be translated belongs, and retrieve the corresponding translation result from the tree-shaped pre-translation document corresponding to the target system scenario.
8. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, configured to execute the computer program to implement the steps of the multilingual translation method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: Used to store computer programs; wherein, when the computer program is executed by a processor, the steps of the multilingual translation method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Text translation method and device and equipment
CN107391500A
Language processing method and device, equipment and storage medium
CN114398912A