Text translation method, system, device and equipment and storage medium
By generating translation prompt text and calling AI big model for multilingual translation, the problems of low efficiency and low accuracy of international text translation in the existing technology are solved, automated translation is realized, and translation efficiency and accuracy are improved.
Patent Information
- Application Number
- CN202411397842.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-08
- Publication Date
- 2024-12-31
AI Technical Summary
Text translation in the internationalization of existing software is inefficient and accurate, and requires manual or manual processing of file formats and translation results.
By obtaining the original language text file, generating translation prompt text based on text generation rules templates and translation language requirements information, calling the AI model for multi-language translation, automatically completing the original language text file, and generating multi-language files.
It improves the translation efficiency and accuracy of software language text, realizes the automated translation process, and reduces manual intervention.
Smart Images

Figure CN119227701A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a text translation method, system, device, equipment, storage medium and computer program product. Background Art
[0002] In the prior art, software internationalization is usually achieved through manual translation or using traditional translation tools. These tools require developers to export text into a specific format file (for example, .strings files in iOS system development), then translate it and import it into the project. Some developers will use a simple translation API, but they need to manually handle the file format and translation results.
[0003] Currently, the translation efficiency and accuracy of software language texts are low. Summary of the invention
[0004] The present disclosure provides a text translation method, system, device, equipment, storage medium and computer program product to at least solve the problems of low efficiency and low accuracy of existing translation.
[0005] The technical solution of the present disclosure is as follows:
[0006] The present disclosure provides a text translation method, including:
[0007] Get the original language text file;
[0008] Generate a translation prompt text corresponding to the original language text file according to the original language text file, the text generation rule template and the translation language requirement information;
[0009] Calling the big model interface to provide the translation prompt text to the AI big model, so that the AI big model can perform multilingual translation according to the translation prompt text to generate multilingual translation text;
[0010] The original language text file is translated and completed according to the multilingual translation text to obtain a multilingual file.
[0011] Optionally, generating a translation prompt text corresponding to the original language text file according to the original language text file, a text generation rule template and translation language requirement information includes:
[0012] Extracting the text to be translated from the original language text file;
[0013] According to the translation language requirement information, the text to be translated is added to the text generation rule template to generate a translation prompt text corresponding to the original language text file.
[0014] Optionally, the translation language requirement information includes: language type and output language format; the adding of the text to be translated into the text generation rule template according to the translation language requirement information to generate a translation prompt text corresponding to the original language text file includes:
[0015] According to the language type and the output language format, the text to be translated is added to the text generation rule template to generate a translation prompt text corresponding to the original language text file.
[0016] Optionally, calling the big model interface to provide the translation prompt text to the AI big model, so that the AI big model performs multilingual translation according to the translation prompt text to generate multilingual translation text, includes:
[0017] The big model interface is called to send the translation prompt text to the AI big model deployed on the server, so that the AI big model can perform multilingual translation according to the translation prompt text and generate multilingual translation text.
[0018] Optionally, the translating and completing the original language text file according to the multilingual translation text to obtain the multilingual file includes:
[0019] The multilingual translation text is added to the designated position of the original language text file to obtain the multilingual file.
[0020] The present disclosure also provides a text translation system, including:
[0021] The user terminal obtains an original language text file; generates a translation prompt text corresponding to the original language text file according to the original language text file, a text generation rule template and translation language requirement information; calls a large model interface to send the translation prompt text to a server; and translates and completes the original language text file according to the received multilingual translation text sent by the server to obtain a multilingual file;
[0022] The server receives the translation prompt text uploaded by the user terminal, uses the AI big model deployed on the server to perform multilingual translation according to the translation prompt text to generate the multilingual translation text; and sends the multilingual translation text to the user terminal.
[0023] The present disclosure also provides a text translation device, including:
[0024] An acquisition module, used for acquiring original language text files;
[0025] A generation module, used for generating a translation prompt text corresponding to the original language text file according to the original language text file, the text generation rule template and the translation language requirement information;
[0026] A translation module, used to call the big model interface and provide the translation prompt text to the AI big model, so that the AI big model can perform multilingual translation according to the translation prompt text and generate multilingual translation text;
[0027] The completion module is used to translate and complete the original language text file according to the multilingual translation text to obtain a multilingual file.
[0028] The present disclosure also provides an electronic device, including:
[0029] processor;
[0030] a memory for storing instructions executable by the processor;
[0031] The processor is configured to execute the instructions to implement each step in the above method.
[0032] The embodiment of the present disclosure further provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, each step in the above method is implemented.
[0033] The embodiment of the present disclosure further provides a computer program product, including a computer program / instruction, which implements each step of the above method when executed by a processor.
[0034] The technical solution provided by the embodiments of the present disclosure brings at least the following beneficial effects:
[0035] In some embodiments of the present disclosure, an original language text file is obtained; a translation prompt text corresponding to the original language text file is automatically generated according to the original language text file, a text generation rule template and translation language requirement information; a large model interface is called to provide the translation prompt text to the AI large model, and the AI large model is used to perform multi-language translation according to the translation prompt text to generate a multi-language translation text; the original language text file is translated and completed according to the multi-language translation text to obtain a multi-language file; the entire translation process is automatically executed to improve the translation efficiency of the software language text, and the translation is combined with the AI large model to improve the accuracy of the translation.
[0036] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] The drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute improper limitations on the present disclosure.
[0038] Figure 1 A flowchart of a text translation method provided for an exemplary embodiment of the present disclosure;
[0039] Figure 2 A schematic diagram of a translation prompt text provided for an exemplary embodiment of the present disclosure;
[0040] Figure 3 A schematic diagram of a multi-language translation text provided for an exemplary embodiment of the present disclosure;
[0041] Figure 4 A schematic diagram of a text translation system provided for an exemplary embodiment of the present disclosure;
[0042] Figure 5 A structural schematic diagram of a text translation device provided for an exemplary embodiment of the present disclosure;
[0043] Figure 6 A schematic structural diagram of an electronic device provided by an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION
[0044] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings.
[0045] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure.
[0046] It should be noted that the user information involved in this disclosure includes but is not limited to: user device information and user personal information; the collection, storage, use, processing, transmission, provision and disclosure of user information in this disclosure comply with the relevant laws and regulations and do not violate public order and good morals.
[0047] In the prior art, software internationalization is usually achieved through manual translation or using traditional translation tools. These tools require developers to export text into a specific format file (for example, .strings files in iOS system development), then translate it and import it into the project. Some developers will use a simple translation API, but they need to manually handle the file format and translation results.
[0048] Currently, the translation efficiency and accuracy of software language texts are low.
[0049] In response to the above technical problems, in some embodiments of the present disclosure, an original language text file is obtained; a translation prompt text corresponding to the original language text file is automatically generated according to the original language text file, a text generation rule template and translation language requirement information; the big model interface is called to provide the translation prompt text to the AI big model, and the AI big model is used to perform multilingual translation according to the translation prompt text to generate a multilingual translation text; according to the multilingual translation text, the original language text file is translated and completed to obtain a multilingual file; the entire translation process is automatically executed to improve the translation efficiency of the software language text, and the translation is combined with the AI big model to improve the accuracy of the translation.
[0050] The technical solutions provided by various embodiments of the present disclosure are described in detail below in conjunction with the accompanying drawings.
[0051] Figure 1 The flowchart of a text translation method provided by the exemplary embodiment of the present disclosure is as follows. Figure 1 As shown, the method includes:
[0052] S101: Obtaining an original language text file;
[0053] S102: Generate a translation prompt text corresponding to the original language text file according to the original language text file, the text generation rule template and the translation language requirement information;
[0054] S103: calling the big model interface to provide the translation prompt text to the AI big model, so that the AI big model can perform multi-language translation according to the translation prompt text and generate multi-language translation text;
[0055] S104: According to the multilingual translation text, the original language text file is translated and completed to obtain a multilingual file.
[0056] In this embodiment, the execution subject of the above method may be a terminal device or a server.
[0057] Among them, the terminal device includes but is not limited to a mobile station (MS), a mobile terminal, a mobile phone, a handset and a portable equipment, etc. The terminal device can communicate with one or more core networks via a radio access network (RAN). For example, the terminal device can be a mobile phone (or a "cellular" phone), a computer with a wireless communication function, etc. The terminal device can also be a computer with a wireless transceiver function, a virtual reality (VR) terminal device, an AR terminal device, a wireless terminal in industrial control, a wireless terminal in self driving, a wireless terminal in remote medical, a wireless terminal in a smart grid, a wireless terminal in transportation safety, a wireless terminal in a smart city, a wireless terminal in a smart home, etc., and the operating system installed on the terminal device includes but is not limited to: IOS, Android, windows, linux, Mac OS and other operating systems. In different networks, the terminal may be called different names, such as user equipment, mobile station, subscriber unit, station, cellular phone, personal digital assistant, wireless modem, wireless communication device, handheld device, laptop computer, cordless phone, wireless local loop station, television, etc. For the convenience of description, it is referred to as terminal equipment in this embodiment.
[0058] It should be noted that the above method of the present disclosure can be implemented by developing corresponding scripts and automatically executing the above steps by running the scripts.
[0059] In this embodiment, the implementation form of the server is not limited. For example, the server can be a conventional server, a cloud server, a cloud host, a virtual center, or other server devices. The server mainly includes a processor, a hard disk, a memory, a system bus, etc., and a general computer architecture type.
[0060] In this embodiment, an original language text file is obtained; a translation prompt text corresponding to the original language text file is automatically generated according to the original language text file, a text generation rule template and translation language requirement information; a large model interface is called to provide the translation prompt text to the AI large model, and the AI large model is used to perform multi-language translation according to the translation prompt text to generate a multi-language translation text; based on the multi-language translation text, the original language text file is translated and completed to obtain a multi-language file; the entire translation process is automatically executed to improve the translation efficiency of the software language text, and the translation is combined with the AI large model to improve the accuracy of the translation.
[0061] In some embodiments of the present disclosure, an original language text file is obtained. For example, an original language text file in a specific format is exported using a file export tool. The original language text file, for example, is a .strings file in iOS system development. It should be noted that the original language text file can be a file of any language type.
[0062] In some embodiments of the present disclosure, it is necessary to pre-formulate a text generation rule template. For example, the style of the text generation rule template, the content in the text generation rule template, and the content format. The following is a translation prompt text to clearly explain the text generation rule template.
[0063] In some embodiments of the present disclosure, in response to an input operation, translation language requirement information is obtained. The translation language requirement information includes: language type and output language format. For example, Chinese is translated into Japanese, Korean, German and French. The output language format is, for example, a key-value format.
[0064] In some embodiments of the present disclosure, a translation prompt text corresponding to the original language text file is generated according to the original language text file, the text generation rule template and the translation language requirement information. One achievable method is to extract the text to be translated from the original language text file; according to the translation language requirement information, add the text to be translated to the text generation rule template to generate the translation prompt text corresponding to the original language text file. Optionally, according to the language type and the output language format, add the text to be translated to the text generation rule template to generate the translation prompt text corresponding to the original language text file. Among them, the text to be translated is exported from the original language text file, and the number of the text to be translated is determined; according to the language type and the output language format, the text to be translated is added to the text generation rule template to generate the translation prompt text corresponding to the original language text file.
[0065] Figure 2 A schematic diagram of a translation prompt text provided by an exemplary embodiment of the present disclosure. Figure 2As shown, the number of texts to be translated is 3, the language of the texts to be translated is Chinese, and the language types that the texts to be translated need to be translated into are Japanese, German, Korean and French.
[0066] In some embodiments of the present disclosure, a large model interface is called to provide the translation prompt text to the AI large model, so that the AI large model can perform multilingual translation according to the translation prompt text and generate a multilingual translation text. One achievable method is to call the large model interface to send the translation prompt text to the AI large model deployed on the server, so that the AI large model can perform multilingual translation according to the translation prompt text and generate a multilingual translation text. Among them, the large model interface is called to send the translation prompt text to the server; the server receives the translation prompt text uploaded by the user terminal, and uses the AI large model deployed on the server to perform multilingual translation according to the translation prompt text to generate a multilingual translation text; and sends the multilingual translation text to the user terminal according to the multilingual translation text sent by the server. The present disclosure uses the AI large model to semantically understand the translation prompt text and perform multilingual translation to obtain a multilingual translation text with a more accurate translation result.
[0067] Figure 3 A schematic diagram of a multi-language translation text provided for an exemplary embodiment of the present disclosure. Figure 3 As shown, the Chinese text to be translated is translated into Japanese, Korean, German and French respectively, and output in the output language format key-value format.
[0068] In some embodiments of the present disclosure, the original language text file is translated and completed according to the multilingual translation text to obtain a multilingual file. One achievable method is to add the multilingual translation text to a specified position of the original language text file to obtain a multilingual file. The multilingual translation text includes translation texts in multiple languages, and the position of each language translation text in the original language text file can be identified, and then each language translation text is added to the corresponding position to obtain a multilingual file.
[0069] After obtaining the multi-language file, import the multi-language file into the project.
[0070] In the above method embodiment of the present disclosure, an original language text file is obtained; a translation prompt text corresponding to the original language text file is automatically generated according to the original language text file, a text generation rule template and translation language requirement information; a large model interface is called to provide the translation prompt text to the AI large model, and the AI large model is used to perform multi-language translation according to the translation prompt text to generate a multi-language translation text; the original language text file is translated and completed according to the multi-language translation text to obtain a multi-language file; the entire translation process is automatically executed to improve the translation efficiency of the software language text, and the translation is combined with the AI large model to improve the accuracy of the translation.
[0071] Combined with the description of the above embodiments, Figure 4 FIG. 4 is a schematic diagram of a text translation system 40 provided by an exemplary embodiment of the present disclosure. Figure 4 As shown, the text translation system 40 includes: a user terminal 41 and a server 42. The user terminal 41 obtains the original language text file; generates a translation prompt text corresponding to the original language text file according to the original language text file, the text generation rule template and the translation language requirement information; calls the large model interface to send the translation prompt text to the server; translates and completes the original language text file according to the multilingual translation text sent by the server to obtain a multilingual file; the server 42 receives the translation prompt text uploaded by the user terminal, uses the AI large model deployed on the server to perform multilingual translation according to the translation prompt text, generates a multilingual translation text; and sends the multilingual translation text to the user terminal. It should be noted that the specific implementation method of the execution steps of the user terminal 41 and the server 42 can be found in the description of the aforementioned embodiments, which will not be repeated here.
[0072] Figure 5 FIG. 5 is a schematic diagram of a text translation device 50 provided by an exemplary embodiment of the present disclosure. Figure 5 As shown, the text translation device 50 includes: an acquisition module 51, a generation module 52, a translation module 53 and a completion module 54.
[0073] Wherein, the acquisition module 51 is used to acquire the original language text file;
[0074] A generating module 52, for generating a translation prompt text corresponding to the original language text file according to the original language text file, the text generating rule template and the translation language requirement information;
[0075] The translation module 53 is used to call the big model interface and provide the translation prompt text to the AI big model, so that the AI big model can perform multi-language translation according to the translation prompt text and generate multi-language translation text;
[0076] The completion module 54 is used to translate and complete the original language text file according to the multilingual translation text to obtain a multilingual file.
[0077] Optionally, when generating the translation prompt text corresponding to the original language text file according to the original language text file, the text generation rule template and the translation language requirement information, the generation module 52 is used to:
[0078] Extracting text to be translated from original language text files;
[0079] According to the translation language requirement information, the text to be translated is added to the text generation rule template to generate a translation prompt text corresponding to the original language text file.
[0080] Optionally, the translation language requirement information includes: language type and output language format; when the generation module 52 adds the text to be translated into the text generation rule template according to the translation language requirement information to generate the translation prompt text corresponding to the original language text file, it is used to:
[0081] According to the language type and output language format, the text to be translated is added to the text generation rule template to generate translation prompt text corresponding to the original language text file.
[0082] Optionally, the big model interface is called, and the translation module 53 provides the translation prompt text to the AI big model so that the AI big model performs multilingual translation according to the translation prompt text and generates multilingual translation text, and is used to:
[0083] The big model interface is called to send the translation prompt text to the AI big model deployed on the server, so that the AI big model can perform multilingual translation according to the translation prompt text and generate multilingual translation text.
[0084] Optionally, when the completion module 54 performs translation completion on the original language text file according to the multilingual translation text to obtain the multilingual file, it is used to:
[0085] Add the multilingual translation text to the specified position of the original language text file to obtain a multilingual file.
[0086] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0087] Figure 6 FIG. 1 is a schematic diagram of a structure of an electronic device provided by an exemplary embodiment of the present disclosure. Figure 6 As shown, the electronic device includes: a memory 61 and a processor 62. In addition, the electronic device also includes a power supply component 63 and a communication component 64.
[0088] The memory 61 is used to store computer programs and can be configured to store various other data to support operations on the electronic device. Examples of such data include instructions for any application program or method operating on the electronic device.
[0089] Memory 61 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0090] The communication component 64 is used for data transmission with other devices.
[0091] The processor 62 can execute computer instructions stored in the memory 61 to: obtain the original language text file;
[0092] Generate a translation prompt text corresponding to the original language text file according to the original language text file, the text generation rule template and the translation language requirement information;
[0093] Call the big model interface and provide the translation prompt text to the AI big model, so that the AI big model can perform multi-language translation according to the translation prompt text and generate multi-language translation text;
[0094] According to the multilingual translation text, the original language text file is translated and completed to obtain a multilingual file.
[0095] Optionally, generating a translation prompt text corresponding to the original language text file according to the original language text file, the text generation rule template and the translation language requirement information includes:
[0096] Extracting text to be translated from original language text files;
[0097] According to the translation language requirement information, the text to be translated is added to the text generation rule template to generate a translation prompt text corresponding to the original language text file.
[0098] Optionally, the translation language requirement information includes: language type and output language format; according to the translation language requirement information, the text to be translated is added to the text generation rule template to generate a translation prompt text corresponding to the original language text file, including:
[0099] According to the language type and output language format, the text to be translated is added to the text generation rule template to generate translation prompt text corresponding to the original language text file.
[0100] Optionally, the big model interface is called to provide the translation prompt text to the AI big model, so that the AI big model can perform multilingual translation according to the translation prompt text to generate multilingual translation text, including:
[0101] The big model interface is called to send the translation prompt text to the AI big model deployed on the server, so that the AI big model can perform multilingual translation according to the translation prompt text and generate multilingual translation text.
[0102] Optionally, the original language text file is translated and completed according to the multilingual translation text to obtain a multilingual file, including:
[0103] Add the multilingual translation text to the specified position of the original language text file to obtain a multilingual file.
[0104] Accordingly, the present disclosure also provides a computer-readable storage medium storing a computer program. When the computer-readable storage medium stores the computer program and the computer program is executed by one or more processors, the one or more processors execute Figure 1 Each step in the method embodiment.
[0105] Accordingly, the present disclosure also provides a computer program product, the computer program product includes a computer program / instruction, the computer program / instruction is executed by a processor Figure 1 Each step in the method embodiment.
[0106] Above Figure 6 The communication component in is configured to facilitate wired or wireless communication between the device where the communication component is located and other devices. The device where the communication component is located can access a wireless network based on a communication standard, such as WiFi, 2G, 3G, 4G / LTE, 5G and other mobile communication networks, or a combination thereof. In an exemplary embodiment, the communication component receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0107] Above Figure 6 The power supply component in the device provides power to various components of the device where the power supply component is located. The power supply component may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the device where the power supply component is located.
[0108] The electronic device also includes a display screen and an audio component.
[0109] The display screen includes a screen, and the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation.
[0110] The audio component may be configured to output and / or input audio signals. For example, the audio component includes a microphone (MIC), and when the device where the audio component is located is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal may be further stored in a memory or sent via a communication component. In some embodiments, the audio component also includes a speaker for outputting an audio signal.
[0111] In the above-mentioned apparatus, device, storage medium and computer program product embodiments of the present disclosure, an original language text file is obtained; a translation prompt text corresponding to the original language text file is automatically generated according to the original language text file, a text generation rule template and translation language requirement information; a large model interface is called to provide the translation prompt text to the AI large model, and the AI large model is used to perform multi-language translation according to the translation prompt text to generate a multi-language translation text; the original language text file is translated and completed according to the multi-language translation text to obtain a multi-language file; the entire translation process is automatically executed to improve the translation efficiency of the software language text, and the translation is combined with the AI large model to improve the accuracy of the translation.
[0112] Those skilled in the art will appreciate that the embodiments of the present disclosure may be provided as methods, systems, or computer program products. Therefore, the present disclosure may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present disclosure may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0113] The present disclosure is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present disclosure. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0114] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0115] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0116] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0117] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0118] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0119] It should be noted that, in this article, relational terms such as "first" and "second" 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 existence of other identical elements in the process, method, article or device including the elements.
[0120] The above are only specific embodiments of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to these embodiments herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A text translation method, characterized in that: include: Get the original language text file; Generate a translation prompt text corresponding to the original language text file according to the original language text file, the text generation rule template and the translation language requirement information; Calling the big model interface to provide the translation prompt text to the AI big model, so that the AI big model can perform multilingual translation according to the translation prompt text to generate multilingual translation text; The original language text file is translated and completed according to the multilingual translation text to obtain a multilingual file.
2. The method according to claim 1, characterized in that The step of generating a translation prompt text corresponding to the original language text file according to the original language text file, the text generation rule template and the translation language requirement information comprises: Extracting the text to be translated from the original language text file; According to the translation language requirement information, the text to be translated is added to the text generation rule template to generate a translation prompt text corresponding to the original language text file.
3. The method according to claim 2, characterized in that The translation language requirement information includes: language type and output language format; adding the text to be translated to the text generation rule template according to the translation language requirement information to generate a translation prompt text corresponding to the original language text file includes: According to the language type and the output language format, the text to be translated is added to the text generation rule template to generate a translation prompt text corresponding to the original language text file.
4. The method according to claim 1, characterized in that The calling of the big model interface to provide the translation prompt text to the AI big model, so that the AI big model performs multilingual translation according to the translation prompt text to generate multilingual translation text, includes: The big model interface is called to send the translation prompt text to the AI big model deployed on the server, so that the AI big model can perform multilingual translation according to the translation prompt text and generate multilingual translation text.
5. The method according to claim 1, characterized in that The step of translating and completing the original language text file according to the multilingual translation text to obtain a multilingual file includes: The multilingual translation text is added to the designated position of the original language text file to obtain the multilingual file.
6. A text translation system, characterized in that: include: The user terminal obtains an original language text file; and generates a translation prompt text corresponding to the original language text file according to the original language text file, a text generation rule template and translation language requirement information; Calling the large model interface to send the translation prompt text to the server; According to the received multilingual translation text sent by the server, the original language text file is translated and completed to obtain a multilingual file; The server receives the translation prompt text uploaded by the user terminal, and uses the AI big model deployed on the server to perform multilingual translation according to the translation prompt text to generate the multilingual translation text; And the multilingual translation text is sent to the user terminal.
7. A text translation device, characterized in that: include: An acquisition module, used for acquiring original language text files; A generation module, used for generating a translation prompt text corresponding to the original language text file according to the original language text file, the text generation rule template and the translation language requirement information; A translation module, used to call the big model interface and provide the translation prompt text to the AI big model, so that the AI big model can perform multilingual translation according to the translation prompt text and generate multilingual translation text; The completion module is used to translate and complete the original language text file according to the multilingual translation text to obtain a multilingual file.
8. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement each step in the method according to any one of claims 1 to 5.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, each step of the method according to any one of claims 1 to 5 is implemented.
10. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.