Nothing Special   »   [go: up one dir, main page]

TWI850945B - Method and user apparatus for generating and applying translation marker - Google Patents

Method and user apparatus for generating and applying translation marker Download PDF

Info

Publication number
TWI850945B
TWI850945B TW112100130A TW112100130A TWI850945B TW I850945 B TWI850945 B TW I850945B TW 112100130 A TW112100130 A TW 112100130A TW 112100130 A TW112100130 A TW 112100130A TW I850945 B TWI850945 B TW I850945B
Authority
TW
Taiwan
Prior art keywords
translation
text string
electronic document
processor
mark
Prior art date
Application number
TW112100130A
Other languages
Chinese (zh)
Other versions
TW202401229A (en
Inventor
陳郁雯
李佳亭
林文瑋
石凱琳
姜青儀
Original Assignee
凱鈿行動科技股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 凱鈿行動科技股份有限公司 filed Critical 凱鈿行動科技股份有限公司
Priority to US18/215,449 priority Critical patent/US20240005103A1/en
Publication of TW202401229A publication Critical patent/TW202401229A/en
Application granted granted Critical
Publication of TWI850945B publication Critical patent/TWI850945B/en

Links

Landscapes

  • Machine Translation (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The present invention provides a method and a user apparatus for generating and applying a translation marker, and the method is executed by the user apparatus and comprises: opening an electronic file on a user operation interface; selecting at least one text string in the electronic file according to a first triggering event; and when a translation option is detected to be selected, performing the following steps: generating a code corresponding to the selected text string by using an operation function; and when it is determined that there is a first translation record associated with the code in the user apparatus, displaying a first translation text string of the first translation record on the user operation interface and generating a first translation marker associated with the first translation text string on the electronic file.

Description

產生並應用翻譯標記的方法及用戶裝置Method and user device for generating and applying translation markup

本發明是有關於一種在電子文件上進行局部翻譯的方法,且特別是有關於一種在電子文件上產生並應用翻譯標記的方法及用戶裝置。The present invention relates to a method for performing partial translation on an electronic document, and more particularly to a method and a user device for generating and applying translation marks on an electronic document.

目前一些文件編輯軟體或文件瀏覽軟體中提供了註解功能,以供使用者對於文件中的文字、段落、符號、表格等物件進行註解。然而,當使用者要針對文件中的一字串或一段落進行翻譯,並將經翻譯的字串註解在該字串或該段落上時,通常需要利用翻譯軟體、翻譯模組或翻譯網站進行該字串或該段落的翻譯後,再利用拷貝與貼上的功能將經翻譯的字串輸入到註解欄位上。因此,對於使用者而言,利用上述方式將經翻譯的字串輸入到註解欄位上甚為費時與不便。At present, some document editing software or document browsing software provide annotation functions for users to annotate text, paragraphs, symbols, tables and other objects in the document. However, when a user wants to translate a string or a paragraph in a document and annotate the translated string on the string or the paragraph, it is usually necessary to use translation software, translation module or translation website to translate the string or the paragraph, and then use the copy and paste function to input the translated string into the annotation field. Therefore, it is very time-consuming and inconvenient for users to input the translated string into the annotation field using the above method.

為了解決上述問題,有必要提出一種可以在電子文件上產生並應用翻譯標記的方法。In order to solve the above problems, it is necessary to propose a method that can generate and apply translation marks on electronic documents.

有鑒於此,本發明提供了一種產生並應用翻譯標記的方法,該方法由一用戶裝置來執行,並且包括:開啟一電子文件於一使用者操作介面上,其中該電子文件包括複數個文字串;根據一第一觸發事件來選擇該複數個文字串中的至少一個文字串;將一翻譯選項顯示於該使用者操作介面上;偵測該翻譯選項是否被選擇;以及當偵測到該翻譯選項被選擇時,執行下列步驟:藉由一功能函數產生對應於該被選擇的至少一個文字串的一代碼;確認該用戶裝置中是否存在有相關聯於該代碼的一第一翻譯紀錄,其中該第一翻譯紀錄包括對應於該被選擇的至少一個文字串的一第一翻譯文字串;以及當確認該用戶裝置中存在有該第一翻譯紀錄時,將該第一翻譯文字串顯示於該使用者操作介面上,並產生相關聯於該第一翻譯文字串的一第一翻譯標記於該電子文件上。In view of this, the present invention provides a method for generating and applying a translation mark, which is executed by a user device and includes: opening an electronic document on a user operation interface, wherein the electronic document includes a plurality of text strings; selecting at least one of the plurality of text strings according to a first trigger event; displaying a translation option on the user operation interface; detecting whether the translation option is selected; and when the translation option is detected to be selected, executing the following steps: The invention relates to a method for generating a code corresponding to the at least one selected text string by a function; confirming whether a first translation record associated with the code exists in the user device, wherein the first translation record includes a first translation text string corresponding to the at least one selected text string; and when confirming that the first translation record exists in the user device, displaying the first translation text string on the user operation interface, and generating a first translation mark associated with the first translation text string on the electronic document.

於本發明的一實施例中,當偵測到該翻譯選項被選擇時,更執行下列步驟:當確認該用戶裝置中未存在有該第一翻譯紀錄時,發送一翻譯請求給一伺服器,以請求該伺服器回傳對應於該被選擇的至少一個文字串的一第二翻譯文字串,其中該翻譯請求帶有該代碼及該被選擇的至少一個文字串;從該伺服器接收響應於該翻譯請求的該第二翻譯文字串;以及當從該伺服器接收到該第二翻譯文字串時,將該第二翻譯文字串顯示於該使用者操作介面上,並產生相關聯於該第二翻譯文字串的一第二翻譯標記於該電子文件上。In an embodiment of the present invention, when it is detected that the translation option is selected, the following steps are further performed: when it is confirmed that the user device does not have the first translation record, a translation request is sent to a server to request the server to return a second translation text string corresponding to the selected at least one text string, wherein the translation request carries the code and the selected at least one text string; the second translation text string is received from the server in response to the translation request; and when the second translation text string is received from the server, the second translation text string is displayed on the user operation interface, and a second translation mark associated with the second translation text string is generated on the electronic document.

於本發明的一實施例中,該第二翻譯文字串是從該伺服器的一資料庫中讀取出。In one embodiment of the present invention, the second translated text string is read from a database of the server.

於本發明的另一實施例中,該第二翻譯文字串是藉由該伺服器呼叫一翻譯模組來對該被選擇的至少一個文字串進行翻譯而產生,並由該伺服器發送給該用戶裝置。In another embodiment of the present invention, the second translated text string is generated by the server calling a translation module to translate the selected at least one text string, and is sent by the server to the user device.

於本發明的一實施例中,該方法更包括:將該代碼以及該第二翻譯文字串儲存為一第二翻譯紀錄,並將該第二翻譯紀錄儲存在該用戶裝置中。In an embodiment of the present invention, the method further includes: storing the code and the second translated text string as a second translation record, and storing the second translation record in the user device.

於本發明的一實施例中,該方法更包括:將該翻譯請求編碼成JSON(JavaScript Object Notation)物件,並發送該JSON物件給該伺服器。In one embodiment of the present invention, the method further includes: encoding the translation request into a JSON (JavaScript Object Notation) object, and sending the JSON object to the server.

於本發明的一實施例中,該功能函數為雜湊(Hash)函數,且該代碼為一Hash值。In an embodiment of the present invention, the functional function is a hash function, and the code is a hash value.

於本發明的一實施例中,其中產生相關聯於該第一翻譯文字串的該第一翻譯標記於該電子文件上的步驟更包括:根據一第二觸發事件來產生相關聯於該第一翻譯文字串的該第一翻譯標記於該電子文件上。In one embodiment of the present invention, the step of generating the first translation mark associated with the first translation text string on the electronic document further includes: generating the first translation mark associated with the first translation text string on the electronic document according to a second triggering event.

於本發明的一實施例中,該方法更包括:當該第一翻譯標記被選擇時,將該第一翻譯文字串顯示於該使用者操作介面上。In an embodiment of the present invention, the method further comprises: when the first translation mark is selected, displaying the first translation text string on the user operation interface.

於本發明的一實施例中,該方法更包括:根據一第三觸發事件來產生一備註標記於該電子文件上,並同時將該第一翻譯標記與該備註標記顯示於該電子文件上,其中該備註標記相關聯於一備註文字串。In an embodiment of the present invention, the method further includes: generating a note mark on the electronic document according to a third trigger event, and simultaneously displaying the first translation mark and the note mark on the electronic document, wherein the note mark is associated with a note text string.

本發明另提供了一種產生並應用翻譯標記的用戶裝置,該用戶裝置包括:一處理器、一顯示器以及一儲存器。該顯示器電性耦接到該處理器,用以顯示一使用者操作介面。該儲存器電性耦接到該處理器,並且該儲存器儲存至少一個電腦可執行程式,其中該至少一個電腦可執行程式在由該處理器執行時,使該處理器執行下列步驟:開啟一電子文件於該使用者操作介面上,其中該電子文件包括複數個文字串;根據一第一觸發事件來選擇該複數個文字串中的至少一個文字串;將一翻譯選項顯示於該使用者操作介面上;偵測該翻譯選項是否被選擇;以及當偵測到該翻譯選項被選擇時,更執行下列步驟:藉由一功能函數產生對應於該被選擇的至少一個文字串的一代碼;確認該儲存器中是否存在有相關聯於該代碼的一第一翻譯紀錄,其中該第一翻譯紀錄包括對應於該被選擇的至少一個文字串的一第一翻譯文字串;以及當確認該儲存器中存在有該第一翻譯紀錄時,將該第一翻譯文字串顯示於該使用者操作介面上,並產生相關聯於該第一翻譯文字串的一第一翻譯標記於該電子文件上。The present invention also provides a user device for generating and applying translation marks, the user device comprising: a processor, a display and a memory. The display is electrically coupled to the processor to display a user operation interface. The memory is electrically coupled to the processor, and the memory stores at least one computer executable program, wherein when the at least one computer executable program is executed by the processor, the processor executes the following steps: opening an electronic document on the user operation interface, wherein the electronic document includes a plurality of text strings; selecting at least one text string from the plurality of text strings according to a first trigger event; displaying a translation option on the user operation interface; detecting whether the translation option is selected; and when the translation option is detected to be selected, When the at least one selected text string is selected, the following steps are further performed: a code corresponding to the at least one selected text string is generated by a function; whether a first translation record associated with the code exists in the memory, wherein the first translation record includes a first translation text string corresponding to the at least one selected text string; and when it is confirmed that the first translation record exists in the memory, the first translation text string is displayed on the user operation interface, and a first translation mark associated with the first translation text string is generated on the electronic document.

於本發明的一實施例中,該用戶裝置更包括一輸入元件,其中該輸入元件用以:接收一第一輸入,並產生對應於該第一輸入的一第一輸入訊號,其中該第一觸發事件是根據該第一輸入訊號而產生。In an embodiment of the present invention, the user device further includes an input element, wherein the input element is used to: receive a first input and generate a first input signal corresponding to the first input, wherein the first trigger event is generated according to the first input signal.

於本發明的一實施例中,該用戶裝置更包括一發送器以及一接收器。該發送器電性耦接到該處理器,用以:當該處理器確認該儲存器中未存在有該第一翻譯紀錄時,發送一翻譯請求給一伺服器,以請求該伺服器回傳對應於該被選擇的至少一個文字串的一第二翻譯文字串,其中該翻譯請求帶有該代碼及該被選擇的至少一個文字串。該接收器電性耦接到該處理器,用以從該伺服器接收響應於該翻譯請求的該第二翻譯文字串。In an embodiment of the present invention, the user device further includes a transmitter and a receiver. The transmitter is electrically coupled to the processor and is used to: when the processor confirms that the first translation record does not exist in the memory, send a translation request to a server to request the server to return a second translation text string corresponding to the selected at least one text string, wherein the translation request carries the code and the selected at least one text string. The receiver is electrically coupled to the processor and is used to receive the second translation text string in response to the translation request from the server.

於本發明的一實施例中,當該接收器從該伺服器接收到該第二翻譯文字串時,該處理器更用以:將該第二翻譯文字串顯示於該使用者操作介面上,並產生相關聯於該第二翻譯文字串的一第二翻譯標記於該電子文件上。In one embodiment of the present invention, when the receiver receives the second translation string from the server, the processor is further configured to: display the second translation string on the user interface, and generate a second translation mark associated with the second translation string on the electronic document.

於本發明的一實施例中,該處理器更執行:將該代碼以及該第二翻譯文字串儲存為一第二翻譯紀錄,並將該第二翻譯紀錄儲存在該儲存器中。In one embodiment of the present invention, the processor further executes: storing the code and the second translated text string as a second translation record, and storing the second translation record in the memory.

於本發明的一實施例中,該處理器更執行:將該翻譯請求編碼成JSON(JavaScript Object Notation)物件,並藉由該發送器發送該JSON物件給該伺服器。In one embodiment of the present invention, the processor further executes: encoding the translation request into a JSON (JavaScript Object Notation) object, and sending the JSON object to the server via the sender.

於本發明的一實施例中,該處理器更執行:當該第一翻譯標記被選擇時,將該第一翻譯文字串顯示於該使用者操作介面上。In one embodiment of the present invention, the processor further executes: when the first translation mark is selected, the first translation text string is displayed on the user operation interface.

於本發明的一實施例中,該處理器更執行:根據一第三觸發事件來產生一備註標記於該電子文件上,並同時將該第一翻譯標記與該備註標記顯示於該電子文件上,其中該備註標記相關聯於一備註文字串。In one embodiment of the present invention, the processor further executes: generating a remark mark on the electronic document according to a third trigger event, and simultaneously displaying the first translation mark and the remark mark on the electronic document, wherein the remark mark is associated with a remark text string.

於本文中,除非內文中對於冠詞有所特別限定,否則『一』與『該』可指單一個或多個。In this document, unless the context specifically limits the article, "a", "an" and "the" can refer to one or more than one item.

另外,本文中所使用之『包括』、『具有』及類似詞彙均為開放性的用語,即意指包含其所記載的特徵、元件與/或組件,但不排除其所述或額外的其一個或多個其它特徵、元件、組件,與/或其中之群組。In addition, the words "include", "have" and similar terms used in this document are open terms, which mean including the features, elements and/or components described therein, but do not exclude one or more other features, elements, components, and/or groups thereof described therein or in addition thereto.

再者,本文中所使用之『耦接』可指二或多個元件或裝置相互直接作實體接觸,或是相互間接作實體接觸,亦可指二或多個元件或裝置相互操作或動作。Furthermore, the term "coupled" as used herein may refer to two or more elements or devices being in direct physical contact with each other, or being in indirect physical contact with each other, or may refer to two or more elements or devices operating or moving with each other.

以下將以圖式及詳細敘述清楚說明本發明之精神,任何所屬技術領域中具有通常知識者在瞭解本發明之實施例後,當可由本發明所教示之技術,加以改變及修飾,其並不脫離本發明之精神與範圍。The following will clearly illustrate the spirit of the present invention with drawings and detailed descriptions. After understanding the embodiments of the present invention, any person having ordinary knowledge in the relevant technical field can make changes and modifications based on the techniques taught by the present invention without departing from the spirit and scope of the present invention.

圖1為根據本發明的一實施例之產生並應用翻譯標記的用戶裝置100的方塊示意圖。該用戶裝置100包括一處理器102、一顯示器104、一儲存器106、一輸入元件108、一發送器110以及一接收器112。該顯示器104、該儲存器106、該輸入元件108、該發送器110以及該接收器112分別電性耦接到該處理器102。1 is a block diagram of a user device 100 for generating and applying translation marks according to an embodiment of the present invention. The user device 100 includes a processor 102, a display 104, a memory 106, an input element 108, a transmitter 110, and a receiver 112. The display 104, the memory 106, the input element 108, the transmitter 110, and the receiver 112 are electrically coupled to the processor 102, respectively.

圖2A至圖2H為根據本發明的一實施例之使用者操作介面200於不同操作狀態下的示意圖。現請參考圖1與圖2A,該顯示器104係用以顯示該使用者操作介面200。於本實施例中,該使用者操作介面200可以是由該處理器102執行一文件編輯軟體或一文件瀏覽軟體而產生的使用者操作介面。該使用者操作介面200至少包括一文件顯示區域202、一輔助顯示區域204以及一功能選擇區域206。FIG. 2A to FIG. 2H are schematic diagrams of a user operation interface 200 in different operation states according to an embodiment of the present invention. Referring now to FIG. 1 and FIG. 2A , the display 104 is used to display the user operation interface 200. In this embodiment, the user operation interface 200 may be a user operation interface generated by the processor 102 executing a file editing software or a file browsing software. The user operation interface 200 at least includes a file display area 202, an auxiliary display area 204, and a function selection area 206.

圖3A與圖3B為根據本發明的一實施例之產生並應用翻譯標記的方法之流程圖。於本實施例中,該方法由該用戶裝置100來執行。現請參考圖1、圖2A至圖2F與圖3A,該儲存器106儲存至少一個電腦可執行程式,且該至少一個電腦可執行程式在由該處理器102執行時,使該處理器102執行圖3A與圖3B中的實施例之產生並應用翻譯標記的方法。該方法包括下列步驟S300至步驟S320,並說明如下。FIG. 3A and FIG. 3B are flow charts of a method for generating and applying translation marks according to an embodiment of the present invention. In this embodiment, the method is executed by the user device 100. Referring now to FIG. 1 , FIG. 2A to FIG. 2F and FIG. 3A , the memory 106 stores at least one computer executable program, and when the at least one computer executable program is executed by the processor 102, the processor 102 executes the method for generating and applying translation marks of the embodiment in FIG. 3A and FIG. 3B . The method includes the following steps S300 to S320, and is described as follows.

於步驟S300中,該處理器102會根據一使用者的操作來執行一文件編輯軟體或一文件瀏覽軟體,以開啟一電子文件210於該使用者操作介面200的文件顯示區域202上。於本實施例中,該電子文件210至少包括複數個段落212,每一個段落212會具有至少一個文字串,並且該複數個段落212的語言類別為英文,如圖2A所示。In step S300, the processor 102 executes a document editing software or a document browsing software according to a user's operation to open an electronic document 210 in the document display area 202 of the user operation interface 200. In this embodiment, the electronic document 210 includes at least a plurality of paragraphs 212, each paragraph 212 has at least one text string, and the language category of the plurality of paragraphs 212 is English, as shown in FIG2A.

於步驟S302中,該處理器102會根據一第一觸發事件來選擇該複數個文字串中的至少一個文字串212a。於本實施例中,該被選擇的文字串212a可呈現高光(highlighted)狀態,以表示其已被選擇,如圖2B所示。此外,於本實施例中,該第一觸發事件可以是該輸入元件108(例如:滑鼠、觸控面板或鍵盤)所控制的游標在該文字串212a上的移動選擇(例如:從點P1移動到點P2),但不以此為限。In step S302, the processor 102 selects at least one text string 212a from the plurality of text strings according to a first trigger event. In this embodiment, the selected text string 212a may be highlighted to indicate that it has been selected, as shown in FIG. 2B . In addition, in this embodiment, the first trigger event may be a cursor controlled by the input element 108 (e.g., a mouse, a touch panel, or a keyboard) moving on the text string 212a (e.g., moving from point P1 to point P2), but is not limited thereto.

於步驟S304中,該處理器102會驅動該顯示器104將一功能選單214顯示於該使用者操作介面200上。於本實施例中,該處理器102會根據該輸入元件108的一第一輸入訊號來驅動該顯示器104將該功能選單214顯示於該使用者操作介面200上,如圖2C所示。舉例而言,該第一輸入訊號可以是藉由將一游標240停留在該被選擇的文字串212a上,並執行滑鼠的右鍵點擊或觸控面板的觸擊而產生,但不以此為限。於本實施例中,該功能選單214具有「翻譯」選項、「新增備註」選項、「拷貝」選項等,但並不以此為限。於另一實施例中,該功能選單214可以僅具有「翻譯」選項。於其他實施例中,該功能選單214的「翻譯」選項可以是該功能選擇區域206上的一功能選項,亦即該功能選單214的「翻譯」選項可以是在該處理器102執行一文件編輯軟體或一文件瀏覽軟體後自動顯示在該使用者操作介面200的功能選擇區域206上。例如,該功能選擇區域206具有四個功能選項A、B、C、D,並且該功能選項A可為該功能選單214的「翻譯」選項。In step S304, the processor 102 drives the display 104 to display a function menu 214 on the user interface 200. In this embodiment, the processor 102 drives the display 104 to display the function menu 214 on the user interface 200 according to a first input signal of the input element 108, as shown in FIG2C. For example, the first input signal can be generated by placing a cursor 240 on the selected text string 212a and performing a right-click of a mouse or a touch of a touch panel, but the present invention is not limited thereto. In this embodiment, the function menu 214 has a "translate" option, a "add note" option, a "copy" option, etc., but the present invention is not limited thereto. In another embodiment, the function menu 214 may only have a “Translate” option. In other embodiments, the “Translate” option of the function menu 214 may be a function option on the function selection area 206, that is, the “Translate” option of the function menu 214 may be automatically displayed on the function selection area 206 of the user interface 200 after the processor 102 executes a document editing software or a document browsing software. For example, the function selection area 206 has four function options A, B, C, and D, and the function option A may be the “Translate” option of the function menu 214.

於步驟S306中,該處理器102會偵測該功能選單214的「翻譯」選項是否被選擇。當該處理器102偵測到該功能選單214的「翻譯」選項被選擇時,執行步驟S308至S318;否則,回到步驟S302重新選擇該電子文件210上的其他文字串。於本實施例中,該處理器102會根據該輸入元件108的一第二輸入訊號,來判斷是否偵測到該功能選單214的「翻譯」選項被選擇。舉例而言,該第二輸入訊號可以是藉由將一游標240移動至該功能選單214的「翻譯」選項上(如圖2D所示),並執行滑鼠的左鍵點擊或觸控面板的觸擊而產生,但不以此為限。具體而言,當該處理器102偵測或接收到該第二輸入訊號時,則表示該處理器102偵測到該功能選單214的「翻譯」選項被選擇。In step S306, the processor 102 detects whether the "Translate" option of the function menu 214 is selected. When the processor 102 detects that the "Translate" option of the function menu 214 is selected, steps S308 to S318 are executed; otherwise, the processor 102 returns to step S302 to reselect other text strings on the electronic document 210. In this embodiment, the processor 102 determines whether the "Translate" option of the function menu 214 is detected to be selected according to a second input signal of the input element 108. For example, the second input signal may be generated by moving a cursor 240 to the "Translate" option of the function menu 214 (as shown in FIG. 2D ) and executing a left click of a mouse or a touch of a touch panel, but the present invention is not limited thereto. Specifically, when the processor 102 detects or receives the second input signal, it indicates that the processor 102 detects that the "Translate" option of the function menu 214 is selected.

於步驟S308中,該處理器102會藉由一功能函數產生對應於該被選擇的文字串212a的一代碼。於本實施例中,該功能函數為雜湊(Hash)函數,且該代碼為該雜湊函數針對該被選擇的文字串212a所產生得一Hash值。該Hash值是一短碼,用來表示該被選擇的文字串212a。相較於該被選擇的文字串212a之長度,該Hash值之長度較為簡短。因此,當該Hash值儲存在該儲存器106時,該Hash值所佔用的儲存空間比起該被選擇的文字串212a所佔用的儲存空間相對較小。In step S308, the processor 102 generates a code corresponding to the selected text string 212a through a function. In this embodiment, the function is a hash function, and the code is a hash value generated by the hash function for the selected text string 212a. The hash value is a short code used to represent the selected text string 212a. Compared with the length of the selected text string 212a, the length of the hash value is shorter. Therefore, when the hash value is stored in the register 106, the storage space occupied by the hash value is relatively smaller than the storage space occupied by the selected text string 212a.

於步驟S310中,該處理器102會確認該用戶裝置100的儲存器106中是否存在有相關聯於該代碼的一第一翻譯紀錄。於本實施例中,該第一翻譯紀錄可包括對應於該被選擇的文字串212a的一第一翻譯文字串。舉例而言,該處理器102可使用該產生的Hash值來確認該儲存器106中是否存在有該第一翻譯紀錄。於另一實施例中,該第一翻譯紀錄可至少包括一目的語言類別(例如:中文、日文或其他語言)、一索引的Hash值及該第一翻譯文字串,其中該目的語言類別係用以表示該第一翻譯文字串的語言類別。當該處理器102使用該產生的Hash值來確認該儲存器106中是否存在有該第一翻譯紀錄時,該處理器102可使用該產生的Hash值來比對該索引的Hash值。當比對出該產生的Hash值與該索引的Hash值相同或相關聯時,該處理器102可確認該儲存器106中存在有相關聯於該產生的Hash值的第一翻譯紀錄。In step S310, the processor 102 confirms whether there is a first translation record associated with the code in the memory 106 of the user device 100. In this embodiment, the first translation record may include a first translation text string corresponding to the selected text string 212a. For example, the processor 102 may use the generated Hash value to confirm whether there is the first translation record in the memory 106. In another embodiment, the first translation record may include at least a target language category (e.g., Chinese, Japanese or other languages), an indexed Hash value and the first translation text string, wherein the target language category is used to represent the language category of the first translation text string. When the processor 102 uses the generated Hash value to confirm whether the first translation record exists in the memory 106, the processor 102 can use the generated Hash value to compare the Hash value of the index. When the generated Hash value is compared to the Hash value of the index and is identical or related, the processor 102 can confirm that the first translation record associated with the generated Hash value exists in the memory 106.

於步驟S312中,當該處理器102確認了該用戶裝置100的儲存器106中存在有該第一翻譯紀錄時,該處理器102會從該第一翻譯紀錄中讀取出該第一翻譯文字串,並驅動該顯示器104將該讀取出的第一翻譯文字串216及/或其語言類別218(例如:中文)顯示於該使用者操作介面200的輔助顯示區域204上(如圖2E所示),並根據一第二觸發事件來產生相關聯於該讀取出的第一翻譯文字串216的一第一翻譯標記220於該電子文件210上(如圖2F所示)。於本實施例中,該第二觸發事件可以是該輸入元件108(例如:滑鼠、觸控面板或鍵盤)所控制的一游標240在ㄧ軟體按鍵222上的點選,但不以此為限。於另一實施例中,當該處理器102確認了該用戶裝置100的儲存器106中存在有該第一翻譯紀錄時,該處理器102可驅動該顯示器104將該讀取出的第一翻譯文字串216及/或其語言類別218(例如:中文)顯示於該使用者操作介面200的輔助顯示區域204上,並且可自動產生(即不需根據該第二觸發事件來產生)相關聯於該讀取出的第一翻譯文字串216的一第一翻譯標記220於該電子文件210上。In step S312, when the processor 102 confirms that the first translation record exists in the memory 106 of the user device 100, the processor 102 reads the first translation string from the first translation record, drives the display 104 to display the read first translation string 216 and/or its language category 218 (e.g., Chinese) on the auxiliary display area 204 of the user operation interface 200 (as shown in FIG. 2E ), and generates a first translation mark 220 associated with the read first translation string 216 on the electronic document 210 according to a second trigger event (as shown in FIG. 2F ). In this embodiment, the second trigger event may be a click of a software button 222 by a cursor 240 controlled by the input element 108 (eg, a mouse, a touch panel, or a keyboard), but is not limited thereto. In another embodiment, when the processor 102 confirms that the first translation record exists in the memory 106 of the user device 100, the processor 102 may drive the display 104 to display the read first translation text string 216 and/or its language category 218 (e.g., Chinese) on the auxiliary display area 204 of the user operation interface 200, and may automatically generate (i.e., without being generated according to the second trigger event) a first translation mark 220 associated with the read first translation text string 216 on the electronic document 210.

圖4為圖1的用戶裝置100請求一伺服器400回傳一翻譯文字串的操作示意圖。現請參考圖1、圖2G、圖3B與圖4,步驟S314至步驟S320將說明如后。Fig. 4 is a schematic diagram of the operation of the user device 100 of Fig. 1 requesting a server 400 to return a translated text string. Referring now to Fig. 1, Fig. 2G, Fig. 3B and Fig. 4, steps S314 to S320 will be described as follows.

於步驟S314中,當該處理器102確認了該用戶裝置100的儲存器106中未存在有該第一翻譯紀錄時,處理器102會藉由該發送器110發送一翻譯請求給該伺服器400,以請求該伺服器400回傳對應於該被選擇的文字串212a的一第二翻譯文字串。於本實施例中,該翻譯請求帶有該產生的Hash值、該被選擇的文字串212a及一目的語言類別(例如:中文、日文或其他語言),但不以此為限。例如,當該處理器102所執行的文件編輯軟體或文件瀏覽軟體僅提供兩種語言(例如:英文與中文)間的翻譯功能時,則該翻譯請求僅帶有該產生的Hash值及該被選擇的文字串212a。再者,於本實施例中,該處理器102可將該翻譯請求編碼成一第一JSON(JavaScript Object Notation)物件,並藉由該發送器110發送該第一JSON物件給該伺服器。於另一實施例中,該處理器102可不需將該翻譯請求編碼成該第一JSON物件,而可直接將該翻譯請求發送給該伺服器400。In step S314, when the processor 102 confirms that the first translation record does not exist in the memory 106 of the user device 100, the processor 102 sends a translation request to the server 400 through the transmitter 110 to request the server 400 to return a second translation text string corresponding to the selected text string 212a. In this embodiment, the translation request carries the generated hash value, the selected text string 212a, and a target language category (e.g., Chinese, Japanese, or other languages), but is not limited thereto. For example, when the document editing software or document browsing software executed by the processor 102 only provides translation functions between two languages (e.g., English and Chinese), the translation request only carries the generated Hash value and the selected text string 212a. Furthermore, in this embodiment, the processor 102 may encode the translation request into a first JSON (JavaScript Object Notation) object and send the first JSON object to the server via the sender 110. In another embodiment, the processor 102 may not encode the translation request into the first JSON object, but may directly send the translation request to the server 400.

於本實施例中,當該伺服器400接收到該第一JSON物件後,會對該第一JSON物件進行解碼,以獲得該翻譯請求。接者,該伺服器400可使用該翻譯請求中所帶有的Hash值來確認該伺服器400的一儲存器402中是否存在有相關聯於該帶有的Hash值的一第二翻譯紀錄。於本實施例中,該第二翻譯紀錄可包括對應於該被選擇的文字串212a的一第二翻譯文字串。舉例而言,該伺服器400可使用該帶有的Hash值來確認該伺服器400的一儲存器402中是否存在有該第二翻譯紀錄。於另一實施例中,該第二翻譯紀錄可至少包括一目的語言類別(例如:中文、日文或其他語言)、一索引的Hash值及該第二翻譯文字串,其中該目的語言類別係用以表示該第二翻譯文字串的語言類別。當該伺服器400使用該帶有的Hash值來確認該儲存器402中是否存在有該第二翻譯紀錄時,該伺服器400可使用該帶有的Hash值來比對該索引的Hash值。當比對出該帶有的Hash值與該索引的Hash值相同或相關聯時,該伺服器400可確認該儲存器402中存在有相關聯於該帶有的Hash值的第二翻譯紀錄,並從儲存在該儲存器402的該第二翻譯紀錄中讀取出該第二翻譯文字串。接著,該伺服器400可將該讀取出的第二翻譯文字串發送給該用戶裝置100。於本實施例中,該伺服器400可將該第二翻譯文字串編碼成一第二JSON物件,並發送該第二JSON物件給該用戶裝置100。於另一實施例中,該伺服器400可不需將該第二翻譯文字串編碼成該第二JSON物件,而可直接將該第二翻譯文字串發送給該用戶裝置100。In this embodiment, after receiving the first JSON object, the server 400 decodes the first JSON object to obtain the translation request. Then, the server 400 can use the hash value in the translation request to confirm whether there is a second translation record associated with the hash value in a memory 402 of the server 400. In this embodiment, the second translation record may include a second translation text string corresponding to the selected text string 212a. For example, the server 400 can use the hash value to confirm whether there is a second translation record in a memory 402 of the server 400. In another embodiment, the second translation record may include at least a target language category (e.g., Chinese, Japanese, or other languages), a hash value of an index, and the second translation text string, wherein the target language category is used to indicate the language category of the second translation text string. When the server 400 uses the hash value to confirm whether the second translation record exists in the memory 402, the server 400 may use the hash value to compare the hash value of the index. When the hash value is compared to the hash value of the index and is identical or related, the server 400 may confirm that the second translation record associated with the hash value exists in the memory 402, and read the second translation string from the second translation record stored in the memory 402. Then, the server 400 may send the read second translation string to the user device 100. In this embodiment, the server 400 may encode the second translation string into a second JSON object and send the second JSON object to the user device 100. In another embodiment, the server 400 may not need to encode the second translated text string into the second JSON object, but may directly send the second translated text string to the user device 100.

於本實施例中,當未比對出該帶有的Hash值與該索引的Hash值相同或相關聯時,該伺服器400可確認該儲存器402中未存在有相關聯於該帶有的Hash值的一第二翻譯紀錄,並呼叫一翻譯模組來對該被選擇的文字串212a進行翻譯,以產生該第二翻譯文字串。於本實施例中,該翻譯模組可以是儲存在該儲存器402中並由伺服器400所執行的一翻譯軟體或是一遠端翻譯伺服器(未顯示)上所執行的一翻譯軟體。接著,該伺服器400可將該Hash值與該產生的第二翻譯文字串儲存為該第二翻譯紀錄,並將該第二翻譯紀錄儲存在該儲存器402中。最後,該伺服器400可將該產生的第二翻譯文字串編碼成該第二JSON物件,並發送該第二JSON物件給該用戶裝置100。於另一實施例中,該伺服器400可不需將該產生的第二翻譯文字串編碼成該第二JSON物件,而可直接將該第二翻譯文字串發送給該用戶裝置100。In this embodiment, when the hash value with is not matched to be the same or related to the hash value of the index, the server 400 can confirm that there is no second translation record associated with the hash value with in the memory 402, and call a translation module to translate the selected text string 212a to generate the second translated text string. In this embodiment, the translation module can be a translation software stored in the memory 402 and executed by the server 400 or a translation software executed on a remote translation server (not shown). Next, the server 400 may store the hash value and the generated second translation string as the second translation record, and store the second translation record in the memory 402. Finally, the server 400 may encode the generated second translation string into the second JSON object, and send the second JSON object to the user device 100. In another embodiment, the server 400 may not encode the generated second translation string into the second JSON object, but may directly send the second translation string to the user device 100.

於步驟S316中,該處理器102會藉由該接收器112從該伺服器400接收響應於該翻譯請求的一第二翻譯文字串。舉例而言,該處理器102會藉由該接收器112從該伺服器400接收到該第二JSON物件,並會對該第二JSON物件進行解碼,以獲得該第二翻譯文字串。於另一實施例中,該處理器102會藉由該接收器112接收未經編碼成JSON物件的第二翻譯文字串。In step S316, the processor 102 receives a second translation string in response to the translation request from the server 400 via the receiver 112. For example, the processor 102 receives the second JSON object from the server 400 via the receiver 112 and decodes the second JSON object to obtain the second translation string. In another embodiment, the processor 102 receives the second translation string that is not encoded into a JSON object via the receiver 112.

於步驟S318中,當該處理器102藉由該接收器112從該伺服器400接收到該第二翻譯文字串時,該處理器102會驅動該顯示器104將該接收到的第二翻譯文字串226顯示於該使用者操作介面200上,並根據該第二觸發事件來產生相關聯於該第二翻譯文字串226的一第二翻譯標記228於該電子文件210上,如圖2G所示。於本實施例中,該接收到的第二翻譯文字串226與該讀取出的第一翻譯文字串216可為相同。然而,於其他實施例中,當該接收到的第二翻譯文字串226與該讀取出的第一翻譯文字串216是由不同翻譯模組或不同翻譯軟體產生時,則兩者可能會略有差異。於另一實施例中,當該處理器102藉由該接收器112從該伺服器400接收到該第二翻譯文字串時,該處理器102會驅動該顯示器104將該接收到的第二翻譯文字串226顯示於該使用者操作介面200上,並且可自動產生(即不需根據該第二觸發事件來產生)相關聯於該第二翻譯文字串226的一第二翻譯標記228於該電子文件210上。In step S318, when the processor 102 receives the second translation string from the server 400 via the receiver 112, the processor 102 drives the display 104 to display the received second translation string 226 on the user interface 200, and generates a second translation mark 228 associated with the second translation string 226 on the electronic document 210 according to the second trigger event, as shown in FIG2G. In this embodiment, the received second translation string 226 and the read first translation string 216 can be the same. However, in other embodiments, when the received second translation string 226 and the read first translation string 216 are generated by different translation modules or different translation software, the two may be slightly different. In another embodiment, when the processor 102 receives the second translation string from the server 400 via the receiver 112, the processor 102 drives the display 104 to display the received second translation string 226 on the user operation interface 200, and can automatically generate (i.e., without generating according to the second trigger event) a second translation mark 228 associated with the second translation string 226 on the electronic document 210.

於步驟S320中,該處理器102會將該產生的代碼(例如:該產生的Hash值)以及該接收的第二翻譯文字串226儲存為一第二翻譯紀錄,並將該第二翻譯紀錄儲存在該用戶裝置100的儲存器106中。In step S320 , the processor 102 stores the generated code (eg, the generated hash value) and the received second translated text string 226 as a second translation record, and stores the second translation record in the memory 106 of the user device 100 .

現請參考圖2H,當該處理器102根據使用者的另一操作來開啟具有該文字串212a的另一電子文件211時,該處理器102可以藉由執行步驟S302至步驟S312來確認該儲存器106中存在有上述步驟S320中所儲存的該第二翻譯紀錄,接著將該第二翻譯紀錄中的第二翻譯文字串226顯示於該使用者操作介面200的輔助顯示區域204上,並產生對應於該文字串212a的一第三翻譯標記229。Now please refer to Figure 2H. When the processor 102 opens another electronic document 211 having the text string 212a according to another operation of the user, the processor 102 can confirm that the second translation record stored in the above step S320 exists in the memory 106 by executing steps S302 to S312, and then display the second translation text string 226 in the second translation record on the auxiliary display area 204 of the user operation interface 200, and generate a third translation mark 229 corresponding to the text string 212a.

圖5A與圖5B為根據本發明的另一實施例之使用者操作介面於不同操作狀態下的示意圖。現請參考圖5A,該處理器102可以藉由執行上述實施例之步驟S302至步驟S318來選擇一文字串212b,接著將一對應於該被選擇的文字串212b的一第三翻譯文字串227顯示於該使用者操作介面200的輔助顯示區域204上,並產生對應於該被選擇的文字串212b的一第四翻譯標記230。5A and 5B are schematic diagrams of a user interface according to another embodiment of the present invention in different operating states. Referring now to FIG. 5A , the processor 102 can select a text string 212 b by executing steps S302 to S318 of the above embodiment, then display a third translated text string 227 corresponding to the selected text string 212 b on the auxiliary display area 204 of the user interface 200, and generate a fourth translated mark 230 corresponding to the selected text string 212 b.

於上述實施例中,根據本發明之方法更可包括以下步驟:當該第一翻譯標記220、該第二翻譯標記228、該第三翻譯標記229或該第四翻譯標記230被選擇時,該處理器102會將其所對應的該第一翻譯文字串216、該第二翻譯文字串226或該第三翻譯文字串227顯示於該使用者操作介面200的輔助顯示區域204上。舉例而言,於圖5A中,該輔助顯示區域204中顯示了對應於該文字串212b的第三翻譯文字串227,並且該處理器102會偵測該輸入元件108所控制的游標240是否移動至該第二翻譯標記228進行選擇(例如:藉由滑鼠的左鍵點擊或觸控面板的觸擊而進行選擇)。當該處理器102偵測到該輸入元件108所控制的游標240移動至該第二翻譯標記228進行選擇時,該處理器102會驅動該顯示器104將對應於該文字串212a的第二翻譯文字串226顯示於該使用者操作介面200的輔助顯示區域204上,進而取代該第三翻譯文字串227,如圖5B所示。In the above embodiment, the method according to the present invention may further include the following steps: when the first translation mark 220, the second translation mark 228, the third translation mark 229 or the fourth translation mark 230 is selected, the processor 102 will display the corresponding first translation text string 216, the second translation text string 226 or the third translation text string 227 on the auxiliary display area 204 of the user operation interface 200. For example, in FIG. 5A , the auxiliary display area 204 displays the third translated text string 227 corresponding to the text string 212 b, and the processor 102 detects whether the cursor 240 controlled by the input element 108 moves to the second translated mark 228 for selection (e.g., by left-clicking the mouse or touching the touch panel). When the processor 102 detects that the cursor 240 controlled by the input element 108 moves to the second translation mark 228 for selection, the processor 102 drives the display 104 to display the second translation text string 226 corresponding to the text string 212a on the auxiliary display area 204 of the user operation interface 200, thereby replacing the third translation text string 227, as shown in FIG. 5B .

於其他實施例中,該處理器102可產生至少一個翻譯標記與至少一個註解標記於同一個電子文件上,使得根據本發明的方法可支援在同一份電子文件上同時產生翻譯標記與註解標記的功能。此功能將以圖6A至圖6C為例說明如后。In other embodiments, the processor 102 may generate at least one translation mark and at least one annotation mark on the same electronic document, so that the method according to the present invention can support the function of generating translation marks and annotation marks on the same electronic document at the same time. This function will be described below with reference to FIG. 6A to FIG. 6C as an example.

圖6A至圖6C為根據本發明的其他實施例之使用者操作介面於不同操作狀態下的示意圖。於上述實施例中,根據本發明之方法更可包括以下步驟:該處理器102會根據一第三觸發事件來產生一備註標記於該電子文件上,並同時將一翻譯標記(如:該第一翻譯標記220、該第二翻譯標記228、該第三翻譯標記229或該第四翻譯標記230)與該備註標記顯示於該電子文件上。舉例而言,如圖6A所示,該處理器102可根據步驟S302與步驟S304來選擇一文字串212b,並驅動該顯示器104將該功能選單214顯示於該使用者操作介面200上。於本實施例中,該第三觸發事件可以是該輸入元件108(例如:滑鼠、觸控面板或鍵盤)所控制的游標240在該功能選項214的「新增備註」選項上的點選,但不以此為限。當該「新增備註」選項被該游標240點選後,該處理器102會產生相關聯於該文字串212b的一備註標記250與一備註視窗252,並驅動該顯示器104同時將該第一翻譯標記220、該備註標記250與該備註視窗252顯示於該電子文件210上,如圖6B所示。於此實施例中,該備註視窗252具有一備註欄位252a與一儲存按鍵252b。當該備註欄位252a接收一使用者輸入的備註文字,並且該儲存按鍵252b被該輸入元件108(例如:滑鼠、觸控面板或鍵盤)所控制的游標240點選後,該備註視窗252可被隱藏,如圖6C所示。於此實施例中,該備註視窗252被隱藏後,可藉由該輸入元件108(例如:滑鼠、觸控面板或鍵盤)所控制的游標240點選該備註標記250而再次顯現於該使用者操作介面200上。6A to 6C are schematic diagrams of user operation interfaces in different operation states according to other embodiments of the present invention. In the above embodiments, the method according to the present invention may further include the following steps: the processor 102 generates a remark mark on the electronic document according to a third trigger event, and simultaneously displays a translation mark (such as the first translation mark 220, the second translation mark 228, the third translation mark 229 or the fourth translation mark 230) and the remark mark on the electronic document. For example, as shown in FIG6A , the processor 102 may select a text string 212 b according to step S302 and step S304, and drive the display 104 to display the function menu 214 on the user interface 200. In this embodiment, the third trigger event may be a click of the cursor 240 controlled by the input element 108 (e.g., a mouse, a touch panel, or a keyboard) on the “Add Note” option of the function option 214, but is not limited thereto. When the "Add Note" option is selected by the cursor 240, the processor 102 generates a note mark 250 and a note window 252 associated with the text string 212b, and drives the display 104 to simultaneously display the first translation mark 220, the note mark 250 and the note window 252 on the electronic document 210, as shown in FIG6B. In this embodiment, the note window 252 has a note field 252a and a save button 252b. When the note field 252a receives a note text input by a user, and the save button 252b is clicked by the cursor 240 controlled by the input element 108 (e.g., a mouse, a touch panel, or a keyboard), the note window 252 can be hidden, as shown in FIG6C. In this embodiment, after the note window 252 is hidden, the note mark 250 can be displayed again on the user interface 200 by clicking the cursor 240 controlled by the input element 108 (e.g., a mouse, a touch panel, or a keyboard).

另外,在此實施例中,該電子文件可以是可攜式文件格式(Portable Document Format:PDF)的電子文件,且該第一翻譯標記220與該備註標記250是分別藉由兩個不同的PDF標籤來實現。例如:該備註標記250可由PDF常規標籤(如:Markup標籤)來實現,而該第一翻譯標記220可由PDF自定義標籤來實現。因此,當具有該第一翻譯標記220的電子文件被有支援該PDF自定義標籤的文件編輯軟體或文件瀏覽軟體開啟時,該第一翻譯標記220才會出現在該電子文件上。反之,當具有該第一翻譯標記220的電子文件被未支援該PDF自定義標籤的文件編輯軟體或文件瀏覽軟體開啟時,該第一翻譯標記220將不會出現在該電子文件上。或者,當具有該第一翻譯標記220的電子文件被未支援該PDF自定義標籤的文件編輯軟體或文件瀏覽軟體開啟時,該第一翻譯標記220可根據不同設計而由一備註標記來取代。In addition, in this embodiment, the electronic document may be an electronic document in a portable document format (PDF), and the first translation mark 220 and the remark mark 250 are respectively implemented by two different PDF tags. For example, the remark mark 250 may be implemented by a conventional PDF tag (such as a Markup tag), and the first translation mark 220 may be implemented by a PDF custom tag. Therefore, when the electronic document with the first translation mark 220 is opened by a document editing software or a document browsing software that supports the PDF custom tag, the first translation mark 220 will appear on the electronic document. On the contrary, when the electronic document with the first translation mark 220 is opened by a document editing software or a document browsing software that does not support the PDF custom tag, the first translation mark 220 will not appear on the electronic document. Alternatively, when the electronic document with the first translation mark 220 is opened by a document editing software or a document browsing software that does not support the PDF custom tag, the first translation mark 220 can be replaced by a note mark according to different designs.

應瞭解到,在上述所有實施例中,雖然電子文件210中的文字串212a是從英文翻成中文,但並不以此為限,亦即本發明所提供的方法可應用在電子文件中任何語言間的翻譯。It should be understood that in all the above embodiments, although the text string 212a in the electronic document 210 is translated from English into Chinese, it is not limited to this. That is, the method provided by the present invention can be applied to the translation between any languages in the electronic document.

雖然本發明已以實施例揭露如上,然其並非用以限定本發明,任何所屬技術領域中具有通常知識者,在不脫離本發明的精神和範圍內,當可作些許的更動與潤飾,故本發明的保護範圍當視後附的申請專利範圍所界定者為準。Although the present invention has been disclosed as above by the embodiments, they are not intended to limit the present invention. Any person with ordinary knowledge in the relevant technical field can make some changes and modifications without departing from the spirit and scope of the present invention. Therefore, the protection scope of the present invention shall be defined by the scope of the attached patent application.

A、B、C、D:功能選項 P1、P2:點 S300~S320:步驟 100:用戶裝置 102:處理器 104:顯示器 106:儲存器 108:輸入元件 110:發送器 112:接收器 200:使用者操作介面 202:文件顯示區域 204:輔助顯示區域 206:功能選擇區域 210、211:電子文件 212:段落 212a、212b:文字串 214:功能選單 216:讀取的第一翻譯文字串 218:語言類別 220:第一翻譯標記 222:軟體按鍵 226:接收的第二翻譯文字串 227:第三翻譯文字串 228:第二翻譯標記 229:第三翻譯標記 230:第四翻譯標記 240:游標 250:備註標記 252:備註視窗 252a:備註欄位 252b:儲存按鍵 400:伺服器 402:儲存器 A, B, C, D: Function options P1, P2: Points S300~S320: Steps 100: User device 102: Processor 104: Display 106: Memory 108: Input element 110: Transmitter 112: Receiver 200: User interface 202: Document display area 204: Auxiliary display area 206: Function selection area 210, 211: Electronic document 212: Paragraph 212a, 212b: Text string 214: Function menu 216: Read the first translated text string 218: Language category 220: First translation mark 222: Software button 226: Received second translation string 227: Third translation string 228: Second translation mark 229: Third translation mark 230: Fourth translation mark 240: Cursor 250: Note mark 252: Note window 252a: Note field 252b: Save button 400: Server 402: Memory

為讓本發明內容之上述和其他目的、特徵、優點與實施例能更明顯易懂,所附圖式之說明如下:In order to make the above and other purposes, features, advantages and embodiments of the present invention more clearly understood, the attached drawings are described as follows:

圖1為根據本發明的一實施例之產生並應用翻譯標記的用戶裝置的方塊示意圖。FIG. 1 is a block diagram of a user device for generating and applying translation marks according to an embodiment of the present invention.

圖2A至圖2H為根據本發明的一實施例之使用者操作介面於不同操作狀態下的示意圖。2A to 2H are schematic diagrams of a user operation interface according to an embodiment of the present invention in different operation states.

圖3A與圖3B為根據本發明的一實施例之產生並應用翻譯標記的方法之流程圖。3A and 3B are flow charts of a method for generating and applying translation marks according to an embodiment of the present invention.

圖4為圖1的用戶裝置請求一伺服器回傳翻譯文字串的操作示意圖。FIG. 4 is a schematic diagram of the operation of the user device in FIG. 1 requesting a server to return a translated text string.

圖5A與圖5B為根據本發明的另一實施例之使用者操作介面於不同操作狀態下的示意圖。5A and 5B are schematic diagrams of a user operation interface in different operation states according to another embodiment of the present invention.

圖6A至圖6C為根據本發明的其他實施例之使用者操作介面於不同操作狀態下的示意圖。6A to 6C are schematic diagrams of user operation interfaces in different operation states according to other embodiments of the present invention.

S300~S312:步驟 S300~S312: Steps

Claims (15)

一種產生並應用翻譯標記的方法,該方法由一用戶裝置來執行,並且包括:開啟一電子文件於一使用者操作介面上,其中該使用者操作介面包括一文件顯示區域及一輔助顯示區域,該電子文件被開啟於該文件顯示區域上,且該電子文件包括複數個文字串;顯示一文字串於該輔助顯示區域上;根據一第一觸發事件來選擇該複數個文字串中的至少一個文字串;顯示一翻譯選項於該使用者操作介面上;偵測該翻譯選項是否被選擇;以及當偵測到該翻譯選項被選擇時,執行下列步驟:藉由一功能函數產生對應於該被選擇的至少一個文字串的一代碼;確認該用戶裝置中是否存在有相關聯於該代碼的一第一翻譯紀錄,其中該第一翻譯紀錄包括對應於該被選擇的至少一個文字串的一第一翻譯文字串;當確認該用戶裝置中存在有該第一翻譯紀錄時,產生相關聯於該第一翻譯文字串的一第一翻譯標記於該電子文件上;以及當該第一翻譯標記被選擇時,將該第一翻譯文字串顯示於該輔助顯示區域上,進而取代該文字串。 A method for generating and applying a translation mark is performed by a user device and includes: opening an electronic document on a user operation interface, wherein the user operation interface includes a document display area and an auxiliary display area, the electronic document is opened on the document display area, and the electronic document includes a plurality of text strings; displaying a text string on the auxiliary display area; selecting at least one of the plurality of text strings according to a first trigger event; displaying a translation option on the user operation interface; detecting whether the translation option is selected; and when the translation option is detected to be selected, When the user device selects the first translation record, the following steps are performed: a code corresponding to the selected at least one text string is generated by a function; whether a first translation record associated with the code exists in the user device, wherein the first translation record includes a first translation text string corresponding to the selected at least one text string; when it is confirmed that the user device has the first translation record, a first translation mark associated with the first translation text string is generated on the electronic document; and when the first translation mark is selected, the first translation text string is displayed on the auxiliary display area, thereby replacing the text string. 如請求項1之方法,其中當偵測到該翻譯選項被選擇時,更執行下列步驟: 當確認該用戶裝置中未存在有該第一翻譯紀錄時,發送一翻譯請求給一伺服器,以請求該伺服器回傳對應於該被選擇的至少一個文字串的一第二翻譯文字串,其中該翻譯請求帶有該代碼及該被選擇的至少一個文字串;從該伺服器接收響應於該翻譯請求的該第二翻譯文字串;以及當從該伺服器接收到該第二翻譯文字串時,顯示該第二翻譯文字串於該輔助顯示區上,並產生相關聯於該第二翻譯文字串的一第二翻譯標記於該電子文件上。 The method of claim 1, wherein when it is detected that the translation option is selected, the following steps are further performed: When it is confirmed that the user device does not have the first translation record, a translation request is sent to a server to request the server to return a second translation text string corresponding to the selected at least one text string, wherein the translation request carries the code and the selected at least one text string; the second translation text string is received from the server in response to the translation request; and when the second translation text string is received from the server, the second translation text string is displayed on the auxiliary display area, and a second translation mark associated with the second translation text string is generated on the electronic document. 如請求項2之方法,其中該第二翻譯文字串是從該伺服器的一儲存器中讀取出,或是藉由該伺服器呼叫一翻譯模組來對該被選擇的至少一個文字串進行翻譯而產生,並由該伺服器發送給該用戶裝置。 As in the method of claim 2, the second translated text string is read from a storage of the server, or is generated by the server calling a translation module to translate the at least one selected text string, and is sent by the server to the user device. 如請求項2之方法,更包括:將該代碼以及該第二翻譯文字串儲存為一第二翻譯紀錄,並將該第二翻譯紀錄儲存在該用戶裝置中。 The method of claim 2 further includes: storing the code and the second translated text string as a second translation record, and storing the second translation record in the user device. 如請求項2之方法,更包括:將該翻譯請求編碼成JSON(JavaScript Object Notation)物件,並發送該JSON物件給該伺服器。 The method of request item 2 further includes: encoding the translation request into a JSON (JavaScript Object Notation) object, and sending the JSON object to the server. 如請求項1之方法,其中該功能函數為雜湊(Hash)函數,且該代碼為一Hash值。 As in the method of claim 1, wherein the function is a hash function, and the code is a hash value. 如請求項1之方法,其中產生相關聯於該第一翻譯文字串的該第一翻譯標記於該電子文件上的步驟更包括:根據一第二觸發事件來產生相關聯於該第一翻譯文字串的該第一翻譯標記於該電子文件上。 As in the method of claim 1, the step of generating the first translation mark associated with the first translation text string on the electronic document further includes: generating the first translation mark associated with the first translation text string on the electronic document according to a second triggering event. 如請求項1之方法,更包括: 根據一第三觸發事件來產生一備註標記於該電子文件上,並同時將該第一翻譯標記與該備註標記顯示於該電子文件上,其中該電子文件可以是可攜式文件格式(PDF)的電子文件,且該第一翻譯標記與該備註標記是分別藉由兩個不同的PDF標籤來實現。 The method of claim 1 further includes: Generating a remark on the electronic document according to a third trigger event, and simultaneously displaying the first translation mark and the remark on the electronic document, wherein the electronic document may be a portable document format (PDF) electronic document, and the first translation mark and the remark are respectively implemented by two different PDF tags. 一種產生並應用翻譯標記的用戶裝置,包括:一處理器;一顯示器,電性耦接到該處理器,用以顯示一使用者操作介面,其中該使用者操作介面包括一文件顯示區域及一輔助顯示區域;以及一儲存器,電性耦接到該處理器,並且該儲存器儲存至少一個電腦可執行程式,其中該至少一個電腦可執行程式在由該處理器執行時,使該處理器執行下列步驟:開啟一電子文件於該輔助顯示區域上,其中該電子文件包括複數個文字串;顯示一文字串於該輔助顯示區域上;根據一第一觸發事件來選擇該複數個文字串中的至少一個文字串;顯示一翻譯選項於該使用者操作介面上;偵測該翻譯選項是否被選擇;以及當偵測到該翻譯選項被選擇時,更執行下列步驟:藉由一功能函數產生對應於該被選擇的至少一個文字串的一代碼;確認該儲存器中是否存在有相關聯於該代碼的一第一翻譯紀錄,其中該第一翻譯紀錄包括對應於該被選擇的至少一個文字串的一第一翻譯文字串; 當確認該儲存器中存在有該第一翻譯紀錄時,產生相關聯於該第一翻譯文字串的一第一翻譯標記於該電子文件上;以及當該第一翻譯標記被選擇時,將該第一翻譯文字串顯示於該輔助顯示區域上,進而取代該文字串。 A user device for generating and applying translation marks comprises: a processor; a display electrically coupled to the processor for displaying a user operation interface, wherein the user operation interface comprises a document display area and an auxiliary display area; and a memory electrically coupled to the processor and storing at least one computer executable program, wherein the at least one computer executable program, when executed by the processor, causes the processor to execute the following steps: opening an electronic document on the auxiliary display area, wherein the electronic document comprises a plurality of text strings; displaying a text string on the auxiliary display area; selecting at least one text string from the plurality of text strings according to a first trigger event; displaying a translation selection item on the user operation interface; detecting whether the translation option is selected; and when the translation option is detected to be selected, further executing the following steps: generating a code corresponding to the selected at least one text string by a function; confirming whether there is a first translation record associated with the code in the memory, wherein the first translation record includes a first translation text string corresponding to the selected at least one text string; When confirming that the first translation record exists in the memory, generating a first translation mark associated with the first translation text string on the electronic document; and when the first translation mark is selected, displaying the first translation text string on the auxiliary display area, thereby replacing the text string. 如請求項9之用戶裝置,更包括:一輸入元件,電性耦接到該處理器,用以:接收一第一輸入,並產生對應於該第一輸入的一第一輸入訊號,其中該第一觸發事件是根據該第一輸入訊號而產生。 The user device of claim 9 further includes: an input element electrically coupled to the processor, for: receiving a first input and generating a first input signal corresponding to the first input, wherein the first trigger event is generated according to the first input signal. 如請求項9之用戶裝置,更包括:一發送器,電性耦接到該處理器,用以:當該處理器確認該儲存器中未存在有該第一翻譯紀錄時,發送一翻譯請求給一伺服器,以請求該伺服器回傳對應於該被選擇的至少一個文字串的一第二翻譯文字串,其中該翻譯請求帶有該代碼及該被選擇的至少一個文字串;以及一接收器,電性耦接到該處理器,用以:從該伺服器接收響應於該翻譯請求的該第二翻譯文字串;其中當該接收器從該伺服器接收到該第二翻譯文字串時,該處理器更用以:將該第二翻譯文字串顯示於該輔助顯示區上,並產生相關聯於該第二翻譯文字串的一第二翻譯標記於該電子文件上。 The user device of claim 9 further comprises: a transmitter electrically coupled to the processor, for: when the processor confirms that the first translation record does not exist in the memory, sending a translation request to a server to request the server to return a second translation text string corresponding to the selected at least one text string, wherein the translation request carries the code and the selected at least one text string ; and a receiver electrically coupled to the processor, for: receiving the second translation string in response to the translation request from the server; wherein when the receiver receives the second translation string from the server, the processor is further used to: display the second translation string on the auxiliary display area, and generate a second translation mark associated with the second translation string on the electronic document. 如請求項11之用戶裝置,其中該處理器更執行:將該代碼以及該第二翻譯文字串儲存為一第二翻譯紀錄,並將該第二翻譯紀錄儲存在該儲存器中。 A user device as claimed in claim 11, wherein the processor further executes: storing the code and the second translated text string as a second translation record, and storing the second translation record in the memory. 如請求項11之用戶裝置,其中該處理器更執行: 將該翻譯請求編碼成JSON(JavaScript Object Notation)物件,並藉由該發送器發送該JSON物件給該伺服器。 The user device of request item 11, wherein the processor further executes: Encode the translation request into a JSON (JavaScript Object Notation) object, and send the JSON object to the server via the sender. 如請求項9之用戶裝置,其中該處理器所執行的產生相關聯於該第一翻譯文字串的該第一翻譯標記於該電子文件上的步驟更包括:根據一第二觸發事件來產生相關聯於該第一翻譯文字串的該第一翻譯標記於該電子文件上。 In the user device of claim 9, the step of generating the first translation mark associated with the first translation text string on the electronic document executed by the processor further includes: generating the first translation mark associated with the first translation text string on the electronic document according to a second triggering event. 如請求項9之用戶裝置,其中該處理器更執行:根據一第三觸發事件來產生一備註標記於該電子文件上,並同時將該第一翻譯標記與該備註標記顯示於該電子文件上,其中該電子文件可以是可攜式文件格式(PDF)的電子文件,且該第一翻譯標記與該備註標記是分別藉由兩個不同的PDF標籤來實現。 A user device as claimed in claim 9, wherein the processor further executes: generating a remark mark on the electronic document according to a third trigger event, and simultaneously displaying the first translation mark and the remark mark on the electronic document, wherein the electronic document may be an electronic document in a portable document format (PDF), and the first translation mark and the remark mark are respectively implemented by two different PDF tags.
TW112100130A 2022-06-29 2023-01-03 Method and user apparatus for generating and applying translation marker TWI850945B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US18/215,449 US20240005103A1 (en) 2022-06-29 2023-06-28 Method and user apparatus for generating and applying translation marker

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
US202263356639P 2022-06-29 2022-06-29
US63/356,639 2022-06-29

Publications (2)

Publication Number Publication Date
TW202401229A TW202401229A (en) 2024-01-01
TWI850945B true TWI850945B (en) 2024-08-01

Family

ID=90457639

Family Applications (2)

Application Number Title Priority Date Filing Date
TW112100130A TWI850945B (en) 2022-06-29 2023-01-03 Method and user apparatus for generating and applying translation marker
TW112109820A TWI851088B (en) 2022-06-29 2023-03-16 Method, electronic apparatus and non-transitory computer readable medium for modifying pages of electronic document

Family Applications After (1)

Application Number Title Priority Date Filing Date
TW112109820A TWI851088B (en) 2022-06-29 2023-03-16 Method, electronic apparatus and non-transitory computer readable medium for modifying pages of electronic document

Country Status (1)

Country Link
TW (2) TWI850945B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130253901A1 (en) * 2012-03-23 2013-09-26 Avaya Inc. System and method for automatic language translation for applications
TWI434187B (en) * 2010-11-03 2014-04-11 Inst Information Industry Text conversion method and system
CN112232091A (en) * 2020-10-14 2021-01-15 文思海辉智科科技有限公司 Content matching method and device and readable storage medium
CN112633015A (en) * 2020-12-30 2021-04-09 语联网(武汉)信息技术有限公司 Document translation method and device, electronic equipment and storage medium
CN113255327A (en) * 2021-06-10 2021-08-13 腾讯科技(深圳)有限公司 Text processing method and device, electronic equipment and computer readable storage medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8515930B2 (en) * 2010-08-31 2013-08-20 Ricoh Company, Ltd. Merging a scanned document with an existing document on a server
TWI423049B (en) * 2011-08-04 2014-01-11 S & J Corp Online publication editing system
BR112014003925A2 (en) * 2011-08-19 2017-02-21 Apple Inc digital book content authoring method and digital book content authoring system
TW201401149A (en) * 2012-06-18 2014-01-01 Richplay Information Co Ltd Automatic double-paging method for electronic book
CN112036149B (en) * 2020-09-01 2023-10-27 珠海豹趣科技有限公司 File editing method and device, electronic equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI434187B (en) * 2010-11-03 2014-04-11 Inst Information Industry Text conversion method and system
US20130253901A1 (en) * 2012-03-23 2013-09-26 Avaya Inc. System and method for automatic language translation for applications
CN112232091A (en) * 2020-10-14 2021-01-15 文思海辉智科科技有限公司 Content matching method and device and readable storage medium
CN112633015A (en) * 2020-12-30 2021-04-09 语联网(武汉)信息技术有限公司 Document translation method and device, electronic equipment and storage medium
CN113255327A (en) * 2021-06-10 2021-08-13 腾讯科技(深圳)有限公司 Text processing method and device, electronic equipment and computer readable storage medium

Also Published As

Publication number Publication date
TW202401230A (en) 2024-01-01
TW202401229A (en) 2024-01-01
TWI851088B (en) 2024-08-01

Similar Documents

Publication Publication Date Title
US8473857B1 (en) Link annotation for keyboard navigation
US9507519B2 (en) Methods and apparatus for dynamically adapting a virtual keyboard
US8121413B2 (en) Method and system for controlling browser by using image
JP6728036B2 (en) Ink to text representation conversion
JP5706657B2 (en) Context-dependent sidebar window display system and method
US10204085B2 (en) Display and selection of bidirectional text
US20040181711A1 (en) Change request form annotation
JP2003186614A (en) Automatic software input panel selection based on application program state
US10817651B2 (en) Method for referring to specific content on a web page and web browsing system
CN105468256A (en) Input method keyboard switching method and device
US7519901B2 (en) Methods and systems for selecting objects by grouping annotations on the objects
US9378193B2 (en) Web management device, web management method, web management program, computer readable recording medium for recording said program, and web system
JP6100013B2 (en) Electronic device and handwritten document processing method
US20160103799A1 (en) Methods and systems for automated detection of pagination
TWI850945B (en) Method and user apparatus for generating and applying translation marker
US20240005103A1 (en) Method and user apparatus for generating and applying translation marker
CN112698734A (en) Candidate word display method and device and electronic equipment
CN113795819A (en) System and method for deleting key gestures and providing continuous path gestures at touch-sensitive keyboards
JP2013134657A (en) Device, method and program for information processing
KR20150093045A (en) Sketch Retrieval system, user equipment, service equipment and service method based on meteorological phenomena information and computer readable medium having computer program recorded therefor
JP2013239207A (en) Electronic apparatus, method, and program
US9411885B2 (en) Electronic apparatus and method for processing documents
US20240176463A1 (en) Electronic device, method for controlling electronic device, and program
CN114356118A (en) Character input method, device, electronic equipment and medium
CN119166262A (en) Application processing method, device, electronic equipment, storage medium and program product