[go: up one dir, main page]

TWI605378B - Method of recording operations and method of automatically re-executing operations - Google Patents

Method of recording operations and method of automatically re-executing operations Download PDF

Info

Publication number
TWI605378B
TWI605378B TW105140802A TW105140802A TWI605378B TW I605378 B TWI605378 B TW I605378B TW 105140802 A TW105140802 A TW 105140802A TW 105140802 A TW105140802 A TW 105140802A TW I605378 B TWI605378 B TW I605378B
Authority
TW
Taiwan
Prior art keywords
manipulation
component layout
node
event
record
Prior art date
Application number
TW105140802A
Other languages
Chinese (zh)
Other versions
TW201810009A (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 CN201611197685.9A priority Critical patent/CN107632851B/en
Priority to US15/393,002 priority patent/US20180018307A1/en
Application granted granted Critical
Publication of TWI605378B publication Critical patent/TWI605378B/en
Publication of TW201810009A publication Critical patent/TW201810009A/en

Links

Landscapes

  • User Interface Of Digital Computer (AREA)

Description

操控記錄方法及自動執行操控方法Control recording method and automatic execution control method

本揭露是有關於一種操控記錄方法,及一種自動執行操控方法。The disclosure relates to a manipulation recording method and an automatic execution manipulation method.

智慧型手機或平板與無線網路的結合已普遍被使用,許多服務商為方便顧客可透過網路取得服務,各自推出手機平台的相關應用程式(Application)供消費者使用。以金融業為例,各家銀行各自推出手機平台的網路銀行應用程式,使用者對每一銀行的網路銀行設定各自的帳號與密碼,並在使用時輸入身份號、帳號與密碼認證登入後,才可開始執行操作與取得服務,對於擁有多家銀行帳戶的使用者而言,在查詢各銀行的各筆資料,或在不同銀行間確認款項是否成功轉移的情況,使用者必須同時登入不同手機平台的網路銀行應用程式之外,還需執行切換,因此對使用者而言登入與操作流程變得加倍繁瑣與費時。The combination of smart phones or tablets and wireless networks has been widely used. Many service providers have launched applications related to mobile platforms for consumers to use. In the financial industry, for example, each bank launches an online banking application for the mobile platform. Users set their own account and password for each bank's online banking, and enter the identity number, account number and password to log in when using. After that, you can start the operation and obtain the service. For users with multiple bank accounts, users must log in at the same time when checking the information of each bank or confirming the successful transfer of funds between different banks. In addition to the online banking application of different mobile platforms, switching is also required, so the login and operation process becomes more cumbersome and time consuming for the user.

本揭露提供一種操控記錄方法,及一種自動執行操控方法。The present disclosure provides a manipulation recording method and an automatic execution manipulation method.

在一示範的實施例中,依據本揭露係之一種操控記錄方法,其用於一電子裝置。該電子裝置具有經配置以執行輔助功能服務(Accessibility Service)的一輔助功能介面,以及經配置以顯示一操作畫面的一顯示器,該操作畫面具有可供使用者操控的數個使用者介面(User Interface,UI)元件,該些UI元件間構成一樹狀階層關係,該輔助功能介面依據使用者操控的元件發送一操控資訊。所述操控記錄方法包括:擷取該操控資訊;依據該操控資訊及該樹狀階層關係,判斷使用者操控的操控事件、該些UI元件中對應該操控事件的該UI元件,並指派一節點位置符(Node Identifier)對應該操控事件;以及在一操控記錄檔中寫入該操控事件及該節點位置符。In an exemplary embodiment, a method of controlling recording according to the present disclosure is for an electronic device. The electronic device has an auxiliary function interface configured to perform an Accessibility Service, and a display configured to display an operation screen having a plurality of user interfaces (User) Interface, UI) components, the UI elements form a tree-like hierarchical relationship, and the auxiliary function interface sends a manipulation information according to the components operated by the user. The manipulation recording method includes: capturing the manipulation information; determining, according to the manipulation information and the tree hierarchy relationship, a manipulation event manipulated by the user, the UI component corresponding to the manipulation event in the UI elements, and assigning a node The Node Identifier corresponds to the manipulation event; and the manipulation event and the node position character are written in a manipulation log file.

在一示範的實施例中,依據本揭露之一種自動執行操控方法,用於一電子裝置,該電子裝置包括經配置以執行輔助功能服務(Accessibility Service)的一輔助功能介面,以及經配置以顯示一操作畫面的一顯示器,該操作畫面包括經配置以供操控的數個使用者介面(User Interface,UI)元件,該些UI元件間構成一樹狀階層關係。該自動執行操控方法包括:讀取一操控記錄檔,該操控記錄檔包括至少一操控事件、對應於該至少一操控事件的至少一節點位置符,及對應於該至少一操控事件的至少一元件布局記錄;擷取由該輔助功能介面傳送的一元件布局資訊,該元件布局資訊對應於該操作畫面;依據該至少一元件布局記錄與該元件布局資訊,判斷該元件布局記錄是否對應該操作畫面;以及只在該操作畫面與該至少一元件布局記錄對應的情況下,依據該至少一操控事件及該節點位置符傳送一操控執行指令至該輔助功能介面,且以使該輔助功能介面執行該操控執行指令。In an exemplary embodiment, a method of automatically performing a method of operation is provided for an electronic device including an auxiliary function interface configured to perform an Accessibility Service, and configured to display A display screen of an operation screen, the operation screen comprising a plurality of user interface (UI) elements configured to be manipulated, the UI elements forming a tree-like hierarchical relationship. The automatic execution control method includes: reading a manipulation log file, the manipulation log file including at least one manipulation event, at least one node position corresponding to the at least one manipulation event, and at least one component corresponding to the at least one manipulation event Layout record; capturing a component layout information transmitted by the auxiliary function interface, the component layout information corresponding to the operation screen; determining, according to the at least one component layout record and the component layout information, whether the component layout record corresponds to the operation screen And transmitting, in the case of the operation screen corresponding to the at least one component layout record, a manipulation execution instruction to the auxiliary function interface according to the at least one manipulation event and the node position, and causing the auxiliary function interface to execute the Manipulate execution instructions.

在另一示範的實施例中,依據本揭露之一種自動執行操控方法,用於一電子裝置,該電子裝置包括經配置以執行輔助功能服務(Accessibility Service)的一輔助功能介面,以及經配置以顯示一第一操作畫面的一顯示器,該第一操作畫面具有經配置以供操控的至少一第一使用者介面(User Interface,UI)元件。該自動執行操控方法包括:回應於執行該第一UI元件,該電子裝置顯示一第二操作畫面,並且該第二操作畫面具有數個第二UI元件,該些第二UI元件間構成一樹狀階層關係;讀取一操控記錄檔,該操控記錄檔包括至少一操控事件、對應於該至少一操控事件的至少一節點位置符,及對應於該至少一操控事件的至少一元件布局記錄;擷取由該輔助功能介面傳送的一元件布局資訊,該元件布局資訊對應於該第二操作畫面;依據該至少一元件布局記錄與該元件布局資訊,判斷該至少一元件布局記錄是否對應該第二操作畫面;以及只在該第二操作畫面與該至少一元件布局記錄對應的情況下,依據該至少一操控事件及該節點位置符傳送一操控執行指令至該輔助功能介面,以使該輔助功能介面執行該操控執行指令。In another exemplary embodiment, an automated method of controlling a method for an electronic device including an auxiliary function interface configured to perform an Accessibility Service, and configured to A display displaying a first operational screen having at least one first user interface (UI) component configured for manipulation. The automatic execution control method includes: in response to executing the first UI element, the electronic device displays a second operation screen, and the second operation screen has a plurality of second UI elements, and the second UI elements form a tree a hierarchical relationship; reading a manipulation log file including at least one manipulation event, at least one node position corresponding to the at least one manipulation event, and at least one component layout record corresponding to the at least one manipulation event; Taking a component layout information transmitted by the auxiliary function interface, the component layout information corresponding to the second operation screen; determining, according to the at least one component layout record and the component layout information, whether the at least one component layout record corresponds to the second Operating the screen; and transmitting a manipulation execution command to the auxiliary function interface according to the at least one manipulation event and the node position, only if the second operation screen corresponds to the at least one component layout record, to enable the auxiliary function The interface executes the manipulation execution instruction.

基於上述,本揭露實施例提出的操控記錄方法與自動執行操控方法,可記錄在電子裝置上的操控並存為該操控記錄檔,並進一步的可由電子裝置讀取,並依據該操控記錄檔自動執行操控,因此可協助執行複雜的操控,以提供便利省時的操控。Based on the above, the manipulation recording method and the automatic execution manipulation method proposed by the embodiment of the present disclosure can record and control the operation on the electronic device as the manipulation record file, and further can be read by the electronic device, and automatically executed according to the manipulation record file. Manipulation, thus assisting in the execution of complex controls to provide convenient and time-saving manipulation.

為讓本揭露的上述特徵和優點能更明顯易懂,下文特舉實施例,並配合所附圖式作詳細說明如下。The above described features and advantages of the present invention will be more apparent from the following description.

在本案說明書全文(包括申請專利範圍)中所使用的「耦接」一詞可指任何直接或間接的連接手段。舉例而言,若文中描述處理器耦接於儲存器,則應該被解釋成該處理器可以直接連接於該儲存器,或者該處理器可以透過其他裝置或某種連接手段而間接地連接至該儲存器。另外,凡可能之處,在圖式及實施方式中使用相同標號的元件/構件/步驟代表相同或類似部分。不同實施例中使用相同標號或使用相同用語的元件/構件/步驟可以相互參照相關說明。The term "coupled" as used throughout the specification (including the scope of the patent application) may be used in any direct or indirect connection. For example, if the processor is described as being coupled to a memory, it should be interpreted that the processor can be directly connected to the memory, or the processor can be indirectly connected to the device through other means or a connection means. Storage. In addition, wherever possible, the elements and/ Elements/components/steps that use the same reference numbers or use the same terms in different embodiments may refer to the related description.

圖1、2是依據本揭露之一實施例,分別繪示之可執行一操控記錄方法之一電子裝置的方塊圖及其顯示畫面的示意圖。所述操控記錄方法適用於該電子裝置1,並且該電子裝置1包括一顯示器11、一儲存器12、可收發無線訊號的一天線14,及耦接該觸控顯示器11、該儲存器12與該天線14的一運算處理器13,所述運算處理器13具有可執行輔助功能服務(Accessibility Service)的一輔助功能介面131,並驅動該觸控顯示器11顯示一操作畫面20。在本實施例中,該顯示器11為操控顯示器。1 and 2 are block diagrams showing an electronic device capable of performing a manipulation recording method and a display screen thereof, respectively, according to an embodiment of the present disclosure. The control recording method is applicable to the electronic device 1 , and the electronic device 1 includes a display 11 , a storage device 12 , an antenna 14 capable of transmitting and receiving wireless signals, and the touch display 11 , the storage device 12 and the An operation processor 13 of the antenna 14 has an auxiliary function interface 131 that can execute an accessibility service and drives the touch display 11 to display an operation screen 20. In the present embodiment, the display 11 is a manipulation display.

再參照圖3,是依據本揭露一實施例之操控記錄方法的一樹狀階層關係之節點樹狀示意圖。所述操作畫面20具有經配置以供使用者操控的數個使用者介面(User Interface,UI)元件23,且該些UI元件23間具有如圖3所示之該樹狀階層關係,各個UI元件23為該樹狀階層關係中的各節點,並且該輔助功能介面131經配置以依據使用者操控的UI元件發送操控資訊。在本實施例中,該電子裝置1是安裝安卓作業系統(Android Operation System)運作,且該輔助功能介面131為安卓輔助功能介面 (Android Accessibility Service Interface)。Referring again to FIG. 3, it is a node tree diagram of a tree hierarchy relationship of the manipulation recording method according to an embodiment of the present disclosure. The operation screen 20 has a plurality of user interface (UI) elements 23 configured for user manipulation, and the UI elements 23 have the tree hierarchy relationship as shown in FIG. Element 23 is each node in the tree hierarchy relationship, and the auxiliary function interface 131 is configured to send manipulation information in accordance with UI elements manipulated by the user. In this embodiment, the electronic device 1 is installed with an Android Operation System, and the auxiliary function interface 131 is an Android Accessibility Service Interface.

在安卓作業系統中,畫面配置(frame layout)是由各種顯示物件(item)建構,所述顯示物件可以是影像(Imageview)或文字(Textview)等,且共同構成階層關係;本實施例的UI元件23即為安卓作業系統的顯示物件。In the Android operating system, a frame layout is constructed by various display objects, which may be an image (Imageview) or a text (Textview), and collectively form a hierarchical relationship; the UI of the embodiment Element 23 is the display object of the Android operating system.

進一步參照圖4,是依據本揭露一實施例之操控記錄方法的流程圖。所述操控記錄方法包括的步驟說明如下:執行步驟S31,使用者操控該些UI元件23中之一,在本實施中使用者點擊顯示「BBB」的該UI元件(圖中以23’表示),然而使用者的操控不以點擊為限,除點擊外亦可以是系統所允許之其他操控動作,也可以是鍵入資料的操控。Further referring to FIG. 4, it is a flowchart of a method for controlling recording according to an embodiment of the present disclosure. The steps included in the manipulation recording method are as follows: Step S31 is executed, and the user controls one of the UI elements 23. In this embodiment, the user clicks on the UI component that displays "BBB" (indicated by 23' in the figure) However, the user's control is not limited to clicks. In addition to clicking, it can be other manipulation actions allowed by the system, or it can be the manipulation of typing data.

於實施例中,在步驟S31之後執行步驟S32,該輔助功能介面131依據使用者的操控及點擊的該UI元件23’發送操控資訊,其中該操控資訊包括對應於該操作畫面20的一元件布局資訊(Frame-layout)、對應於使用者操控的一操控事件(Event),及對應於該操控事件所執行的UI元件23的一雜湊碼(Hash-code)。In the embodiment, step S32 is performed after step S31, and the auxiliary function interface 131 sends the manipulation information according to the user's manipulation and clicking on the UI element 23', wherein the manipulation information includes a component layout corresponding to the operation screen 20. A frame-layout, a manipulation event corresponding to the user's manipulation, and a hash code corresponding to the UI element 23 executed by the manipulation event.

所述元件布局資訊是描述該操作畫面20的資訊,也就是該操作畫面20中所有UI元件23的資訊;該元件布局資訊包括該操作畫面20中每一UI元件23的元件類型、該操作畫面20中每一UI元件23在該樹狀階層關係中具有的子節點數,及分別對應該操作畫面20中每一UI元件23的數個雜湊碼(Hash-code)。不同的操作畫面可以包括不同的元件布局資訊。The component layout information is information describing the operation screen 20, that is, information of all the UI elements 23 in the operation screen 20; the component layout information includes the component type of each UI element 23 in the operation screen 20, and the operation screen. Each of the UI elements 23 in the 20 has a number of child nodes in the tree hierarchy relationship, and a plurality of hash codes corresponding to each UI element 23 in the operation screen 20, respectively. Different operation screens can include different component layout information.

在Android作業系統中,該輔助功能介面傳送該元件布局資訊時,是依據其中每一UI元件的節點位置順序傳送,因此可依據子節點數與接收的順序取得該樹狀階層關係。本實施例所述元件類型為Android作業系統中定義的FrameLayout、LinearLayout、TextView或ImageView,其中FrameLayout為根節點,LinearLayout為具有子節點的節點,以圖3中根節點下的左側節點為例,其對應的元件類型為LinearLayout,且在該樹狀階層關係中,其具有5個子節點繼承在其階層,因此對應的子節點數為5,在圖3中標示為「Child=5」。In the Android operating system, when the auxiliary function interface transmits the component layout information, it is transmitted according to the node position of each UI element, so the tree hierarchical relationship can be obtained according to the number of child nodes and the order of receiving. The component type described in this embodiment is a FrameLayout, a LinearLayout, a TextView, or an ImageView defined in the Android operating system, wherein the FrameLayout is a root node, and the LinearLayout is a node having a child node, and the left node under the root node in FIG. 3 is taken as an example, and the corresponding The component type is LinearLayout, and in the tree hierarchy relationship, it has 5 child nodes inherited in its hierarchy, so the corresponding number of child nodes is 5, which is marked as "Child=5" in FIG.

所述操控資訊中,該操控事件是使用者操作動作的資訊,在Android作業系統上運作時,本實施例的該操控事件可以是點擊(TYPE_VIEW_CLICKED)、聚焦(TYPE_VIEW_FOCUSED)或長點擊(TYPE_VIEW_LONG_CLICKED)等,且本揭露不以此為限。以使用者執行點擊顯示為「BBB」的該UI元件23’的情況為例,所述輔助功能介面131發送的該操控事件為點擊(TYPE_VIEW_CLICKED),並且發送對應於該使用者點擊的該UI元件23’的雜湊碼為「562471」。In the manipulation information, the manipulation event is information of a user operation action. When operating on the Android operating system, the manipulation event in this embodiment may be a click (TYPE_VIEW_CLICKED), a focus (TYPE_VIEW_FOCUSED), or a long click (TYPE_VIEW_LONG_CLICKED). And the disclosure is not limited to this. For example, when the user performs the click on the UI element 23 ′ displayed as “BBB”, the manipulation event sent by the auxiliary function interface 131 is a click (TYPE_VIEW_CLICKED), and the UI element corresponding to the user click is sent. The hash code for 23' is "562471".

在該輔助功能介面131發送該操控資訊後,執行步驟S33,擷取由該輔助功能介面131發送的該操控資訊,並暫存該操控資訊的該元件布局資訊、該操控事件,及對應此操控事件的一節點位置符(Node Identifier)。After the operation information is sent by the auxiliary function interface 131, step S33 is executed to retrieve the manipulation information sent by the auxiliary function interface 131, and temporarily store the component layout information of the manipulation information, the manipulation event, and corresponding to the manipulation. The Node Identifier of the event.

在擷取由該輔助功能介面131發送的該元件布局資訊後,執行步驟S34,判斷該操控事件是否為點擊(TYPE_VIEW_CLICKED)、聚焦 (TYPE_VIEW_FOCUSED)或長點擊 (TYPE_VIEW_LONG_CLICKED)。After the component layout information sent by the auxiliary function interface 131 is retrieved, step S34 is performed to determine whether the manipulation event is a click (TYPE_VIEW_CLICKED), a focus (TYPE_VIEW_FOCUSED), or a long click (TYPE_VIEW_LONG_CLICKED).

只在判斷該操控事件為點擊(TYPE_VIEW_CLICKED)、聚焦 (TYPE_VIEW_FOCUSED)或長點擊 (TYPE_VIEW_LONG_CLICKED)的情況下,執行步驟S35,依據該操控資訊及該樹狀階層關係,判斷該些UI元件23中對應該操控事件的該UI元件23’,並指派一節點位置符(Node Identifier)對應該操控事件。In the case that it is determined that the manipulation event is a click (TYPE_VIEW_CLICKED), a focus (TYPE_VIEW_FOCUSED), or a long click (TYPE_VIEW_LONG_CLICKED), step S35 is performed, and according to the manipulation information and the tree hierarchy relationship, it is determined that the UI elements 23 correspond to each other. The UI element 23' of the event is manipulated and a Node Identifier is assigned to correspond to the event.

進一步參照圖5,本實施例的步驟S35的細節步驟如下:執行步驟S351,依據該樹狀階層關係、與該元件布局資訊的每一UI元件23的元件類型執行一位置符演算法,以分別指派該元件布局資訊的每一UI元件23對應的節點位置符。接著執行步驟S352,依據該元件布局資訊的每一UI元件23對應的雜湊碼、該元件布局資訊的每一UI元件23對應的節點位置符,比對對應於該操控事件的雜湊碼與該元件布局資訊的每一UI元件23對應的雜湊碼,判斷該些UI元件23’中對應該操控事件的該UI元件23’,並指派對應該操控事件的該UI元件23’的節點位置符為對應該操控事件的節點位置符。With further reference to FIG. 5, the detailed steps of step S35 of this embodiment are as follows: Step S351 is executed to perform a position function algorithm according to the tree hierarchy relationship and the component type of each UI element 23 of the component layout information, respectively. A node position symbol corresponding to each UI element 23 of the component layout information is assigned. Then, in step S352, the hash code corresponding to the manipulation event and the component are compared according to the hash code corresponding to each UI element 23 of the component layout information and the node position symbol corresponding to each UI component 23 of the component layout information. Corresponding to the hash code corresponding to each UI element 23 of the layout information, determining the UI element 23' of the UI elements 23' corresponding to the manipulation event, and assigning the node position of the UI element 23' corresponding to the manipulation event to be The node position of the event should be manipulated.

在此說明步驟S351中所述的該位置符演算法,參照圖6,其為該位置符演算法之流程圖。該位置符演算法是用以運算出每一UI元件23對應的節點位置符,於一實施例中的步驟如下:執行步驟S41,記錄該UI元件23在該樹狀階層關係中所隸屬的各階層母節點,接著執行步驟S42,記錄該UI元件23在所屬階層中的位置,並執行步驟S43,依據該UI元件23所隸屬的各階層母節點及該UI元件23在所屬階層中的位置指派該節點位置符。該節點位置符為所述各階層母節點與該UI元件23在所屬階層中的位置的集合。Here, the positional algorithm described in step S351 will be described. Referring to FIG. 6, it is a flowchart of the positional algorithm. The positional algorithm is used to calculate the node position corresponding to each UI element 23. The steps in an embodiment are as follows: Step S41 is executed to record the UI elements 23 in the tree hierarchy. The hierarchical parent node, next to step S42, records the location of the UI element 23 in the hierarchy, and performs step S43, according to the hierarchical parent node to which the UI element 23 belongs and the location assignment of the UI element 23 in the hierarchy. The node position character. The node location symbol is a set of locations of the hierarchical parent nodes and the UI elements 23 in their respective levels.

為更清楚解釋該位置符演算法,在此以UI元件23’為例說明:該UI元件23’位於其所屬階層的第二個位置,也就是LinearLayout下的第二個位置,並指派「1」為表示節點位置的代碼,此外,該UI元件23’所隸屬的母節點為FrameLayout、LinearLayout,其中該UI元件23’的母節點FrameLayout為根階層指派空集合,其另一母節點LinearLayout為繼承在根階層之下的第一個位置並指派「0」為位置代碼。指派該UI元件23’的節點位置符為母節點的位置代碼「0」與該UI元件23’的節點位置代碼「1」之集合,以集合形式標示該節點位置符為[0, 1]。To explain the position algorithm more clearly, the UI element 23' is taken as an example here: the UI element 23' is located at the second position of its hierarchy, that is, the second position under the LinearLayout, and is assigned "1". In addition, the parent node to which the UI element 23' belongs is a FrameLayout and a LinearLayout, wherein the parent node FrameLayout of the UI element 23' assigns an empty set to the root level, and the other parent node LinearLayout is an inheritance. The first position below the root level is assigned "0" as the location code. The node position symbol assigned to the UI element 23' is a set of the position code "0" of the parent node and the node position code "1" of the UI element 23', and the node position symbol is indicated as [0, 1] in a collective form.

表示節點位置的代碼其編碼是由「0」起算,因此第二個位置即以「1」表示且第一個位置即以「0」表示。該節點位置符中不同位置的元素表示不同階層,最後一個元素表示所屬階層的位置,而依序往前為其前一階層母節點位置。而編碼起算順序或方式本揭露不以此為限,可依系統設定或規模調整起算點、增加代碼位數或採用數字以外的符號,例如利用字母順序等來表示,集合中各位置代表的階層亦可依系統設定來調整,例如改以集合中後面位置的元素記錄母節點位置。The code indicating the position of the node is encoded by "0", so the second position is represented by "1" and the first position is represented by "0". The elements in different positions in the node position symbol represent different levels, and the last element represents the position of the class to which it belongs, and sequentially advances to the position of the parent node of the previous level. The coding sequence or method is not limited to this. The starting point can be adjusted according to the system setting or size, the number of code bits can be increased, or the symbols other than numbers can be used. For example, the alphabetical order is used to represent the hierarchy represented by each position in the collection. It can also be adjusted according to the system settings, such as changing the position of the parent node by the element at the back position in the set.

以使用者點擊顯示「BBB」的該UI元件23’的情況為例,本實施例判斷該操控事件為點擊(TYPE_VIEW_CLICKED)後,接收到的對應於該操控事件的雜湊碼「562471」後,在該元件布局資訊的該些雜湊碼中進行比對搜尋,在該元件布局資訊的雜湊碼中同為「562471」者為UI元件23’,因此判斷該UI元件23’對應於該操控事件,也就是使用者的操控為點擊該UI元件23’,並且指派該UI元件23’的節點位置符[0,1]為對應於該操控事件的節點位置符。For example, when the user clicks on the UI element 23 ′ that displays “BBB”, the present embodiment determines that the control event is a click (TYPE_VIEW_CLICKED), and after receiving the hash code “562471” corresponding to the manipulation event, The matching search is performed in the hash codes of the component layout information. In the hash code of the component layout information, the same as "562471" is the UI component 23', so that the UI component 23' is determined to correspond to the manipulation event. That is, the user's manipulation is to click on the UI element 23', and the node position symbol [0, 1] of the UI element 23' is assigned to be the node position symbol corresponding to the manipulation event.

參照圖1、3、4,在執行步驟S35後,判斷是否收到一記錄停止指令,在收到該記錄停止指令的情況下,執行步驟S36,回應於該記錄停止指令,在一操控記錄檔中寫入該操控事件、對應該操控事件的該節點位置符、該元件布局資訊的每一UI元件23對應的節點位置符、在該樹狀階層關係中隸屬於每一UI元件的子節點數、每一UI元件23的元件類型,及該元件布局資訊的每一UI元件23對應的雜湊碼。本實施例的操控記錄檔的形式為script。在執行步驟S35後,若無收到該記錄停止指令,則執行步驟S33。Referring to FIGS. 1, 3, and 4, after step S35 is executed, it is determined whether a record stop command is received. If the record stop command is received, step S36 is executed, in response to the record stop command, in a manipulated log file. Writing the manipulation event, the node position symbol corresponding to the manipulation event, the node position symbol corresponding to each UI element 23 of the component layout information, and the number of child nodes belonging to each UI element in the tree hierarchy relationship The component type of each UI element 23, and the hash code corresponding to each UI element 23 of the component layout information. The form of the manipulation record file of this embodiment is script. After the execution of step S35, if the recording stop command is not received, step S33 is performed.

另一方面,在步驟S34中,若判斷該操控事件並非點擊(TYPE_VIEW_CLICKED)、聚焦 (TYPE_VIEW_FOCUSED)或長點擊 (TYPE_VIEW_LONG_CLICKED)的情況下,則判斷是否收到該記錄停止指令,在未收到該記錄停止指令的情況下,執行步驟S33。在收到該記錄停止指令的情況下,則執行步驟S36。On the other hand, in step S34, if it is determined that the manipulation event is not a click (TYPE_VIEW_CLICKED), a focus (TYPE_VIEW_FOCUSED), or a long click (TYPE_VIEW_LONG_CLICKED), it is determined whether the record stop instruction is received, and the record is not received. In the case of stopping the command, step S33 is performed. When the record stop command is received, step S36 is executed.

本揭露之一實施例的操控記錄檔舉例如下: { "event_type":"TYPE_VIEW_CLICKED", "check_node": [ { "class_name":"android.widget.FrameLayout", "get_node":[], "child_count":2, }, { "class_name":"android.widget.LinearLayout", "get_node":[0], "child_count":5, }, { "class_name":"android.widget.ImageView", "get_node":[0,0], "child_count":0, }, { "class_name":"android.widget.ImageView", "get_node":[0,1], "child_count":0, }, { "class_name":"android.widget.ImageView", "get_node":[0,2], "child_count":0, }, { "class_name":"android.widget.ImageView", "get_node":[0,3], "child_count":0, }, { "class_name":"android.widget.ImageView", "get_node":[0,4], "child_count":0, }, { "timeout":5000 } ], "perform_action": [ { "action":"ACTION_CLICK", "get_node":[0,1], } ] },An example of the manipulation log file of one embodiment of the present disclosure is as follows: { "event_type": "TYPE_VIEW_CLICKED", "check_node": [ { "class_name": "android.widget.FrameLayout", "get_node":[], "child_count" :2, }, { "class_name":"android.widget.LinearLayout", "get_node":[0], "child_count":5, }, { "class_name":"android.widget.ImageView", "get_node" :[0,0], "child_count":0, }, { "class_name":"android.widget.ImageView", "get_node":[0,1], "child_count":0, }, { "class_name":"android.widget.ImageView", "get_node":[0,2], "child_count":0, }, { "class_name":"android.widget.ImageView", "get_node":[0,3], "child_count":0, }, { "class_name":"android.widget.ImageView", "get_node":[0, 4], "child_count": 0, }, { "timeout":5000 } ], "perform_action": [ { "action":"ACTION_CLICK", "get_node":[0,1], } ] },

上述操控記錄檔中以項目check_node記錄該元件布局資訊,在項目check_node中,每一UI元件23的資訊是以項目class_name記錄元件類型、以項目get_node記錄節點位置符、以項目child_count記錄子節點數,以及以項目hash_code記錄雜湊碼。此外,以項目perform_action記錄使用者操控,其中以action記錄操控事件,並以項目get_node記錄對應於該操控事件的UI元件23的節點位置符。In the above control log file, the component layout information is recorded by the item check_node. In the item check_node, the information of each UI element 23 is recorded by the item class_name, the node position of the item get_node, and the number of child nodes recorded by the item child_count. And record the hash code with the project hash_code. In addition, the user manipulation is recorded with the item perform_action, in which the event is manipulated by the action record, and the node position character of the UI element 23 corresponding to the manipulation event is recorded with the item get_node.

參照圖1、7,本揭露自動執行操控方法之一實施例適用於圖1所示之該電子裝置1。所述電子裝置1具有一顯示器11、一儲存器12、可收發無線訊號的一天線14,及耦接該顯示器11、該儲存器12與該天線14的一運算處理器13,所述運算處理器13包括經配置以執行輔助功能服務(Accessibility Service)的一輔助功能介面131,並驅動該觸控顯示器11顯示一操作畫面20。在本實施例中該顯示器11為觸控顯示器。Referring to Figures 1 and 7, an embodiment of the automatic execution control method of the present disclosure is applicable to the electronic device 1 shown in Figure 1. The electronic device 1 has a display 11 , a storage 12 , an antenna 14 capable of transmitting and receiving wireless signals, and an operation processor 13 coupled to the display 11 , the storage 12 and the antenna 14 . The device 13 includes an auxiliary function interface 131 configured to perform an Accessibility Service and drives the touch display 11 to display an operation screen 20. In the embodiment, the display 11 is a touch display.

再參照圖8,是本揭露實施例之自動執行操控方法的一樹狀階層關係之節點樹狀示意圖。該操作畫面20包括經配置以供使用者操控的數個使用者介面(User Interface,UI)元件23,且該些UI元件23構成該樹狀階層關係。本實施例的電子裝置1是安裝安卓作業系統(Android Operation System)運作,且該輔助功能介面131為安卓輔助功能介面 (Android Accessibility Service Interface)。Referring to FIG. 8 again, it is a node tree diagram of a tree hierarchy relationship of the automatic execution control method according to the embodiment of the disclosure. The operation screen 20 includes a plurality of user interface (UI) elements 23 configured for user manipulation, and the UI elements 23 constitute the tree hierarchy relationship. The electronic device 1 of the present embodiment is installed with an Android Operation System (Android Operation System), and the auxiliary function interface 131 is an Android Accessibility Service Interface.

進一步參照圖9A、9B,是依據本揭露一實施例之自動執行操控方法的流程圖。所述自動執行操控方法是依據一操控記錄檔自動執行操控,所述操控記錄檔是經由前一實施例之圖4、5、6所示的操控記錄方法所產生。本揭露一實施例之自動執行操控方法的步驟說明如下。9A and 9B are flowcharts of an automatic execution control method according to an embodiment of the present disclosure. The automatic execution control method automatically performs the manipulation according to a manipulation log file generated by the manipulation recording method shown in FIGS. 4, 5, and 6 of the previous embodiment. The steps of the automatic execution control method of an embodiment of the present disclosure are explained below.

執行步驟S51,讀取該操控記錄檔。該操控記錄檔包括至少一元件布局記錄、至少一操控事件、對應於該至少一操控事件的至少一節點位置符、及對應於該至少一操控事件的至少一元件布局記錄。所述操控記錄檔的該元件布局記錄的內容是一記錄畫面中每一UI元件23的資訊,並所述操控記錄檔的該元件布局記錄包括所述記錄畫面中每一UI元件23對應的元件類型、子節點數、節點位置符,及雜湊碼。所述記錄畫面中每一UI元件23構成一記錄樹狀階層關係,並且該節點位置符為階層母節點資訊及節點位置資訊的集合。Step S51 is executed to read the manipulation log file. The manipulation log file includes at least one component layout record, at least one manipulation event, at least one node position corresponding to the at least one manipulation event, and at least one component layout record corresponding to the at least one manipulation event. The content of the component layout record of the manipulation log file is information of each UI element 23 in the recording screen, and the component layout record of the manipulation log file includes components corresponding to each UI element 23 in the recording screen. Type, number of children, node position, and hash code. Each UI element 23 in the recorded picture constitutes a record tree hierarchical relationship, and the node position symbol is a set of hierarchical parent node information and node position information.

本實施例的操控記錄檔中,所述至少一操控事件包括一第一操控事件,及一第二操控事件,也就是本實施例的操控記錄檔中記錄了兩項操控動作。所述至少一節點位置符包括對應於該第一操控事件的一第一節點位置符,及對應於該第二操控事件的一第二節點位置符。所述至少一元件布局記錄包括對應於該第一操控事件的一第一元件布局記錄,及對應於該第二操控事件的一第二元件布局記錄。所述操控記錄檔是由前一實施例的操控記錄方法所產生,該操控記錄檔的各項資訊已於前一實施例中說明,因此不再進一步詳述。In the manipulation record file of the embodiment, the at least one manipulation event includes a first manipulation event, and a second manipulation event, that is, two manipulation actions are recorded in the manipulation record file of the embodiment. The at least one node position symbol includes a first node position symbol corresponding to the first manipulation event, and a second node position symbol corresponding to the second manipulation event. The at least one component layout record includes a first component layout record corresponding to the first manipulation event, and a second component layout record corresponding to the second manipulation event. The manipulation log file is generated by the manipulation recording method of the previous embodiment, and the information of the manipulation log file has been described in the previous embodiment, and therefore will not be further described in detail.

執行步驟S53,擷取由該輔助功能介面131傳送的一元件布局資訊,且該元件布局資訊是描述該操作畫面20的資訊,也就是該操作畫面20中所有UI元件23的資訊;所述元件布局資訊包括該操作畫面20中每一UI元件23的元件類型、該操作畫面20中每一UI元件23在該樹狀階層關係中具有的子節點數,及分別隸屬該操作畫面20中每一UI元件23的數個雜湊碼(Hash-code)。在本實施例中,所述元件類型為Android作業系統中定義的FrameLayout、LinearLayout、TextView或ImageView,其中FrameLayout為根節點,LinearLayout為具有子節點的節點。Step S53 is performed to retrieve a component layout information transmitted by the auxiliary function interface 131, and the component layout information is information describing the operation screen 20, that is, information of all UI elements 23 in the operation screen 20; The layout information includes the component type of each UI element 23 in the operation screen 20, the number of child nodes each UI element 23 in the operation screen 20 has in the tree hierarchy relationship, and each of the operation screens 20 respectively. A number of hash codes of the UI element 23. In this embodiment, the component type is a FrameLayout, a LinearLayout, a TextView, or an ImageView defined in the Android operating system, wherein the FrameLayout is a root node, and the LinearLayout is a node having a child node.

執行步驟S52,啟動計時並且計算一判斷時間,並執行步驟S54,依據該操控記錄檔的該至少一元件布局記錄,與該輔助功能介面131傳送的該元件布局資訊,判斷該至少一元件布局記錄是否對應於該操作畫面20。先依據至少一該元件布局記錄的每一節點位置符與該樹狀階層關係,判斷該至少一元件布局記錄的每一節點位置符在該樹狀階層關係中指示的節點位置;再依據該至少一元件布局記錄的每一節點位置符對應的節點位置,判斷該至少一元件布局記錄的每一節點位置符各自對應到的該元件佈局資訊的該些UI元件23,再由該至少一元件布局記錄中,取得該元件布局記錄的每一節點位置符對應的該UI元件23的子節點數;接著,比對該至少一元件布局記錄的每一節點位置符對應的子節點數與其在元件布局資訊中對應的UI元件23的子節點數是否相同。Step S52 is executed to start timing and calculate a judgment time, and step S54 is executed to determine the at least one component layout record according to the at least one component layout record of the manipulation log file and the component layout information transmitted by the auxiliary function interface 131. Whether it corresponds to the operation screen 20. Determining, according to the relationship between each node position record of the at least one component layout record and the tree hierarchy, determining a node position indicated by each node position of the at least one component layout record in the tree hierarchy relationship; Determining a node position corresponding to each node position symbol of a component layout record, determining the UI elements 23 corresponding to the component layout information of each node position symbol of the at least one component layout record, and then arranging the at least one component In the record, the number of child nodes of the UI element 23 corresponding to each node position symbol of the component layout record is obtained; then, the number of child nodes corresponding to each node position symbol of the at least one component layout record is compared with the component layout Whether the number of child nodes of the corresponding UI element 23 in the information is the same.

在該至少一元件布局記錄的每一子節點數與其在元件布局資訊中對應的UI元件23的子節點數皆相同時,判斷該至少一元件布局記錄對應於該操作畫面20,並停止計時並歸零。另一方面,在該至少一元件布局記錄的每一子節點數與其在元件布局資訊中對應的UI元件23的子節點數不全部相同時,執行步驟S57,判斷該判斷時間是否大於一時限值時。在該判斷時間大於一時限值時,執行步驟S58,結束該自動執行操控方法。When the number of each child node of the at least one component layout record is the same as the number of child nodes of the UI component 23 corresponding to the component layout information, it is determined that the at least one component layout record corresponds to the operation screen 20, and the timing is stopped and Return to zero. On the other hand, when the number of each child node of the at least one component layout record is not all the same as the number of child nodes of the UI component 23 corresponding to the component layout information, step S57 is performed to determine whether the determination time is greater than a time limit. Time. When the determination time is greater than a time limit, step S58 is executed to end the automatic execution manipulation method.

需要注意的是,本實施例的該操控記錄檔記錄有兩項操控動作,也就是第一操控事件及第二操控事件,此階段是讀取與處理對應於該第一操控事件的該第一元件布局記錄,因此上述步驟S54中提及的該至少一元件布局記錄是第一元件布局記錄。It should be noted that the manipulation record file of the embodiment records two manipulation actions, that is, a first manipulation event and a second manipulation event, and the phase is reading and processing the first corresponding to the first manipulation event. The component layout record, so the at least one component layout record mentioned in the above step S54 is the first component layout record.

在該至少一元件布局記錄的每一子節點數與其在元件布局資訊中對應的UI元件23的子節點數不相同,且該判斷時間不大於該時限值時,執行步驟S59,執行一移動畫面指令(例如指令ACTION_SCROLL_BACKWARD)移動該操作畫面20,並再次執行步驟S53擷取由該輔助功能介面131傳送的該元件布局資訊,及步驟S54依據該至少一元件布局記錄與該元件布局資訊,以判斷該元件布局記錄是否對應於該操作畫面20。在執行該移動畫面指令後該操作畫面20隨之發生變化,例如移動操作畫面20的範圍後,會有出現原超出顯示畫面的UI元件23的情況,該輔助功能介面131依據變化後的操作畫面20發送對應的元件布局資訊,也就是該元件布局資訊可能因而涵括不同的UI元件23的資訊。When the number of the child nodes of the at least one component layout record is different from the number of the child nodes of the UI component 23 corresponding to the component layout information, and the determination time is not greater than the time limit, step S59 is performed to perform a movement. The screen instruction (for example, the instruction ACTION_SCROLL_BACKWARD) moves the operation screen 20, and performs step S53 to retrieve the component layout information transmitted by the auxiliary function interface 131, and step S54 records the component layout information according to the at least one component layout. It is judged whether or not the component layout record corresponds to the operation screen 20. After the execution of the moving screen command, the operation screen 20 changes accordingly. For example, after the range of the operation screen 20 is moved, the UI element 23 that originally exceeds the display screen may appear. The auxiliary function interface 131 is based on the changed operation screen. 20 sends the corresponding component layout information, that is, the component layout information may thus include information of different UI elements 23.

執行步驟S55,只在該操作畫面20與該元件布局記錄對應的情況下,依據該操控事件及該節點位置符傳送一操控執行指令至該輔助功能介面131,且該輔助功能介面131執行該操控執行指令。Step S55 is executed, and only when the operation screen 20 corresponds to the component layout record, a manipulation execution instruction is transmitted to the auxiliary function interface 131 according to the manipulation event and the node position symbol, and the auxiliary function interface 131 performs the manipulation. Execute the instruction.

在判斷該操作畫面20與該元件布局記錄相符後,執行步驟S55,停止計時,並先讀取該操控記錄檔的該至少一操控事件與該至少一節點位置符,再依據該元件布局資訊將該至少一節點位置符轉換為對應的UI元件23。本實施例的該操控記錄檔記錄有兩項操控動作,也就是該第一操控事件及該第二操控事件,此階段是讀取與處理對應於該第一操控事件的該第一節點位置符,因此上述S55提及的該至少一節點位置符是第一節點位置符。After determining that the operation screen 20 matches the component layout record, step S55 is executed to stop timing, and the at least one manipulation event of the manipulation log file and the at least one node position symbol are first read, and then according to the component layout information. The at least one node position symbol is converted to a corresponding UI element 23. The control record file of this embodiment records two manipulation actions, that is, the first manipulation event and the second manipulation event, and the stage is to read and process the first node position symbol corresponding to the first manipulation event. Therefore, the at least one node position symbol mentioned in the above S55 is the first node position symbol.

以標示為[0,1]的該第一節點位置符為例說明,該第一節點位置符[0,1]指示的UI元件23為繼承在第二階層的第一個節點之下的第二個節點,接著對照該元件布局資訊,取得對應該第一操控事件的UI元件23。Taking the first node position symbol labeled [0, 1] as an example, the UI element 23 indicated by the first node position symbol [0, 1] is inherited from the first node of the second level. Two nodes, followed by the component layout information, obtain the UI element 23 corresponding to the first manipulation event.

接著,依據該第一操控事件及對應於該第一節點位置符的UI元件23產生並傳送一第一操控執行指令至該輔助功能介面131,該輔助功能介面131進一步執行該第一操控執行指令。Then, a first manipulation execution instruction is generated and transmitted to the auxiliary function interface 131 according to the first manipulation event and the UI element 23 corresponding to the first node position, and the auxiliary function interface 131 further executes the first manipulation execution instruction. .

在對應該第一操控事件的第一操控執行指令被執行後,接著執行步驟S56,判斷該操控記錄檔是否存在未被讀取的第二操控事件,並在判斷存在未被讀取的該第二操控事件時,讀取該第二操控事件、該第二節點位置符及該第二元件布局記錄。再依據該元件布局資訊將該第二節點位置符轉換為對應的UI元件23,並依據該第二操控事件及對應於該第二節點位置符的UI元件23,產生並傳送一第二操控執行指令至該輔助功能介面131。該輔助功能介面131進一步執行該第二操控執行指令。本實施例的該操控記錄檔記錄有兩項操控動作,也就是該第一操控事件及該第二操控事件,此階段是讀取與處理對應於該第二操控事件的該第二節點位置符。After the first manipulation execution instruction corresponding to the first manipulation event is executed, proceeding to step S56, determining whether the manipulation log file has a second manipulation event that is not read, and determining that the first is not read. When the event is controlled, the second manipulation event, the second node position symbol, and the second component layout record are read. And converting the second node position symbol to the corresponding UI element 23 according to the component layout information, and generating and transmitting a second manipulation execution according to the second manipulation event and the UI element 23 corresponding to the second node position symbol. The instruction is to the auxiliary function interface 131. The auxiliary function interface 131 further executes the second manipulation execution instruction. The manipulation record file of the embodiment records two manipulation actions, that is, the first manipulation event and the second manipulation event, and the phase is reading and processing the second node position symbol corresponding to the second manipulation event. .

判斷該第二節點位置符對應的UI元件23的運算,與前述該第一節點位置符對應至UI元件23的方法相同,因此不再重複說明。由於該操控記錄檔中可能記錄了多筆操控事件,因此步驟S56是用以逐一讀取與執行各筆操控事件,同時確認是否需要執行下一筆操控事件。The operation of judging the UI element 23 corresponding to the second node position is the same as the method of the first node position corresponding to the UI element 23, and therefore the description will not be repeated. Since a plurality of manipulation events may be recorded in the manipulation log, step S56 is for reading and executing each manipulation event one by one, and confirming whether the next manipulation event needs to be executed.

另一方面,在判斷不存在未被讀取的該第二操控事件時,執行步驟S58,結束該自動執行操控方法。On the other hand, when it is judged that there is no second manipulation event that has not been read, step S58 is executed to end the automatic execution manipulation method.

本實施例的操控記錄檔舉例如下,由於程式碼冗長因此僅保留與本實施例執行時相關者: { "event_type":"TYPE_VIEW_CLICKED", "check_node": [ { "class_name":"android.widget.FrameLayout", "get_node":[], "child_count":2, }, { "class_name":"android.widget.LinearLayout", "get_node":[0], "child_count":5, }, ..... { "class_name":"android.widget.ImageView", "get_node":[0,1], "child_count":0, }, ..... { "timeout":5000 } ], "perform_action": [ { "action":"ACTION_CLICK", "get_node":[0,2], } ] }, { "event_type":"TYPE_VIEW_FOCUSED", "check_node": [ { "class_name":"android.widget.FrameLayout", "get_node":[], "child_count":2, }, { "class_name":"android.widget.LinearLayout", "get_node":[0], "child_count":5, }, …… { "class_name":"android.widget.ImageView", "get_node":[0,2], "child_count":0, }, …… { "timeout":5000 } ], "perform_action": [ { "action":"ACTION_FOCUSED", "get_node":[0,2], } ] }The example of the manipulation log file of this embodiment is as follows. Since the code is verbose, only the one associated with the execution of this embodiment is retained: { "event_type": "TYPE_VIEW_CLICKED", "check_node": [ { "class_name":"android.widget. FrameLayout", "get_node":[], "child_count":2, }, { "class_name":"android.widget.LinearLayout", "get_node":[0], "child_count":5, }, ... .. { "class_name":"android.widget.ImageView", "get_node":[0,1], "child_count":0, }, ..... { "timeout":5000 } ], "perform_action": [ { "action":"ACTION_CLICK", "get_node":[0,2], } ] }, { "event_type":"TYPE_VIEW_FOCUSED", "check_node": [ { "class_name":"android.widget.FrameLayout", "get_node":[], "child_count":2, }, { "class_name":"android.widget.LinearLayout", "get_node":[0], "child_count": 5, }, ... { "class_name":"android.widget.ImageView", "get_node":[0,2], "child_count":0, }, ...... { "timeout":5000 } ], "perform_action": [ { "action":"ACTION_FOCUSED", "get_node":[0,2], } ] }

上述操控記錄檔中,兩個"check_node"的段落分別為第一元件布局記錄與第二元件布局記錄,兩個"perform_action"的段落中,則以"action"記錄操控事件及"get_node"記錄節點指示符。In the above control log file, the two "check_node" paragraphs are the first component layout record and the second component layout record respectively, and in the two "perform_action" paragraphs, the "action" record manipulation event and the "get_node" record node are recorded. indicator.

參照圖1、10,本揭露自動執行操控方法之一實施例適用於圖1所示之電子裝置1。所述電子裝置1具有一顯示器11、一儲存器12、可收發無線訊號的天線14,及耦接該觸控顯示器11、該儲存器12與該天線14的一運算處理器13。本實施例的顯示器11為觸控顯示器。Referring to Figures 1 and 10, an embodiment of the automatic execution control method of the present disclosure is applicable to the electronic device 1 shown in Figure 1. The electronic device 1 has a display 11 , a storage 12 , an antenna 14 capable of transmitting and receiving wireless signals, and an operation processor 13 coupled to the touch display 11 , the storage 12 , and the antenna 14 . The display 11 of this embodiment is a touch display.

所述運算處理器13包括經配置以執行輔助功能服務(Accessibility Service)的一輔助功能介面131,並驅動該觸控顯示器11顯示一第一操作畫面21。該第一操作畫面21包括經配置以供使用者操控的數個第一使用者介面(User Interface,UI)元件231。本實施例的電子裝置1是安裝安卓作業系統(Android Operation System)運作,且該輔助功能介面131為安卓輔助功能介面(Android Accessibility Service Interface)。The operation processor 13 includes an auxiliary function interface 131 configured to execute an Accessibility Service and drives the touch display 11 to display a first operation screen 21. The first operational screen 21 includes a plurality of first user interface (UI) elements 231 that are configured for manipulation by a user. The electronic device 1 of the present embodiment is operated by installing an Android operation system (Android Operation System), and the auxiliary function interface 131 is an Android Accessibility Service Interface.

圖11是依據本揭露之一實施例,繪示該電子裝置1顯示一第二操作畫面22的示意圖。本實施例的自動執行操控方法與圖10A、10B所示的前一實施例類似,皆是依據一操控記錄檔自動執行操控,而本實施例與前一實施例的主要不同處在於:本實施例的運作是經由該第一操作畫面21呼叫圖13所示的該第二操作畫面22後,再執行如圖9A、9B所示的前一實施例中的步驟,與前一實施例相同地本實施例的該操控記錄檔也是由圖4、5、6所示的操控記錄方法所產生。FIG. 11 is a schematic diagram showing the display of a second operation screen 22 by the electronic device 1 according to an embodiment of the disclosure. The automatic execution control method of the present embodiment is similar to the previous embodiment shown in FIGS. 10A and 10B, and the control is automatically performed according to a control record file. The main difference between this embodiment and the previous embodiment is that the present embodiment The operation of the example is to call the second operation screen 22 shown in FIG. 13 via the first operation screen 21, and then perform the steps in the previous embodiment as shown in FIGS. 9A and 9B, as in the previous embodiment. The manipulation log file of this embodiment is also produced by the manipulation recording method shown in Figs. 4, 5, and 6.

進一步參照圖12、13A、13B,是依據本揭露自動執行操控方法之一實施例的流程圖,及一樹狀階層關係之節點樹狀示意圖。本實施例的自動執行操控方法的步驟說明如下:執行步驟S50,回應於使用者操控該第一UI元件231’,該電子裝置1顯示該第二操作畫面22,其中該第二操作畫面22具有數個第二UI元件232,且該些第二UI元件232間構成該樹狀階層關係。12, 13A, and 13B are flowcharts of an embodiment of an automatic execution control method according to the present disclosure, and a node tree diagram of a tree hierarchy relationship. The steps of the automatic execution control method of the embodiment are as follows: Step S50 is executed, in response to the user manipulating the first UI element 231 ′, the electronic device 1 displays the second operation screen 22, wherein the second operation screen 22 has A plurality of second UI elements 232, and the second UI elements 232 form the tree hierarchy relationship.

執行步驟S51,讀取該操控記錄檔,該操控記錄檔包括至少一元件布局記錄、至少一操控事件、對應於該至少一操控事件的至少一節點位置符,及對應於該至少一操控事件的至少一元件布局記錄。所述操控記錄檔的該元件布局記錄的內容是一記錄畫面中每一UI元件23的資訊,並所述操控記錄檔的該元件布局記錄包括所述記錄畫面中每一UI元件23對應的元件類型、子節點數、節點位置符,及雜湊碼。所述記錄畫面中每一UI元件23構成一記錄樹狀階層關係,並且該節點位置符為階層母節點資訊及節點位置資訊的集合。Step S51 is executed to read the manipulation log file, where the manipulation log file includes at least one component layout record, at least one manipulation event, at least one node position symbol corresponding to the at least one manipulation event, and corresponding to the at least one manipulation event. At least one component layout record. The content of the component layout record of the manipulation log file is information of each UI element 23 in the recording screen, and the component layout record of the manipulation log file includes components corresponding to each UI element 23 in the recording screen. Type, number of children, node position, and hash code. Each UI element 23 in the recorded picture constitutes a record tree hierarchical relationship, and the node position symbol is a set of hierarchical parent node information and node position information.

本實施例的操控記錄檔中,所述至少一操控事件包括一第一操控事件,及一第二操控事件,也就是本實施例的操控記錄檔中記錄了兩項操控動作。所述至少一節點位置符包括對應於該第一操控事件的一第一節點位置符,及對應於該第二操控事件的一第二節點位置符。所述至少一元件布局記錄包括對應於該第一操控事件的一第一元件布局記錄,及對應於該第二操控事件的一第二元件布局記錄。所述操控記錄檔是由圖4對應的實施例的操控記錄方法所產生,該操控記錄檔的各項資訊已於前該操控記錄方法的實施例中說明,因此不再詳述。In the manipulation record file of the embodiment, the at least one manipulation event includes a first manipulation event, and a second manipulation event, that is, two manipulation actions are recorded in the manipulation record file of the embodiment. The at least one node position symbol includes a first node position symbol corresponding to the first manipulation event, and a second node position symbol corresponding to the second manipulation event. The at least one component layout record includes a first component layout record corresponding to the first manipulation event, and a second component layout record corresponding to the second manipulation event. The manipulation log file is generated by the manipulation recording method of the embodiment corresponding to FIG. 4, and the information of the manipulation log file has been explained in the embodiment of the manipulation recording method, and therefore will not be described in detail.

執行步驟S53,擷取由該輔助功能介面131傳送的一元件布局資訊。該輔助功能介面131傳送的該元件布局資訊對應於該第二操作畫面22,並該元件布局資訊是描述該第二操作畫面22的資訊,也就是該第二操作畫面22中所有第二UI元件232的資訊;所述元件布局資訊包括該第二操作畫面22中每一第二UI元件232的元件類型、該第二操作畫面22中每一UI元件23在該樹狀階層關係中具有的子節點數,及分別隸屬該操作畫面20中每一第二UI元件232的數個雜湊碼(Hash-code)。在本實施例中,所述元件類型可為Android作業系統中定義的FrameLayout、LinearLayout、TextView或ImageView,其中FrameLayout為根節點,LinearLayout為具有子節點的節點。Step S53 is executed to retrieve a component layout information transmitted by the auxiliary function interface 131. The component layout information transmitted by the auxiliary function interface 131 corresponds to the second operation screen 22, and the component layout information is information describing the second operation screen 22, that is, all the second UI components in the second operation screen 22. The information of the component layout information includes the component type of each of the second UI elements 232 in the second operation screen 22, and the child of each UI component 23 in the second operation screen 22 in the tree hierarchy relationship. The number of nodes, and a number of hash codes (Hash-codes) respectively belonging to each of the second UI elements 232 in the operation screen 20. In this embodiment, the component type may be a FrameLayout, a LinearLayout, a TextView, or an ImageView defined in the Android operating system, wherein the FrameLayout is a root node, and the LinearLayout is a node having a child node.

接著執行步驟S52,啟動計時並且計算一判斷時間,並執行步驟,依據該操控記錄檔的該至少一元件布局記錄,與該輔助功能介面131傳送的該元件布局資訊,判斷該至少一元件布局記錄是否對應於該第二操作畫面22。先依據該至少一元件布局記錄的每一節點位置符與該樹狀階層關係,判斷對應的該至少一第二UI元件232與對應的子節點數;接著,比對該元件布局記錄的每一節點位置符對應的子節點數與其在元件布局資訊中對應的第二UI元件232的子節點數是否相同。Then, step S52 is executed to start the timing and calculate a judgment time, and execute the step of determining the at least one component layout record according to the at least one component layout record of the manipulation log file and the component layout information transmitted by the auxiliary function interface 131. Whether it corresponds to the second operation screen 22. First determining, according to the relationship between each node position record of the at least one component layout and the tree hierarchy, the corresponding at least one second UI element 232 and the corresponding number of child nodes; and then, comparing each of the component layout records The number of child nodes corresponding to the node position symbol is the same as the number of child nodes of the second UI element 232 corresponding to the component layout information.

在該至少一元件布局記錄的每一子節點數與其在元件布局資訊中對應的第二UI元件232的子節點數皆相同時,判斷該至少一元件布局記錄對應於該第二操作畫面22,並停止計時及歸零。另一方面,在該至少一元件布局記錄的每一子節點數與其在元件布局資訊中對應的UI元件23的子節點數不全部相同時,執行步驟S57,判斷該判斷時間是否大於一時限值。在該判斷時間大於一時限值時,執行步驟S58,結束該自動執行操控方法。Determining that the at least one component layout record corresponds to the second operation screen 22 when the number of each child node of the at least one component layout record is the same as the number of child nodes of the second UI component 232 corresponding to the component layout information. And stop timing and return to zero. On the other hand, when the number of each child node of the at least one component layout record is not all the same as the number of child nodes of the UI component 23 corresponding to the component layout information, step S57 is performed to determine whether the determination time is greater than a time limit. . When the determination time is greater than a time limit, step S58 is executed to end the automatic execution manipulation method.

需要注意的是,本實施例的該操控記錄檔記錄有兩項操控動作,也就是第一操控事件及第二操控事件,此階段是讀取與處理對應於該第一操控事件的該第一元件布局記錄,因此上述步驟S54中提及的該至少一元件布局記錄是第一元件布局記錄。It should be noted that the manipulation record file of the embodiment records two manipulation actions, that is, a first manipulation event and a second manipulation event, and the phase is reading and processing the first corresponding to the first manipulation event. The component layout record, so the at least one component layout record mentioned in the above step S54 is the first component layout record.

在該至少一元件布局記錄的每一子節點數與其在元件布局資訊中對應的第二UI元件232的子節點數不相同,且該判斷時間不大於該時限值時,執行步驟S59,執行一移動畫面指令(例如指令ACTION_SCROLL_BACKWARD)移動該第二操作畫面22,並再次執行步驟S53及步驟S54。本實施例經由該元件布局記錄在該元件局資訊中取得對應的第二UI元件232及子節點數,其中的轉換、運算與對照,及判斷是否對應於該第二操作畫面22的過程,與圖9A、9B所示的前一實施例相同,不再重複詳細說明。When the number of the child nodes of the at least one component layout record is different from the number of the child nodes of the second UI component 232 corresponding to the component layout information, and the determination time is not greater than the time limit, step S59 is executed to execute A moving picture instruction (for example, the instruction ACTION_SCROLL_BACKWARD) moves the second operation screen 22, and performs step S53 and step S54 again. In this embodiment, the corresponding second UI element 232 and the number of child nodes are obtained in the component office information, wherein the conversion, the operation and the comparison, and the process of determining whether the second operation screen 22 corresponds to the second operation screen 22 are The previous embodiment shown in Figs. 9A and 9B is the same, and the detailed description will not be repeated.

執行步驟S55,只在該第二操作畫面22與該元件布局記錄對應的情況下,依據該操控事件及該節點位置符傳送一操控執行指令至該輔助功能介面131,且該輔助功能介面131執行該操控執行指令。Step S55 is executed, and only when the second operation screen 22 corresponds to the component layout record, a manipulation execution instruction is transmitted to the auxiliary function interface 131 according to the manipulation event and the node position, and the auxiliary function interface 131 is executed. This manipulation executes the instruction.

在判斷該第二操作畫面22與該元件布局記錄相符後,執行步驟S55,停止計時,並先讀取該操控記錄檔的該至少一操控事件與該至少一節點位置符,再依據該元件布局資訊將該至少一節點位置符轉換為對應的第二UI元件232。本實施例的該操控記錄檔記錄有兩項操控動作,也就是該第一操控事件及該第二操控事件,此階段是讀取與處理對應於該第一操控事件的該第一節點位置符,因此上述S55提及的該至少一節點位置符是第一節點位置符。將該操控記錄檔中的節點位置符轉換對應到該元件布局資訊中的第二UI元件232的過程與相關運算,與前一實施例相同,因此不再重複說明。After determining that the second operation screen 22 matches the component layout record, step S55 is executed to stop timing, and the at least one manipulation event of the manipulation log file and the at least one node position symbol are first read, and then according to the component layout. The information converts the at least one node position symbol into a corresponding second UI element 232. The control record file of this embodiment records two manipulation actions, that is, the first manipulation event and the second manipulation event, and the stage is to read and process the first node position symbol corresponding to the first manipulation event. Therefore, the at least one node position symbol mentioned in the above S55 is the first node position symbol. The process of converting the node position symbol in the manipulation log to the second UI element 232 in the component layout information and the correlation operation are the same as in the previous embodiment, and therefore the description will not be repeated.

接著,依據該第一操控事件及對應於該第一節點位置符的UI元件23產生並傳送一第一操控執行指令至該輔助功能介面131,該輔助功能介面131進一步執行該第一操控執行指令。Then, a first manipulation execution instruction is generated and transmitted to the auxiliary function interface 131 according to the first manipulation event and the UI element 23 corresponding to the first node position, and the auxiliary function interface 131 further executes the first manipulation execution instruction. .

在對應該第一操控事件的第一操控執行指令被執行後,接著執行步驟S56,判斷該操控記錄檔是否存在未被讀取的該第二操控事件,並在判斷存在未被讀取的該第二操控事件時,讀取該第二操控事件、該第二節點位置符及該第二元件布局記錄。再依據該元件布局資訊將該第二節點位置符轉換為對應的第二UI元件232,並依據該第二操控事件及對應於該第二節點位置符的第二UI元件232產生並傳送一第二操控執行指令至該輔助功能介面131,並且該輔助功能介面131進一步執行該第二操控執行指令。本實施例的該操控記錄檔記錄有兩項操控動作,也就是該第一操控事件及該第二操控事件,此階段是讀取與處理對應於該第二操控事件的該第二節點位置符。另一方面,在判斷不存在未被讀取的該第二操控事件時,結束該自動執行操控方法。After the first manipulation execution instruction corresponding to the first manipulation event is executed, proceeding to step S56, determining whether the manipulation log file has the second manipulation event that is not read, and determining that there is an unread During the second manipulation event, the second manipulation event, the second node position character, and the second component layout record are read. And converting the second node position symbol to the corresponding second UI element 232 according to the component layout information, and generating and transmitting a second control element according to the second manipulation event and the second UI element 232 corresponding to the second node position symbol. The second execution instruction is sent to the auxiliary function interface 131, and the auxiliary function interface 131 further executes the second manipulation execution instruction. The manipulation record file of the embodiment records two manipulation actions, that is, the first manipulation event and the second manipulation event, and the phase is reading and processing the second node position symbol corresponding to the second manipulation event. . On the other hand, when it is judged that there is no second manipulation event that has not been read, the automatic execution manipulation method is ended.

補充說明的是,本實施例的第一操作畫面21與第二操作畫面22可以是不同的應用程式,也就是可經由不同的應用程式啟動自動執行操控,因此可協助使用者自動操控不同的應用程式,使應用程式間的切換與操控行為更為省時。It is to be noted that the first operation screen 21 and the second operation screen 22 of the embodiment may be different applications, that is, the automatic execution of the operation may be initiated through different applications, thereby assisting the user to automatically control different applications. Programs make switching and manipulation between applications more time-saving.

雖然本揭露已以實施例揭露如上,然其並非用以限定本揭露,任何所屬技術領域中具有通常知識者,在不脫離本揭露的精神和範圍內,當可作些許的更動與潤飾,故發明的保護範圍當視後附的申請專利範圍所界定者為準。The present disclosure has been disclosed in the above embodiments, but it is not intended to limit the disclosure, and any person skilled in the art can make some changes and refinements without departing from the spirit and scope of the disclosure. The scope of the invention is defined by the scope of the appended claims.

1‧‧‧電子裝置
11‧‧‧顯示器
12‧‧‧儲存器
13‧‧‧運算處理器
131‧‧‧輔助功能介面
14‧‧‧天線
20‧‧‧操作畫面
21‧‧‧第一操作畫面
22‧‧‧第二操作畫面
23、23’‧‧‧使用者介面元件
231‧‧‧第一使用者介面元件
232‧‧‧第二使用者介面元件
S31~S36‧‧‧步驟
S351、S352‧‧‧步驟
S41~S43‧‧‧步驟
S50~S59‧‧‧步驟
1‧‧‧Electronic device
11‧‧‧ Display
12‧‧‧Storage
13‧‧‧Operation processor
131‧‧‧Accessory interface
14‧‧‧Antenna
20‧‧‧ operation screen
21‧‧‧First operation screen
22‧‧‧Second operation screen
23, 23'‧‧ User interface components
231‧‧‧First user interface component
232‧‧‧Second user interface component
S31~S36‧‧‧Steps
S351, S352‧‧‧ steps
S41~S43‧‧‧Steps
S50~S59‧‧‧Steps

圖1是依據本揭露之一實施例繪示之一電子裝置之方塊圖。 圖2是依據圖1實施例繪示之電子裝置顯示的一操作畫面之示意圖。 圖3是依據本揭露之一實施例繪示之操控記錄方法的一樹狀階層關係之節點樹狀示意圖。 圖4是依據本揭露之一實施例繪示的操控記錄方法之流程圖。 圖5是依據圖4之步驟S35繪示之流程圖。 圖6是依據本揭露之一實施例繪示的操控記錄方法的一位置符演算法之流程圖。 圖7是繪示圖1之電子裝置顯示一操作畫面之示意圖。 圖8是依據本揭露之一實施例繪示之自動執行操控方法的一樹狀階層關係之節點樹狀示意圖。 圖9A、9B是依據本揭露之一實施例繪示的自動執行操控方法之流程圖。 圖10是繪示圖1之電子裝置顯示一第一操作畫面之示意圖。 圖11是繪示圖1之電子裝置顯示一第二操作畫面之示意圖。 圖12是依據本揭露之一實施例繪示之自動執行操控方法的一樹狀階層關係之節點樹狀示意圖。 圖13A、13B是依據本揭露之一實施例繪示的自動執行操控方法之流程圖。1 is a block diagram of an electronic device in accordance with an embodiment of the present disclosure. FIG. 2 is a schematic diagram of an operation screen displayed by the electronic device according to the embodiment of FIG. 1. FIG. FIG. 3 is a schematic diagram of a node tree of a tree hierarchy relationship according to an embodiment of the present invention. 4 is a flow chart of a method of manipulating recording according to an embodiment of the present disclosure. FIG. 5 is a flow chart according to step S35 of FIG. 4. FIG. 6 is a flow chart of a positional algorithm for controlling a recording method according to an embodiment of the present disclosure. FIG. 7 is a schematic diagram showing an operation screen of the electronic device of FIG. 1. FIG. FIG. 8 is a schematic diagram of a node tree of a tree hierarchy relationship according to an automatic execution control method according to an embodiment of the disclosure. 9A and 9B are flowcharts of an automatic execution control method according to an embodiment of the present disclosure. FIG. 10 is a schematic diagram showing the first operation screen displayed by the electronic device of FIG. 1. FIG. FIG. 11 is a schematic diagram showing a second operation screen of the electronic device of FIG. 1. FIG. FIG. 12 is a schematic diagram of a node tree of a tree hierarchy relationship according to an automatic execution control method according to an embodiment of the disclosure. 13A and 13B are flowcharts of an automatic execution control method according to an embodiment of the present disclosure.

S52~S59‧‧‧步驟 S52~S59‧‧‧Steps

Claims (23)

一種操控記錄方法,用於一電子裝置,該電子裝置具有經配置以執行輔助功能服務(Accessibility Service)的一輔助功能介面,以及經配置以顯示一操作畫面的一顯示器,該操作畫面具有供使用者操控的數個使用者介面(User Interface,UI)元件,該些UI元件間構成一樹狀階層關係,該輔助功能介面依據使用者操控的UI元件發送一操控資訊,所述操控記錄方法包括: 擷取該操控資訊; 依據該操控資訊及該樹狀階層關係,判斷使用者操控的操控事件、該些UI元件中對應該操控事件的該UI元件,並指派一節點位置符對應該操控事件;以及 在一操控記錄檔中寫入該操控事件及該節點位置符。A control recording method for an electronic device having an auxiliary function interface configured to perform an Accessibility Service, and a display configured to display an operation screen, the operation screen having a use A plurality of user interface (UI) components are controlled, and the UI elements form a tree-like hierarchical relationship, and the auxiliary function interface sends a manipulation information according to the user-controlled UI component, and the manipulation recording method includes: Obtaining the manipulation information; determining, according to the manipulation information and the tree hierarchy relationship, a manipulation event controlled by the user, the UI component corresponding to the manipulation event in the UI elements, and assigning a node position symbol to the manipulation event; And writing the manipulation event and the node position character in a manipulation log file. 如申請專利範圍第1項所述的操控記錄方法,其中該操控資訊包括對應於該操作畫面的一元件布局資訊、該操控事件,及對應於該操控事件的一雜湊碼,該元件布局資訊包括該操作畫面的該些UI元件分別對應的數個雜湊碼,及該操作畫面的該些UI元件分別對應的數個元件類型,並且,其中指派該節點位置符對應該操控事件時還包括: 依據該樹狀階層關係、與該元件布局資訊的每一UI元件的元件類型分別指派該元件布局資訊的每一UI元件對應的節點位置符;以及 依據該元件布局資訊的每一UI元件對應的雜湊碼、該元件布局資訊的每一UI元件對應的節點位置符,比對對應於該操控事件的雜湊碼與該元件布局資訊的每一UI元件對應的雜湊碼,判斷該些UI元件中對應該操控事件的該UI元件,並指派對應該操控事件的該UI元件的節點位置符為對應該操控事件的節點位置符。The manipulation recording method according to claim 1, wherein the manipulation information includes a component layout information corresponding to the operation screen, the manipulation event, and a hash code corresponding to the manipulation event, the component layout information includes a plurality of hash codes corresponding to the UI elements of the operation screen, and a plurality of component types corresponding to the UI elements of the operation screen, and wherein assigning the node position symbol to the manipulation event further includes: The tree hierarchy relationship, the element type of each UI element of the component layout information respectively assigns a node position symbol corresponding to each UI element of the component layout information; and a hash corresponding to each UI element according to the component layout information a code, a node position corresponding to each UI element of the component layout information, and a hash code corresponding to each UI element of the component layout information corresponding to the hash code of the manipulation event, and determining corresponding to the UI components Manipulating the UI element of the event and assigning the node position of the UI element corresponding to the manipulation event to the node corresponding to the manipulation event Character set. 如申請專利範圍第2項所述的操控記錄方法,其中只在判斷該操控事件為點擊、聚焦或長點擊的情況下,執行步驟依據該操控資訊判斷使用者的操控事件及該些UI元件中對應該操控事件的該UI元件,並依據對應該操控事件的該UI元件與該樹狀階層關係指派該節點位置符。The control recording method of claim 2, wherein only when the control event is clicked, focused, or long clicked, the executing step determines the user's manipulation event and the UI elements according to the manipulation information. The UI element corresponding to the event is manipulated, and the node position is assigned according to the UI element corresponding to the manipulation event. 如申請專利範圍第2項所述的操控記錄方法,其中分別指派該元件布局資訊的每一UI元件對應的節點位置符時包括: 記錄該每一UI元件在該樹狀階層關係中所隸屬的各階層母節點; 記錄該每一UI元件在所屬階層中的位置;以及 依據該每一UI元件所隸屬的各階層母節點及該每一UI元件在所屬階層中的位置指派該每一UI元件的節點位置符,該節點位置符為所述各階層母節點與該每一UI元件在所屬階層中的位置的集合。The control recording method according to claim 2, wherein the node position corresponding to each UI element of the component layout information is respectively included: recording the belonging of each UI element in the tree hierarchy relationship a parent node of each level; recording a position of each UI element in a hierarchy; and assigning each UI element according to each hierarchical parent node to which each UI element belongs and a position of each UI element in a hierarchy a node position character, the node position symbol being a set of locations of the hierarchical parent nodes and the respective UI elements in the hierarchy. 如申請專利範圍第2項所述的操控記錄方法,還包括: 暫存該操控事件、該節點位置符、該元件布局資訊及該元件布局資訊的每一UI元件對應的節點位置符;以及 在該操控記錄檔中寫入該元件布局資訊的每一UI元件對應的節點位置符。The control recording method of claim 2, further comprising: temporarily storing the manipulation event, the node position symbol, the component layout information, and a node position symbol corresponding to each UI element of the component layout information; The node position symbol corresponding to each UI element in which the component layout information is written in the manipulation log file. 如申請專利範圍第5項所述的操控記錄方法,其中還在該操控記錄檔中寫入隸屬於每一UI元件的子節點數。The manipulation recording method according to claim 5, wherein the number of child nodes belonging to each UI element is also written in the manipulation record file. 如申請專利範圍第1項所述的操控記錄方法,其中該輔助功能介面為Android輔助功能介面 (Android Accessibility Service Interface)。The control recording method described in claim 1, wherein the auxiliary function interface is an Android Accessibility Service Interface. 一種自動執行操控方法,用於一電子裝置,該電子裝置包括經配置以執行輔助功能服務的一輔助功能介面,以及經配置以顯示一操作畫面的一顯示器,該操作畫面具有可供操控的數個使用者介面元件,該些UI元件間構成一樹狀階層關係,該方法包括: 讀取一操控記錄檔,該操控記錄檔包括至少一操控事件、對應於該至少一操控事件的至少一節點位置符,及對應於該至少一操控事件的至少一元件布局記錄; 擷取由該輔助功能介面傳送的一元件布局資訊,該元件布局資訊對應於該操作畫面; 依據該至少一元件布局記錄與該元件布局資訊,判斷該元件布局記錄是否對應該操作畫面;以及 只在該操作畫面與該至少一元件布局記錄對應的情況下,依據該至少一操控事件及該節點位置符傳送一操控執行指令至該輔助功能介面,以使該輔助功能介面執行該操控執行指令。An automatic execution control method for an electronic device comprising an auxiliary function interface configured to perform an auxiliary function service, and a display configured to display an operation screen having a number of manipulated a user interface component, the UI elements form a tree hierarchy relationship, the method comprising: reading a manipulation log file, the manipulation log file including at least one manipulation event, at least one node position corresponding to the at least one manipulation event And a component layout record corresponding to the at least one manipulation event; capturing a component layout information transmitted by the auxiliary function interface, the component layout information corresponding to the operation screen; according to the at least one component layout record a component layout information, determining whether the component layout record corresponds to the operation screen; and transmitting, in the case of the operation screen corresponding to the at least one component layout record, a manipulation execution instruction according to the at least one manipulation event and the node position symbol to The accessibility interface to enable the accessibility interface to perform the manipulation Line instruction. 如申請專利範圍第8項所述的自動執行操控方法,其中該至少一元件布局記錄包括至少一節點位置符,及對應該至少一節點位置符的至少一子節點數,且其中依據該至少一元件布局記錄與該元件布局資訊,判斷該至少一元件布局記錄是否對應該操作畫面,還包括: 依據該至少一元件布局記錄的每一節點位置符,判斷在該元件布局資訊中分別對應每一節點位置符的該些UI元件,並取得每一該些UI元件的子節點數; 比對該至少一元件布局記錄的每一子節點數與對應的UI元件的子節點數是否相同;以及 在該至少一元件布局記錄的每一子節點數與對應的UI元件的子節點數相同時,判斷該至少一元件布局記錄對應該操作畫面。The automatic execution control method of claim 8, wherein the at least one component layout record includes at least one node position symbol, and at least one child node number corresponding to at least one node position symbol, and wherein the at least one The component layout record and the component layout information determine whether the at least one component layout record corresponds to the operation screen, and further includes: determining, according to the position identifier of each node of the at least one component layout record, corresponding to each of the component layout information Nodes of the UI elements of the node position, and obtaining the number of child nodes of each of the UI elements; whether the number of each child node recorded by the at least one component layout is the same as the number of child nodes of the corresponding UI element; When the number of each child node of the at least one component layout record is the same as the number of child nodes of the corresponding UI element, it is determined that the at least one component layout record corresponds to the operation screen. 如申請專利範圍第9項所述的自動執行操控方法,還包括執行計時並且計算一判斷時間,步驟依據該至少一元件布局記錄與該元件布局資訊,判斷該至少一元件布局記錄是否對應該操作畫面還包括: 在該至少一元件布局記錄的每一子節點數與對應的UI元件的子節點數不相同,且該判斷時間大於一時限值時,結束該自動執行操控方法;以及 在該至少一元件布局記錄的每一子節點數與對應的UI元件的子節點數不相同,且該判斷時間不大於該時限值時,執行一移動畫面指令移動該操作畫面,並再執行步驟擷取由該輔助功能介面傳送的該元件布局資訊,及步驟依據該至少一元件布局記錄與該元件布局資訊,判斷該至少一元件布局記錄是否對應該操作畫面。The automatic execution control method of claim 9, further comprising performing timing and calculating a judgment time, and determining, according to the at least one component layout record and the component layout information, whether the at least one component layout record corresponds to the operation. The screen further includes: ending the automatic execution manipulation method when the number of each child node of the at least one component layout record is different from the number of child nodes of the corresponding UI component, and the determination time is greater than a time limit; When the number of each child node of a component layout record is different from the number of child nodes of the corresponding UI component, and the determination time is not greater than the time limit value, a moving picture instruction is executed to move the operation screen, and then the step is performed. The component layout information transmitted by the auxiliary function interface, and the step determining whether the at least one component layout record corresponds to the operation screen according to the at least one component layout record and the component layout information. 如申請專利範圍第8項所述的自動執行操控方法,其中步驟只在該操作畫面與該至少一元件布局記錄對應的情況下,依據該至少一操控事件傳送該操控執行指令至該輔助功能介面,以使該輔助功能介面執行該操控執行指令時,還包括: 依據該元件布局資訊及該階層樹狀關係將該至少一節點位置符轉換為對應的UI元件,並依據該至少一操控事件及對應於該至少一節點位置符的該UI元件傳送該操控執行指令至該輔助功能介面;以及 該輔助功能介面執行該操控執行指令。The automatic execution control method of claim 8, wherein the step of transmitting the manipulation execution instruction to the auxiliary function interface according to the at least one manipulation event only if the operation screen corresponds to the at least one component layout record When the auxiliary function interface executes the manipulation execution instruction, the method further includes: converting the at least one node position symbol into a corresponding UI component according to the component layout information and the hierarchical tree relationship, and according to the at least one manipulation event and The UI element corresponding to the at least one node locator transmits the manipulation execution instruction to the auxiliary function interface; and the auxiliary function interface executes the manipulation execution instruction. 如申請專利範圍第8項所述的自動執行操控方法,其中該操控記錄檔的該至少一操控事件是包括一第一操控事件,及至少ㄧ第二操控事件,該操控記錄檔的該至少一節點位置符包括對應於該第一操控事件的第一節點位置符,及對應於該至少一第二操控事件的至少一第二節點位置符,該操控記錄檔的該至少一元件布局記錄包括對應於該第一操控事件的一第一元件佈局記錄,及對應於該至少一第二操控事件的至少一第二元件布局記錄,其中讀取一操控記錄檔包括讀取該第一操控事件、該第一節點位置符,及該第一元件布局記錄,該自動執行操控方法還包括: 讀取該至少一第二操控事件、該至少一第二節點位置符,及該至少一第二元件布局資訊; 依據被讀取的該至少一第二元件布局記錄與該元件布局資訊,判斷被讀取的該至少一第二元件布局記錄是否對應該操作畫面;以及 只在該操作畫面與被讀取的該至少一第二元件布局記錄對應的情況下,依據被讀取的該至少一第二操控事件及被讀取的該至少一第二節點位置符傳送一第二操控執行指令至該輔助功能介面,以使該輔助功能介面執行該第二操控執行指令。The automatic execution control method of claim 8, wherein the at least one manipulation event of the manipulation log file comprises a first manipulation event, and at least a second manipulation event, the at least one of the manipulation log files The node position symbol includes a first node position symbol corresponding to the first manipulation event, and at least one second node position symbol corresponding to the at least one second manipulation event, the at least one component layout record of the manipulation log file includes a corresponding a first component layout record of the first manipulation event, and at least one second component layout record corresponding to the at least one second manipulation event, wherein reading a manipulation log file includes reading the first manipulation event, the a first node locator, and the first component layout record, the automatic execution control method further comprising: reading the at least one second manipulation event, the at least one second node locator, and the at least one second component layout information Determining whether the read at least one second component layout record is correct according to the read at least one second component layout record and the component layout information The operation screen; and in the case that the operation screen corresponds to the at least one second component layout record being read, according to the at least one second manipulation event being read and the at least one second being read The node position symbol transmits a second manipulation execution instruction to the auxiliary function interface, so that the auxiliary function interface executes the second manipulation execution instruction. 如申請專利範圍第12項所述的自動執行操控方法,還包括: 判斷該操控記錄檔是否存在未被讀取的該至少一第二操控事件; 在判斷存在未被讀取的該至少一第二操控事件時,執行讀取該至少一第二操控事件、該至少一第二節點位置符,及該至少一第二元件布局資訊;以及 在判斷不存在未被讀取的該至少一第二操控事件時結束該自動執行操控方法。The automatic execution control method of claim 12, further comprising: determining whether the manipulation record file has the at least one second manipulation event that is not read; determining that the at least one is not read Reading, by the second control event, the at least one second manipulation event, the at least one second node position, and the at least one second component layout information; and determining that there is no at least one second that is not read This automatic execution control method ends when the event is manipulated. 如申請專利範圍第9項所述的自動執行操控方法,其中該節點位置符為階層母節點資訊及階層位置資訊的集合,其中判斷在該元件布局資訊中分別對應每一節點位置符的該些UI元件,並取得每一該些UI元件的子節點數時,還包括: 依據該每一節點位置符與該樹狀階層關係,判斷該每一節點位置符在該樹狀階層關係中指示的節點位置,並依據指示的該節點位置取得對應的UI元件。The automatic execution control method according to claim 9, wherein the node position symbol is a set of hierarchical parent node information and hierarchical position information, wherein each of the node position information is determined in the component layout information. When the UI component obtains the number of child nodes of each of the UI components, the method further includes: determining, according to the relationship between the node location and the tree hierarchy, the location identifier of each node in the tree hierarchy relationship The node location, and the corresponding UI component is obtained according to the indicated node location. 如申請專利範圍第8項所述的自動執行操控方法,其中該輔助功能介面為Android輔助功能介面。The automatic execution control method described in claim 8 is wherein the auxiliary function interface is an Android auxiliary function interface. 一種自動執行操控方法,用於一電子裝置,該電子裝置包括經配置以執行輔助功能服務(Accessibility Service)的一輔助功能介面,以及經配置以顯示一第一操作畫面的一顯示器,該第一操作畫面包括經配置以供操控的至少一第一使用者介面(User Interface,UI)元件,該方法包括: 回應於執行該第一UI元件,該電子裝置顯示一第二操作畫面,並且該第二操作畫面具有數個第二UI元件,該些第二UI元件間構成一樹狀階層關係; 讀取一操控記錄檔,該操控記錄檔包括至少一操控事件、對應於該至少一操控事件的至少一節點位置符,及對應於該至少一操控事件的至少一元件布局記錄; 擷取由該輔助功能介面傳送的一元件布局資訊,該元件布局資訊對應於該第二操作畫面; 依據該至少一元件布局記錄與該元件布局資訊,判斷該至少一元件布局記錄是否對應該第二操作畫面;以及 只在該第二操作畫面與該至少一元件布局記錄對應的情況下,依據該至少一操控事件及該節點位置符傳送一操控執行指令至該輔助功能介面,以使該輔助功能介面執行該操控執行指令。An automatic execution control method for an electronic device, the electronic device comprising an auxiliary function interface configured to perform an Accessibility Service, and a display configured to display a first operation screen, the first The operation screen includes at least one first user interface (UI) component configured to be manipulated, the method comprising: in response to executing the first UI element, the electronic device displays a second operation screen, and the The second operation screen has a plurality of second UI elements, and the second UI elements form a tree-like hierarchical relationship; reading a manipulation log file, the manipulation log file including at least one manipulation event, corresponding to at least one manipulation event a node locator, and at least one component layout record corresponding to the at least one manipulation event; capturing a component layout information transmitted by the auxiliary function interface, the component layout information corresponding to the second operation screen; The component layout record and the component layout information determine whether the at least one component layout record corresponds to the second operation And transmitting, in the case of the second operation screen corresponding to the at least one component layout record, a manipulation execution instruction to the auxiliary function interface according to the at least one manipulation event and the node position to enable the auxiliary function interface Execute the manipulation execution instruction. 如申請專利範圍第16項所述的自動執行操控方法,其中該至少一元件布局記錄包括至少一節點位置符,及對應該至少一節點位置符的至少一子節點數,其中依據該至少一元件布局記錄與該元件布局資訊,判斷該至少一元件布局記錄是否對應該第二操作畫面時,還包括: 依據該至少一元件布局記錄的每一節點位置符,判斷在該元件布局資訊中分別對應每一節點位置符的該些第二UI元件,並取得每一該些第二UI元件的子節點數; 比對該至少一元件布局記錄的每一子節點數與對應的第二UI元件的子節點數是否相同;以及 在該至少一元件布局記錄的每一子節點數與對應的第二UI元件的子節點數相同時,判斷該至少一元件布局記錄對應該第二操作畫面。The automatic execution control method of claim 16, wherein the at least one component layout record comprises at least one node position symbol, and at least one child node corresponding to at least one node position symbol, wherein the at least one component is Layout record and the component layout information, determining whether the at least one component layout record corresponds to the second operation screen, further comprising: determining, according to the position identifier of each node of the at least one component layout record, correspondingly corresponding to the component layout information Each of the second UI elements of each node location identifier, and obtaining the number of child nodes of each of the second UI elements; comparing the number of each child node recorded by the at least one component layout with the corresponding second UI component Whether the number of child nodes is the same; and when the number of each child node of the at least one component layout record is the same as the number of child nodes of the corresponding second UI element, determining that the at least one component layout record corresponds to the second operation screen. 如申請專利範圍第17項所述的自動執行操控方法,還包括:執行計時並且計算一判斷時間,其中依據該至少一元件布局記錄與該元件布局資訊,判斷該至少一元件布局記錄是否對應該第二操作畫面時,還包括: 在該至少一元件布局記錄的每一子節點數與對應的第二UI元件的子節點數不相同,且該判斷時間大於一時限值時,結束該自動執行操控方法;以及 在該至少一元件布局記錄的每一子節點數與對應的第二UI元件的子節點數不相同,且該判斷時間不大於該時限值時,執行一移動畫面指令移動該第二操作畫面,並再執行擷取由該輔助功能介面傳送的該元件布局資訊,及依據該至少一元件布局記錄與該元件布局資訊,判斷該至少一元件布局記錄是否對應該第二操作畫面。The automatic execution control method of claim 17, further comprising: performing timing and calculating a judgment time, wherein determining whether the at least one component layout record corresponds to the component layout information according to the at least one component layout record The second operation screen further includes: when the number of each child node of the at least one component layout record is different from the number of child nodes of the corresponding second UI element, and the determination time is greater than a time limit value, ending the automatic execution a manipulation method; and when the number of each child node of the at least one component layout record is different from the number of child nodes of the corresponding second UI element, and the determination time is not greater than the time limit value, performing a moving screen instruction to move the Performing, by the second operation screen, the component layout information transmitted by the auxiliary function interface, and determining, according to the at least one component layout record and the component layout information, whether the at least one component layout record corresponds to the second operation screen . 如申請專利範圍第16項所述的自動執行操控方法,其中依據該至少一操控事件傳送該操控執行指令至該輔助功能介面,以使該輔助功能介面執行該操控執行指令時,還包括: 依據該元件布局資訊及該階層樹狀關係將該至少一節點位置符轉換為對應的第二UI元件,並依據該至少一操控事件及對應於該至少一節點位置符的該第二UI元件傳送該操控執行指令至該輔助功能介面;以及 該輔助功能介面執行該操控執行指令。The automatic execution control method of claim 16, wherein the manipulation execution instruction is transmitted to the auxiliary function interface according to the at least one manipulation event, so that the auxiliary function interface executes the manipulation execution instruction, further comprising: The component layout information and the hierarchical tree relationship convert the at least one node position symbol into a corresponding second UI element, and transmit the according to the at least one manipulation event and the second UI element corresponding to the at least one node position symbol Manipulating execution instructions to the auxiliary function interface; and the auxiliary function interface executing the manipulation execution instruction. 如申請專利範圍第17項所述的自動執行操控方法,其中該操控記錄檔的該至少一操控事件是包括一第一操控事件,及至少ㄧ第二操控事件,該操控記錄檔的該至少一節點位置符包括對應於該第一操控事件的第一節點位置符,及對應於該至少一第二操控事件的至少一第二節點位置符,該操控記錄檔的該至少一元件布局記錄包括對應於該第一操控事件的一第一元件佈局記錄,及對應於該至少一第二操控事件的至少一第二元件布局記錄,其中讀取一操控記錄檔包括讀取該第一操控事件、該第一節點位置符,及該第一元件布局記錄,該自動執行操控方法還包括: 讀取該至少一第二操控事件、該至少一第二節點位置符,及該至少一第二元件布局資訊; 依據被讀取的該至少一第二元件布局記錄與該元件布局資訊,判斷被讀取的該至少一第二元件布局記錄是否對應該第二操作畫面;以及 只在該第二操作畫面與被讀取的該至少一第二元件布局記錄對應的情況下,依據被讀取的該至少一第二操控事件及被讀取的該至少一第二節點位置符傳送一第二操控執行指令至該輔助功能介面,以使該輔助功能介面執行該第二操控執行指令。The automatic execution control method of claim 17, wherein the at least one manipulation event of the manipulation log file comprises a first manipulation event, and at least a second manipulation event, the at least one of the manipulation log files The node position symbol includes a first node position symbol corresponding to the first manipulation event, and at least one second node position symbol corresponding to the at least one second manipulation event, the at least one component layout record of the manipulation log file includes a corresponding a first component layout record of the first manipulation event, and at least one second component layout record corresponding to the at least one second manipulation event, wherein reading a manipulation log file includes reading the first manipulation event, the a first node locator, and the first component layout record, the automatic execution control method further comprising: reading the at least one second manipulation event, the at least one second node locator, and the at least one second component layout information Determining whether the read at least one second component layout record is correct according to the read at least one second component layout record and the component layout information Should be the second operation screen; and only if the second operation picture corresponds to the read at least one second component layout record, according to the read at least one second manipulation event and the read The at least one second node position assigns a second manipulation execution instruction to the auxiliary function interface, so that the auxiliary function interface executes the second manipulation execution instruction. 如申請專利範圍第20項所述的自動執行操控方法,還包括: 判斷該操控記錄檔是否存在未被讀取的該至少一第二操控事件; 在判斷存在未被讀取的該至少一第二操控事件時,執行步驟讀取該至少一第二操控事件、該至少一第二節點位置符,及該至少一第二元件布局資訊;以及 在判斷不存在未被讀取的該至少一第二操控事件時結束該自動執行操控方法。The automatic execution control method of claim 20, further comprising: determining whether the control record file has the at least one second manipulation event that is not read; determining that the at least one is not read During the second manipulation event, the executing step reads the at least one second manipulation event, the at least one second node position symbol, and the at least one second component layout information; and determines that there is no at least one unread The automatic execution of the control method ends when the event is manipulated. 如申請專利範圍第20項所述的自動執行操控方法,其中該節點位置符為階層母節點資訊及階層位置資訊的集合,且其中判斷在該元件布局資訊中分別對應每一節點位置符的該些第二UI元件,並取得每一該些第二UI元件的子節點數時,還包括: 依據該每一節點位置符與該樹狀階層關係,判斷該每一節點位置符在該樹狀階層關係中指示的節點位置,並依據指示的該節點位置取得對應的第二UI元件。The automatic execution control method according to claim 20, wherein the node position symbol is a set of hierarchical parent node information and hierarchical position information, and wherein the component corresponding to each node position symbol is determined in the component layout information. When the second UI component obtains the number of child nodes of each of the second UI components, the method further includes: determining, according to the relationship between the node location and the tree hierarchy, that each node location character is in the tree shape The node position indicated in the hierarchical relationship, and the corresponding second UI element is obtained according to the indicated node position. 如申請專利範圍第17項所述的自動執行操控方法,其中該輔助功能介面為Android輔助功能介面。The automatic execution control method described in claim 17, wherein the auxiliary function interface is an Android auxiliary function interface.
TW105140802A 2016-07-14 2016-12-09 Method of recording operations and method of automatically re-executing operations TWI605378B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201611197685.9A CN107632851B (en) 2016-07-14 2016-12-22 Control recording method and automatic control execution method
US15/393,002 US20180018307A1 (en) 2016-07-14 2016-12-28 Method of recording operations and method of automatically executing operations

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
US201662362240P 2016-07-14 2016-07-14
US62/362,240 2016-07-14

Publications (2)

Publication Number Publication Date
TWI605378B true TWI605378B (en) 2017-11-11
TW201810009A TW201810009A (en) 2018-03-16

Family

ID=61023053

Family Applications (1)

Application Number Title Priority Date Filing Date
TW105140802A TWI605378B (en) 2016-07-14 2016-12-09 Method of recording operations and method of automatically re-executing operations

Country Status (2)

Country Link
CN (1) CN107632851B (en)
TW (1) TWI605378B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW201001204A (en) * 2008-06-27 2010-01-01 Microsoft Corp Presenting dynamic folders
TW201525710A (en) * 2013-12-26 2015-07-01 Chunghwa Telecom Co Ltd Cloud based flexible assembly system of service and method suitable for telecommunication applications

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130024812A1 (en) * 2011-07-13 2013-01-24 Z124 Foreground/background assortment of hidden windows
US7627821B2 (en) * 2004-06-15 2009-12-01 Microsoft Corporation Recording/playback tools for UI-based applications
CN102129361B (en) * 2010-01-13 2015-07-15 宏正自动科技股份有限公司 Centralized display system and method for multi-split pictures
CN101882078B (en) * 2010-05-28 2013-01-16 浙江大学 Inter-module real-time synchronization method based on internal memory data framework
US9165005B2 (en) * 2012-02-24 2015-10-20 Simplivity Corporation Method and apparatus utilizing non-uniform hash functions for placing records in non-uniform access memory
CN104376237B (en) * 2013-08-13 2017-09-26 中国科学院沈阳自动化研究所 A kind of method of controlling security and system for being directed to information in production process
CN104378335A (en) * 2013-08-15 2015-02-25 中兴通讯股份有限公司 Node register method and system, node analysis method and system and gateway
JP6282659B2 (en) * 2013-08-28 2018-02-21 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカPanasonic Intellectual Property Corporation of America Information providing method in control method, program, terminal device and information providing system
CN104636251B (en) * 2014-12-30 2017-12-08 佛山市蠢材科技有限公司 A kind of more browser compatibility method of testings and system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW201001204A (en) * 2008-06-27 2010-01-01 Microsoft Corp Presenting dynamic folders
TW201525710A (en) * 2013-12-26 2015-07-01 Chunghwa Telecom Co Ltd Cloud based flexible assembly system of service and method suitable for telecommunication applications

Also Published As

Publication number Publication date
CN107632851B (en) 2021-02-02
TW201810009A (en) 2018-03-16
CN107632851A (en) 2018-01-26

Similar Documents

Publication Publication Date Title
US8418257B2 (en) Collection user interface
US9928697B2 (en) Configuring point-of-sale (POS) applications based on a priority level in order to communicate with peripheral devices in a POS system
US11436819B2 (en) Consolidation and history recording of a physical display board using an online task management system
CN113537954B (en) Project milestone processing method and device, storage medium and electronic equipment
JP6763245B2 (en) Information processing equipment and information processing programs
US10853097B1 (en) Robotic process automation with secure recording
US20120050336A1 (en) Touch-based remote control
JP5806688B2 (en) OpS equipment
HK1221533A1 (en) Text editing method and apparatus applied to screen display device
US10169189B2 (en) Functional test automation of mobile applications interacting with native stock applications
CN112631924A (en) Automatic testing method and device, computer equipment and storage medium
US10095608B2 (en) Application test automation transmitting data via phone/voice calls
CN103984626A (en) Method and device for generating test-case script
CN106126424A (en) A kind of visual automated testing method of script, device and mobile terminal
US20180095807A1 (en) Method and Apparatus for Automatic Processing of Service Requests on an Electronic Device
US20180018307A1 (en) Method of recording operations and method of automatically executing operations
CN101136780A (en) Method and system for acquiring user command information and device for registering user commands
TWI605378B (en) Method of recording operations and method of automatically re-executing operations
CN106897257A (en) The conversion method and device of a kind of ASCII character and character string based on LINUX platforms
US20190332458A1 (en) Information processing system, input value verification support program, and input value verification program
CN112732243B (en) Data processing method and device for generating functional components
US20040075696A1 (en) System and method for automatic mnemonic assignment
CN110096392A (en) Method and apparatus for output information
TWI887897B (en) Electronic device and method of providing user interface thereof
Huang et al. Generative Approach to the Automation of Artificial Intelligence Applications