TWI885711B - Electronic apparatus and windows arrangement method thereof - Google Patents
Electronic apparatus and windows arrangement method thereof Download PDFInfo
- Publication number
- TWI885711B TWI885711B TW113102303A TW113102303A TWI885711B TW I885711 B TWI885711 B TW I885711B TW 113102303 A TW113102303 A TW 113102303A TW 113102303 A TW113102303 A TW 113102303A TW I885711 B TWI885711 B TW I885711B
- Authority
- TW
- Taiwan
- Prior art keywords
- window
- layout
- application
- information
- processor
- Prior art date
Links
Images
Landscapes
- Digital Computer Display Output (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
Description
本發明是有關於一種電子裝置的管理技術,且特別是有關於一種電子裝置與其視窗排版方法。The present invention relates to a management technology of an electronic device, and in particular to an electronic device and a window layout method thereof.
近年來,視窗化的作業系統已經相當普遍。透過於顯示螢幕上顯示應用程式的視窗,用戶得以操作應用程式來完成對應的工作。另一方面,隨著科技的演進,大尺寸的顯示螢幕的應用越來越廣泛。雖然大尺寸的顯示螢幕在許多使用情境(例如:視聽娛樂、多工作業,或電腦視覺繪圖等等)中確實非常便利,但有些時刻透過大尺寸的顯示螢幕顯示大尺寸視窗反而不符合用戶需求。像是,某些應用程式的視窗畫面或視窗所顯示的網頁內容並不複雜,若透過大尺寸視窗對其進行顯示,反而會導致應用程式內容或控制項過於分散。如此一來,將更進一步導致滑鼠遊標的移動距離過長等等問題,因而影響工作效率或者導致用戶肩頸痠痛。每當用戶開啟一個新視窗,用戶只能手動地自行調整視窗的尺寸與位置,相當不便利。In recent years, windowed operating systems have become quite common. By displaying application windows on the display screen, users can operate the application to complete the corresponding tasks. On the other hand, with the evolution of technology, large-size display screens are increasingly widely used. Although large-size display screens are indeed very convenient in many usage scenarios (such as audio-visual entertainment, multitasking, or computer visual drawing, etc.), there are times when displaying large-size windows on a large-size display screen does not meet user needs. For example, the window screen of some applications or the web page content displayed in the window is not complicated. If it is displayed through a large-size window, it will cause the application content or controls to be too scattered. This will further lead to problems such as the mouse cursor moving too long, thus affecting work efficiency or causing shoulder and neck pain for the user. Whenever a user opens a new window, the user can only manually adjust the size and position of the window, which is quite inconvenient.
本發明提供一種電子裝置與其視窗排版方法,可改善上述問題。The present invention provides an electronic device and a window layout method thereof, which can improve the above-mentioned problem.
本發明的實施例提供一種視窗排版方法,適用於包括顯示器的電子裝置。所述方法包括下列步驟。透過顯示器顯示應用程式的視窗。獲取視窗的視窗資訊。根據視窗的視窗資訊與應用程式的應用程式資訊,將視窗分類為多個視窗佈局類別其中一者。根據多個視窗佈局類別其中一者的視窗尺寸準則,調整視窗的視窗尺寸。The embodiment of the present invention provides a window layout method applicable to an electronic device including a display. The method comprises the following steps. Displaying a window of an application program through a display. Obtaining window information of the window. Classifying the window into one of a plurality of window layout categories according to the window information of the window and application information of the application. Adjusting the window size of the window according to a window size criterion of one of the plurality of window layout categories.
本發明的實施例另提供一種電子裝置,其包括顯示器、儲存裝置與處理器。處理器耦接顯示器與儲存裝置,並經配置以執行下列操作。透過顯示器顯示應用程式的視窗。獲取視窗的視窗資訊。根據視窗的視窗資訊與應用程式的應用程式資訊,將視窗分類為多個視窗佈局類別其中一者。根據多個視窗佈局類別其中一者的視窗尺寸準則,調整視窗的視窗尺寸。The embodiment of the present invention further provides an electronic device, which includes a display, a storage device and a processor. The processor is coupled to the display and the storage device and is configured to perform the following operations. Display the window of the application through the display. Obtain window information of the window. Classify the window into one of a plurality of window layout categories based on the window information of the window and the application information of the application. Adjust the window size of the window according to the window size criteria of one of the plurality of window layout categories.
基於上述,於本發明實施例中,可根據應用程式資訊與視窗資訊來將視窗分類為多個視窗佈局類別其中一者,以根據分類結果對視窗尺寸進行自動化調整。藉此,在用戶無須手動調整視窗尺寸的情況下,可讓用戶輕鬆享受大尺寸顯示螢幕的好處,並提昇操作便利性與作業效率。Based on the above, in the embodiment of the present invention, the window can be classified into one of a plurality of window layout categories according to the application information and the window information, so as to automatically adjust the window size according to the classification result. In this way, the user can easily enjoy the benefits of a large-size display screen without having to manually adjust the window size, and the operation convenience and work efficiency are improved.
圖1是根據本發明的一實施例所繪示的電子裝置的方塊圖。請參照圖1,電子裝置100可為筆記型電腦、桌上型電腦、智慧型手機、平板電腦、工業電腦或伺服器等各式電腦裝置。電子裝置100可包括顯示器110、視線偵測裝置120、儲存裝置130與處理器140。FIG1 is a block diagram of an electronic device according to an embodiment of the present invention. Referring to FIG1 , the
顯示器110用以顯示影像。例如,顯示器110可包括液晶顯示器(liquid crystal display, LCD)、薄膜電晶體液晶(Thin Film Transistor LCD, TFT LCD)顯示器、場序式液晶顯示器(Field Sequential LCD, FS LCD)、發光二極體(light emitting diode, LED)顯示器、主動矩陣有機發光二極體(Active-matrix organic light-emitting diode, AMOLED)顯示器或電濕潤(electrowetting)顯示器等各類型的顯示器。The
視線偵測裝置120用以偵測電子裝置100的用戶的視線資訊。例如,視線偵測裝置120可包括攝像頭,其可朝用戶拍攝影像。用戶的視線資訊可基於用戶影像而估測。或者,視線偵測裝置120可包括眼球追蹤(eye tracking)裝置,其可根據通過紅外線感測器或專用攝像頭跟蹤眼球位置和眼球運動。用戶的視線資訊可基於眼球位置和眼球運動而產生。The
儲存裝置130用以儲存影像、程式碼等資料,可包括揮發性記憶體模組與非揮發性記憶體模組。儲存裝置130可以是任何型態的固定式或可移動式隨機存取記憶體(random access memory, RAM)、唯讀記憶體(read-only memory, ROM)、快閃記憶體(flash memory)、硬碟或其他類似裝置、積體電路及其組合。The
處理器140耦接至顯示器110、視線偵測裝置120,與儲存裝置130。處理器140可用以控制電子裝置100的整體或部分運作。例如,處理器140可包括任何可程式化之一般用途或特殊用途的微處理器、數位訊號處理器(Digital Signal Processor, DSP)、可程式化控制器、特殊應用積體電路(Application Specific Integrated Circuits, ASIC)、可程式化邏輯裝置(Programmable Logic Device, PLD)或其他類似裝置或這些裝置的組合。於一些實施例中,處理器140可執行儲存裝置130中的指令、程式或軟體模組,以實現本文中處理器140所執行的各個操作。The
須注意的是,在一實施例中,電子裝置100還可以包括電源供應裝置及各式輸出/輸出裝置。所述電源供應裝置可包括電池及/或電源管理電路。所述輸出/輸出裝置可包括網路連接介面、觸控板、滑鼠、鍵盤、揚聲器及/或麥克風等,本發明不加以限制。It should be noted that, in one embodiment, the
於一些實施例中,處理器140可指示顯示器110顯示至少一視窗。本發明對於顯示器110所顯示的視窗數目並不加以限制。須特別說明的是,相比於傳統上用戶需要透過輸入裝置手動調整視窗的視窗尺寸,在本發明實施例中,處理器140可以自動根據視窗的視窗資訊與應用程式資訊來適應性地調整視窗尺寸,例如放大視窗或縮小視窗。藉此,可有效改善用戶體驗,與提昇操作便利性。In some embodiments, the
舉例而言,圖2是根據本發明的一實施例所繪示的自動調整視窗尺寸的示意圖。請參照圖2,在啟動某一應用程式之後,顯示器110可顯示該應用程式的視窗210。例如,視窗210可呈現該應用程式的用戶操作介面。處理器140可即時地根據視窗210的視窗資訊與應用程式資訊來調整視窗210的視窗尺寸。於一些實施例中,視窗210的視窗尺寸可反應於視窗210的視窗資訊的變化而變動,上述視窗資訊可包括視窗標題(title)、視窗畫面、視窗的元件佈局,網頁內容或其他與視窗210相關的資訊。For example, FIG. 2 is a schematic diagram of automatically adjusting the window size according to an embodiment of the present invention. Referring to FIG. 2 , after starting an application, the
舉例而言,反應於視窗210的視窗畫面的變化,處理器140可將視窗210的視窗尺寸從第一預設尺寸(例如視窗寬度W1)放大為第二預設尺寸(例如視窗寬度W2)。然後,反應於視窗210的視窗畫面的變化,處理器140可將視窗210的視窗尺寸從第二預設尺寸(例如視窗寬度W2)縮小為第三預設尺寸(例如視窗寬度W3)。在沒有用戶操作介入的情況下,視窗210的視窗尺寸可基於視窗畫面而自動地調整。For example, in response to the change of the window image of the
圖3是根據本發明的一實施例所繪示的視窗排版方法的流程圖。請同時參照圖1及圖3,以下即搭配圖1中電子裝置100的各項元件與裝置,說明本實施例之視窗排版方法的詳細步驟。FIG3 is a flow chart of a window layout method according to an embodiment of the present invention. Please refer to FIG1 and FIG3 simultaneously. The following is a detailed description of the window layout method of this embodiment in conjunction with the components and devices of the
於步驟S310,處理器140透過顯示器110顯示應用程式的視窗。於步驟S320,處理器140獲取視窗的視窗資訊。具體來說,處理器140可先獲取當前的活動視窗(Active Window)的基本資訊。舉例而言,透過Windows應用程式介面(API),處理器140可獲取當前的活動視窗的視窗標題與應用程式名稱。上述Windows應用程式介面例如是GetForegroundWindow()、GetWindowTextLength()、GetWindowText()、GetWindowThreadProcessId(),或GetModuleBaseName()等等,本發明對此不限制。In step S310, the
於步驟S330,處理器140根據視窗的視窗資訊與應用程式的應用程式資訊,將視窗分類為多個視窗佈局類別其中一者。進一步來說,應用程式的應用程式資訊可包括應用程式名稱、應用程式類型或其他與應用程式相關的資訊。此外,視窗資訊還可包括視窗畫面、元件佈局,網頁內容、視窗內容,或分析上述資訊而產生的衍生視窗資訊等等。In step S330, the
於一些實施例中,根據視窗的視窗資訊與應用程式的應用程式資訊,將視窗分類為多個視窗佈局類別其中一者的步驟包括第一運作及第二運作中至少一者。第一運作包括:反應於應用程式並非為瀏覽器程式,將視窗劃分為多個子視窗區塊;透過應用程式介面元件擷取多個子視窗區塊分別對應的多個元件型態;以及根據多個子視窗區塊的多個元件型態,決定視窗分類為第一視窗佈局類別或第二視窗佈局類別。第二運作包括:反應於應用程式為瀏覽器程式,擷取視窗中的至少一圖片區塊與至少一文字區塊;以及根據至少一圖片區塊的數量、至少一圖片區塊的區塊範圍、至少一文字區塊的區塊範圍,決定視窗分類為第一視窗佈局類別或第二視窗佈局類別。In some embodiments, the step of classifying the window into one of a plurality of window layout categories according to the window information of the window and the application information of the application includes at least one of a first operation and a second operation. The first operation includes: in response to the application being not a browser program, dividing the window into a plurality of sub-window blocks; capturing a plurality of component types respectively corresponding to the plurality of sub-window blocks through an application program interface component; and determining whether the window is classified into the first window layout category or the second window layout category according to the plurality of component types of the plurality of sub-window blocks. The second operation includes: in response to the application being a browser program, capturing at least one image block and at least one text block in the window; and determining whether the window is classified into a first window layout category or a second window layout category according to the quantity of the at least one image block, the block range of the at least one image block, and the block range of the at least one text block.
於不同實施例中,處理器140可依據不同分類準則,而將視窗分類為多個視窗佈局類別其中一者。後續實施例將有更詳細的說明。須特別說明的是,不同視窗佈局類別是對應於不同的視窗尺寸準則。換言之,透過將視窗分類多個視窗佈局類別其中一者,處理器140可獲取該視窗所適用的視窗尺寸準則。In different embodiments, the
於是,於步驟S340,處理器140根據多個視窗佈局類別其中一者的視窗尺寸準則,調整視窗的視窗尺寸。各個視窗佈局類別的視窗尺寸準則可包括預設尺寸或預設縮放比例等等。例如,當視窗所被分類到對應於某一視窗尺寸準則的某一視窗佈局類別的時候,處理器140可依據該視窗尺寸準則將視窗放大至最大化。或者,當視窗所被分類到對應於某一視窗尺寸準則的某一視窗佈局類別的時候,處理器140可依據將視窗尺寸調整為相同於目標預設尺寸。上述目標預設尺寸可根據顯示器110的螢幕尺寸而決定。例如,目標預設尺寸中的目標寬度可為螢幕寬度乘上M1%,M1為介於1至100之間的預設數值。目標預設尺寸中的目標高度可為螢幕高度乘上M2%,M2為介於1至100之間的預設數值。Therefore, in step S340, the
於一些實施例中,根據多個視窗佈局類別其中一者的視窗尺寸準則,調整視窗的視窗尺寸的步驟包括第一運作、第二運作及第三運作中至少一者。第一運作包括:偵測一用戶的視線;判斷視線是否投射於視窗上;以及反應於視線投射於視窗上,根據視窗尺寸準則調整視窗的視窗尺寸。第二運作包括:反應於多個視窗佈局類別其中一者為第一視窗佈局類別,將視窗的視窗尺寸調整為第一預設尺寸。第三運作包括:反應於多個視窗佈局類別其中一者為第二視窗佈局類別,將視窗的視窗尺寸調整為第二預設尺寸,並將視窗移動至預設顯示位置。In some embodiments, the step of adjusting the window size of the window according to the window size criteria of one of the plurality of window layout categories includes at least one of a first operation, a second operation, and a third operation. The first operation includes: detecting a user's line of sight; determining whether the line of sight is projected on the window; and in response to the line of sight being projected on the window, adjusting the window size of the window according to the window size criteria. The second operation includes: in response to one of the plurality of window layout categories being the first window layout category, adjusting the window size of the window to a first default size. The third operation includes: in response to one of the plurality of window layout categories being the second window layout category, adjusting the window size of the window to a second default size, and moving the window to a default display position.
進一步來說,於一些實施例中,處理器140可根據用戶的視線資訊而決定是否調整視窗的視窗尺寸。請參照圖4,其是根據本發明的一實施例所繪示的基於視線調整視窗尺寸的流程圖。圖3所示的步驟S340可實施為步驟S341至步驟S343。Further, in some embodiments, the
於步驟S341,處理器140透過視線偵測裝置120偵測一用戶的視線。於步驟S342,處理器140判斷視線是否投射於視窗上。具體來說,處理器140可判斷用戶於顯示器110上的視線落點是否位於視窗的視窗範圍。In step S341, the
若步驟S342判斷為是,於步驟S343,反應於視線投射於視窗上,處理器140根據視窗尺寸準則調整視窗的視窗尺寸。亦即,當用戶注視某一視窗,則處理器140將即時地調整該視窗的視窗尺寸。反之,若步驟S342判斷為否,處理器140可禁能根據視窗尺寸準則調整視窗的視窗尺寸。亦即,當用戶未注視某一視窗,則處理器140將不調整該視窗的視窗尺寸。值得一提的是,當未偵測到任何視線,處理器140可禁能根據視窗尺寸準則調整視窗的視窗尺寸。亦即,當沒有用戶注視顯示器110時,則處理器140將不調整該視窗的視窗尺寸。If the judgment in step S342 is yes, in step S343, in response to the line of sight being projected on the window, the
於一些實施例中,處理器140可透過視線偵測裝置120擷取用戶的臉部影像,並根據此臉部影像計算頭部姿態角度。之後,處理器140可根據頭部姿態角度決定視線投射於顯示器110上的視線落點。In some embodiments, the
更詳細來說,處理器140可對視線偵測裝置120所擷取的影像進行人臉辨識運作而取得頭部影像上的人臉區塊。處理器140可檢測人臉區塊內的用以標記臉部輪廓、五官形狀與五官位置的多個臉部特徵點(facial landmarks)。之後,處理器140依據臉部特徵點估計使用者的頭部姿態角度。舉例而言,透過採用透視n點(Perspective-n-Point,PnP)演算法,處理器140可依據這些臉部特徵點的座標位置來估計使用者於世界座標系統下的頭部姿態角度。此頭部姿態角度可包括相對於第一座標軸旋轉的頭部傾仰(pitch)角以及相對於第二座標軸旋轉的頭部偏擺(yaw)角。基於關聯於顯示器110的頭部擺動角度邊界與當前的頭部姿態角度,處理器140可決定視線投射於顯示器110上的視線落點。頭部擺動角度邊界包括對應至右螢幕邊界的最大偏擺角、對應至左螢幕邊界的最小偏擺角、對應至上螢幕邊界的最大傾仰角,以及對應至下螢幕邊界的最小傾仰角。In more detail, the
舉例來說,圖5A與5B是根據本發明的一實施例所繪示的偵測視線的示意圖。請參照圖5A與5B,處理器140可依據最大偏擺角θymax、最小偏擺角θymin、最大偏擺角θymax所對應之螢幕座標系下的X軸座標(即為Sw)、最小偏擺角θymin所對應之螢幕座標系下的X軸座標(即為0),以及使用者當前的頭部偏擺角度θy進行內插運算,以取得視線落點F2的X座標值(即為Sx)。相似的,處理器140可依據最大傾仰角θpmax、最小傾仰角θpmin、最大傾仰角θpmax所對應之螢幕座標系統下的Y軸座標(即為0)、最小傾仰角θpmin所對應之螢幕座標系下的X軸座標(即為Sh),以及使用者當前的頭部偏擺角度θp進行內插運算,以取得注視位置F2的Y座標值(即為Sy)。藉此,處理器140可預測出使用者的注視位置為螢幕座標系統下的(Sx,Sy)。於此,螢幕座標系統可為以像素為單位且基於螢幕解析度而定義的座標系統。於一實施例中,處理器140可依據下列公式(1)與公式(2)而計算出視線落點的座標。
公式(1)
公式(2)
For example, FIG5A and FIG5B are schematic diagrams of detecting sight lines according to an embodiment of the present invention. Referring to FIG5A and FIG5B , the
當處理器140判定螢幕座標系統下視線落點的座標位於視窗的視窗範圍內,處理器140可判定視線投射於視窗上。反之,當處理器140判定螢幕座標系統下視線落點的座標沒有位於視窗的視窗範圍內,處理器140可判定視線未投射於視窗上。When the
圖6是根據本發明的一實施例所繪示的視窗排版方法的流程圖。請同時參照圖1及圖6,以下即搭配圖1中電子裝置100的各項元件與裝置,說明本實施例之視窗排版方法的詳細步驟。FIG6 is a flow chart of a window layout method according to an embodiment of the present invention. Please refer to FIG1 and FIG6 simultaneously. The following is a detailed description of the window layout method of this embodiment in conjunction with the components and devices of the
於步驟S610,處理器140透過顯示器110顯示應用程式的視窗。於步驟S620,處理器140獲取視窗的視窗資訊。步驟S610~步驟S620的實施細節可參照前文說明,於此不贅述。In step S610, the
須注意的是,於步驟S630,處理器140根據視窗的活動視窗時間、互動事件次數與視線駐留時間,判斷視窗是否符合常用條件。換言之,處理器140可判斷某一視窗是否為常用視窗。It should be noted that in step S630, the
於一些實施例中,活動視窗時間為某視窗在單位時段內作為活動視窗的時間總和。互動事件次數為某視窗在單位時段內所接收的用戶互動事件的次數。用戶互動事件包括滑鼠事件、鍵盤事件、觸控事件或其組合。視線駐留時間為用戶視線在單位時段內停留於某視窗的時間總和。In some embodiments, the active window time is the total time that a window is an active window in a unit time period. The number of interactive events is the number of user interactive events received by a window in a unit time period. User interactive events include mouse events, keyboard events, touch events or a combination thereof. The gaze dwell time is the total time that the user's gaze stays on a window in a unit time period.
於一些實施例中,處理器140可根據視窗的活動視窗時間、互動事件次數與視線駐留時間,計算視窗的視窗常用分數。例如,處理器140可根據以下公式(3)來計算視窗的視窗常用分數。
ΔOx = (Wa*Ax + We*Ex + Ws*Mx) / (Wa + We + Ws) 公式(3)
其中,ΔOx代表視窗常用分數;Ax代表活動視窗時間;Ex代表互動事件次數;Mx代表視線駐留時間;Wa、We、Ws分別為權重因子。
In some embodiments, the
於一些實施例中,處理器140可根據視窗的視窗常用分數,對視窗與至少一其他視窗進行排序。處理器140可根據視窗的排序順序判斷視窗是否符合常用條件。具體來說,處理器140可針對顯示器110所顯示的多個視窗分別計算視窗常用分數,並依據所有視窗的視窗常用分數篩選出常用視窗。例如,當某一視窗的排序順序為前n位,處理器140可判斷該視窗符合常用條件。否則,當某一視窗的排序順序並非為前n位,處理器140可判斷該視窗未符合常用條件。或者,於一些實施例中,處理器140可判斷視窗常用分數是否大於門檻值,以判斷視窗是否符合常用條件。當某一視窗的視窗常用分數大於門檻值,處理器140可判斷該視窗符合常用條件。否則,當某一視窗的視窗常用分數未大於門檻值,處理器140可判斷視窗未符合常用條件。In some embodiments, the
若步驟S630判斷為是,於步驟S640,反應於視窗符合常用條件,處理器140根據視窗資訊與應用程式資訊,將視窗分類為多個視窗佈局類別其中一者。也就是說,處理器140可對與用戶互動頻率高的視窗進行自動化視窗尺寸調整,且不對與用戶互動頻率低的視窗進行自動化視窗尺寸調整。If the determination in step S630 is yes, in step S640, the
於步驟S650,處理器140根據多個視窗佈局類別其中一者的視窗尺寸準則,調整視窗的視窗尺寸。於本實施例中,步驟S650可實施為步驟S651與步驟S652。於步驟S651,反應於多個視窗佈局類別其中一者為第一視窗佈局類別,處理器140將視窗的視窗尺寸調整為第一預設尺寸。於步驟S652,反應於多個視窗佈局類別其中一者為第二視窗佈局類別,處理器140將視窗的視窗尺寸調整為第二預設尺寸,並將視窗移動至預設顯示位置。In step S650, the
於一些實施例中,第一視窗佈局類別為大視窗尺寸類別,且第一視窗佈局類別為小視窗尺寸類別。第一預設尺寸可為最大化尺寸,且第二預設尺寸可為非最大化尺寸。預設顯示位置例如是顯示器110的螢幕中心位置。也就是說,反應於視窗被分類至不同視窗佈局類別,處理器140會將視窗尺寸調整為不同預設尺寸。此外,處理器140可根據視窗所屬的視窗佈局類別來移動視窗的視窗位置。以圖2為例,當視窗210被分類為第一視窗佈局類別,視窗210將被最大化為具有視窗寬度W2(即最大化尺寸)。當視窗210被分類為第二視窗佈局類別,處理器140可將視窗210調整為具有視窗寬度W3(即非最大化尺寸),且將視窗210顯示於顯示器110的螢幕中心位置。In some embodiments, the first window layout category is a large window size category, and the second window layout category is a small window size category. The first default size may be a maximized size, and the second default size may be a non-maximized size. The default display position is, for example, the center position of the screen of the
圖7是根據本發明的一實施例所繪示的將視窗分類為多個視窗佈局類別其中之一的流程圖。請同時參照圖1及圖7,以下即搭配圖1中電子裝置100的各項元件與裝置,說明本實施例的詳細步驟。FIG7 is a flow chart of classifying windows into one of a plurality of window layout categories according to an embodiment of the present invention. Please refer to FIG1 and FIG7 simultaneously. The following is a detailed description of the steps of this embodiment in conjunction with the components and devices of the
於步驟S702,處理器140判斷視窗的視窗資訊與應用程式的應用程式資訊是否符合一資料庫記錄的資料庫數據。若步驟S702判斷為是,於步驟S704,反應於視窗資訊與應用程式資訊符合資料庫數據,處理器140根據資料庫數據決定視窗分類為第一視窗佈局類別或第二視窗佈局類別。In step S702, the
於不同實施例中,資料庫可為本地資料庫或雲端資料庫。資料庫數據包括有不同視窗資訊與不同應用程式資訊的多個資訊組合,與上述資訊組合所各自對應的視窗佈局類別。舉例而言,資料庫數據可為表1所示的分類設定清單。
於一些實施例中,應用程式為瀏覽器應用程式,且應用程式資訊包括一網頁連結位址(URL)。也就是說,當視窗的應用程式為瀏覽器應用程式,處理器140可判斷網頁連結位址是否符合資料庫數據,以將視窗分類至多個視窗佈局類別其中之一。也就是說,處理器140可根據網頁連結位址來決定視窗尺寸的調整方式。In some embodiments, the application is a browser application, and the application information includes a web link address (URL). That is, when the application of the window is a browser application, the
若步驟S702判斷為否,代表處理器140無法依據資料庫數據將視窗分類為多個視窗佈局類別其中之一。於是,於步驟S706,處理器140判斷應用程式是否為瀏覽器程式。於本實施例中,當應用程式為瀏覽器程式,處理器140可依據視窗內的圖片量與文字量來進行視窗分類。當應用程式並非為瀏覽器程式,處理器140可分析視窗的面板佈局來進行視窗分類。If the determination in step S702 is no, it means that the
若步驟S706判斷為是,代表視窗的應用程式為瀏覽器程式,視窗的視窗畫面為網頁。於是,於步驟S708,反應於應用程式為瀏覽器程式,處理器140擷取視窗中的至少一圖片區塊與至少一文字區塊。舉例而言,處理器140可透過瀏覽器程式支援的JavaScript API來擷取網頁中的文字區塊與圖片區塊。If the determination in step S706 is yes, it means that the application of the window is a browser program, and the window screen of the window is a web page. Therefore, in step S708, in response to the application being a browser program, the
舉例而言,圖8是根據本發明的一實施例所繪示的視窗中的多個圖片區塊與多個文字區塊的示意圖。請參照圖8,處理器140可自視窗810之中擷取出多個圖片區塊(例如圖片區塊IB1、IB2)與多個文字區塊(例如文字區塊TB1、TB2、TB3)。處理器140可獲取這些圖片區塊的位置與區塊範圍。處理器140可獲取這些文字區塊的位置與區塊範圍。For example, FIG8 is a schematic diagram of multiple image blocks and multiple text blocks in a window according to an embodiment of the present invention. Referring to FIG8 , the
於是,於步驟S710,處理器140根據至少一圖片區塊的數量、至少一圖片區塊的區塊範圍、至少一文字區塊的區塊範圍,決定視窗分類為第一視窗佈局類別或第二視窗佈局類別。於一些實施例中,處理器140可判斷圖片區塊的數量是否大於數量門檻值(例如10張)。當圖片區塊的數量大於數量門檻值,處理器140可決定視窗分類為第一視窗佈局類別。此外,處理器140可判斷圖片區塊的區塊範圍總和佔網頁整體範圍的比例是否大於比例門檻值(例如50%)。當圖片區塊的區塊範圍總和佔網頁整體範圍的比例大於比例門檻值,處理器140可決定視窗分類為第一視窗佈局類別。另外,處理器140可判斷圖片區塊的區塊範圍總和佔網頁整體範圍的第一比例是否大於文字區塊的區塊範圍總和佔網頁整體範圍的第二比例。當第一比例大於第二比例,處理器140可決定視窗分類為第一視窗佈局類別。當圖片區塊的數量、圖片區塊的區塊範圍、文字區塊的區塊範圍未滿足上述任一條件,處理器140可決定視窗分類為第二視窗佈局類別。Therefore, in step S710, the
若步驟S706判斷為否,代表視窗的應用程式非為瀏覽器程式。於是,於步驟S712,反應於應用程式並非為瀏覽器程式,處理器140將視窗劃分為多個子視窗區塊。本發明對於子視窗區塊的數量並不限制,其可根據實際應用而設計。舉例而言,圖9是根據本發明的一實施例所繪示的多個子視窗區塊的示意圖。請參照圖9,基於預設劃分比例A%與B%,處理器140可將視窗910劃分為9個子視窗區塊Z1~Z9。If step S706 is judged as no, it means that the application of the window is not a browser program. Therefore, in step S712, reflecting that the application is not a browser program, the
於步驟S714,處理器140透過應用程式介面元件擷取多個子視窗區塊分別對應的多個元件型態。例如,處理器140可利用作業系統提供的API來獲取多個子視窗區塊分別對應的多個元件型態。上述API可以是Windows UI Automation API,例如AutomationControlType Enum(),但可不限制於此。In step S714, the
於一些實施例中,處理器140可將各個子視窗區塊中的一個參考位置輸入至作業系統提供的API,以獲取各個子視窗區塊中一元件的元件型態(ControlType)與元件範圍。元件型態可例如是「Edit」、「Document」、「Pane」、「List」、「ListItem」、「Tree」、「TreeItem」、「TreeView」、「Table」、「Group」、「ToolBar」,或「MenuBar」等等。以圖9為例,處理器140可獲取各個子視窗區塊Z1~Z9中一元件的元件型態與元件範圍。In some embodiments, the
於步驟S716,處理器140檢測多個元件型態是否符合特定條件。詳細來說,處理器140判斷這些元件型態是否足以分析視窗的面板佈局。於一些實施例中,當這些元件型態都相同或都屬於未知,處理器140可判定多個元件型態不符合特定條件。舉例來說,當多個子視窗區塊的元件型態都相同且對應元件範圍的範圍總和大於門檻值,處理器140將無法根據多個子視窗區塊的元件型態來得知視窗的面板佈局,上述狀況常見於遊戲應用程式。In step S716, the
於一些實施例中,根據多個子視窗區塊各自的元件型態,處理器140可決定由至少一子視窗區塊所組成的多個操作面板的面板型態。以圖9為例,相鄰的子視窗區塊Z1~Z3可組成上方操作面板。相鄰的子視窗區塊Z7~Z9可組成下方操作面板。相鄰的子視窗區塊Z1、Z4、Z7可組成左方操作面板。相鄰的子視窗區塊Z3、Z6、Z9可組成右方操作面板。子視窗區塊Z5可組成中央操作面板。In some embodiments, according to the component types of the plurality of sub-window blocks, the
以圖9為例,根據子視窗區塊Z1~Z3的元件型態,處理器140可決定上方操作面板的面板型態。根據子視窗區塊Z7~Z9的元件型態,處理器140可決定下方操作面板的面板型態。根據子視窗區塊Z1、Z4、Z7的元件型態,處理器140可決定左方操作面板的面板型態。根據子視窗區塊Z3、Z6、Z9的元件型態,處理器140可決定右方操作面板的面板型態。根據子視窗區塊Z5的元件型態,處理器140可決定中方操作面板的面板型態。舉例而言,處理器140可根據下列表2來決定各個操作面板的面板型態。
以圖9的上方操作面板為範例,假設上方操作面板的子視窗區塊Z1~Z3的元件型態皆為「Group」,則處理器140可基於表2判定上方操作面板的面板型態為「選單面板」。於一些實施例中,當一操作面板的多個子視窗區塊的元件型態都不同時,處理器140可根據一操作面板的多個子視窗區塊其中一者的元件型態來決定該操作面板的面板型態。以圖9的上方操作面板為範例,假設上方操作面板的子視窗區塊Z2的元件型態為「Group」,則處理器140可基於表2判定上方操作面板的面板型態為「選單面板」。於一些實施例中,當一操作面板的多個子視窗區塊的元件型態大多數相同時,處理器140可根據多數子視窗區塊的相同元件型態來決定該操作面板的面板型態。以圖9的上方操作面板為範例,假設上方操作面板的子視窗區塊Z1與Z2的元件型態為「Group」但子視窗區塊Z3的元件型態為「Document」,則處理器140可判定上方操作面板的面板型態為「選單面板」。Taking the upper operation panel of FIG. 9 as an example, assuming that the component types of the sub-window blocks Z1 to Z3 of the upper operation panel are all "Group", the
於一些實施例中,處理器140可根據這些操作面板的面板型態查找一查找表而決定視窗的分類結果。當這些操作面板的面板型態不符合上述查找表所記錄的面板佈局,處理器140可判定這些元件型態不符合特定條件。舉例而言,表3為上述查找表的一個範例。若處理器140判斷某一視窗的多個操作面板的面板型態不符合表3所記錄的面板佈局,處理器140可判定這些元件型態不符合特定條件。
若步驟S716判斷為是,於步驟S718,處理器140根據多個子視窗區塊的多個元件型態,決定視窗分類為第一視窗佈局類別或第二視窗佈局類別。如上表3所示,根據多個操作面板的面板型態,處理器140可透過查表來決定視窗分類為第一視窗佈局類別或第二視窗佈局類別。舉例而言,當處理器140判定多個操作面板的面板型態符合表3中的面板佈局「Office文件軟體」,則處理器140可將該視窗分類為第一視窗佈局類別。If the judgment in step S716 is yes, in step S718, the
若步驟S716判斷為否,於步驟S720,處理器140將視窗的視窗畫面輸入至一機器學習模型,而獲取模型分類結果。於步驟S722,根據模型分類結果,處理器140決定視窗分類為第一視窗佈局類別或第二視窗佈局類別。If the determination in step S716 is no, in step S720, the
圖10是根據本發明的一實施例所繪示的利用機器學習模型決定視窗佈局類別的示意圖。請參照圖10,處理器140可擷取視窗的視窗畫面WMG1,並將視窗畫面WMG1輸入至經訓練的機器學習模型M1。上述機器學習模型M1為經過訓練的分類模型,例如是卷積神經網路模型。處理器140可根據機器學習模型M1的輸出獲取模型分類結果R1。舉例而言,機器學習模型M1可將視窗畫面WMG1分類為多個預設模型類別其中之一,例如多種遊戲類別其中之一或多種網頁模式其中之一。處理器140可利用模型分類結果R1查找查找表LT1而決定視窗的視窗佈局類別WC1,視窗佈局類別WC1可以是第一視窗佈局類別或第二視窗佈局類別。由此可知,處理器140可將不同遊戲類別的多種遊戲應用程式的視窗分別調整為不同視窗尺寸。FIG10 is a schematic diagram of determining a window layout category using a machine learning model according to an embodiment of the present invention. Referring to FIG10 , the
於一些實施例中,處理器140可在應用程式執行一預設時間後,擷取視窗的多張目標視窗畫面。上述預設時間可依據實際應用而設置,本發明對此不限制。透過等待預設時間後才擷取目標視窗畫面,可避免開啟應用程式時的動畫將視窗分類錯誤的情況。處理器140可以一取樣週期擷取視窗的多張目標視窗畫,例如每隔p秒擷取一張目標視窗畫。處理器140將多張目標視窗畫面分別輸入至機器學習模型,而獲取各張目標視窗畫面的多個預設模型類別的多個分類信心值。處理器140根據各張目標視窗畫面的多個預設模型類別的多個分類信心值的統計結果,決定模型分類結果。In some embodiments, the
舉例而言,圖11是根據本發明的一實施例所繪示的基於多張目標視窗畫面決定模型分類結果的示意圖。請參照圖11,目標視窗畫面WMG2與目標視窗畫面WMG3將分別輸入至機器學習模型M1來進行分類處理。機器學習模型M1可輸出目標視窗畫面WMG2的影像分類結果與目標視窗畫面WMG3的影像分類結果。目標視窗畫面WMG2的影像分類結果包括目標視窗畫面WMG2分類至多個預設模型類別的多個分類信心值C1。目標視窗畫面WMG3的影像分類結果包括目標視窗畫面WMG3分類至多個預設模型類別的多個分類信心值C2。這些分類信心值可為機率值。也就是說,對於每個預設模型類別,機器學習模型M1會根據輸入影像產生一個相應的分類信心值。之後,處理器140可對多張目標視窗畫面的多個分類信心值進行加權統計處理,而獲取多個預設模型類別的多個融合分類信心值C3。例如圖11所示,處理器140可對「分類信心值1-1」與「分類信心值2-1」進行加權運算而產生「類別1」的「融合分類信心值1」。透過比較多個融合分類信心值,處理器140可決定模型分類結果R1為對應至最高的融合分類信心值的預設模型類別。For example, FIG11 is a schematic diagram of determining a model classification result based on multiple target window images according to an embodiment of the present invention. Referring to FIG11 , the target window image WMG2 and the target window image WMG3 are respectively input into the machine learning model M1 for classification processing. The machine learning model M1 can output the image classification result of the target window image WMG2 and the image classification result of the target window image WMG3. The image classification result of the target window image WMG2 includes multiple classification confidence values C1 for classifying the target window image WMG2 into multiple preset model categories. The image classification result of the target window image WMG3 includes multiple classification confidence values C2 for classifying the target window image WMG3 into multiple preset model categories. These classification confidence values can be probability values. That is, for each default model category, the machine learning model M1 will generate a corresponding classification confidence value based on the input image. Afterwards, the
例如,處理器140可根據下列公式(4)來計算多個預設模型類別的多個融合分類信心值。
公式(4)
其中,Cs為某一個預設模型類別的融合分類信心值;Cns為第n張目標視窗畫面的該預設模型類別的分類信心值;N為目標視窗畫面的數量;第R張目標視窗畫面之後的目標視窗畫面可給定標準權重「1」;第R張目標視窗畫面之前的目標視窗畫面可給定權重「n/R」。也就是說,在第1張目標視窗畫面到第R-1張目標視窗畫面給定較低的權重「n/R」,從第R張目標視窗畫面至第N張目標視窗畫面可給定標準權重「1」。例如,處理器140可擷取10張目標視窗畫面(N=10),處理器140可設定第1張目標視窗畫面至5張目標視窗畫面的權重分別為1/6、2/6、…、5/6,而第6張目標視窗畫面至10張目標視窗畫面的權重皆為1(R=6)。
For example, the
綜上所述,於本發明實施例中,可根據應用程式資訊與視窗資訊來將視窗分類為多個視窗佈局類別其中一者,並根據分類結果對視窗尺寸進行自動化調整。藉此,在用戶無須手動調整視窗尺寸的情況下,可讓用戶輕鬆享受大尺寸顯示螢幕的好處,並提昇操作便利性與作業效率。此外,本發明實施例可針對不同應用程式應用不同分類規則,而使視窗尺寸調整結果更符合用戶需求。In summary, in the embodiment of the present invention, the window can be classified into one of multiple window layout categories according to the application information and the window information, and the window size can be automatically adjusted according to the classification result. In this way, the user can easily enjoy the benefits of a large-size display screen without having to manually adjust the window size, and the operation convenience and work efficiency are improved. In addition, the embodiment of the present invention can apply different classification rules to different applications, so that the window size adjustment result can better meet the user's needs.
雖然本發明已以實施例揭露如上,然其並非用以限定本發明,任何所屬技術領域中具有通常知識者,在不脫離本發明的精神和範圍內,當可作些許的更動與潤飾,故本發明的保護範圍當視後附的申請專利範圍所界定者為準。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.
100:電子裝置
110:顯示器
120:視線偵測裝置
130:儲存裝置
140:處理器
210, 810, 910:視窗
W1, W2, W3:視窗寬度
θymax:最大偏擺角
θymin:最小偏擺角
θpmax:最大傾仰角
θpmin:最小傾仰角
θy:頭部偏擺角度
θp:頭部傾仰角度
F2:視線落點
TB1、TB2、TB3:文字區塊
IB1、IB2:圖片區塊
Z1~Z9:子視窗區塊
WMG1:視窗畫面
WMG2, WMG3:目標視窗畫面
M1:機器學習模型
R1:模型分類結果
LT1:查找表
WC1:視窗佈局類別
C1, C2:分類信心值
C3:融合分類信心值
S310~S340, S341~S343, S610~S652, S702~S722:步驟
100: electronic device
110: display
120: line of sight detection device
130: storage device
140:
圖1是根據本發明一實施例所繪示的電子裝置的方塊圖。 圖2是根據本發明一實施例所繪示的自動調整視窗尺寸的示意圖。 圖3是根據本發明一實施例所繪示的視窗排版方法的流程圖。 圖4是根據本發明一實施例所繪示的基於視線調整視窗尺寸的流程圖。 圖5A與5B是根據本發明一實施例所繪示的偵測視線的示意圖。 圖6是根據本發明一實施例所繪示的視窗排版方法的流程圖。 圖7是根據本發明一實施例所繪示的將視窗分類為多個視窗佈局類別其中之一的流程圖。 圖8是根據本發明一實施例所繪示的視窗中的多個圖片區塊與多個文字區塊的示意圖。 圖9是根據本發明一實施例所繪示的多個子視窗區塊的示意圖。 圖10是根據本發明一實施例所繪示的利用機器學習模型決定視窗佈局類別的示意圖。 圖11是根據本發明一實施例所繪示的基於多張目標視窗畫面決定模型分類結果的示意圖。 FIG. 1 is a block diagram of an electronic device according to an embodiment of the present invention. FIG. 2 is a schematic diagram of automatically adjusting the window size according to an embodiment of the present invention. FIG. 3 is a flow chart of a window layout method according to an embodiment of the present invention. FIG. 4 is a flow chart of adjusting the window size based on the line of sight according to an embodiment of the present invention. FIG. 5A and FIG. 5B are schematic diagrams of detecting the line of sight according to an embodiment of the present invention. FIG. 6 is a flow chart of a window layout method according to an embodiment of the present invention. FIG. 7 is a flow chart of classifying a window into one of a plurality of window layout categories according to an embodiment of the present invention. FIG8 is a schematic diagram of multiple image blocks and multiple text blocks in a window drawn according to an embodiment of the present invention. FIG9 is a schematic diagram of multiple sub-window blocks drawn according to an embodiment of the present invention. FIG10 is a schematic diagram of determining a window layout category using a machine learning model according to an embodiment of the present invention. FIG11 is a schematic diagram of determining a model classification result based on multiple target window images according to an embodiment of the present invention.
S310~S340:步驟 S310~S340: Steps
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| TW113102303A TWI885711B (en) | 2024-01-19 | 2024-01-19 | Electronic apparatus and windows arrangement method thereof |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| TW113102303A TWI885711B (en) | 2024-01-19 | 2024-01-19 | Electronic apparatus and windows arrangement method thereof |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| TWI885711B true TWI885711B (en) | 2025-06-01 |
| TW202530967A TW202530967A (en) | 2025-08-01 |
Family
ID=97227267
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| TW113102303A TWI885711B (en) | 2024-01-19 | 2024-01-19 | Electronic apparatus and windows arrangement method thereof |
Country Status (1)
| Country | Link |
|---|---|
| TW (1) | TWI885711B (en) |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| TWI509495B (en) * | 2013-11-15 | 2015-11-21 | Yongming Technology Consulting Corp | System and method for adjusting layout of windows |
| CN111399789A (en) * | 2020-02-20 | 2020-07-10 | 华为技术有限公司 | Interface layout method, device and system |
| TWI775261B (en) * | 2020-12-30 | 2022-08-21 | 宏碁股份有限公司 | Computer system supporting automatic windows arrangement and windows arrangement method thereof |
| CN115951960A (en) * | 2022-12-27 | 2023-04-11 | 润芯微科技(江苏)有限公司 | Method and system for intelligently arranging modal windows of rear-row screen in vehicle |
-
2024
- 2024-01-19 TW TW113102303A patent/TWI885711B/en active
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| TWI509495B (en) * | 2013-11-15 | 2015-11-21 | Yongming Technology Consulting Corp | System and method for adjusting layout of windows |
| CN111399789A (en) * | 2020-02-20 | 2020-07-10 | 华为技术有限公司 | Interface layout method, device and system |
| TWI775261B (en) * | 2020-12-30 | 2022-08-21 | 宏碁股份有限公司 | Computer system supporting automatic windows arrangement and windows arrangement method thereof |
| CN115951960A (en) * | 2022-12-27 | 2023-04-11 | 润芯微科技(江苏)有限公司 | Method and system for intelligently arranging modal windows of rear-row screen in vehicle |
Also Published As
| Publication number | Publication date |
|---|---|
| TW202530967A (en) | 2025-08-01 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN112492388B (en) | Video processing method, device, device and storage medium | |
| US9195345B2 (en) | Position aware gestures with visual feedback as input method | |
| US8693807B1 (en) | Systems and methods for providing image feedback | |
| US9667860B2 (en) | Photo composition and position guidance in a camera or augmented reality system | |
| CN110795018B (en) | Apparatus, method and graphical user interface for switching between camera interfaces | |
| EP3606081A1 (en) | On-screen comment display method and electronic device | |
| US9965039B2 (en) | Device and method for displaying user interface of virtual input device based on motion recognition | |
| US11538096B2 (en) | Method, medium, and system for live preview via machine learning models | |
| CN103164022B (en) | Many fingers touch method and device, portable terminal | |
| US12034996B2 (en) | Video playing method, apparatus and device, storage medium, and program product | |
| US10705720B2 (en) | Data entry system with drawing recognition | |
| CN114025097B (en) | Composition guidance method, device, electronic equipment and storage medium | |
| JP2012238293A (en) | Input device | |
| WO2022222510A1 (en) | Interaction control method, terminal device, and storage medium | |
| CN117980873A (en) | A display device and a control method thereof | |
| TWI885711B (en) | Electronic apparatus and windows arrangement method thereof | |
| CN112565605B (en) | Image display method and device and electronic equipment | |
| WO2024160105A1 (en) | Interaction method and apparatus, and electronic device and storage medium | |
| CN117519479A (en) | Man-machine interaction method, device, equipment and storage medium based on gestures | |
| CN114627494B (en) | A method and display device for locating a hand area | |
| CN110597397A (en) | Augmented reality implementation method, mobile terminal and storage medium | |
| US11537824B2 (en) | Categorization of photographs | |
| US20220050528A1 (en) | Electronic device for simulating a mouse | |
| EP3244293A1 (en) | Selection option information presentation system and method | |
| CN103076873B (en) | A kind of computer vision controls adaptive system and the method for window |