[go: up one dir, main page]

TWI885711B - Electronic apparatus and windows arrangement method thereof - Google Patents

Electronic apparatus and windows arrangement method thereof Download PDF

Info

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
Application number
TW113102303A
Other languages
Chinese (zh)
Other versions
TW202530967A (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 TW113102303A priority Critical patent/TWI885711B/en
Application granted granted Critical
Publication of TWI885711B publication Critical patent/TWI885711B/en
Publication of TW202530967A publication Critical patent/TW202530967A/en

Links

Images

Landscapes

  • Digital Computer Display Output (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

An electronic apparatus and a windows arrangement method thereof are disclosed. The method is adapted to the electronic apparatus and includes the following steps. A window of an application is displayed via a display. Window Information of the window is obtained. The window is classified into one of window layout categories based on the window Information of the window and application information of the application. A window size of the window is adjusted according to a size criterion of one of the window layout categories.

Description

電子裝置與其視窗排版方法Electronic device and window layout method thereof

本發明是有關於一種電子裝置的管理技術,且特別是有關於一種電子裝置與其視窗排版方法。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 electronic device 100 may be a laptop computer, a desktop computer, a smart phone, a tablet computer, an industrial computer, or a server. The electronic device 100 may include a display 110, a line of sight detection device 120, a storage device 130, and a processor 140.

顯示器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 display 110 is used to display images. For example, the display 110 may include various types of displays such as a liquid crystal display (LCD), a thin film transistor LCD (TFT LCD), a field sequential LCD (FS LCD), a light emitting diode (LED), an active-matrix organic light-emitting diode (AMOLED) display, or an electrowetting display.

視線偵測裝置120用以偵測電子裝置100的用戶的視線資訊。例如,視線偵測裝置120可包括攝像頭,其可朝用戶拍攝影像。用戶的視線資訊可基於用戶影像而估測。或者,視線偵測裝置120可包括眼球追蹤(eye tracking)裝置,其可根據通過紅外線感測器或專用攝像頭跟蹤眼球位置和眼球運動。用戶的視線資訊可基於眼球位置和眼球運動而產生。The sight detection device 120 is used to detect the sight information of the user of the electronic device 100. For example, the sight detection device 120 may include a camera that can shoot an image toward the user. The sight information of the user can be estimated based on the user image. Alternatively, the sight detection device 120 may include an eye tracking device that can track the eye position and eye movement through an infrared sensor or a dedicated camera. The sight information of the user can be generated based on the eye position and eye movement.

儲存裝置130用以儲存影像、程式碼等資料,可包括揮發性記憶體模組與非揮發性記憶體模組。儲存裝置130可以是任何型態的固定式或可移動式隨機存取記憶體(random access memory, RAM)、唯讀記憶體(read-only memory, ROM)、快閃記憶體(flash memory)、硬碟或其他類似裝置、積體電路及其組合。The storage device 130 is used to store data such as images and program codes, and may include a volatile memory module and a non-volatile memory module. The storage device 130 may be any type of fixed or removable random access memory (RAM), read-only memory (ROM), flash memory, hard disk or other similar devices, integrated circuits and combinations thereof.

處理器140耦接至顯示器110、視線偵測裝置120,與儲存裝置130。處理器140可用以控制電子裝置100的整體或部分運作。例如,處理器140可包括任何可程式化之一般用途或特殊用途的微處理器、數位訊號處理器(Digital Signal Processor, DSP)、可程式化控制器、特殊應用積體電路(Application Specific Integrated Circuits, ASIC)、可程式化邏輯裝置(Programmable Logic Device, PLD)或其他類似裝置或這些裝置的組合。於一些實施例中,處理器140可執行儲存裝置130中的指令、程式或軟體模組,以實現本文中處理器140所執行的各個操作。The processor 140 is coupled to the display 110, the line of sight detection device 120, and the storage device 130. The processor 140 can be used to control the operation of the electronic device 100 in whole or in part. For example, the processor 140 can include any programmable general-purpose or special-purpose microprocessor, digital signal processor (DSP), programmable controller, application specific integrated circuits (ASIC), programmable logic device (PLD) or other similar devices or combinations of these devices. In some embodiments, the processor 140 can execute instructions, programs or software modules in the storage device 130 to implement various operations performed by the processor 140 herein.

須注意的是,在一實施例中,電子裝置100還可以包括電源供應裝置及各式輸出/輸出裝置。所述電源供應裝置可包括電池及/或電源管理電路。所述輸出/輸出裝置可包括網路連接介面、觸控板、滑鼠、鍵盤、揚聲器及/或麥克風等,本發明不加以限制。It should be noted that, in one embodiment, the electronic device 100 may also include a power supply device and various input/output devices. The power supply device may include a battery and/or a power management circuit. The output/output device may include a network connection interface, a touch panel, a mouse, a keyboard, a speaker and/or a microphone, etc., and the present invention is not limited thereto.

於一些實施例中,處理器140可指示顯示器110顯示至少一視窗。本發明對於顯示器110所顯示的視窗數目並不加以限制。須特別說明的是,相比於傳統上用戶需要透過輸入裝置手動調整視窗的視窗尺寸,在本發明實施例中,處理器140可以自動根據視窗的視窗資訊與應用程式資訊來適應性地調整視窗尺寸,例如放大視窗或縮小視窗。藉此,可有效改善用戶體驗,與提昇操作便利性。In some embodiments, the processor 140 may instruct the display 110 to display at least one window. The present invention does not limit the number of windows displayed by the display 110. It should be particularly noted that, compared to the traditional method where the user needs to manually adjust the window size of the window through an input device, in the embodiment of the present invention, the processor 140 can automatically and adaptively adjust the window size according to the window information and application information of the window, such as enlarging or reducing the window. In this way, the user experience can be effectively improved and the convenience of operation can be enhanced.

舉例而言,圖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 display 110 may display a window 210 of the application. For example, the window 210 may present a user interface of the application. The processor 140 may adjust the window size of the window 210 in real time according to the window information and application information of the window 210. In some embodiments, the window size of the window 210 may change in response to changes in the window information of the window 210, and the above-mentioned window information may include a window title, a window screen, a layout of components of the window, web page content or other information related to the window 210.

舉例而言,反應於視窗210的視窗畫面的變化,處理器140可將視窗210的視窗尺寸從第一預設尺寸(例如視窗寬度W1)放大為第二預設尺寸(例如視窗寬度W2)。然後,反應於視窗210的視窗畫面的變化,處理器140可將視窗210的視窗尺寸從第二預設尺寸(例如視窗寬度W2)縮小為第三預設尺寸(例如視窗寬度W3)。在沒有用戶操作介入的情況下,視窗210的視窗尺寸可基於視窗畫面而自動地調整。For example, in response to the change of the window image of the window 210, the processor 140 may enlarge the window size of the window 210 from a first preset size (e.g., window width W1) to a second preset size (e.g., window width W2). Then, in response to the change of the window image of the window 210, the processor 140 may reduce the window size of the window 210 from the second preset size (e.g., window width W2) to a third preset size (e.g., window width W3). The window size of the window 210 may be automatically adjusted based on the window image without user intervention.

圖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 electronic device 100 in FIG1.

於步驟S310,處理器140透過顯示器110顯示應用程式的視窗。於步驟S320,處理器140獲取視窗的視窗資訊。具體來說,處理器140可先獲取當前的活動視窗(Active Window)的基本資訊。舉例而言,透過Windows應用程式介面(API),處理器140可獲取當前的活動視窗的視窗標題與應用程式名稱。上述Windows應用程式介面例如是GetForegroundWindow()、GetWindowTextLength()、GetWindowText()、GetWindowThreadProcessId(),或GetModuleBaseName()等等,本發明對此不限制。In step S310, the processor 140 displays the application window through the display 110. In step S320, the processor 140 obtains the window information of the window. Specifically, the processor 140 may first obtain the basic information of the current active window (Active Window). For example, through the Windows application programming interface (API), the processor 140 may obtain the window title and application name of the current active window. The above-mentioned Windows application programming interface is, for example, GetForegroundWindow(), GetWindowTextLength(), GetWindowText(), GetWindowThreadProcessId(), or GetModuleBaseName(), etc., and the present invention is not limited thereto.

於步驟S330,處理器140根據視窗的視窗資訊與應用程式的應用程式資訊,將視窗分類為多個視窗佈局類別其中一者。進一步來說,應用程式的應用程式資訊可包括應用程式名稱、應用程式類型或其他與應用程式相關的資訊。此外,視窗資訊還可包括視窗畫面、元件佈局,網頁內容、視窗內容,或分析上述資訊而產生的衍生視窗資訊等等。In step S330, the processor 140 classifies 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. Further, the application information of the application may include the application name, the application type or other information related to the application. In addition, the window information may also include the window screen, the component layout, the webpage content, the window content, or the derived window information generated by analyzing the above information, etc.

於一些實施例中,根據視窗的視窗資訊與應用程式的應用程式資訊,將視窗分類為多個視窗佈局類別其中一者的步驟包括第一運作及第二運作中至少一者。第一運作包括:反應於應用程式並非為瀏覽器程式,將視窗劃分為多個子視窗區塊;透過應用程式介面元件擷取多個子視窗區塊分別對應的多個元件型態;以及根據多個子視窗區塊的多個元件型態,決定視窗分類為第一視窗佈局類別或第二視窗佈局類別。第二運作包括:反應於應用程式為瀏覽器程式,擷取視窗中的至少一圖片區塊與至少一文字區塊;以及根據至少一圖片區塊的數量、至少一圖片區塊的區塊範圍、至少一文字區塊的區塊範圍,決定視窗分類為第一視窗佈局類別或第二視窗佈局類別。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 processor 140 may classify a window into one of a plurality of window layout categories according to different classification criteria. The following embodiments will be described in more detail. It should be particularly noted that different window layout categories correspond to different window size criteria. In other words, by classifying a window into one of a plurality of window layout categories, the processor 140 may obtain the window size criteria applicable to the window.

於是,於步驟S340,處理器140根據多個視窗佈局類別其中一者的視窗尺寸準則,調整視窗的視窗尺寸。各個視窗佈局類別的視窗尺寸準則可包括預設尺寸或預設縮放比例等等。例如,當視窗所被分類到對應於某一視窗尺寸準則的某一視窗佈局類別的時候,處理器140可依據該視窗尺寸準則將視窗放大至最大化。或者,當視窗所被分類到對應於某一視窗尺寸準則的某一視窗佈局類別的時候,處理器140可依據將視窗尺寸調整為相同於目標預設尺寸。上述目標預設尺寸可根據顯示器110的螢幕尺寸而決定。例如,目標預設尺寸中的目標寬度可為螢幕寬度乘上M1%,M1為介於1至100之間的預設數值。目標預設尺寸中的目標高度可為螢幕高度乘上M2%,M2為介於1至100之間的預設數值。Therefore, in step S340, the processor 140 adjusts the window size of the window according to the window size criteria of one of the plurality of window layout categories. The window size criteria of each window layout category may include a default size or a default scaling ratio, etc. For example, when the window is classified into a window layout category corresponding to a certain window size criteria, the processor 140 may enlarge the window to the maximum according to the window size criteria. Alternatively, when the window is classified into a window layout category corresponding to a certain window size criteria, the processor 140 may adjust the window size to be the same as the target default size. The above target default size may be determined according to the screen size of the display 110. For example, the target width in the target default size may be the screen width multiplied by M1%, where M1 is a preset value between 1 and 100. The target height in the target default size may be the screen height multiplied by M2%, where M2 is a preset value between 1 and 100.

於一些實施例中,根據多個視窗佈局類別其中一者的視窗尺寸準則,調整視窗的視窗尺寸的步驟包括第一運作、第二運作及第三運作中至少一者。第一運作包括:偵測一用戶的視線;判斷視線是否投射於視窗上;以及反應於視線投射於視窗上,根據視窗尺寸準則調整視窗的視窗尺寸。第二運作包括:反應於多個視窗佈局類別其中一者為第一視窗佈局類別,將視窗的視窗尺寸調整為第一預設尺寸。第三運作包括:反應於多個視窗佈局類別其中一者為第二視窗佈局類別,將視窗的視窗尺寸調整為第二預設尺寸,並將視窗移動至預設顯示位置。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 processor 140 may determine whether to adjust the window size of the window according to the user's line of sight information. Please refer to FIG. 4, which is a flow chart of adjusting the window size based on line of sight according to an embodiment of the present invention. Step S340 shown in FIG. 3 may be implemented as steps S341 to S343.

於步驟S341,處理器140透過視線偵測裝置120偵測一用戶的視線。於步驟S342,處理器140判斷視線是否投射於視窗上。具體來說,處理器140可判斷用戶於顯示器110上的視線落點是否位於視窗的視窗範圍。In step S341, the processor 140 detects a user's line of sight through the line of sight detection device 120. In step S342, the processor 140 determines whether the line of sight is projected on the window. Specifically, the processor 140 can determine whether the user's line of sight on the display 110 is located within the window range of the window.

若步驟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 processor 140 adjusts the window size of the window according to the window size criteria. That is, when the user focuses on a certain window, the processor 140 will adjust the window size of the window in real time. On the contrary, if the judgment in step S342 is no, the processor 140 may disable the adjustment of the window size of the window according to the window size criteria. That is, when the user does not focus on a certain window, the processor 140 will not adjust the window size of the window. It is worth mentioning that when no line of sight is detected, the processor 140 may disable the adjustment of the window size of the window according to the window size criteria. That is, when no user is looking at the display 110, the processor 140 will not adjust the window size of the window.

於一些實施例中,處理器140可透過視線偵測裝置120擷取用戶的臉部影像,並根據此臉部影像計算頭部姿態角度。之後,處理器140可根據頭部姿態角度決定視線投射於顯示器110上的視線落點。In some embodiments, the processor 140 can capture the user's facial image through the line of sight detection device 120 and calculate the head posture angle based on the facial image. Afterwards, the processor 140 can determine the line of sight projected on the display 110 according to the head posture angle.

更詳細來說,處理器140可對視線偵測裝置120所擷取的影像進行人臉辨識運作而取得頭部影像上的人臉區塊。處理器140可檢測人臉區塊內的用以標記臉部輪廓、五官形狀與五官位置的多個臉部特徵點(facial landmarks)。之後,處理器140依據臉部特徵點估計使用者的頭部姿態角度。舉例而言,透過採用透視n點(Perspective-n-Point,PnP)演算法,處理器140可依據這些臉部特徵點的座標位置來估計使用者於世界座標系統下的頭部姿態角度。此頭部姿態角度可包括相對於第一座標軸旋轉的頭部傾仰(pitch)角以及相對於第二座標軸旋轉的頭部偏擺(yaw)角。基於關聯於顯示器110的頭部擺動角度邊界與當前的頭部姿態角度,處理器140可決定視線投射於顯示器110上的視線落點。頭部擺動角度邊界包括對應至右螢幕邊界的最大偏擺角、對應至左螢幕邊界的最小偏擺角、對應至上螢幕邊界的最大傾仰角,以及對應至下螢幕邊界的最小傾仰角。In more detail, the processor 140 may perform a face recognition operation on the image captured by the line of sight detection device 120 to obtain a face block on the head image. The processor 140 may detect a plurality of facial landmarks in the face block for marking the facial contour, the shape of the facial features, and the position of the facial features. Afterwards, the processor 140 estimates the user's head posture angle based on the facial landmarks. For example, by adopting a perspective-n-point (PnP) algorithm, the processor 140 may estimate the user's head posture angle in the world coordinate system based on the coordinate positions of these facial landmarks. The head posture angle may include a head pitch angle relative to the first coordinate axis and a head yaw angle relative to the second coordinate axis. Based on the head yaw angle boundary associated with the display 110 and the current head posture angle, the processor 140 may determine the point of view projected on the display 110. The head yaw angle boundary includes a maximum yaw angle corresponding to the right screen boundary, a minimum yaw angle corresponding to the left screen boundary, a maximum pitch angle corresponding to the upper screen boundary, and a minimum pitch angle corresponding to the lower screen boundary.

舉例來說,圖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 processor 140 may perform interpolation calculations based on the maximum deflection angle θymax, the minimum deflection angle θymin, the X-axis coordinate in the screen coordinate system corresponding to the maximum deflection angle θymax (i.e., Sw), the X-axis coordinate in the screen coordinate system corresponding to the minimum deflection angle θymin (i.e., 0), and the user's current head deflection angle θy to obtain the X-coordinate value of the sight line landing point F2 (i.e., Sx). Similarly, the processor 140 can perform interpolation calculations based on the maximum tilt angle θpmax, the minimum tilt angle θpmin, the Y-axis coordinate in the screen coordinate system corresponding to the maximum tilt angle θpmax (i.e., 0), the X-axis coordinate in the screen coordinate system corresponding to the minimum tilt angle θpmin (i.e., Sh), and the user's current head tilt angle θp to obtain the Y-coordinate value of the gaze position F2 (i.e., Sy). In this way, the processor 140 can predict that the user's gaze position is (Sx, Sy) in the screen coordinate system. Here, the screen coordinate system can be a coordinate system defined in pixels and based on the screen resolution. In one embodiment, the processor 140 can calculate the coordinates of the sight point according to the following formula (1) and formula (2). Formula (1) Formula (2)

當處理器140判定螢幕座標系統下視線落點的座標位於視窗的視窗範圍內,處理器140可判定視線投射於視窗上。反之,當處理器140判定螢幕座標系統下視線落點的座標沒有位於視窗的視窗範圍內,處理器140可判定視線未投射於視窗上。When the processor 140 determines that the coordinates of the view point under the screen coordinate system are within the window range of the window, the processor 140 can determine that the view is projected on the window. Conversely, when the processor 140 determines that the coordinates of the view point under the screen coordinate system are not within the window range of the window, the processor 140 can determine that the view is not projected on the window.

圖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 electronic device 100 in FIG1.

於步驟S610,處理器140透過顯示器110顯示應用程式的視窗。於步驟S620,處理器140獲取視窗的視窗資訊。步驟S610~步驟S620的實施細節可參照前文說明,於此不贅述。In step S610, the processor 140 displays the application window through the display 110. In step S620, the processor 140 obtains the window information of the window. The implementation details of step S610 to step S620 can be referred to the above description and will not be elaborated here.

須注意的是,於步驟S630,處理器140根據視窗的活動視窗時間、互動事件次數與視線駐留時間,判斷視窗是否符合常用條件。換言之,處理器140可判斷某一視窗是否為常用視窗。It should be noted that in step S630, the processor 140 determines whether the window meets the common condition according to the window's active window time, the number of interactive events, and the eye-retention time. In other words, the processor 140 can determine whether a window is a common window.

於一些實施例中,活動視窗時間為某視窗在單位時段內作為活動視窗的時間總和。互動事件次數為某視窗在單位時段內所接收的用戶互動事件的次數。用戶互動事件包括滑鼠事件、鍵盤事件、觸控事件或其組合。視線駐留時間為用戶視線在單位時段內停留於某視窗的時間總和。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 processor 140 may calculate the window usage score of the window according to the window's active window time, the number of interactive events, and the eye retention time. For example, the processor 140 may calculate the window usage score of the window according to the following formula (3). ΔOx = (Wa*Ax + We*Ex + Ws*Mx) / (Wa + We + Ws)   Formula (3) Wherein, ΔOx represents the window usage score; Ax represents the active window time; Ex represents the number of interactive events; Mx represents the eye retention time; Wa, We, and Ws are weight factors, respectively.

於一些實施例中,處理器140可根據視窗的視窗常用分數,對視窗與至少一其他視窗進行排序。處理器140可根據視窗的排序順序判斷視窗是否符合常用條件。具體來說,處理器140可針對顯示器110所顯示的多個視窗分別計算視窗常用分數,並依據所有視窗的視窗常用分數篩選出常用視窗。例如,當某一視窗的排序順序為前n位,處理器140可判斷該視窗符合常用條件。否則,當某一視窗的排序順序並非為前n位,處理器140可判斷該視窗未符合常用條件。或者,於一些實施例中,處理器140可判斷視窗常用分數是否大於門檻值,以判斷視窗是否符合常用條件。當某一視窗的視窗常用分數大於門檻值,處理器140可判斷該視窗符合常用條件。否則,當某一視窗的視窗常用分數未大於門檻值,處理器140可判斷視窗未符合常用條件。In some embodiments, the processor 140 may sort the window and at least one other window according to the window common score of the window. The processor 140 may determine whether the window meets the common condition according to the sorting order of the window. Specifically, the processor 140 may calculate the window common score for each of the multiple windows displayed by the display 110, and filter out the common windows according to the window common scores of all the windows. For example, when the sorting order of a certain window is the first n, the processor 140 may determine that the window meets the common condition. Otherwise, when the sorting order of a certain window is not the first n, the processor 140 may determine that the window does not meet the common condition. Alternatively, in some embodiments, the processor 140 may determine whether the window common score is greater than a threshold value to determine whether the window meets the common condition. When the window common score of a certain window is greater than the threshold value, the processor 140 may determine that the window meets the common condition. Otherwise, when the window common score of a certain window is not greater than the threshold value, the processor 140 may determine that the window does not meet the common condition.

若步驟S630判斷為是,於步驟S640,反應於視窗符合常用條件,處理器140根據視窗資訊與應用程式資訊,將視窗分類為多個視窗佈局類別其中一者。也就是說,處理器140可對與用戶互動頻率高的視窗進行自動化視窗尺寸調整,且不對與用戶互動頻率低的視窗進行自動化視窗尺寸調整。If the determination in step S630 is yes, in step S640, the processor 140 classifies the window into one of a plurality of window layout categories according to the window information and the application information, reflecting that the window meets the common conditions. In other words, the processor 140 can automatically adjust the window size for the window with a high frequency of interaction with the user, and does not automatically adjust the window size for the window with a low frequency of interaction with the user.

於步驟S650,處理器140根據多個視窗佈局類別其中一者的視窗尺寸準則,調整視窗的視窗尺寸。於本實施例中,步驟S650可實施為步驟S651與步驟S652。於步驟S651,反應於多個視窗佈局類別其中一者為第一視窗佈局類別,處理器140將視窗的視窗尺寸調整為第一預設尺寸。於步驟S652,反應於多個視窗佈局類別其中一者為第二視窗佈局類別,處理器140將視窗的視窗尺寸調整為第二預設尺寸,並將視窗移動至預設顯示位置。In step S650, the processor 140 adjusts the window size of the window according to the window size criteria of one of the plurality of window layout categories. In this embodiment, step S650 can be implemented as steps S651 and S652. In step S651, in response to one of the plurality of window layout categories being a first window layout category, the processor 140 adjusts the window size of the window to a first default size. In step S652, in response to one of the plurality of window layout categories being a second window layout category, the processor 140 adjusts the window size of the window to a second default size and moves the window to a default display position.

於一些實施例中,第一視窗佈局類別為大視窗尺寸類別,且第一視窗佈局類別為小視窗尺寸類別。第一預設尺寸可為最大化尺寸,且第二預設尺寸可為非最大化尺寸。預設顯示位置例如是顯示器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 display 110. That is, in response to the window being classified into different window layout categories, the processor 140 will adjust the window size to different default sizes. In addition, the processor 140 may move the window position of the window according to the window layout category to which the window belongs. Taking FIG. 2 as an example, when the window 210 is classified into the first window layout category, the window 210 will be maximized to have a window width W2 (i.e., the maximized size). When the window 210 is classified as the second window layout category, the processor 140 may adjust the window 210 to have a window width W3 (ie, a non-maximized size), and display the window 210 at the center of the screen of the display 110 .

圖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 electronic device 100 in FIG1.

於步驟S702,處理器140判斷視窗的視窗資訊與應用程式的應用程式資訊是否符合一資料庫記錄的資料庫數據。若步驟S702判斷為是,於步驟S704,反應於視窗資訊與應用程式資訊符合資料庫數據,處理器140根據資料庫數據決定視窗分類為第一視窗佈局類別或第二視窗佈局類別。In step S702, the processor 140 determines whether the window information of the window and the application information of the application match the database data recorded in a database. If the determination in step S702 is yes, in step S704, the processor 140 determines whether the window is classified into the first window layout category or the second window layout category according to the database data, in response to the window information and the application information matching the database data.

於不同實施例中,資料庫可為本地資料庫或雲端資料庫。資料庫數據包括有不同視窗資訊與不同應用程式資訊的多個資訊組合,與上述資訊組合所各自對應的視窗佈局類別。舉例而言,資料庫數據可為表1所示的分類設定清單。 視窗標題 應用程式名稱 視窗佈局類別 標題A 程式名稱A 第一視窗佈局類別 標題B 程式名稱B 第二視窗佈局類別 標題C 程式名稱B 第二視窗佈局類別 表1 基於表1的範例,當視窗的視窗標題符合「標題A」且視窗的應用程式名稱符合「程式名稱A」,則處理器140根據資料庫數據決定將視窗分類為第一視窗佈局類別。當視窗的視窗標題符合「標題B」且視窗的應用程式名稱符合「程式名稱B」,則處理器140根據資料庫數據決定將視窗分類為第一視窗佈局類別。當視窗的視窗標題符合「標題D」且視窗的應用程式名稱符合「程式名稱D」,則處理器140判定視窗資訊與應用程式資訊未符合資料庫數據。 In different embodiments, the database may be a local database or a cloud database. The database data includes a plurality of information combinations of different window information and different application information, and the window layout categories corresponding to the above information combinations. For example, the database data may be a classification setting list shown in Table 1. Window title Application Name Window layout class Title A Program Name A First window layout class Title B Program Name B Second window layout class Title C Program Name B Second window layout class Table 1 Based on the example of Table 1, when the window title of the window matches "Title A" and the application name of the window matches "Program Name A", the processor 140 determines to classify the window into the first window layout category according to the database data. When the window title of the window matches "Title B" and the application name of the window matches "Program Name B", the processor 140 determines to classify the window into the first window layout category according to the database data. When the window title of the window matches "Title D" and the application name of the window matches "Program Name D", the processor 140 determines that the window information and the application information do not match the database data.

於一些實施例中,應用程式為瀏覽器應用程式,且應用程式資訊包括一網頁連結位址(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 processor 140 can determine whether the web link address matches the database data to classify the window into one of a plurality of window layout categories. That is, the processor 140 can determine the window size adjustment method according to the web link address.

若步驟S702判斷為否,代表處理器140無法依據資料庫數據將視窗分類為多個視窗佈局類別其中之一。於是,於步驟S706,處理器140判斷應用程式是否為瀏覽器程式。於本實施例中,當應用程式為瀏覽器程式,處理器140可依據視窗內的圖片量與文字量來進行視窗分類。當應用程式並非為瀏覽器程式,處理器140可分析視窗的面板佈局來進行視窗分類。If the determination in step S702 is no, it means that the processor 140 cannot classify the window into one of the plurality of window layout categories according to the database data. Therefore, in step S706, the processor 140 determines whether the application is a browser program. In this embodiment, when the application is a browser program, the processor 140 can classify the window according to the amount of images and text in the window. When the application is not a browser program, the processor 140 can analyze the panel layout of the window to classify the window.

若步驟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 processor 140 captures at least one image block and at least one text block in the window. For example, the processor 140 can capture the text block and the image block in the web page through the JavaScript API supported by the browser program.

舉例而言,圖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 processor 140 can extract multiple image blocks (e.g., image blocks IB1, IB2) and multiple text blocks (e.g., text blocks TB1, TB2, TB3) from the window 810. The processor 140 can obtain the positions and block ranges of these image blocks. The processor 140 can obtain the positions and block ranges of these text blocks.

於是,於步驟S710,處理器140根據至少一圖片區塊的數量、至少一圖片區塊的區塊範圍、至少一文字區塊的區塊範圍,決定視窗分類為第一視窗佈局類別或第二視窗佈局類別。於一些實施例中,處理器140可判斷圖片區塊的數量是否大於數量門檻值(例如10張)。當圖片區塊的數量大於數量門檻值,處理器140可決定視窗分類為第一視窗佈局類別。此外,處理器140可判斷圖片區塊的區塊範圍總和佔網頁整體範圍的比例是否大於比例門檻值(例如50%)。當圖片區塊的區塊範圍總和佔網頁整體範圍的比例大於比例門檻值,處理器140可決定視窗分類為第一視窗佈局類別。另外,處理器140可判斷圖片區塊的區塊範圍總和佔網頁整體範圍的第一比例是否大於文字區塊的區塊範圍總和佔網頁整體範圍的第二比例。當第一比例大於第二比例,處理器140可決定視窗分類為第一視窗佈局類別。當圖片區塊的數量、圖片區塊的區塊範圍、文字區塊的區塊範圍未滿足上述任一條件,處理器140可決定視窗分類為第二視窗佈局類別。Therefore, in step S710, the processor 140 determines whether the window is classified into the first window layout category or the second window layout category according to the number of at least one image block, the block range of at least one image block, and the block range of at least one text block. In some embodiments, the processor 140 may determine whether the number of image blocks is greater than a quantity threshold (e.g., 10). When the number of image blocks is greater than the quantity threshold, the processor 140 may determine that the window is classified into the first window layout category. In addition, the processor 140 may determine whether the ratio of the total block range of the image blocks to the overall range of the webpage is greater than a ratio threshold (e.g., 50%). When the ratio of the total block range of the image blocks to the overall range of the webpage is greater than the ratio threshold, the processor 140 may determine that the window is classified as the first window layout category. In addition, the processor 140 may determine whether the first ratio of the total block range of the image blocks to the overall range of the webpage is greater than the second ratio of the total block range of the text blocks to the overall range of the webpage. When the first ratio is greater than the second ratio, the processor 140 may determine that the window is classified as the first window layout category. When the number of image blocks, the block range of the image blocks, and the block range of the text blocks do not meet any of the above conditions, the processor 140 may determine that the window is classified as the second window layout category.

若步驟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 processor 140 divides the window into a plurality of sub-window blocks. The present invention does not limit the number of sub-window blocks, which can be designed according to actual applications. For example, FIG. 9 is a schematic diagram of a plurality of sub-window blocks drawn according to an embodiment of the present invention. Referring to FIG. 9, based on the preset division ratios A% and B%, the processor 140 can divide the window 910 into 9 sub-window blocks Z1 to Z9.

於步驟S714,處理器140透過應用程式介面元件擷取多個子視窗區塊分別對應的多個元件型態。例如,處理器140可利用作業系統提供的API來獲取多個子視窗區塊分別對應的多個元件型態。上述API可以是Windows UI Automation API,例如AutomationControlType Enum(),但可不限制於此。In step S714, the processor 140 captures multiple component types corresponding to the multiple sub-window blocks through the application program interface component. For example, the processor 140 can use the API provided by the operating system to obtain the multiple component types corresponding to the multiple sub-window blocks. The above API can be a Windows UI Automation API, such as AutomationControlType Enum(), but is not limited thereto.

於一些實施例中,處理器140可將各個子視窗區塊中的一個參考位置輸入至作業系統提供的API,以獲取各個子視窗區塊中一元件的元件型態(ControlType)與元件範圍。元件型態可例如是「Edit」、「Document」、「Pane」、「List」、「ListItem」、「Tree」、「TreeItem」、「TreeView」、「Table」、「Group」、「ToolBar」,或「MenuBar」等等。以圖9為例,處理器140可獲取各個子視窗區塊Z1~Z9中一元件的元件型態與元件範圍。In some embodiments, the processor 140 may input a reference position in each sub-window block to an API provided by the operating system to obtain a component type (ControlType) and a component range of a component in each sub-window block. The component type may be, for example, "Edit", "Document", "Pane", "List", "ListItem", "Tree", "TreeItem", "TreeView", "Table", "Group", "ToolBar", or "MenuBar", etc. Taking FIG. 9 as an example, the processor 140 may obtain a component type and a component range of a component in each sub-window block Z1 to Z9.

於步驟S716,處理器140檢測多個元件型態是否符合特定條件。詳細來說,處理器140判斷這些元件型態是否足以分析視窗的面板佈局。於一些實施例中,當這些元件型態都相同或都屬於未知,處理器140可判定多個元件型態不符合特定條件。舉例來說,當多個子視窗區塊的元件型態都相同且對應元件範圍的範圍總和大於門檻值,處理器140將無法根據多個子視窗區塊的元件型態來得知視窗的面板佈局,上述狀況常見於遊戲應用程式。In step S716, the processor 140 detects whether the multiple component types meet the specific conditions. Specifically, the processor 140 determines whether these component types are sufficient to analyze the panel layout of the window. In some embodiments, when these component types are all the same or are all unknown, the processor 140 may determine that the multiple component types do not meet the specific conditions. For example, when the component types of multiple sub-window blocks are all the same and the sum of the ranges of the corresponding component ranges is greater than the threshold value, the processor 140 will not be able to know the panel layout of the window based on the component types of the multiple sub-window blocks. The above situation is common in game applications.

於一些實施例中,根據多個子視窗區塊各自的元件型態,處理器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 processor 140 may determine the panel types of the plurality of operation panels composed of at least one sub-window block. Taking FIG. 9 as an example, the adjacent sub-window blocks Z1 to Z3 may form an upper operation panel. The adjacent sub-window blocks Z7 to Z9 may form a lower operation panel. The adjacent sub-window blocks Z1, Z4, and Z7 may form a left operation panel. The adjacent sub-window blocks Z3, Z6, and Z9 may form a right operation panel. The sub-window block Z5 may form a central operation panel.

以圖9為例,根據子視窗區塊Z1~Z3的元件型態,處理器140可決定上方操作面板的面板型態。根據子視窗區塊Z7~Z9的元件型態,處理器140可決定下方操作面板的面板型態。根據子視窗區塊Z1、Z4、Z7的元件型態,處理器140可決定左方操作面板的面板型態。根據子視窗區塊Z3、Z6、Z9的元件型態,處理器140可決定右方操作面板的面板型態。根據子視窗區塊Z5的元件型態,處理器140可決定中方操作面板的面板型態。舉例而言,處理器140可根據下列表2來決定各個操作面板的面板型態。 面板型態 元件型態 文字編輯器面板 Edit, Document, ... 主控面板 Pane (限用於中央操作面板) 清單面板 List, ListItem, Tree, TreeItem, TreeView, Table, ... 選單面板 Group, Pane, ToolBar, MenuBar, Tab, TabItem... 表2 Taking FIG. 9 as an example, according to the component types of sub-window blocks Z1 to Z3, the processor 140 can determine the panel type of the upper operation panel. According to the component types of sub-window blocks Z7 to Z9, the processor 140 can determine the panel type of the lower operation panel. According to the component types of sub-window blocks Z1, Z4, and Z7, the processor 140 can determine the panel type of the left operation panel. According to the component types of sub-window blocks Z3, Z6, and Z9, the processor 140 can determine the panel type of the right operation panel. According to the component type of sub-window block Z5, the processor 140 can determine the panel type of the middle operation panel. For example, the processor 140 can determine the panel type of each operation panel according to the following Table 2. Panel Type Component Type Text Editor Panel Edit, Document, ... Main control panel Pane (only for central operation panel) List Panel List, ListItem, Tree, TreeItem, TreeView, Table, ... Menu Panel Group, Pane, ToolBar, MenuBar, Tab, TabItem... Table 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 processor 140 can determine the panel type of the upper operation panel as "Menu Panel" based on Table 2. In some embodiments, when the component types of multiple sub-window blocks of an operation panel are different, the processor 140 can determine the panel type of the operation panel according to the component type of one of the multiple sub-window blocks of the operation panel. Taking the upper operation panel of FIG. 9 as an example, assuming that the component type of the sub-window block Z2 of the upper operation panel is "Group", the processor 140 can determine the panel type of the upper operation panel as "Menu Panel" based on Table 2. In some embodiments, when the component types of a plurality of sub-window blocks of an operation panel are mostly the same, the processor 140 may determine the panel type of the operation panel according to the same component types of the majority of sub-window blocks. Taking the upper operation panel of FIG. 9 as an example, assuming that the component types of the sub-window blocks Z1 and Z2 of the upper operation panel are "Group" but the component type of the sub-window block Z3 is "Document", the processor 140 may determine that the panel type of the upper operation panel is "Menu Panel".

於一些實施例中,處理器140可根據這些操作面板的面板型態查找一查找表而決定視窗的分類結果。當這些操作面板的面板型態不符合上述查找表所記錄的面板佈局,處理器140可判定這些元件型態不符合特定條件。舉例而言,表3為上述查找表的一個範例。若處理器140判斷某一視窗的多個操作面板的面板型態不符合表3所記錄的面板佈局,處理器140可判定這些元件型態不符合特定條件。 面板布局 視窗佈局類別 中央操作面板 上方操作面板 下方操作面板 左方操作面板 右方操作面板 多控制板 第一視窗佈局類別 主控面板/ 文字編輯器面板 選單面板 清單面板 清單面板 清單面板 多媒體撥放器 第一視窗佈局類別 主控面板/ 清單面板 無限制 選單群組相關 清單面板 無限制 視訊會議 第一視窗佈局類別 選單面板 無法偵測 無法偵測 無法偵測 無法偵測 Office文件軟體 第一視窗佈局類別 主控面板/ 文字編輯器面板 選單群組相關 無限制 無限制 無限制 電腦資料夾 第二視窗佈局類別 清單面板 選單面板 無限制 清單面板 無限制 通訊軟體 第二視窗佈局類別 無限制 無限制 文字編輯器面板 清單面板 無限制 小工具(Widget) 第二視窗佈局類別 無面板 無面板 無面板 無面板 無面板 表3 In some embodiments, the processor 140 may search a lookup table according to the panel types of these operation panels to determine the classification result of the window. When the panel types of these operation panels do not conform to the panel layout recorded in the above-mentioned lookup table, the processor 140 may determine that these component types do not conform to the specific conditions. For example, Table 3 is an example of the above-mentioned lookup table. If the processor 140 determines that the panel types of multiple operation panels of a certain window do not conform to the panel layout recorded in Table 3, the processor 140 may determine that these component types do not conform to the specific conditions. Panel Layout Window layout class Central operating panel Upper operation panel Lower operation panel Left operation panel Right operation panel Multi-control panel First window layout class Main Control Panel/Text Editor Panel Menu Panel List Panel List Panel List Panel Multimedia player First window layout class Main Dashboard/List Panel Unlimited Menu Group Related List Panel Unlimited Video Conferencing First window layout class Menu Panel Unable to detect Unable to detect Unable to detect Unable to detect Office document software First window layout class Main Control Panel/Text Editor Panel Menu Group Related Unlimited Unlimited Unlimited Computer folder Second window layout class List Panel Menu Panel Unlimited List Panel Unlimited Communication software Second window layout class Unlimited Unlimited Text Editor Panel List Panel Unlimited Widget Second window layout class No panel No panel No panel No panel No panel Table 3

若步驟S716判斷為是,於步驟S718,處理器140根據多個子視窗區塊的多個元件型態,決定視窗分類為第一視窗佈局類別或第二視窗佈局類別。如上表3所示,根據多個操作面板的面板型態,處理器140可透過查表來決定視窗分類為第一視窗佈局類別或第二視窗佈局類別。舉例而言,當處理器140判定多個操作面板的面板型態符合表3中的面板佈局「Office文件軟體」,則處理器140可將該視窗分類為第一視窗佈局類別。If the judgment in step S716 is yes, in step S718, the processor 140 determines whether the window is classified into the first window layout category or the second window layout category according to the multiple component types of the multiple sub-window blocks. As shown in Table 3 above, according to the panel types of the multiple operation panels, the processor 140 can determine whether the window is classified into the first window layout category or the second window layout category by looking up a table. For example, when the processor 140 determines that the panel types of the multiple operation panels meet the panel layout "Office document software" in Table 3, the processor 140 can classify the window into the first window layout category.

若步驟S716判斷為否,於步驟S720,處理器140將視窗的視窗畫面輸入至一機器學習模型,而獲取模型分類結果。於步驟S722,根據模型分類結果,處理器140決定視窗分類為第一視窗佈局類別或第二視窗佈局類別。If the determination in step S716 is no, in step S720, the processor 140 inputs the window image of the window into a machine learning model to obtain a model classification result. In step S722, the processor 140 determines whether the window is classified into the first window layout category or the second window layout category according to the model classification result.

圖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 processor 140 may capture a window screen WMG1 of a window and input the window screen WMG1 into a trained machine learning model M1. The machine learning model M1 is a trained classification model, such as a convolutional neural network model. The processor 140 may obtain a model classification result R1 based on the output of the machine learning model M1. For example, the machine learning model M1 may classify the window screen WMG1 into one of a plurality of preset model categories, such as one of a plurality of game categories or one of a plurality of web page modes. The processor 140 can use the model classification result R1 to look up the lookup table LT1 to determine the window layout category WC1 of the window. The window layout category WC1 can be the first window layout category or the second window layout category. Therefore, the processor 140 can adjust the windows of multiple game applications of different game categories to different window sizes.

於一些實施例中,處理器140可在應用程式執行一預設時間後,擷取視窗的多張目標視窗畫面。上述預設時間可依據實際應用而設置,本發明對此不限制。透過等待預設時間後才擷取目標視窗畫面,可避免開啟應用程式時的動畫將視窗分類錯誤的情況。處理器140可以一取樣週期擷取視窗的多張目標視窗畫,例如每隔p秒擷取一張目標視窗畫。處理器140將多張目標視窗畫面分別輸入至機器學習模型,而獲取各張目標視窗畫面的多個預設模型類別的多個分類信心值。處理器140根據各張目標視窗畫面的多個預設模型類別的多個分類信心值的統計結果,決定模型分類結果。In some embodiments, the processor 140 may capture multiple target window images of the window after the application has been running for a preset time. The above-mentioned preset time can be set according to the actual application, and the present invention is not limited to this. By waiting for the preset time before capturing the target window image, it is possible to avoid the situation where the animation when the application is opened misclassifies the window. The processor 140 can capture multiple target window images of the window in a sampling cycle, for example, capturing a target window image every p seconds. The processor 140 inputs the multiple target window images into the machine learning model respectively, and obtains multiple classification confidence values of multiple preset model categories for each target window image. The processor 140 determines the model classification result according to the statistical results of multiple classification confidence values of multiple default model categories of each target window image.

舉例而言,圖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 processor 140 can perform weighted statistical processing on the multiple classification confidence values of the multiple target window images to obtain multiple fused classification confidence values C3 for the multiple default model categories. For example, as shown in FIG11 , the processor 140 can perform weighted operations on the "classification confidence value 1-1" and the "classification confidence value 2-1" to generate the "fused classification confidence value 1" for "category 1". By comparing multiple fused classification confidence values, the processor 140 can determine that the model classification result R1 is the default model category corresponding to the highest fused classification confidence value.

例如,處理器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 processor 140 may calculate multiple fusion classification confidence values of multiple default model categories according to the following formula (4). Formula (4) Wherein, Cs is the fusion classification confidence value of a certain default model category; Cns is the classification confidence value of the default model category of the nth target window screen; N is the number of target window screens; the target window screens after the Rth target window screen can be given a standard weight of "1"; the target window screens before the Rth target window screen can be given a weight of "n/R". In other words, a lower weight "n/R" is given to the 1st target window screen to the R-1th target window screen, and a standard weight of "1" is given to the target window screens from the Rth target window screen to the Nth target window screen. For example, the processor 140 may capture 10 target window images (N=10), and the processor 140 may set the weights of the 1st to 5th target window images to 1/6, 2/6, ..., 5/6 respectively, and the weights of the 6th to 10th target window images are all 1 (R=6).

綜上所述,於本發明實施例中,可根據應用程式資訊與視窗資訊來將視窗分類為多個視窗佈局類別其中一者,並根據分類結果對視窗尺寸進行自動化調整。藉此,在用戶無須手動調整視窗尺寸的情況下,可讓用戶輕鬆享受大尺寸顯示螢幕的好處,並提昇操作便利性與作業效率。此外,本發明實施例可針對不同應用程式應用不同分類規則,而使視窗尺寸調整結果更符合用戶需求。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: processor 210, 810, 910: window W1, W2, W3: window width θymax: maximum deflection angle θymin: minimum deflection angle θpmax: maximum tilt angle θpmin: minimum tilt angle θy: head deflection angle θp: head tilt angle F2: line of sight point TB1, TB2, TB3: text block IB1, IB2: image block Z1~Z9: sub-window block WMG1: window screen WMG2, WMG3: target window screen M1: Machine learning model R1: Model classification result LT1: Lookup table WC1: Window layout category C1, C2: Classification confidence value C3: Fusion classification confidence value S310~S340, S341~S343, S610~S652, S702~S722: Steps

圖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)

一種視窗排版方法,適用於包括顯示器的電子裝置,包括:透過所述顯示器顯示一應用程式的一視窗;獲取所述視窗的視窗資訊;根據所述視窗的所述視窗資訊與所述應用程式的應用程式資訊,將所述視窗分類為多個視窗佈局類別其中一者;以及根據所述多個視窗佈局類別其中一者的視窗尺寸準則,調整所述視窗的視窗尺寸,其中根據所述視窗的所述視窗資訊與所述應用程式的所述應用程式資訊,將所述視窗分類為所述多個視窗佈局類別其中一者的步驟包括:反應於所述應用程式為瀏覽器程式,擷取所述視窗中的至少一圖片區塊與至少一文字區塊;以及根據所述至少一圖片區塊的數量、所述至少一圖片區塊的區塊範圍、所述至少一文字區塊的區塊範圍,決定所述視窗分類為第一視窗佈局類別或第二視窗佈局類別。 A window layout method, applicable to an electronic device including a display, comprises: displaying a window of an application program through the 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 program; and adjusting the window size of the window according to a window size criterion of one of the plurality of window layout categories, wherein the window size of the window is adjusted according to the window information of the window. The step of classifying the window into one of the plurality of window layout categories based on the application information of the application includes: capturing at least one image block and at least one text block in the window in response to the application being a browser program; and determining whether the window is classified into the first window layout category or the second window layout category according to the number 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. 如請求項1所述的視窗排版方法,其中根據所述視窗的所述視窗資訊與所述應用程式的所述應用程式資訊,將所述視窗分類為所述多個視窗佈局類別其中一者的步驟包括:根據所述視窗的活動視窗時間、互動事件次數與視線駐留時間,判斷所述視窗是否符合常用條件;以及反應於所述視窗符合所述常用條件,根據所述視窗資訊與所述 應用程式資訊,將所述視窗分類為所述多個視窗佈局類別其中一者。 The window layout method as described in claim 1, wherein the step of classifying the window into one of the plurality of window layout categories according to the window information of the window and the application information of the application comprises: judging whether the window meets common conditions according to the active window time, the number of interactive events and the eye retention time of the window; and in response to the window meeting the common conditions, classifying the window into one of the plurality of window layout categories according to the window information and the application information. 如請求項2所述的視窗排版方法,其中根據所述視窗的所述活動視窗時間、所述互動事件次數與所述視線駐留時間,判斷所述視窗是否符合所述常用條件的步驟包括:根據所述視窗的所述活動視窗時間、所述互動事件次數與所述視線駐留時間,計算所述視窗的一視窗常用分數;根據所述視窗的所述視窗常用分數,對所述視窗與至少一其他視窗進行排序;以及根據所述視窗的排序順序判斷所述視窗是否符合常用條件。 The window layout method as described in claim 2, wherein the step of judging whether the window meets the common condition according to the active window time, the number of interactive events and the sight dwelling time of the window comprises: calculating a window common score of the window according to the active window time, the number of interactive events and the sight dwelling time of the window; sorting the window and at least one other window according to the window common score of the window; and judging whether the window meets the common condition according to the sorting order of the window. 如請求項1所述的視窗排版方法,其中根據所述多個視窗佈局類別其中一者的所述視窗尺寸準則,調整所述視窗的所述視窗尺寸的步驟包括一第一運作、一第二運作及一第三運作中至少一者,其中所述第一運作包括:偵測一用戶的視線;判斷所述視線是否投射於所述視窗上;以及反應於所述視線投射於所述視窗上,根據所述視窗尺寸準則調整所述視窗的所述視窗尺寸;所述第二運作包括:反應於所述多個視窗佈局類別其中一者為第一視窗佈局類別,將所述視窗的視窗尺寸調整為第一預設尺寸;以及所述第三運作包括:反應於所述多個視窗佈局類別其中一者為第二視窗佈局類別,將所述視窗的視窗尺寸調整為第二預設尺寸,並將所述視窗移動至預設顯示位置。 The window layout method of claim 1, wherein 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 comprises at least one of a first operation, a second operation, and a third operation, wherein the first operation comprises: detecting a user's line of sight; determining whether the line of sight is projected on the window; and responding to the line of sight being projected on the window, adjusting the window size according to the window size criteria. The second operation includes: in response to one of the plurality of window layout categories being a first window layout category, adjusting the window size of the window to a first default size; and the third operation includes: in response to one of the plurality of window layout categories being a 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. 如請求項1所述的視窗排版方法,其中根據所述視窗的所述視窗資訊與所述應用程式的所述應用程式資訊,將所述視窗分類為所述多個視窗佈局類別其中一者的步驟包括:判斷所述視窗的所述視窗資訊與所述應用程式的所述應用程式資訊是否符合一資料庫記錄的資料庫數據;以及反應於所述視窗資訊與所述應用程式資訊符合所述資料庫數據,根據所述資料庫數據決定所述視窗分類為第一視窗佈局類別或第二視窗佈局類別。 The window layout method as described in claim 1, wherein the step of classifying the window into one of the plurality of window layout categories according to the window information of the window and the application information of the application includes: determining whether the window information of the window and the application information of the application match database data recorded in a database; and in response to the window information and the application information matching the database data, determining whether the window is classified into the first window layout category or the second window layout category according to the database data. 如請求項5所述的視窗排版方法,其中所述應用程式為瀏覽器應用程式,所述應用程式資訊包括一網頁連結位址。 A window layout method as described in claim 5, wherein the application is a browser application, and the application information includes a web page link address. 如請求項1所述的視窗排版方法,其中根據所述視窗的所述視窗資訊與所述應用程式的所述應用程式資訊,將所述視窗分類為所述多個視窗佈局類別其中一者的步驟包括:反應於所述應用程式並非為瀏覽器程式,將所述視窗劃分為多個子視窗區塊;透過應用程式介面元件擷取所述多個子視窗區塊分別對應的多個元件型態;以及根據所述多個子視窗區塊的所述多個元件型態,決定所述視窗分類為所述第一視窗佈局類別或所述第二視窗佈局類別。 The window layout method as described in claim 1, wherein the step of classifying the window into one of the plurality of window layout categories according to the window information of the window and the application information of the application includes: dividing the window into a plurality of sub-window blocks in response to the fact that the application is not a browser program; 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. 如請求項1所述的視窗排版方法,其中根據所述視窗的所述視窗資訊與所述應用程式的所述應用程式資訊,將所述視窗分類為所述多個視窗佈局類別其中一者的步驟包括:將所述視窗的視窗畫面輸入至一機器學習模型,而獲取模型分 類結果;以及根據所述模型分類結果,決定所述視窗分類為所述第一視窗佈局類別或所述第二視窗佈局類別。 The window layout method as described in claim 1, wherein the step of classifying the window into one of the plurality of window layout categories according to the window information of the window and the application information of the application comprises: inputting the window screen of the window into a machine learning model to obtain a model classification result; and determining, according to the model classification result, whether the window is classified into the first window layout category or the second window layout category. 如請求項8所述的視窗排版方法,其中所述視窗畫面包括多張目標視窗畫面,將所述應用程式資訊與所述視窗的所述視窗畫面輸入至所述機器學習模型,而獲取所述模型分類結果的步驟包括:在所述應用程式執行一預設時間後,擷取所述視窗的多張目標視窗畫面;將所述多張目標視窗畫面分別輸入至所述機器學習模型,而獲取各所述多張目標視窗畫面的多個預設模型類別的多個分類信心值;以及根據各所述多張目標視窗畫面的所述多個預設模型類別的所述多個分類信心值的統計結果,決定所述模型分類結果。 The window layout method as described in claim 8, wherein the window screen includes multiple target window screens, and the application information and the window screen of the window are input into the machine learning model, and the step of obtaining the model classification result includes: after the application is executed for a preset time, capturing multiple target window screens of the window; inputting the multiple target window screens into the machine learning model respectively, and obtaining multiple classification confidence values of multiple preset model categories of each of the multiple target window screens; and determining the model classification result according to the statistical results of the multiple classification confidence values of the multiple preset model categories of each of the multiple target window screens. 一種電子裝置,包括:一顯示器;一儲存裝置;以及一處理器,耦接至所述顯示器與所述儲存裝置,並經配置以:透過所述顯示器顯示一應用程式的一視窗;獲取所述視窗的視窗資訊;根據所述視窗的所述視窗資訊與所述應用程式的應用程式資訊,將所述視窗分類為多個視窗佈局類別其中一者;以及根據所述多個視窗佈局類別其中一者的視窗尺寸準則,調 整所述視窗的視窗尺寸,其中根據所述視窗的所述視窗資訊與所述應用程式的所述應用程式資訊,將所述視窗分類為所述多個視窗佈局類別其中一者的操作包括:反應於所述應用程式為瀏覽器程式,擷取所述視窗中的至少一圖片區塊與至少一文字區塊;以及根據所述至少一圖片區塊的數量、所述至少一圖片區塊的區塊範圍、所述至少一文字區塊的區塊範圍,決定所述視窗分類為第一視窗佈局類別或第二視窗佈局類別。 An electronic device comprises: a display; a storage device; and a processor coupled to the display and the storage device and configured to: display a window of an application through the display; obtain window information of the window; classify 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; and adjust the window size of the window according to a window size criterion of one of the plurality of window layout categories, wherein The operation of classifying the window into one of the plurality of window layout categories according to the window information of the window and the application information of the application includes: capturing at least one image block and at least one text block in the window in response to the application being a browser program; and determining whether the window is classified into the first window layout category or the second window layout category according to the number 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.
TW113102303A 2024-01-19 2024-01-19 Electronic apparatus and windows arrangement method thereof TWI885711B (en)

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)

* Cited by examiner, † Cited by third party
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

Patent Citations (4)

* Cited by examiner, † Cited by third party
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