TW201608394A - Automatic translation method of instant messaging system - Google Patents
Automatic translation method of instant messaging system Download PDFInfo
- Publication number
- TW201608394A TW201608394A TW103129039A TW103129039A TW201608394A TW 201608394 A TW201608394 A TW 201608394A TW 103129039 A TW103129039 A TW 103129039A TW 103129039 A TW103129039 A TW 103129039A TW 201608394 A TW201608394 A TW 201608394A
- Authority
- TW
- Taiwan
- Prior art keywords
- language
- communication device
- remote
- translation
- instant messaging
- Prior art date
Links
Landscapes
- Information Transfer Between Computers (AREA)
- Machine Translation (AREA)
Abstract
Description
本發明是有關於一種即時通訊系統的翻譯方法,特別是指一種自動化的即時通訊系統的翻譯方法。 The invention relates to a translation method of an instant messaging system, in particular to an automatic instant messaging system translation method.
隨著即時通訊技術的盛行,在即時通訊程式中發送訊息已成為現代人溝通的常見工具。另外,線上翻譯程式可以提供文字翻譯的服務,但是必須藉由使用者手動輸入語系/國家,並輸入文字才能得到翻譯內容,費時費力。 With the prevalence of instant messaging technology, sending messages in instant messaging programs has become a common tool for modern communication. In addition, the online translation program can provide text translation services, but the user must manually input the language/country and enter the text to get the translated content, which is time consuming and laborious.
本發明之目的,即在提供一種解決先前技術缺失的一對一及一對多的即時通訊系統的自動翻譯方法。 It is an object of the present invention to provide an automatic translation method for a one-to-one and one-to-many instant messaging system that addresses the prior art.
本發明即時通訊系統的自動翻譯方法主要是配合彼此連線的一伺服端、一近端通訊裝置及一遠端通訊裝置運作,且該近端通訊裝置及該遠端通訊裝置皆安裝有一即時通訊軟體,該伺服端安裝一應用程式,該應用程式經由該伺服端載入以執行:一遠端語系偵測步驟,偵測該遠端通訊裝置的程式安裝的一遠端語系/國家資料;及一本地對遠端的翻譯步驟,接收該近端通訊裝置於該即時通訊軟體輸入的一文字訊息,並依據該遠端語系/國家資料取得對 應語系的語料以將該文字訊息翻譯成對應該遠端語系的譯文訊息,且將該遠端語系的譯文訊息發送予該遠端通訊裝置。 The automatic translation method of the instant messaging system of the present invention mainly operates with a servo terminal, a near-end communication device and a remote communication device connected to each other, and the near-end communication device and the remote communication device are all equipped with an instant communication. Software, the server is installed with an application, and the application is loaded via the server to perform: a remote language detecting step to detect a remote language/country data installed by the remote communication device; and a local to remote translation step, receiving a text message input by the near-end communication device in the instant messaging software, and obtaining a pair according to the remote language/country data The corpus of the language system translates the text message into a translation message corresponding to the remote language, and transmits the translation message of the remote language to the remote communication device.
其中,該應用程式還經由該伺服端載入以執行:偵測該近端通訊裝置的程式安裝的一本地語系/國家資料;取得該遠端通訊裝置在該即時通訊軟體輸入的文字訊息,並依據該本地語系/國家資料取得對應語系的語料以將該文字訊息翻譯成對應該本地語系的譯文訊息,且將該本地語系的譯文訊息顯示予該近端通訊裝置。 The application is further loaded by the server to perform: detecting a local language/country data installed by the program of the near-end communication device; obtaining a text message input by the remote communication device in the instant messaging software, and The corpus of the corresponding language is obtained according to the local language/country data to translate the text message into a translation message corresponding to the local language, and the translation message of the local language is displayed to the near-end communication device.
其中,該近端通訊裝置的本地語系/國家資料係取自其安裝的一第一作業系統程式的國別/語系,該遠端通訊裝置的遠端語系/國家資料係取自其安裝的一第二作業系統程式的國別/語系。 The local language/country data of the near-end communication device is taken from the country/language of a first operating system program installed by the remote communication device, and the remote language/national data of the remote communication device is taken from the installed one. Country/language of the second operating system program.
本發明即時通訊系統的自動翻譯方法是配合彼此連線的一伺服端、一近端通訊裝置及多個遠端通訊裝置運作,且該近端通訊裝置及該等遠端通訊裝置皆安裝有一即時通訊軟體,該伺服端安裝一應用程式,該應用程式經由該伺服端載入以執行:一遠端語系偵測步驟,偵測該等遠端通訊裝置的個別語系/國家資料;及一本地對遠端的翻譯步驟,接收該近端通訊裝置於該即時通訊軟體輸入的一文字訊息,並依據個別語系/國家資料取得對應語系的線上翻譯服務翻譯成對應個別語系的訊息內容,且將個別語系的訊息內容分別發送予該等遠端通訊裝置。 The automatic translation method of the instant messaging system of the present invention is operated by a servo terminal, a near-end communication device and a plurality of remote communication devices connected to each other, and the near-end communication device and the remote communication devices are installed with an instant. a communication software, the server is installed with an application, and the application is loaded via the server to perform: a remote language detection step, detecting individual language/country data of the remote communication devices; and a local pair The remote translation step receives a text message input by the near-end communication device in the instant messaging software, and obtains an online translation service corresponding to the language system according to the individual language/country data into a message content corresponding to the individual language system, and the individual language system The message content is sent to the remote communication devices separately.
其中,該應用程式還經由該伺服端載入以執 行:偵測該近端通訊裝置的程式安裝的一本地語系/國家資料;取得該遠端通訊裝置在該即時通訊軟體輸入的文字訊息,並依據該本地語系/國家資料取得對應語系的語料以將該文字訊息翻譯成對應該本地語系的譯文訊息,且將該本地語系的譯文訊息顯示予該近端通訊裝置。 Wherein, the application is also loaded via the server Line: detecting a local language/country data installed by the program of the near-end communication device; obtaining a text message input by the remote communication device in the instant messaging software, and obtaining a corpus of the corresponding language according to the local language/country data Translating the text message into a translation message corresponding to the local language, and displaying the translation message of the local language to the near-end communication device.
其中,該近端通訊裝置的本地語系/國家資料係取自其安裝的作業系統程式的國別/語系,該等遠端通訊裝置的語系/國家資料係取自個別安裝的作業系統程式的國別/語系。 Wherein, the local language/country data of the near-end communication device is taken from the country/language of the operating system program installed, and the language/country data of the remote communication device is taken from the country of the separately installed operating system program. No / language.
本發明之功效在於:無需手動選擇翻譯語系,更能發揮即時通訊的優勢。 The effect of the invention is that it is possible to exert the advantages of instant messaging without having to manually select a translation language system.
1‧‧‧伺服器 1‧‧‧Server
2‧‧‧翻譯伺服器 2‧‧‧Translation server
3‧‧‧近端通訊裝置 3‧‧‧ Near-end communication device
300‧‧‧通訊網路 300‧‧‧Communication network
5、51~53‧‧‧遠端通訊裝置 5, 51~53‧‧‧ remote communication device
S11~S14‧‧‧步驟 S11~S14‧‧‧Steps
S21~S24‧‧‧步驟 S21~S24‧‧‧Steps
S31~S34‧‧‧步驟 S31~S34‧‧‧Steps
S51~S54‧‧‧步驟 S51~S54‧‧‧Steps
S101~S104‧‧‧步驟 S101~S104‧‧‧Steps
S201~S204‧‧‧步驟 S201~S204‧‧‧Steps
S301~S304‧‧‧步驟 S301~S304‧‧‧Steps
S501~S504‧‧‧步驟 S501~S504‧‧‧Steps
本發明之其他的特徵及功效,將於參照圖式的實施方式中清楚地呈現,其中:圖1是一系統方塊圖,說明本發明即時通訊系統應用於一對一的實施例;圖2是一通訊示意圖,說明如圖1的本發明即時通訊系統的自動翻譯方法的實施例;圖3是一系統方塊圖,說明本發明即時通訊系統應用於一對多的實施例;圖4是一通訊示意圖,說明如圖3的本發明即時通訊系統的自動翻譯方法的實施例。 Other features and advantages of the present invention will be apparent from the embodiments of the present invention. FIG. 1 is a system block diagram illustrating the application of the instant messaging system of the present invention to a one-to-one embodiment; A communication diagram illustrating an embodiment of an automatic translation method of the instant messaging system of the present invention as shown in FIG. 1. FIG. 3 is a system block diagram illustrating the application of the instant messaging system of the present invention to a one-to-many embodiment; FIG. Schematic diagram showing an embodiment of the automatic translation method of the instant messaging system of the present invention as shown in FIG.
在本發明被詳細描述之前,應當注意在以下的說明內容中,類似的元件是以相同的編號來表示。 Before the present invention is described in detail, it should be noted that in the following description, similar elements are denoted by the same reference numerals.
參閱圖1,本發明之第一實施例中,一即時通訊系統包括合經由一通訊網路300彼此連線的一近端通訊裝置3、一伺服器1、一翻譯伺服器2及一遠端通訊裝置5,其配合安裝的相關軟體規格、系統硬體規格及通訊協定如下。 Referring to FIG. 1, in a first embodiment of the present invention, an instant messaging system includes a near-end communication device 3, a server 1, a translation server 2, and a remote communication that are connected to each other via a communication network 300. The device 5, which is associated with the installed software specifications, system hardware specifications and communication protocols, is as follows.
近端通訊裝置3及遠端通訊裝置5的軟體規格為Android 2.2以上,搭配線上翻譯軟體的應用程式介面(Application Programming Interface;API),例如:微軟提供的microsoft-translator-java-api-0.6.1.jar。近端通訊裝置3及遠端通訊裝置5的硬體規格為Android作業系統的手機。伺服器1的軟體規格為具備支援Linux distribution、Nginx、PHP、MySQL、MongoDB及NodeJS的環境,且伺服器1採用包含HTTP及Websocket的通訊協定。翻譯伺服器2提供線上翻譯軟體,例如:微軟提供的線上翻譯軟體。 The software specifications of the near-end communication device 3 and the remote communication device 5 are Android 2.2 or higher, and are matched with an application programming interface (API) of the online translation software, for example, Microsoft-translator-java-api-0.6 provided by Microsoft. 1.jar. The hardware specifications of the near-end communication device 3 and the remote communication device 5 are mobile phones of the Android operating system. The software specification of the server 1 is an environment that supports Linux distribution, Nginx, PHP, MySQL, MongoDB, and NodeJS, and the server 1 uses a communication protocol including HTTP and Websocket. Translation Server 2 provides online translation software, such as the online translation software provided by Microsoft.
參閱圖2,第一實施例是一對一的即時通訊系統的自動翻譯方法,近端通訊裝置3的使用者為一第一用戶,遠端通訊裝置5的使用者為一第二用戶,且近端通訊裝置3及遠端通訊裝置5皆安裝有一即時通訊軟體,茲將相關流程說明如下。 Referring to FIG. 2, the first embodiment is an automatic translation method of a one-to-one instant messaging system. The user of the near-end communication device 3 is a first user, and the user of the remote communication device 5 is a second user, and Both the near-end communication device 3 and the remote communication device 5 are equipped with an instant messaging software, and the related processes are described below.
近端通訊裝置3執行步驟如下:第一用戶藉由近端通訊裝置3登入即時通訊軟體,並開啟即時通訊軟體的聊天功能(步驟S31),輸入第二用戶為聊天對象(步驟S32) 後,輸入第一語系的內容(步驟S33),其中,第一語系即本地語系,本實施例假設為中文;若第二用戶有回應,則該回應會顯示第二語系的原文及第一語系的譯文(步驟S34),其中,第二語系即遠端語系,本實施例假設為英文。 The near-end communication device 3 performs the following steps: the first user logs in to the instant messaging software by the near-end communication device 3, and starts the chat function of the instant messaging software (step S31), and inputs the second user as the chat object (step S32). After that, the content of the first language system is input (step S33), wherein the first language is the local language, and the embodiment is assumed to be Chinese; if the second user responds, the response displays the original text and the first language of the second language. The translation (step S34), wherein the second language is the remote language, and the embodiment is assumed to be English.
伺服端1安裝一應用程式,且該應用程式經由伺服端1載入並執行步驟如下:偵測近端通訊裝置3的一第一語系/國家資料(步驟S11),並偵測遠端通訊裝置5的一第二語系/國家資料(步驟S12);本實施例中,偵測近端通訊裝置3的第一語系/國家資料的方式,係偵測近端通訊裝置3安裝的一第一作業系統程式的國別/語系;另外,偵測遠端通訊裝置5的第二語系/國家資料,則是偵測其安裝的一第二作業系統程式的國別/語系。 The server 1 installs an application, and the application is loaded and executed via the server 1 as follows: detecting a first language/country data of the near-end communication device 3 (step S11), and detecting the remote communication device a second language/country data of 5 (step S12); in this embodiment, the method of detecting the first language/country data of the near-end communication device 3 is to detect a first job installed by the near-end communication device 3. The country/language of the system program; in addition, detecting the second language/country data of the remote communication device 5 is to detect the country/language of a second operating system program installed.
本實施例中,取得本機的國家及語系的程式可以是(但不限於)以下的範例。 In the present embodiment, the program for obtaining the country and language of the local machine may be, but is not limited to, the following examples.
lang = Locale.getDefault( ).getLanguage( );//取得本機的語系。 Lang = Locale.getDefault( ).getLanguage( );//Get the native language.
country = Locale.getDefault( ).getCountry( );//取得本機的國家。 Country = Locale.getDefault( ).getCountry( );//Get the country of this machine.
本實施例中,取得即時通訊軟體”一對一”的聊天對象的國家及語系的程式可以是(但不限於)以下的範例。 In this embodiment, the program of the country and the language of the chat object that obtains the "one-to-one" chat instant messaging software may be, but is not limited to, the following examples.
//一對一 GlobalVariable.User.GetUserLocale(lang, country, chatId, getuserlocalecallback); private Callback<UserLocale> getuserlocalecallback = new Callback<UserLocale>( ){ @ Override public void success(UserLocale arg0, Response arg1) { userlocale = arg0; friendlang = userlocale.locale; friendcountry = userlocale.country; } }; //One to one GlobalVariable.User.GetUserLocale(lang, country, chatId, getuserlocalecallback); Private Callback<UserLocale> getuserlocalecallback = new Callback<UserLocale>( ){ @ Override public void success(UserLocale arg0, Response arg1) { userlocale = arg0; friendlang = userlocale.locale; friendcountry = userlocale.country; } };
然後,若是伺服端1接收近端通訊裝置3輸入的第一語系的內容,也就是即時通訊軟體的一近端輸入資料,就依據伺服器1所取得遠端通訊裝置5的第二語系偵測,再向翻譯伺服器2請求線上翻譯服務(步驟S13)以將第一語系的內容翻譯成第二語系的內容。若是伺服端1接收遠端通訊裝置5輸入的第二語系的內容,也就是即時通訊軟體的一遠端輸入資料,就向翻譯伺服器2請求線上翻譯服務(步驟S14)以將第二語系的內容翻譯成第一語系的內容。 Then, if the server 1 receives the content of the first language input by the near-end communication device 3, that is, a near-end input data of the instant messaging software, the second language detection of the remote communication device 5 obtained by the server 1 is obtained. The online translation service is requested from the translation server 2 (step S13) to translate the content of the first language into the content of the second language. If the server 1 receives the content of the second language input by the remote communication device 5, that is, a remote input data of the instant messaging software, requests the translation server 2 for the online translation service (step S14) to use the second language system. The content is translated into the content of the first language.
本實施例中,取得線上翻譯服務配合”一對一”的聊天對象的程式可以是(但不限於)以下的範例。 In this embodiment, the program for obtaining the online one-to-one chat object by the online translation service may be, but is not limited to, the following examples.
// initial import com.memetix.mst.language.Language; import com.memetix.mst.translate.Translate; Translate.setClientId("meetingtool");//登入微軟翻譯id&secret Translate.setClientSecret("secret"); //一對一translatedText = Translate.execute(ettext,GlobalVariable.Translate.getLang(lang, country), GlobalVariable.Translate.getLang(friendlang, friendcountry)); JSONObject obj = new JSONObject( ); obj.put("msg", msg); obj.put("translate", translatedText); msg = obj.toString( ); GlobalVariable.chatApi.sendMsg(chatId, 0, msg, _id, sendMsgCallback); // initial import com.memetix.mst.language.Language; import com.memetix.mst.translate.Translate; Translate.setClientId("meetingtool");//Login Microsoft Translate id&secret Translate.setClientSecret("secret"); //One-to-one translatedText = Translate.execute(ettext,GlobalVariable.Translate.getLang(lang, country), GlobalVariable. Translate.getLang(friendlang, friendcountry)); JSONObject obj = new JSONObject( ); obj.put("msg", msg); obj.put("translate", translatedText); msg = obj.toString( ); GlobalVariable. chatApi.sendMsg(chatId, 0, msg, _id, sendMsgCallback);
翻譯伺服器2執行步驟如下:當收到伺服器1對應第一語系偵測內容的請求,即回應線上翻譯服務(步驟S21)並將第一語系的內容翻譯成第二語系的內容(步驟S22),或是當收到伺服器1對應第二語系偵測內容的請求,即回應線上翻譯服務(步驟S23)並將第二語系的內容翻譯成第一語系的內容(步驟S24)。 The translation server 2 performs the following steps: when receiving the request of the server 1 corresponding to the first language detection content, the response to the online translation service (step S21) and translating the content of the first language system into the content of the second language system (step S22) Or, when receiving the request of the server 1 for detecting the content in the second language, the online translation service is responded (step S23) and the content of the second language is translated into the content of the first language (step S24).
遠端通訊裝置5執行步驟如下:以第二用戶藉由遠端通訊裝置5登入即時通訊軟體,並開啟即時通訊軟體的聊天功能(步驟S51),接受第一用戶為聊天對象(步驟S52),並顯示第一語系的原文及第二語系的譯文(步驟 S53),且可輸入第二語系的內容(步驟S54),再通過前述步驟S14、S23、S24,令近端通訊裝置3將原來的第二語系的內容顯示為第一語系的內容(步驟S34)。 The remote communication device 5 performs the following steps: the second user logs in to the instant messaging software by the remote communication device 5, and starts the chat function of the instant messaging software (step S51), accepting the first user as the chat object (step S52), And display the original text of the first language and the translation of the second language (steps) S53), and the content of the second language system can be input (step S54), and the near-end communication device 3 displays the content of the original second language system as the content of the first language system through the foregoing steps S14, S23, and S24 (step S34). ).
參閱圖3及圖4,本發明之第二實施例的通訊系統類似第一實施例,且其配合安裝的相關軟體規格、系統硬體規格及通訊協定類似;不同於第一實施例的是,第二實施例中,近端通訊裝置3是與數個遠端通訊裝置5經由即時通訊軟體相互溝通,例如:具有網路聊天室的即時通訊軟體,該等遠端通訊裝置5包括遠端通訊裝置51~53,且遠端通訊裝置51~53分別為例如:美國用戶、日本用戶、德國用戶。伺服端1安裝一應用程式,且該應用程式經由該伺服端1載入以執行如圖2的一對多的即時通訊系統的自動翻譯方法,茲將該方法說明如下。 Referring to FIG. 3 and FIG. 4, the communication system of the second embodiment of the present invention is similar to the first embodiment, and is similar to the related software specifications, system hardware specifications and communication protocols of the installation; unlike the first embodiment, In the second embodiment, the near-end communication device 3 communicates with a plurality of remote communication devices 5 via an instant messaging software, for example, an instant messaging software with a network chat room, and the remote communication devices 5 include remote communication. The devices 51 to 53 and the remote communication devices 51 to 53 are, for example, US users, Japanese users, and German users. The server 1 installs an application, and the application is loaded via the server 1 to perform an automatic translation method of the one-to-many instant messaging system as shown in FIG. 2, which is explained below.
近端通訊裝置3執行步驟如下:第一用戶藉由近端通訊裝置3登入即時通訊軟體,並開啟即時通訊軟體的聊天功能(步驟S301),輸入對應遠端通訊裝置51~53的個別用戶為聊天對象(步驟S302)後,輸入第一語系的內容(步驟S303),例如:中文的”早安”;若各用戶有回應,則該回應會顯示為各用戶所屬的個別語系翻譯後的回應(步驟S504),例如,遠端通訊裝置51~53的個別用戶分別輸入英文的”Good morning”、日文的””及德文的”Guten Morgen”,則第一用戶會看到前述語文經過翻譯後的中文”早安”。 The near-end communication device 3 performs the following steps: the first user logs in to the instant messaging software by the near-end communication device 3, and starts the chat function of the instant messaging software (step S301), and inputs the individual users corresponding to the remote communication devices 51-53 as After the chat object (step S302), the content of the first language system is input (step S303), for example, "Good Morning" of Chinese; if each user responds, the response is displayed as a translated response of the individual language to which each user belongs. (Step S504), for example, individual users of the remote communication devices 51-53 respectively input "Good morning" in English, "Japanese" "With German's "Guten Morgen", the first user will see the translated Chinese "Good Morning" in the aforementioned language.
伺服端1安裝一應用程式,且該應用程式經由 伺服端1載入並執行步驟如下:偵測近端通訊裝置3的一第一語系/國家資料(步驟S101),例如:中文,並偵測遠端通訊裝置5的個別語系/國家資料(步驟S102);本實施例中,偵測近端通訊裝置3的第一語系/國家資料的方式,係取自其安裝的一第一作業系統程式的國別/語系;另外,偵測遠端通訊裝置5的個別語系/國家資料,則是取自各自安裝的個別作業系統程式的國別/語系。 The server 1 installs an application, and the application is The server 1 loads and executes the steps as follows: detecting a first language/country data of the near-end communication device 3 (step S101), for example: Chinese, and detecting the individual language/country data of the remote communication device 5 (steps) S102); in this embodiment, the method for detecting the first language/country data of the near-end communication device 3 is taken from the country/language of a first operating system program installed therein; and detecting the remote communication The individual language/country data for device 5 is taken from the country/language of the individual operating system programs installed.
本實施例中,取得即時通訊軟體”一對多”的聊天對象的國家及語系的程式可以是(但不限於)以下的範例。 In this embodiment, the program of the country and the language of the chat object that obtains the "one-to-many" chat instant messaging software may be, but is not limited to, the following examples.
private Callback<UserLocale> getuserlocalecallback = new Callback<UserLocale>( ){ @ Override public void success(UserLocale arg0, Response arg1) { int size = userlocale.langList.size( ); int count = 0; Map<String, String> tmp = new HashMap<String, String>( ); tmp.put(country, ""); for(int i=0;i<size;i++){ if(null == tmp.get(userlocale.langList.get(i).locale_country)){ transList.add(new TransObj(userlocale.langList.get(i).locale_country, "", userlocale.langList.get(i).id, GlobalVariable.Translate.getLang(userlocale.langList.get(i).locale_language, userlocale.langList.get(i).locale_country))); if(ml.equals(GlobalVariable.Translate.getLang(userlocale.langList.get(i).locale_language, userlocale.langList.get(i).locale_country))){ count += 1; } tmp.put(userlocale.langList.get(i).locale_country, ""); } } if(count == transList.size( )){ trans = false; ivtranslate.setImageResource(R.drawable.btn_translate_on); tvtranslate.setText(R.string.chat_main_tvtranslateon) ; } else{ if(trans_type == 0){ trans = true; ivtranslate.setImageResource(R.drawable.btn_translate_off); tvtranslate.setText(R.string.chat_main_tvtranslateoff) ; } else{ trans = false; ivtranslate.setImageResource(R.drawable.btn_translate_off); tvtranslate.setText(R.string.chat_main_tvtranslateoff); } } } }; Private Callback<UserLocale> getuserlocalecallback = new Callback<UserLocale>( ){ @ Override public void success(UserLocale arg0, Response arg1) { int size = userlocale.langList.size( ); int count = 0; Map<String, String> Tmp = new HashMap<String, String>( ); tmp.put(country, ""); for(int i=0;i<size;i++){ if(null == tmp.get(userlocale.langList.get (i).locale_country)){ transList.add(new TransObj(userlocale.langList.get(i).locale_country, "", userlocale.langList.get(i).id, GlobalVariable.Translate.getLang(userlocale.langList.get(i).locale_language, userlocale.langList.get( i).locale_country))); if(ml.equals(GlobalVariable.Translate.getLang(userlocale.langList.get(i).locale_language, userlocale.langList.get(i).locale_country)))) { count += 1; } tmp.put(userlocale.langList.get(i).locale_country, ""); } } if(count == transList.size( )){ trans = false; ivtranslate.setImageResource(R.drawable.btn_translate_on); tvtranslate .setText(R.string.chat_main_tvtranslateon) ; } else{ If(trans_type == 0){ trans = true; ivtranslate.setImageResource(R.drawable.btn_translate_off); tvtranslate.setText(R.string.chat_main_tvtranslateoff) ; } else{ trans = false; ivtranslate.setImageResource(R.drawable.btn_translate_off ); tvtranslate.setText(R.string.chat_main_tvtranslateoff); } } } };
然後,若是伺服端1接收近端通訊裝置3輸入的第一語系的內容,也就是即時通訊軟體的一近端輸入資料,就依據伺服器1所取得遠端通訊裝置5的個別語系,再向翻譯伺服器2請求線上翻譯服務(步驟S103)以將第一語系的內容翻譯成個別語系的內容。若是伺服端1接收遠 端通訊裝置5輸入的個別語系的內容,也就是即時通訊軟體的一遠端輸入資料,就向翻譯伺服器2請求線上翻譯服務(步驟S104)以將個別語系的內容翻譯成第一語系的內容。 Then, if the server 1 receives the content of the first language input by the near-end communication device 3, that is, a near-end input data of the instant messaging software, according to the individual language of the remote communication device 5 obtained by the server 1, The translation server 2 requests an online translation service (step S103) to translate the content of the first language into the content of the individual language. If the servo terminal 1 receives far The content of the individual language input by the end communication device 5, that is, a remote input data of the instant messaging software, requests the translation server 2 for the online translation service (step S104) to translate the content of the individual language into the content of the first language. .
本實施例中,取得線上翻譯服務配合”一對多”的聊天對象的程式可以是(但不限於)以下的範例。 In the present embodiment, the program for obtaining the chat object of the "one-to-many" online translation service may be, but is not limited to, the following examples.
// initial import com.memetix.mst.language.Language; import com.memetix.mst.translate.Translate; Translate.setClientId("meetingtool");//登入微軟翻譯id&secret Translate.setClientSecret("secret"); //一對多int size = transList.size( ); Map<Language, String> tmp = new HashMap<Language, String>( );for(int i=0;i<size;i++){ if(ml.equals(transList.get(i).lang)){ transList.get(i).transString=ettext; }else if(null != tmp.get(transList.get(i).lang)){ transList.get(i).transString = tmp.get(transList.get(i).lang); }else{ transList.get(i).transString = Translate.execute(ettext,ml, transList.get(i).lang); tmp.put(transList.get(i).lang, transList.get(i).transString); } } obj.put("msg",msg); for(TransObj transObj: transList){ obj.put(transObj.id + "_" +transObj.country, transObj.transString); } msg=obj.toString( ); GlobalVariable.chatApi.sendMsg(chatId, 0, msg, _id, sendMsgCallback); // initial import com.memetix.mst.language.Language; import com.memetix.mst.translate.Translate; Translate.setClientId("meetingtool");//Login Microsoft Translate id&secret Translate.setClientSecret("secret"); / / One-to-many int size = transList.size( ); Map<Language, String> tmp = new HashMap<Language, String>( );for(int i=0;i<size;i++){ if(ml.equals (transList.get(i).lang)){ transList.get(i).transString=ettext; }else if(null != tmp.get(transList.get(i).lang)){ transList.get(i ).transString = tmp.get(transList.get(i).lang); }else{ transList.get(i).transString = Translate.execute(ettext,ml, transList.get(i).lang); tmp.put(transList.get(i).lang, transList.get(i).transString); } } obj.put("msg" , msg); for(TransObj transObj: transList){ obj.put(transObj.id + "_" +transObj.country, transObj.transString); } msg=obj.toString( ); GlobalVariable.chatApi.sendMsg(chatId, 0, msg, _id, sendMsgCallback);
翻譯伺服器2執行步驟如下:當收到伺服器1對應第一語系偵測內容的請求,即回應線上翻譯服務(步驟S201)並將第一語系的內容翻譯成個別語系的內容(步驟S202),或是當收到伺服器1對應個別語系內容的請求,即回應線上翻譯服務(步驟S203)並將個別語系的內容翻譯成第一語系的內容(步驟S204)。 The translation server 2 performs the following steps: when receiving the request of the server 1 corresponding to the first language detection content, the response to the online translation service (step S201) and translating the content of the first language into the content of the individual language (step S202) Or, when receiving the request of the server 1 for the content of the individual language, the online translation service is responded (step S203) and the content of the individual language is translated into the content of the first language (step S204).
遠端通訊裝置51~53分別執行步驟如下:個別用戶分別藉由遠端通訊裝置51~53登入即時通訊軟體,並開啟即時通訊軟體的聊天功能(步驟S501),接受第一用戶為聊天對象(步驟S502),並顯示第一語系的原文及個別語系的譯文(步驟S503),其回應分別為:英文、日文及德文; 且遠端通訊裝置51~53可分別輸入個別語系的內容(步驟S504),再通過前述步驟S104、S203、S204,令近端通訊裝置3顯示個別語系的原文及第一語系的譯文(步驟S304);藉此,完成一對多的雙向即時自動翻譯功能。 The remote communication devices 51-53 respectively perform the following steps: the individual users log in to the instant messaging software by the remote communication devices 51-53, respectively, and enable the chat function of the instant messaging software (step S501), accepting the first user as the chat object ( Step S502), and displaying the original text of the first language and the translation of the individual language (step S503), the responses are: English, Japanese, and German; The remote communication devices 51-53 can respectively input the contents of the individual language (step S504), and then the near-end communication device 3 displays the original text of the individual language and the translation of the first language through the steps S104, S203, and S204 (step S304). ); thereby, one-to-many two-way instant automatic translation function is completed.
本發明的其他實施例是一內儲應用程式之電腦可讀取記錄媒體,當伺服器1載入該應用程式並執行後,可完成如圖2及圖4的流程,此亦屬於本發明技術的應用範疇。 Another embodiment of the present invention is a computer readable recording medium for storing an application. After the server 1 loads the application and executes it, the flow of FIG. 2 and FIG. 4 can be completed, which is also a technique of the present invention. The scope of application.
綜上所述,本發明可以滿足不同語系/國家的使用者在即時交談通訊的自動化翻譯需求,並提升整體的時效及效能,故確實能達成本發明之目的。 In summary, the present invention can meet the needs of users of different languages/countries in the automatic translation of instant chat communication, and improve the overall timeliness and effectiveness, so that the object of the present invention can be achieved.
惟以上所述者,僅為本發明之實施例而已,當不能以此限定本發明實施之範圍,即大凡依本發明申請專利範圍及專利說明書內容所作之簡單的等效變化與修飾,皆仍屬本發明專利涵蓋之範圍內。 However, the above is only the embodiment of the present invention, and the scope of the present invention is not limited thereto, that is, the simple equivalent changes and modifications made by the patent application scope and the patent specification of the present invention are still It is within the scope of the patent of the present invention.
1‧‧‧伺服器 1‧‧‧Server
2‧‧‧翻譯伺服器 2‧‧‧Translation server
3‧‧‧近端通訊裝置 3‧‧‧ Near-end communication device
5‧‧‧遠端通訊裝置 5‧‧‧Remote communication device
S11~S14‧‧‧步驟 S11~S14‧‧‧Steps
S21~S24‧‧‧步驟 S21~S24‧‧‧Steps
S31~S34‧‧‧步驟 S31~S34‧‧‧Steps
S51~S54‧‧‧步驟 S51~S54‧‧‧Steps
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW103129039A TW201608394A (en) | 2014-08-22 | 2014-08-22 | Automatic translation method of instant messaging system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW103129039A TW201608394A (en) | 2014-08-22 | 2014-08-22 | Automatic translation method of instant messaging system |
Publications (1)
Publication Number | Publication Date |
---|---|
TW201608394A true TW201608394A (en) | 2016-03-01 |
Family
ID=56084770
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
TW103129039A TW201608394A (en) | 2014-08-22 | 2014-08-22 | Automatic translation method of instant messaging system |
Country Status (1)
Country | Link |
---|---|
TW (1) | TW201608394A (en) |
-
2014
- 2014-08-22 TW TW103129039A patent/TW201608394A/en unknown
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP2807799B1 (en) | Fallback messaging | |
KR101488268B1 (en) | Push message service system and method thereof | |
KR101271285B1 (en) | A method of providing a multi language translation for messages included in chatting window | |
US11016716B2 (en) | Picture interface display method and apparatus according to jump protocol | |
US9961210B2 (en) | Terminal, server, and terminal control method | |
US10291719B2 (en) | Enabling communication while limiting access to user information | |
US20210271827A1 (en) | Multilingual communication system and multilingual communication provision method | |
KR20150035798A (en) | Generating localized user interfaces | |
US11789765B2 (en) | Collaborative hosted virtual systems and methods | |
US20170346938A1 (en) | Sent Text Correction Feature | |
CN106325789B (en) | Information processing method, terminal and system | |
US20170264577A1 (en) | A method and system for processing an electronic message | |
EP3298756B1 (en) | Interfacing with servers having different apis to obtain advertisement data | |
US20180150458A1 (en) | User terminal device for providing translation service, and method for controlling same | |
CN110858175A (en) | Test control method, master control equipment, controlled equipment and test system | |
TW201608394A (en) | Automatic translation method of instant messaging system | |
CN113419656B (en) | Dual-system mail sharing method and device, interactive all-in-one machine and storage medium | |
US20190007520A1 (en) | Electronic device and operation method thereof and server host device | |
CN108037972B (en) | Method and device for completely hiding cursor | |
WO2019127475A1 (en) | Method and apparatus for implementing virtual sim card, storage medium, and electronic device | |
KR101618353B1 (en) | Method for synchronizing server-side language and client-side language, and server-client system using the same | |
CN113726872B (en) | Method, device, equipment and medium for filtering promotion information | |
US20150127713A1 (en) | Cloud Agent Processing Method, Device, and System | |
TW201624446A (en) | Wireless marquee system | |
JP2015505213A (en) | Alternative visual presentation |