TW202105131A - Method, computer program product, and electronic device for setting function of a button of a mobile device - Google Patents
Method, computer program product, and electronic device for setting function of a button of a mobile device Download PDFInfo
- Publication number
- TW202105131A TW202105131A TW108125806A TW108125806A TW202105131A TW 202105131 A TW202105131 A TW 202105131A TW 108125806 A TW108125806 A TW 108125806A TW 108125806 A TW108125806 A TW 108125806A TW 202105131 A TW202105131 A TW 202105131A
- Authority
- TW
- Taiwan
- Prior art keywords
- context
- screen
- function
- mobile device
- target screen
- Prior art date
Links
Images
Landscapes
- User Interface Of Digital Computer (AREA)
Abstract
Description
本發明係有關於一種按鍵功能的設定方法,特別是有關於一種用於行動裝置按鍵功能設定的方法、電腦程式產品及電子裝置。The present invention relates to a method for setting button functions, in particular to a method for setting button functions of a mobile device, a computer program product and an electronic device.
在一行動裝置的使用情境中,例如在瀏覽器的視窗中或在即時通訊軟體的對話視窗中,當使用者在上網瀏覽網頁或與他人在執行文字交談時,時常需要點按上下頁的動作。隨著行動裝置的螢幕愈做愈大,如果使用者此時正好在不易使用雙手的情境,便很難去執行該點按上下頁的動作。In the context of using a mobile device, such as in a browser window or in a conversation window of an instant messaging software, when a user is surfing the Internet or performing a text conversation with others, he often needs to click the action of the next page . As the screen of the mobile device becomes larger and larger, if the user is in a situation where it is not easy to use both hands at this time, it is difficult to perform the action of clicking the next page.
為解決上述問題,本發明提出一用於行動裝置按鍵功能設定的方法、電腦程式產品及電子裝置,透過人工智慧(Artificial Intelligence:AI)自動辨識使用者是否在使用上下頁的情境,同時自動將行動裝置音量鍵設定為可執行切換上下頁的功能。In order to solve the above-mentioned problems, the present invention proposes a method for setting button functions of mobile devices, computer program products, and electronic devices. Artificial Intelligence (AI) is used to automatically identify whether the user is using the context of the upper and lower pages. The volume key of the mobile device is set to perform the function of switching the upper and lower pages.
依據本發明一實施例之行動裝置的按鍵功能設定方法,包括:擷取該行動裝置之螢幕所顯示的一畫面;對該畫面進行情境辨識操作,以判定該畫面是否處於使用上下頁功能的情境;當判定該畫面處於使用上下頁功能的情境時,執行功能鍵設定,以將該行動裝置的實體音量鍵設定為可調整上下頁的功能鍵。該情境辨識操作係由該行動裝置依據一訓練模型運作而執行,該訓練模型係以複數螢幕截圖做為訓練資料而建立,並且運作用以判定一標的畫面是否處於該上下頁功能的情境。A method for setting key functions of a mobile device according to an embodiment of the present invention includes: capturing a screen displayed on the screen of the mobile device; performing a context recognition operation on the screen to determine whether the screen is in the context of using the next page function ; When it is determined that the screen is in the context of using the page up and down function, perform the function key setting to set the physical volume key of the mobile device as a function key that can adjust the up and down pages. The context recognition operation is executed by the mobile device according to a training model, which is established by using plural screenshots as training data, and is operated to determine whether a target screen is in the context of the upper and lower page function.
如上述之按鍵功能設定方法,其中,該訓練模型之建立,包括:蒐集該等螢幕截圖;對該等螢幕截圖進行物件偵測;將該等螢幕截圖,依據是否有符合特定物件而分別分類至一有上下頁情境群組及一無上下頁情境群組;以及依據該標的畫面是否具有該有上下頁情境群組內所包含的該特定物件,對該標的畫面進行情境辨識。Such as the button function setting method mentioned above, wherein the establishment of the training model includes: collecting the screenshots; detecting objects on the screenshots; classifying the screenshots according to whether they match specific objects A context group with upper and lower pages and a context group with no upper and lower pages; and based on whether the target screen has the specific object included in the context group with upper and lower pages, context identification is performed on the target screen.
如上述之按鍵功能設定方法,其中,當該標的畫面中具有該有上下頁情境群組內所包含的該特定物件,則判定該標的畫面為處於使用上下頁功能的情境;或當該標的畫面中不具有該有上下頁情境群組內所包含的該特定物件,則判定該標的畫面非處於使用上下頁功能的情境。Such as the above-mentioned button function setting method, wherein, when the target screen has the specific object contained in the context group with upper and lower pages, it is determined that the target screen is in the context of using the function of the upper and lower pages; or as the target screen If there is no specific object included in the context group with the upper and lower pages, it is determined that the target screen is not in the context of using the upper and lower pages function.
如上述之按鍵功能設定方法,其中,當該標的畫面為處於使用上下頁功能的情境,則將該行動裝置的實體音量鍵設定為可調整上下頁的功能鍵;或當該標的畫面非處於使用上下頁功能的情境,則將該行動裝置的實體音量鍵維持原有功能。Such as the button function setting method mentioned above, in which, when the target screen is in the context of using the upper and lower page functions, the physical volume keys of the mobile device are set as the function keys that can adjust the upper and lower pages; or when the target screen is not in use In the context of the page up and down function, the physical volume key of the mobile device maintains its original function.
依據本發明一實施例之電腦程式產品,用以設定一行動裝置的按鍵功能,該電腦程式產品經由該行動裝置載入以執行一擷取指令、一偵測指令、一設定指令。該擷取指令使該行動裝置的一處理器擷取該行動裝置之螢幕所顯示的一畫面。該偵測指令使該處理器對該畫面進行情境辨識操作,以判定該畫面是否處於使用上下頁功能的情境。當判定該畫面處於使用上下頁功能的情境時,使該處理器執行功能鍵設定,以將該行動裝置的實體音量鍵設定為可調整上下頁的功能鍵。該情境辨識操作係由該行動裝置依據一訓練模型運作而執行,該訓練模型係以複數螢幕截圖做為訓練資料而建立,並且運作用以判定一標的畫面是否處於該上下頁功能的情境。According to an embodiment of the present invention, a computer program product is used to set the key function of a mobile device, and the computer program product is loaded by the mobile device to execute a retrieval command, a detection command, and a setting command. The capture command enables a processor of the mobile device to capture a frame displayed on the screen of the mobile device. The detection instruction enables the processor to perform a context recognition operation on the screen to determine whether the screen is in the context of using the page up and down function. When it is determined that the screen is in the context of using the page up and down function, the processor is made to perform function key setting, so as to set the physical volume key of the mobile device as a function key that can adjust the page up and down. The context recognition operation is executed by the mobile device according to a training model, which is established by using plural screenshots as training data, and is operated to determine whether a target screen is in the context of the upper and lower page function.
如上述之電腦程式產品,其中,該訓練模型之建立,是執行包括:一截圖蒐集指令、一物件偵測指令、一情境分類指令,以及一情境辨識指令。該截圖蒐集指令用以蒐集該等螢幕截圖。該物件偵測指令用以對該等螢幕截圖進行物件偵測。該情境分類指令用以將該等螢幕截圖,依據是否有符合特定物件而分別分類至一有上下頁情境群組及一無上下頁情境群組。該情境辨識指令用以依據該標的畫面是否具有該有上下頁情境群組內所包含的該特定物件,對該標的畫面進行情境辨識。For the computer program product mentioned above, the establishment of the training model includes: a screenshot collection command, an object detection command, a context classification command, and a context recognition command. The screenshot collection command is used to collect these screenshots. The object detection command is used to perform object detection on the screenshots. The context classification command is used to classify the screen shots into a context group with upper and lower pages and a context group without upper and lower pages according to whether there is a specific object. The context recognition command is used to perform context recognition on the target screen according to whether the target screen has the specific object included in the context group with upper and lower pages.
如上述之電腦程式產品,其中,當該標的畫面中具有該有上下頁情境群組內所包含的該特定物件,則判定該標的畫面為處於使用上下頁功能的情境;或當該標的畫面中不具有該有上下頁情境群組內所包含的該特定物件,則判定該標的畫面非處於使用上下頁功能的情境。Such as the above-mentioned computer program product, in which, when the target screen has the specific object contained in the context group with upper and lower pages, it is determined that the target screen is in the context of using the function of the upper and lower pages; or when the target screen is in the context of using the upper and lower pages function; If it does not have the specific object included in the context group with the upper and lower pages, it is determined that the target screen is not in the context of using the upper and lower pages function.
如上述之電腦程式產品,其中,當該標的畫面為處於使用上下頁功能的情境,則將該行動裝置的實體音量鍵設定為可調整上下頁的功能鍵;或當該標的畫面非處於使用上下頁功能的情境,則將該行動裝置的實體音量鍵維持原有功能。Such as the above-mentioned computer program product, in which, when the target screen is in the context of using the upper and lower page function, the physical volume key of the mobile device is set as the function key that can adjust the upper and lower pages; or when the target screen is not in the context of using the upper and lower pages. In the context of the page function, the physical volume key of the mobile device maintains its original function.
依據本發明一實施例之電子裝置,包括一行動裝置。該行動裝置包括一顯示幕、一實體音量鍵、一處理器,以及一訓練模型。該顯示幕用以顯示一畫面。該訓練模型儲存於該行動裝置的一儲存器中,使得該處理器以執行包括:擷取該顯示幕所顯示的該畫面;對該畫面進行情境辨識操作,以判定該畫面是否處於使用上下頁功能的情境;當判定該畫面處於使用上下頁功能的情境時,執行功能鍵設定,以將該行動裝置的該實體音量鍵設定為可調整上下頁的功能鍵。該情境辨識操作係由該行動裝置依據該訓練模型運作而執行,該訓練模型係以複數螢幕截圖做為訓練資料而建立,並且運作用以判定一標的畫面是否處於該上下頁功能的情境。An electronic device according to an embodiment of the invention includes a mobile device. The mobile device includes a display screen, a physical volume button, a processor, and a training model. The display screen is used to display a picture. The training model is stored in a memory of the mobile device, so that the processor can perform operations including: capturing the screen displayed on the display screen; performing a context recognition operation on the screen to determine whether the screen is in use. The context of the function; when it is determined that the screen is in the context of using the upper and lower page functions, the function key setting is performed to set the physical volume key of the mobile device as a function key that can adjust the upper and lower pages. The context recognition operation is executed by the mobile device according to the operation of the training model. The training model is established using plural screenshots as training data, and the operation is used to determine whether a target screen is in the context of the upper and lower page function.
如上述之電子裝置,其中,該訓練模型之建立,包括:蒐集該等螢幕截圖;對該等螢幕截圖進行物件偵測;將該等螢幕截圖,依據是否有符合特定物件而分別分類至一有上下頁情境群組及一無上下頁情境群組;以及依據該標的畫面是否具有該有上下頁情境群組內所包含的該特定物件,對該標的畫面進行情境辨識。Such as the above-mentioned electronic device, wherein the establishment of the training model includes: collecting the screenshots; performing object detection on the screenshots; classifying the screenshots into one according to whether there is a specific object An upper and lower page context group and a no upper and lower page context group; and based on whether the target screen has the specific object included in the upper and lower page context group, context identification is performed on the target screen.
如上述之電子裝置,其中,當該標的畫面中具有該有上下頁情境群組內所包含的該特定物件,則判定該標的畫面為處於使用上下頁功能的情境;或當該標的畫面中不具有該有上下頁情境群組內所包含的該特定物件,則判定該標的畫面非處於使用上下頁功能的情境。Such as the above electronic device, wherein, when the target screen has the specific object contained in the context group with up and down pages, it is determined that the target screen is in the context of using the up and down page function; or when the target screen is not If there is the specific object included in the context group with the upper and lower pages, it is determined that the target screen is not in the context of using the upper and lower pages function.
如上述之電子裝置,其中,當該標的畫面為處於使用上下頁功能的情境,則將該行動裝置的實體音量鍵設定為可調整上下頁的功能鍵;或當該標的畫面非處於使用上下頁功能的情境,則將該行動裝置的實體音量鍵維持原有功能。For the above-mentioned electronic device, when the target screen is in the context of using the upper and lower page function, the physical volume key of the mobile device is set as a function key that can adjust the upper and lower pages; or when the target screen is not in the context of using the upper and lower pages In the context of the function, the physical volume key of the mobile device maintains the original function.
本發明的行動裝置的按鍵功能設定方法係由一行動裝置,及運行於該行動裝置上一處理器的複數程式碼所執行。該等複數程式碼,例如一訓練模型,係可分別執行不同的功能,例如畫面擷取功能、物件偵測功能、影像辨識功能、或影像分類功能等。舉例來說,該訓練模型可為運行於該行動裝置的一背景程式,用以擷取該行動裝置中每一時間點的畫面。隨著人工智慧及大數據分析技術的發展,物件偵測(object detection)技術已被應用於眾多的領域,例如,臉部偵測、臉部辨識、車牌辨識、人形及車輛辨識等。物件偵測技術是讓計算機去分析一張圖片或一段影像流中的物體,並將該物體標記出來。該物件偵測技術需要將大量的物體數據輸入給一神經網絡,作為該神經網絡的訓練(學習)資料,該神經網絡才可對該物體進行識別。The button function setting method of the mobile device of the present invention is executed by a mobile device and a plurality of program codes running on a processor of the mobile device. These plural codes, such as a training model, can perform different functions, such as screen capture function, object detection function, image recognition function, or image classification function. For example, the training model can be a background program running on the mobile device to capture the screen at each time point in the mobile device. With the development of artificial intelligence and big data analysis technology, object detection technology has been applied in many fields, such as face detection, face recognition, license plate recognition, human figure and vehicle recognition, etc. Object detection technology allows a computer to analyze an object in a picture or a segment of image stream and mark the object. The object detection technology needs to input a large amount of object data to a neural network as training (learning) data of the neural network, and the neural network can recognize the object.
第1圖為本發明實施例之行動裝置的按鍵功能設定方法的應用流程圖。如第1圖所示,本發明的行動裝置的按鍵功能設定方法擷取該行動裝置之螢幕所顯示的一畫面 (步驟S100)。FIG. 1 is an application flowchart of a method for setting button functions of a mobile device according to an embodiment of the present invention. As shown in Figure 1, the button function setting method of the mobile device of the present invention captures a screen displayed on the screen of the mobile device (step S100).
接著,本發明的按鍵功能設定方法對該畫面進行情境辨識操作,以判定該畫面是否處於使用上下頁功能的情境(步驟S102)。在本實施例中,該情境辨識操作係由該行動裝置依據一訓練模型運作而執行,該訓練模型係以複數螢幕截圖做為訓練資料而建立,並且運作用以判定一標的畫面是否處於該上下頁功能的情境。舉例來說,本發明的按鍵功能設定方法可使用一外部電腦在網際網路上蒐集大量的手機螢幕截圖用以得到該複數螢幕截圖,並且該手機螢幕截圖涵蓋所有的使用情境,例如手機桌面、設定畫面、或任何應用程式(application:APP)的使用畫面,之後再將所擷取的該等複數螢幕截圖匯入於該行動裝置中,供該訓練模型進行學習。在另一實施例中,在網際網路上所蒐集的大量手機螢幕截圖亦可儲存在一網路伺服器中,使得該訓練模型可透過網際網路讀取儲存於該網路伺服器中的該等複數螢幕截圖,供該訓練模型進行學習。Next, the button function setting method of the present invention performs a context recognition operation on the screen to determine whether the screen is in the context of using the upper and lower page function (step S102). In this embodiment, the context recognition operation is executed by the mobile device according to a training model. The training model is created using multiple screenshots as training data, and the operation is used to determine whether a target screen is in the upper and lower positions. The context of the page function. For example, the button function setting method of the present invention can use an external computer to collect a large number of mobile phone screenshots on the Internet to obtain the plural screenshots, and the mobile phone screenshots cover all usage scenarios, such as mobile phone desktop, settings The screen or the use screen of any application (application: APP), and then the captured plural screen shots are imported into the mobile device for the training model to learn. In another embodiment, a large number of mobile phone screenshots collected on the Internet can also be stored in a web server, so that the training model can read the stored in the web server via the Internet Wait for multiple screenshots for the training model to learn.
第2A圖為本發明實施例之兩個具有使用上下頁功能情境的畫面的示意圖。如第2A圖所示,該行動裝置的該訓練模型透過物件偵測判定畫面100具有一特定物件104(例如為左右箭號),並且畫面102具有另一特定物件106(例如為大於或小於的符號)。第2B圖為本發明實施例之兩個不具有使用上下頁功能情境的畫面的示意圖。如第2B圖所示,該行動裝置的該訓練模型判定畫面108及畫面110不具有該特定物件。換句話說,只要提供給該訓練模型的該等螢幕截圖的樣本數愈多,亦即作為訓練資料的樣本數愈多,則該訓練模型用來判定該標的畫面中是否有該一至多個特定物件以決定是否處於使用上下頁功能的情境的能力就愈強。FIG. 2A is a schematic diagram of two screens with the context of using the upper and lower pages according to an embodiment of the present invention. As shown in Figure 2A, the training model of the mobile device determines through object detection that the
當該行動裝置的該訓練模型判定該標的畫面為處於使用上下頁功能的情境,例如第2A圖的畫面100及畫面102,則進入第1圖的步驟S104。該標的畫面即為使用者在使用該行動裝置時,該行動裝置當下所顯示的畫面。在步驟S104中,該行動裝置的該處理器將該行動裝置的實體音量鍵設定為可調整上下頁的功能鍵。當該訓練模型判定該畫面中沒有處於使用上下頁功能的情境,例如第2B圖畫面108及畫面110,則進入步驟S106。在步驟S106中,該行動裝置的該處理器將該行動裝置的實體音量鍵維持原有的功能。When the training model of the mobile device determines that the target screen is in the context of using the page up and down function, such as
舉例來說,當使用者有上網需求,而將該行動裝置所顯示的畫面由原本一桌布畫面(例如第2B圖的畫面108)切換至一瀏覽器畫面(例如第2A圖的畫面100),此時運作於該行動裝置的該訓練模型擷取了畫面100,並以先前已蒐集大量的歷史螢幕截圖做為樣本,偵測到畫面100中有與可使用上下頁功能的情境相關聯之特定物件104。之後,該訓練模型指示該行動裝置的該處理器,在畫面100有上下頁的功能的情境,並且將該行動裝置的實體音量鍵設定為可調整上下頁的功能鍵。此時,使用者便可透過行動裝置的實體音量鍵調整畫面100的上下頁。當使用者將該行動裝置所顯示的畫面由畫面100切換回畫面108,由於該訓練模型判定畫面108並沒有的該特定物件,亦即沒有上下頁功能的情境,則該訓練模型指示該行動裝置的該處理器,在畫面108的情境下,將該行動裝置的實體音量鍵切換回原有的音量調整功能。For example, when a user needs to surf the Internet, and the screen displayed on the mobile device is switched from the original wallpaper screen (such as the
一般來說,電腦(包括桌上型電腦、筆記型電腦、或伺服器)的硬體計算效能較行動裝置(例如手機或PDA)來得高。舉例來說,電腦的處理器的運算速度往往都高於行動裝置處理器的運算速度。因此,在本實施例中,本發明的按鍵功能設定方法可在另一電腦或該行動裝置的不同平台中建立該訓練模型。本發明的按鍵功能設定方法可將原運行於該電腦的該訓練模型轉換為運行於該行動裝置的該訓練模型,並且該運行於行動裝置的該訓練模型與運行於該電腦的該訓練模型是共用一相同的訓練資料樣本(即所擷取的大量歷史螢幕截圖)。Generally speaking, the hardware computing performance of computers (including desktop computers, notebook computers, or servers) is higher than that of mobile devices (such as mobile phones or PDAs). For example, the computing speed of a computer's processor is often higher than that of a mobile device's processor. Therefore, in this embodiment, the button function setting method of the present invention can establish the training model on another computer or a different platform of the mobile device. The button function setting method of the present invention can convert the training model originally running on the computer into the training model running on the mobile device, and the training model running on the mobile device and the training model running on the computer are Share the same training data sample (that is, a large number of captured historical screenshots).
第3圖為本發明實施例之行動裝置的按鍵功能設定方法的建立一訓練模型的流程圖。如第3圖所示,本發明的按鍵功能設定方法建立該訓練模型始於步驟S300。在步驟S300中,該訓練模型從網際網路或一儲存器中蒐集複數螢幕截圖。在本實施例中,使用者可透過該電腦或該行動裝置,指示該訓練模型設定所需辨識的特定物件。舉例來說,使用者可將「←」、「→」、「↑」、「↓」、「<」、「>」、「《」、「》」、「上頁」、「下頁」、「BACK」、或「NEXT」等代表用於表示可使用上下(前後)頁功能的符號或文字,設定為該訓練模型所需辨識的特定物件,但不限於此。接著,在步驟S302,該訓練模型對該等複數螢幕截圖進行物件偵測。例如,該訓練模型對開始對該等複數螢幕截圖中的上述符號「←」、「→」、「↑」、「↓」、「<」、「>」、「《」、或「》」進行偵測。FIG. 3 is a flowchart of establishing a training model of the method for setting button functions of a mobile device according to an embodiment of the present invention. As shown in FIG. 3, the method for setting the button function of the present invention builds the training model from step S300. In step S300, the training model collects multiple screenshots from the Internet or a storage. In this embodiment, the user can instruct the training model to set a specific object to be recognized through the computer or the mobile device. For example, the user can set "←", "→", "↑", "↓", "<", ">", "", "", "Previous", "Next", "BACK", or "NEXT", etc. represent symbols or texts used to indicate that the upper and lower (front and back) page functions can be used, and are set to specific objects that the training model needs to recognize, but it is not limited to this. Then, in step S302, the training model performs object detection on the plurality of screenshots. For example, the training model started to perform the above-mentioned symbols "←", "→", "↑", "↓", "<", ">", "", or """ in these plural screenshots. Detection.
在步驟S304中,該訓練模型將該等複數螢幕截圖,依據是否符合特定物件而分別分類至一有上下頁情境群組及一無上下頁情境群組。當該等螢幕截圖中有符合特定物件,例如有符合上述符號「←」、「→」、「↑」、「↓」、「<」、「>」、「《」、或「》」,則進入步驟S306,該訓練模型依據該標的畫面是否具有該有上下頁情境群組內所包含的該特定物件,對一標的畫面進行情境辨識。當該標的畫面具有該有上下頁情境群組內所包含的該特定物件,則對該標的畫面進行情境辨識。當該等螢幕截圖中沒有符合該特定物件,則進入步驟S308,該訓練模型將該等螢幕截圖分類至該無上下頁情境群組。以第2A圖的畫面100、102以及第2B圖的畫面108、110為例,由於該訓練模型判定畫面100中具有特定物件104,以及畫面102中具有特定物件106,則該訓練模型會將畫面100及畫面102分類至該有上下頁情境群組。反之,由於該訓練模型判定畫面108、110不具有該特定物件,則該訓練模型會將畫面108及畫面110分類至該無上下頁情境群組。In step S304, the training model categorizes the plural screen shots into a context group with upper and lower pages and a context group without upper and lower pages according to whether they conform to a specific object. When there are specific objects in the screenshots, for example, the above symbols "←", "→", "↑", "↓", "<", ">", "", or """, then In step S306, the training model performs context recognition on a target screen according to whether the target screen has the specific object included in the context group with upper and lower pages. When the target screen has the specific object included in the context group with upper and lower pages, context recognition is performed on the target screen. When the screenshots do not match the specific object, step S308 is entered, and the training model classifies the screenshots into the context group without upper and lower pages. Take the
在該訓練模型完成對大量歷史螢幕截圖的分類後,當該訓練模型例如由處理器運行時,即可對於所擷取之標的畫面判定其是否有使用上下頁功能的情境。為了優化在行動裝置上的執行效能,本發明的按鍵功能設定方法原運行於該電腦的該訓練模型轉換為運行於該行動裝置的該訓練模型,使得該訓練模型可依據所蒐集的大量歷史螢幕截圖,判定該行動裝置的畫面是否有可使用上下頁功能的情境。在本實施例中,運行於該電腦的該訓練模型是使用Tensor Flow撰寫而成。本發明的按鍵功能設定方法將該運行於該電腦的該訓練模型轉換為使用Tensor Flow Lite撰寫而成的該訓練模型,並且配合Tensor Flow Lite的應用程式介面(application programming interface:API),使得該訓練模型可在Android或iOS手機以及Chromebook的環境中被執行。After the training model completes the classification of a large number of historical screenshots, when the training model is run by, for example, a processor, it can determine whether the captured target image has the context of using the upper and lower page function. In order to optimize the execution performance on the mobile device, the key function setting method of the present invention originally runs the training model on the computer into the training model run on the mobile device, so that the training model can be based on a large number of historical screens collected Take a screenshot to determine whether the screen of the mobile device has a context where the upper and lower page functions can be used. In this embodiment, the training model running on the computer is written using Tensor Flow. The button function setting method of the present invention converts the training model running on the computer into the training model written by Tensor Flow Lite, and cooperates with the application programming interface (API) of Tensor Flow Lite to make the The training model can be executed in the environment of Android or iOS mobile phones and Chromebooks.
在本實施例中,該訓練模型在執行完步驟S300~S308之後,即完成了訓練(學習),可回到第1圖的步驟S100,利用該訓練模型開始截取該行動裝置當下的畫面。更詳細來說,當該行動裝置當下的畫面具有該有上下頁情境群組內所包含的該特定物件,則該訓練模型判定該當下的畫面處於使用上下頁功能的情境,並且將該行動裝置的實體音量鍵設定為可調整上下頁的功能鍵。反之,當該行動裝置當下的畫面不具有該有上下頁情境群組內所包含的該特定物件,則該訓練模型判定當下的畫面非處於使用上下頁功能的情境,並且將該行動裝置的實體音量鍵維持原有的功能。In this embodiment, the training model has completed training (learning) after performing steps S300 to S308, and can return to step S100 in Figure 1 to use the training model to start capturing the current screen of the mobile device. In more detail, when the current screen of the mobile device has the specific object contained in the context group with up and down pages, the training model determines that the current screen is in the context of using the up and down page function, and the mobile device The physical volume key of is set as a function key that can adjust the upper and lower pages. Conversely, when the current screen of the mobile device does not have the specific object contained in the context group with up and down pages, the training model determines that the current screen is not in the context of using the up and down page function, and the entity of the mobile device The volume keys maintain their original functions.
舉例來說,參考第2A、2B圖,假設使用者將「←」、「→」、「↑」、「↓」、「<」、「>」、「《」、及「》」符號設定為該訓練模型所需辨識的特定物件,由於上述所設定的特定物件「<」相同於畫面102的特定物件106,因此該訓練模型將畫面102分類至該有上下頁情境群組,並且在畫面102的情境下,將行動裝置的實體音量鍵設定為可調整上下頁的功能鍵。反之,由於沒有任何上述所設定的物件出現在畫面100中,因此該訓練模型將畫面100分類至該無上下頁情境群組,並且在畫面100的情境下,將行動裝置的實體音量鍵維持原有功能。For example, referring to Figures 2A and 2B, suppose the user sets the "←", "→", "↑", "↓", "<", ">", "", and """ symbols as The specific object that the training model needs to identify, because the specific object "<" set above is the same as the
雖然畫面100實際上是處於使用上下頁功能的情境,但該訓練模型卻無法辨識出特定物件104。若要讓該訓練模型可辨識畫面100中的特定物件104,則必須將畫面100加入於訓練資料中(即該等螢幕截圖)中,並重新執行第3圖的步驟S300~S308,並且亦將符號「⇦」、「⇨」設定為該訓練模型所需辨識的特定物件。經過重新訓練(re-train)後的該訓練模型即可辨識出畫面100中的特定物件104,因而能將畫面100分類至該有上下頁情境群組,並且在畫面100的情境下,將行動裝置的實體音量鍵設定為可調整上下頁的功能鍵。Although the
本發明的按鍵功能設定方法在執行第1圖步驟S100~S106用以決定是否將該行動裝置的實體音量鍵設定為可調整上下頁的功能鍵後,由使用者來驗證該訓練模型於步驟S102的判定是否正確。若該訓練模型的判定為正確,則使用者可繼續使用該訓練模型,用以協助使用者在具有可調整上下頁功能的情境下,將該行動裝置的實體音量鍵設定為可調整上下頁的功能鍵。若該訓練模型的判定不正確,則使用者則透過調整該訓練模型中的參數,或增加新的歷史螢幕資料於訓練資料之中,用以增加該訓練資料的樣本數,因而達成改善該訓練模型的準確度。The button function setting method of the present invention executes steps S100~S106 in Figure 1 to determine whether to set the physical volume button of the mobile device as a function button that can adjust the upper and lower pages, and then the user verifies the training model in step S102 Is the judgment correct? If the judgment of the training model is correct, the user can continue to use the training model to assist the user in setting the physical volume keys of the mobile device to be able to adjust the upper and lower pages in the context of the function of adjusting the upper and lower pages. Function keys. If the judgment of the training model is incorrect, the user can adjust the parameters of the training model or add new historical screen data to the training data to increase the number of samples of the training data, thereby achieving improvement of the training The accuracy of the model.
例如,一般來說,該行動裝置的畫面中用於切換上下頁的特定物件是分布在該畫面中的上下側或邊緣角落,因此該訓練模型在偵測該畫面時將率先搜尋該畫面中的上下側或邊緣角落。使用者可透過調整參數,將訓練模型在該畫面中的搜尋範圍擴大,例如需搜尋該畫面的正中央,用以改善該訓練模型的準確度。For example, generally speaking, the specific objects used to switch between the upper and lower pages of the screen of the mobile device are distributed on the upper and lower sides or edge corners of the screen. Therefore, the training model will first search for the screen when detecting the screen. The upper and lower sides or edge corners. The user can expand the search range of the training model in the screen by adjusting the parameters. For example, the user needs to search the center of the screen to improve the accuracy of the training model.
本發明更揭露一種電腦程式產品,用以設定一行動裝置的按鍵功能,該電腦程式產品經由該行動裝置載入該程式執行一擷取指令、一偵測指令,以及一設定指令。該擷取指令可使得運行於該行動裝置的一處理器的一訓練模型執行第1圖的步驟S100。該偵測指令可使得該訓練模型執行第1圖的步驟S102。該設定指令可使得該行動裝置的該處理器執行第1圖的步驟S104或步驟S106。該情境辨識操作係由該行動裝置依據一訓練模型運作而執行,該訓練模型係以複數螢幕截圖做為訓練資料而建立,並且運作用以判定一標的畫面是否處於該上下頁功能的情境。The present invention further discloses a computer program product for setting a key function of a mobile device. The computer program product loads the program through the mobile device to execute an acquisition command, a detection command, and a setting command. The retrieval instruction can cause a training model of a processor running on the mobile device to execute step S100 in FIG. 1. The detection instruction can cause the training model to perform step S102 in FIG. 1. The setting instruction can cause the processor of the mobile device to execute step S104 or step S106 in FIG. 1. The context recognition operation is executed by the mobile device according to a training model, which is established by using plural screenshots as training data, and is operated to determine whether a target screen is in the context of the upper and lower page function.
在本實施例中,該訓練模型亦可運行於一外部電腦上的一處理器,可執行畫面擷取、物件偵測,以及影像分類等功能。該訓練模型執行包括一截圖蒐集指令、一情境分類指令,以及一情境判斷指令。該截圖蒐集指令可使得該外部電腦或該行動裝置的一處理器執行第3圖的步驟S300。該物件偵測指令可使得該外部電腦或該行動裝置的該處理器執行第3圖的步驟S302。該情境分類指令可使得該外部電腦或該行動裝置的該處理器執行第3圖的步驟S304。該情境判斷指令可使得該外部電腦或該行動裝置的該處理器執行第3圖的步驟S306或步驟S308。In this embodiment, the training model can also be run on a processor on an external computer to perform functions such as screen capture, object detection, and image classification. The training model execution includes a screenshot collection command, a context classification command, and a context judgment command. The screenshot collection command can cause a processor of the external computer or the mobile device to execute step S300 in FIG. 3. The object detection command can cause the processor of the external computer or the mobile device to execute step S302 in FIG. 3. The context classification command can cause the processor of the external computer or the mobile device to execute step S304 in FIG. 3. The context determination instruction can cause the processor of the external computer or the mobile device to execute step S306 or step S308 in FIG. 3.
本發明的電腦程式產品所執行的步驟或動作係可直接對應本發明所揭露的用於行動裝置的按鍵功能設定方法,本發明所揭露的用於行動裝置的按鍵功能設定方法已於本案說明書第[0017]~[0031]段做詳細描述,故不再贅述。The steps or actions performed by the computer program product of the present invention can directly correspond to the button function setting method for mobile devices disclosed in the present invention. The button function setting method for mobile devices disclosed in the present invention has been described in the present specification. The paragraphs [0017]~[0031] are described in detail, so they will not be repeated.
本發明更揭露一種電子裝置。第4圖為本發明實施例之電子裝置400的示意圖。如第4圖所示,電子裝置400包括一行動裝置402、一電腦412,並且行動裝置402與電腦412可透過一網際網路420或一連接線422(例如USB線、或Lightning線,但不限於此)彼此相傳輸數據資料。行動裝置402包括一顯示幕404、一實體音量鍵405、一處理器408、一儲存器411。顯示幕404用以顯示畫面406。一訓練模型410儲存於行動裝置402的儲存器411中,使得處理器408以執行包括:擷取行動裝置402之顯示幕404所顯示的畫面406 (對應第1圖步驟S100);對畫面406進行情境辨識操作,以判定畫面406是否處於使用上下頁功能的情境 (對應第1圖步驟S102);當畫面406處於使用上下頁功能的情境,將實體音量鍵405設定為可調整上下頁的功能鍵(對應第1圖步驟S104);當畫面406沒有處於使用上下頁功能的情境,將行動裝置402的實體音量鍵405維持原有功能(對應第1圖步驟S106)。該情境辨識操作係由該行動裝置依據訓練模型410運作而執行,該訓練模型410係以複數螢幕截圖做為訓練資料而建立,並且運作用以判定一標的畫面是否處於該上下頁功能的情境。The invention further discloses an electronic device. FIG. 4 is a schematic diagram of an
電腦412包括一處理器414,以及一儲存器418。一訓練模型416儲存於電腦412的儲存器418中,使得處理器414以執行包括:從網際網路420或儲存器418中蒐集該複數螢幕截圖 (對應第3圖步驟S300);對該等螢幕截圖進行物件偵測(對應第3圖步驟S302);將該等螢幕截圖,依據是否符合特定物件而分別分類至一有上下頁情境群組及一無上下頁情境群組 (對應第3圖步驟S304);當該等螢幕截圖符合特定物件而分類至一有上下頁情境群組,則依據一標的畫面是否具有該有上下頁情境群組內所包含的該特定物件,對該標的畫面進行情境辨識 (對應第3圖步驟S306);當該等螢幕節途中沒有符合該特定物件,將該等螢幕截圖分類至一無上下頁情境群組(對應第3圖步驟S308)。本發明的電子裝置400可將適用於電腦412的訓練模型416轉換為適用於行動裝置402的訓練模型410,並且透過連接線422或網際網路420將轉換而成的訓練模型410傳送至行動裝置402,使得訓練模型410可依據該等螢幕截圖,對畫面406進行情境辨識。The
本發明的電子裝置400中各元件所執行的步驟或動作係可直接對應本發明所揭露的用於行動裝置的按鍵功能設定方法,本發明所揭露的用於行動裝置的按鍵功能設定方法已於本案說明書第[0017]~[0031]段做詳細描述,故不再贅述。本發明所揭露的一種用於行動裝置按鍵功能設定的方法、電腦程式產品及電子裝置讓使用者可以用行動裝置的實體音量鍵來執行點擊上下頁的動作,使得使用者在操作行動裝置時更為便利。The steps or actions performed by the components in the
雖然本發明的實施例如上述所描述,我們應該明白上述所呈現的只是範例,而不是限制。依據本實施例上述示範實施例的許多改變是可以在沒有違反發明精神及範圍下被執行。因此,本發明的廣度及範圍不該被上述所描述的實施例所限制。更確切地說,本發明的範圍應該要以以下的申請專利範圍及其相等物來定義。Although the embodiments of the present invention are as described above, we should understand that what is presented above is only an example, not a limitation. According to this embodiment, many changes of the above exemplary embodiment can be implemented without violating the spirit and scope of the invention. Therefore, the breadth and scope of the present invention should not be limited by the embodiments described above. More precisely, the scope of the present invention should be defined by the following patented scope and its equivalents.
S100、S102、S104、S106:步驟
100、102、108、110:畫面
104、106:特定物件
S300、S302、S304、S306、S308:步驟
400:電子裝置
402:行動裝置
404:顯示幕
405:一至多個實體音量鍵
406:畫面
408:處理器
410:訓練模型
411:儲存器
412:電腦
414:處理器
416:訓練模型
418:儲存器
420:網際網路
422:連接線S100, S102, S104, S106:
第1圖為本發明實施例之行動裝置的按鍵功能設定方法的應用流程圖。 第2A圖為本發明實施例之兩個具有使用上下頁功能情境的畫面的示意圖。 第2B圖為本發明實施例之兩個不具有使用上下頁功能情境的畫面的示意圖。 第3圖為本發明實施例之行動裝置的按鍵功能設定方法的建立一訓練模型的流程圖。 第4圖為本發明實施例之電子裝置的示意圖。FIG. 1 is an application flowchart of a method for setting button functions of a mobile device according to an embodiment of the present invention. FIG. 2A is a schematic diagram of two screens with the context of using the upper and lower pages according to an embodiment of the present invention. FIG. 2B is a schematic diagram of two screens that do not have the context of using the upper and lower pages according to an embodiment of the present invention. FIG. 3 is a flowchart of establishing a training model of the method for setting button functions of a mobile device according to an embodiment of the present invention. FIG. 4 is a schematic diagram of an electronic device according to an embodiment of the invention.
S100、S102、S104、S106:步驟 S100, S102, S104, S106: steps
Claims (18)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW108125806A TW202105131A (en) | 2019-07-22 | 2019-07-22 | Method, computer program product, and electronic device for setting function of a button of a mobile device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW108125806A TW202105131A (en) | 2019-07-22 | 2019-07-22 | Method, computer program product, and electronic device for setting function of a button of a mobile device |
Publications (1)
Publication Number | Publication Date |
---|---|
TW202105131A true TW202105131A (en) | 2021-02-01 |
Family
ID=75745377
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
TW108125806A TW202105131A (en) | 2019-07-22 | 2019-07-22 | Method, computer program product, and electronic device for setting function of a button of a mobile device |
Country Status (1)
Country | Link |
---|---|
TW (1) | TW202105131A (en) |
-
2019
- 2019-07-22 TW TW108125806A patent/TW202105131A/en unknown
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107273019B (en) | Collaborative gesture based input language | |
US11158057B2 (en) | Device, method, and graphical user interface for processing document | |
CN109345553B (en) | Palm and key point detection method and device thereof, and terminal equipment | |
CN107666987A (en) | Robotic process automates | |
US20150058766A1 (en) | Information processing methods and electronic devices | |
US9189152B2 (en) | Touch device and method for dynamically setting touch inactive area, and non-transitory recording medium | |
CN111126347B (en) | Human eye state identification method, device, terminal and readable storage medium | |
CN106293074A (en) | A kind of Emotion identification method and mobile terminal | |
WO2018010316A1 (en) | Desktop page management method and device | |
US11989272B2 (en) | Human-machine verification method, device and storage medium | |
US20210158031A1 (en) | Gesture Recognition Method, and Electronic Device and Storage Medium | |
CN111984803B (en) | Multimedia resource processing method and device, computer equipment and storage medium | |
CN107656866A (en) | A kind of method, mobile terminal and computing device tested using fluency | |
US10739984B1 (en) | System for detection of input device | |
CN112911147A (en) | Display control method, display control device and electronic equipment | |
CN117349181A (en) | Software testing method and device, readable storage medium and electronic equipment | |
CN107958273A (en) | volume adjusting method, device and storage medium | |
CN107885887B (en) | file storage method and mobile terminal | |
TW202105131A (en) | Method, computer program product, and electronic device for setting function of a button of a mobile device | |
CN116149477A (en) | Interaction method, interaction device, electronic equipment and storage medium | |
CN110750193B (en) | Scene topology determination method and device based on artificial intelligence | |
CN111796736B (en) | Application sharing method and device and electronic equipment | |
CN109690446A (en) | A kind of exchange method and electronic equipment | |
CN110209242B (en) | Button function binding method, button function calling method, button function binding device, button function calling device and projection control equipment | |
CN118113206B (en) | Intelligent control method and system for split screen of tablet personal computer |