TW201917554A - Information display method and apparatus - Google Patents
Information display method and apparatus Download PDFInfo
- Publication number
- TW201917554A TW201917554A TW107128734A TW107128734A TW201917554A TW 201917554 A TW201917554 A TW 201917554A TW 107128734 A TW107128734 A TW 107128734A TW 107128734 A TW107128734 A TW 107128734A TW 201917554 A TW201917554 A TW 201917554A
- Authority
- TW
- Taiwan
- Prior art keywords
- cursor
- boundary
- cursors
- character
- pair
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 89
- 238000012544 monitoring process Methods 0.000 claims abstract description 26
- 238000007667 floating Methods 0.000 claims description 42
- 239000003086 colorant Substances 0.000 claims description 11
- 238000010586 diagram Methods 0.000 description 32
- 230000008569 process Effects 0.000 description 31
- 238000013461 design Methods 0.000 description 10
- 230000006870 function Effects 0.000 description 10
- 238000004590 computer program Methods 0.000 description 9
- 230000006872 improvement Effects 0.000 description 9
- 238000005516 engineering process Methods 0.000 description 7
- 238000012545 processing Methods 0.000 description 7
- 238000012790 confirmation Methods 0.000 description 6
- 238000005259 measurement Methods 0.000 description 6
- 230000000007 visual effect Effects 0.000 description 5
- 238000011161 development Methods 0.000 description 3
- 230000002452 interceptive effect Effects 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 230000000750 progressive effect Effects 0.000 description 3
- 101150053844 APP1 gene Proteins 0.000 description 1
- 101100189105 Homo sapiens PABPC4 gene Proteins 0.000 description 1
- 102100039424 Polyadenylate-binding protein 4 Human genes 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000003708 edge detection Methods 0.000 description 1
- 208000037805 labour Diseases 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 229920001296 polysiloxane Polymers 0.000 description 1
- 239000010979 ruby Substances 0.000 description 1
- 229910001750 ruby Inorganic materials 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0481—Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
- G06F3/04812—Interaction techniques based on cursor appearance or behaviour, e.g. being affected by the presence of displayed objects
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0484—Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
- G06F3/04847—Interaction techniques to control parameter settings, e.g. interaction with sliders or dials
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- User Interface Of Digital Computer (AREA)
- Telephone Function (AREA)
- Controls And Circuits For Display Device (AREA)
Abstract
Description
本發明關於資訊技術領域,尤其關於一種資訊顯示的方法及裝置。The invention relates to the field of information technology, in particular to a method and device for displaying information.
目前,在行動終端測量程式介面中的元素或者字元的尺寸時,通常是通過使用測量尺寸的工具進行測量。其中,元素尺寸通常是指在介面中設計的按鍵、視窗等區域的大小尺寸,字元尺寸通常為介面中文字的大小,如圖1所示。 而在現有技術中,行動終端中的測量尺寸的工具,需要通過用戶手指拖動游標,並且只是顯示游標之間的距離。 但是,通常對於元素以及字元的尺寸測量需要精確到像素層級,可見需要一種可以在行動終端上精確顯示元素尺寸、字元尺寸的方法,基於現有技術,本說明書提供一種新的資訊顯示方法。At present, when measuring the size of elements or characters in the program interface of a mobile terminal, it is usually measured by using a tool for measuring the size. Among them, the element size usually refers to the size of the buttons, windows and other areas designed in the interface, and the character size is usually the size of the text in the interface, as shown in FIG. 1. In the prior art, the size measuring tool in the mobile terminal needs to drag the cursor through the user's finger, and only displays the distance between the cursors. However, the size measurement of elements and characters usually needs to be accurate to the pixel level. It can be seen that a method for accurately displaying the element size and the character size on the mobile terminal is needed. Based on the existing technology, this specification provides a new information display method.
本說明書實施例提供一種資訊顯示的方法及裝置,用於解決現有技術難以方便、精確的確定行動終端上的程式介面的元素尺寸以及字元尺寸的問題。 本說明書實施例採用下述技術方案: 一種資訊顯示的方法,方法包括: 獲取行動終端的程式介面的截圖,顯示至少一對游標,並監測用戶的操作; 針對每對游標,當監測到用戶對該對游標執行操作時,確定被執行所述操作的各游標分別對應的位置; 根據各游標分別對應位置,在所述截圖中確定各游標分別對應的選擇範圍; 根據預設的邊界演算法,在各游標分別對應的所述選擇範圍內,分別確定所述程式介面中的元素的邊界; 將被執行所述操作的各游標分別移動至分別確定出的所述元素的邊界; 顯示該對游標之間的距離。 一種資訊顯示方法,包括: 獲取行動終端的程式介面的截圖,顯示至少一個游標,並監測用戶的操作; 當監測到用戶對任一游標執行操作時,確定被執行所述操作的游標的位置; 在所述截圖中確定在所述位置上的顏色; 根據所述游標的邊界以及所述顏色,確定字元邊界; 根據確定出的字元邊界,確定所述游標所覆蓋的字元的尺寸,並顯示。 一種資訊顯示裝置,包括: 獲取顯示及監測模組,獲取行動終端的程式介面的截圖,顯示至少一對游標,並監測用戶的操作; 第一確定模組,針對每對游標,當監測到用戶對該對游標執行操作時,確定被執行所述操作的各游標分別對應的位置; 第二確定模組,根據各游標分別對應位置,在所述截圖中確定各游標分別對應的選擇範圍; 第三確定模組,根據預設的邊界演算法,在各游標分別對應的所述選擇範圍內,分別確定所述程式介面中的元素的邊界; 第四確定模組,將被執行所述操作的各游標分別移動至分別確定出的所述元素的邊界; 顯示模組,顯示該對游標之間的距離。 一種資訊顯示裝置,包括: 獲取顯示及監測模組,獲取行動終端的程式介面的截圖,顯示至少一個游標,並監測用戶的操作; 第一確定模組,當監測到用戶對任一游標執行操作時,確定被執行所述操作的游標的位置; 第二確定模組,在所述截圖中確定在所述位置上的顏色; 第三確定模組,根據所述游標的邊界以及所述顏色,確定字元邊界; 顯示模組,根據確定出的字元邊界,確定所述游標所覆蓋的字元的尺寸,並顯示。 一種行動終端,包括:一個或多個處理器及記憶體,所述程式被配置成由一個或多個處理器執行以下步驟: 獲取所述行動終端的程式介面的截圖,顯示至少一對游標,並監測用戶的操作; 針對每對游標,當監測到用戶對該對游標執行操作時,確定被執行所述操作的各游標分別對應的位置; 根據各游標分別對應位置,在所述截圖中確定各游標分別對應的選擇範圍; 根據預設的邊界演算法,在各游標分別對應的所述選擇範圍內,分別確定所述程式介面中的元素的邊界; 將被執行所述操作的各游標分別移動至分別確定出的所述元素的邊界; 顯示該對游標之間的距離。 一種行動終端,包括:一個或多個處理器及記憶體,所述程式被配置成由一個或多個處理器執行以下步驟: 獲取所述行動終端的程式介面的截圖,顯示至少一個游標,並監測用戶的操作; 當監測到用戶對任一游標執行操作時,確定被執行所述操作的游標的位置; 在所述截圖中確定在所述位置上的顏色; 根據所述游標的邊界以及所述顏色,確定字元邊界; 根據確定出的字元邊界,確定所述游標所覆蓋的字元的尺寸,並顯示。 本說明書實施例採用的上述至少一個技術方案能夠達到以下有益效果: 通過本說明書提供的方法,通過獲取在程式介面的截圖,以及監測用戶對游標的操作,將游標吸附至確定出的元素邊界上,使得無需精確將游標線的移動至元素邊界,便可以確定精確測量的元素尺寸。同理,通過確定該游標的邊界以及游標所在位置的顏色,從而確定字元邊界,進而準確的確定字元的尺寸,使得只需將游標覆蓋在字元上,便可得到字元的尺寸。使得在行動終端上,即使用戶的手指無法精確的移動游標或者游標,也以得到精確的元素尺寸以及字元尺寸,彌補了現有技術難以在行動終端上精確測量元素尺寸以及字元尺寸的缺陷,使得在行動終端上就可以方便、準確的確定程式介面中元素以及字元的尺寸。The embodiments of the present specification provide an information display method and device, which are used to solve the problem that it is difficult for the prior art to conveniently and accurately determine the element size and character size of the program interface on the mobile terminal. The following technical solutions are used in the embodiments of this specification: An information display method, which includes: obtaining a screenshot of the program interface of the mobile terminal, displaying at least one pair of cursors, and monitoring the operation of the user; for each pair of cursors, when the user When performing operations on the cursors, determine the positions corresponding to the cursors where the operations are performed; according to the corresponding positions of the cursors, determine the selection range corresponding to the cursors in the screenshot; according to the preset boundary algorithm, In the selection range corresponding to each cursor, determine the boundary of the element in the programming interface; move each cursor to be operated to the boundary of the element determined separately; display the pair of cursors the distance between. An information display method, including: obtaining a screenshot of a program interface of a mobile terminal, displaying at least one cursor, and monitoring a user's operation; when the user is detected to perform an operation on any cursor, determining the position of the cursor being executed; Determine the color at the position in the screenshot; determine the character boundary according to the cursor boundary and the color; determine the size of the character covered by the cursor according to the determined character boundary, And display. An information display device includes: obtaining a display and monitoring module, obtaining a screenshot of a program interface of a mobile terminal, displaying at least a pair of cursors, and monitoring user operations; a first determining module, for each pair of cursors, when a user is monitored When performing an operation on the pair of cursors, determine the positions corresponding to the cursors where the operations are performed; the second determining module, according to the corresponding positions of the cursors, determine the selection range corresponding to the cursors in the screenshot; 3. Determine the module, according to the preset boundary algorithm, determine the boundary of the elements in the programming interface respectively within the selection range corresponding to each cursor; Fourth, determine the module, which will perform the operation Each cursor moves to the boundary of the element respectively determined; the display module displays the distance between the pair of cursors. An information display device includes: obtaining a display and monitoring module, obtaining a screenshot of a program interface of a mobile terminal, displaying at least one cursor, and monitoring a user's operation; a first determining module, when the user is monitored to perform an operation on any cursor , Determine the position of the cursor on which the operation is performed; the second determination module, determine the color at the position in the screenshot; the third determination module, based on the boundary of the cursor and the color, Determine the character boundary; the display module determines the size of the character covered by the cursor according to the determined character boundary and displays it. A mobile terminal includes: one or more processors and memory, and the program is configured to be executed by one or more processors to obtain the following steps: obtain a screenshot of the program interface of the mobile terminal, display at least one pair of cursors, And monitor the operation of the user; for each pair of cursors, when it is detected that the user performs an operation on the pair of cursors, determine the positions of the cursors corresponding to the operations performed; according to the corresponding positions of the cursors, determine in the screenshot The selection range corresponding to each cursor; according to the preset boundary algorithm, within the selection range corresponding to each cursor, respectively determine the boundary of the element in the programming interface; each cursor to be executed Move to the boundary of the element determined separately; display the distance between the pair of cursors. A mobile terminal includes: one or more processors and a memory, and the program is configured to be executed by one or more processors to take the following steps: obtain a screenshot of the program interface of the mobile terminal, display at least one cursor, and Monitor the operation of the user; when it is detected that the user performs an operation on any cursor, determine the location of the cursor being executed; determine the color at the location in the screenshot; according to the boundary and location of the cursor Determine the character boundary according to the color; determine the size of the character covered by the cursor according to the determined character boundary and display it. The above-mentioned at least one technical solution adopted in the embodiments of the present specification can achieve the following beneficial effects: Through the method provided in the present specification, by taking screenshots on the program interface and monitoring user operations on the cursor, the cursor is adsorbed to the determined element boundary , So that it is not necessary to accurately move the cursor line to the element boundary, you can determine the accurately measured element size. Similarly, by determining the boundary of the cursor and the color of the cursor location, the character boundary is determined, and the character size is accurately determined, so that the character size can be obtained by simply covering the character with the cursor. Therefore, on the mobile terminal, even if the user's finger cannot move the cursor or the cursor accurately, the accurate element size and character size are obtained, which makes up for the shortcomings of the prior art that it is difficult to accurately measure the element size and character size on the mobile terminal. Therefore, the size of elements and characters in the program interface can be conveniently and accurately determined on the mobile terminal.
現有技術中,在行動終端上開發應用時,為了使應用能夠提供更好的用戶體驗,通常會由互動設計師、視覺設計師以及程式師共同協作進行應用開發。 應用開發的流程通常是,先由互動設計師、視覺設計師(為方便描述以下統一稱為設計人員)對應用的介面、互動邏輯等進行設計,確定應用的設計稿(如,介面樣式、對話模式等等),之後再由程式開發人員根據該設計稿,進行應用編寫。 其中,程式開發人員在根據設計稿進行程式編寫時,需要從視覺上儘量還原設計稿的內容。但是,由於程式開發人員和設計人員對於設計稿的理解存在一定的偏差,通常編寫好的應用難以準確的還原出設計稿中的視覺效果。因此還需要設計人員對編寫好的應用進行驗收,判斷是否存在不滿足設計需求的內容。若是則向程式開發人員提出修改意見,再由程式開發人員進行修改,如此反復直至應用符合設計需求為止。上述驗收以及修改的過程通常稱為視覺還原。 其中,設計人員在進行視覺效果的驗收時,主要對程式介面的顏色、元素尺寸以及字元尺寸等進行驗收。並且,元素通常為在程式介面中的由平行線以及垂直線構成的矩形。尺寸的大小通常基於像素點(pixel,px)的數量確定,例如,在安卓系統中以密度獨立像素(Density-independent Pixels,dp)表示元素尺寸,以比例尺獨立像素(Scale-independent Pixels,sp)表示字元尺寸。 但是現有技術中,行動終端上的測量尺寸的工具一般是顯示一對游標之間的距離,當用戶需要測量元素或者字元尺寸時,通過手指在螢幕上將游標分別至元素的邊界,並將測量尺寸的工具顯示的游標之間的距離,作為元素或者字元尺寸。而由於人手指在螢幕上的操作精度較低,導致測量的精度難以保證。 或者在現有技術中,由設計人員將應用的介面進行截圖後,發送至個人電腦上,以在尺寸較大的螢幕(如,顯示器的螢幕)上對截圖進行放大後,再對元素或者字元的尺寸進行精確測量。但又會導致操作繁瑣,測量效率低等問題。 因此,本說明書各實施例提供一種資訊顯示的方法以及裝置,解決現有技術難以方便、精確的確定行動終端上的程式介面的元素尺寸以及字元尺寸的問題。 為使本說明書的目的、技術方案和優點更加清楚,下面將結合本說明書具體實施例及相應的附圖對本發明技術方案進行清楚、完整地描述。顯然,所描述的實施例僅是本發明一部分實施例,而不是全部的實施例。基於說明書中的實施例,本領域普通技術人員在沒有做出進步性勞動前提下所獲得的所有其他實施例,都屬於本發明保護的範圍。 以下結合附圖,詳細說明本發明各實施例提供的技術方案。 圖2為說明書實施例提供的一種資訊顯示的過程,具體可包括以下步驟: S100:獲取行動終端的程式介面的截圖,顯示至少一對游標,並監測用戶的操作。 由於本說明書提供的方法用於解決在行動終端上難以方便精確測量應用的程式介面中元素以及字元的尺寸的問題,所以可由行動終端自身或者安裝在行動終端上的程式,執行本說明書實施例提供的資訊顯示過程。 其中,該行動終端可以是手機、平板電腦等設備,本說明書對此不做限定。而若通過安裝在行動終端上的程式執行該資訊顯示過程,則該程式可以為安裝在行動終端的系統中的程式,並通過運行該程式執行上述資訊顯示過程。此時,該行動終端的程式介面,為待測量元素尺寸的程式介面。而待測量的程式介面對應的程式為第三方程式。如,系統程式(則,此時程式介面為系統介面)或者安裝在系統程式中的其他程式,如圖3a所示。 具體的,無論是通過行動終端自身還是通過行動終端上安裝的程式執行該資訊顯示過程,都需要獲取待測量的程式介面的截圖且顯示至少一對游標,以監測用戶對游標對的操作執行後續操作。其中,本說明書對於游標的形狀不做限定,為了方便描述,後續以游標是線段為例進行說明。具體的,每對游標可為相互平行的線段,並且該線段的長度可以根據需要進行設置。例如,該游標的線段可為貫穿浮動視窗的線段,也可以是預設長度的線段,如圖3b所示。 圖3a為本說明書實施例提供的待測量的程式介面的示意圖,圖3b為本說明書實施例提供的在程式介面上顯示游標線以及游標的示意圖。 進一步地,該游標可以顯示在浮動視窗(Float Window)中。則該浮動視窗為執行該資訊顯示過程的程式的介面,該浮動視窗可為透明視窗。並且,該浮動視窗的視窗Z序高於該程式介面的視窗Z序。於是,當顯示該浮動視窗後,雖然該浮動視窗的視窗Z序在程式介面之上,但是並不會遮擋程式介面中的內容。並且,由於將游標顯示在浮動視窗中,所以當用戶對游標操作時,不會誤觸待測量的程式介面中的元素(如,按鍵)。 另外,通過如圖1所示的程式介面的示意圖,可見在程式介面中的元素通常為矩形。因此,為了方便確定元素的縱向邊長以及水平邊長,在本說明書中可顯示兩對游標。其中,一對游標在為水平的線段,另一對游標為垂直的線段,如圖3c所示。 進一步地,在本說明書中,獲取截圖、顯示游標對以及監測用戶的操作之間不存在執行先後順序。既可以先獲取截圖,再顯示游標最後監測用戶的操作,也可以先監測用戶的操作,再獲取截圖最後顯示游標,本說明書對此不做限定。 具體的,可在當監測到用戶輸入指令時,顯示該浮動視窗。例如,該浮動視窗對應的程式在啟動之後可以顯示浮動按鍵,該浮動按鍵的視窗Z序高於待測量的程式介面的視窗Z序。則在後續該待測量的程式啟動後,該程式介面不會遮擋該浮動按鍵。因此,可在監測到用戶對該浮動按鍵執行點擊操作時(即,監測到用戶輸入指令時),在該程式介面上顯示該浮動視窗。上述過程可如圖4a至4d所示。 圖4a為本說明書提供的行動終端的系統介面的示意圖。其中,系統介面中的APP1為浮動視窗對應的程式,當用戶啟動該程式後可顯示浮動按鍵。圖4b為啟動浮動視窗對應的程式後,在該系統介面上顯示浮動按鍵的示意圖。其中,系統介面中的APP4為待測量的程式介面對應的程式,當用戶啟動APP4後可顯示程式介面。圖4c為啟動待測量的程式介面對應的程式啟動後,在程式介面上顯示浮動按鍵的示意圖。其中,浮動按鍵的視窗Z序高於程式介面的視窗Z序,所以不會被程式介面遮擋。當監測到用戶對該浮動按鍵執行點擊操作後,可顯示該浮動視窗。圖4d為監測到用戶對浮動按鍵執行點擊操作後,在程式介面上顯示浮動視窗的示意圖。其中,浮動視窗中顯示兩對游標。並且,由於浮動視窗為透明視窗,所以並不會遮擋程式介面中的內容。 進一步地,在本說明書實施例中也可在監測到用戶輸入指令時獲取程式介面的截圖。而獲取截圖的指令與顯示浮動視窗的指令可以是同一個指令,則在監測到用戶輸入指令時,可顯示浮動視窗以及獲取截圖。或者,也可以在該浮動視窗中顯示截圖按鍵,當監測到用戶點擊截圖按鍵時,確定用戶輸入指令,並獲取程式介面的截圖。 S102:針對每對游標,當監測到用戶對該對游標執行操作時,確定被執行所述操作的各游標分別對應的位置。 在本說明書實施例中,針對每對游標,當監測到用戶對該對游標執行操作時,可進一步確定被執行操作的各游標分別對應的位置。為方便描述,在本說明書中以一對游標中的一個游標為例進行說明。 具體的,由於游標通常為拖動使用的,所以該操作可以是拖動操作。於是可當監測到用戶對游標執行的拖動操作時,確定游標對應的位置。當然,本說明書並不限定該操作具體為何種操作,可以根據需要進行設置。例如,也可當監測到用戶對游標執行點擊操作、按兩下操作等等操作時,確定游標對應的位置。 另外,在本說明書中,若以監測用戶對游標執行拖動操作為例進行說明。由於用戶在對游標執行拖動操時,游標的位置可能在不斷變化,所以可以在監測到拖動操作結束時,再確定游標的位置。以減少確定游標位置的次數,減少資源消耗。 需要說明的是,此時確定的游標的位置,是游標在行動終端的螢幕中的位置。並且,由於獲取的程式介面的截圖也是顯示行動終端的螢幕中的,所以也可視為,確定出的游標的位置為游標在程式介面中的位置。 S104:根據各游標分別對應位置,在所述截圖中確定各游標分別對應的選擇範圍。 在本說明書實施例中,繼續以一對游標中的一個游標為例進行說明。當在步驟S102中確定了游標對應的位置之後,可進一步在獲取的截圖中,確定該位置對應的選擇範圍。也就是說,確定每一個游標所在位置對應的選擇範圍。以便後續再根據預設的邊界演算法,在確定出的選擇範圍內,確定程式介面中元素的邊界,以執行後續步驟。 具體的,由於通常在程式介面中存在多個元素,而距離游標較遠的元素,顯然是用戶需要測量尺寸的元素的可能性較低。也就是說,通常用戶會將游標移動至元素的邊界附近,以測量元素尺寸。因此,為了避免確定出的錯誤的元素的邊界,在確定出游標位置之後,可先確定該位置對應的選擇範圍。並且,將在該選擇範圍內的元素的邊界視為待選的邊界,再通過步驟S106確定邊界。其中,該選擇範圍的長度單位可以以dp表示。如,選擇範圍為距離該游標10dp以內的範圍。 其中,該選擇範圍的數值可以根據需要進進行設置,本說明書對此不做限定。並且,由於游標為線段時,該線段的長度也可以根據需要設置,如,圖3b所示。因此,該選擇範圍可包括垂直範圍和/或水平範圍。例如,當游標為貫穿行動終端螢幕的水平線段時,該選擇範圍可以僅為垂直範圍。當游標為貫穿行動終端螢幕的垂直線段時,該選擇範圍可以僅為水平範圍。當游標為長度10dp的線段時,則該選擇範圍可包括既垂直範圍也水平範圍。 S106:根據預設的邊界演算法,在各游標分別對應的所述選擇範圍內,分別確定所述程式介面中的元素的邊界。 在本說明書實施例中,當確定游標對應的選擇範圍後,可以繼續根據預設的邊界演算法,確定元素的邊界。 具體的,在本說明書提供第一種確定元素的邊界的方法中。首先,可根據預設的邊界演算法,確定程式介面中各元素的邊界。之後,再確定在該游標對應的選擇範圍內的邊界。最後,再從在選擇範圍內各邊界中,選擇距離該游標最近的邊界。其中,該預設的邊界演算法可以是Sobel邊緣檢測演算法、Roberts運算元等等,本說明書對此不做限定。 另外,在本說明書提供的第二種確定元素的邊界的方法中,該游標可為線段。首先,可確定在該游標的位置上,該程式介面顯示的顏色,作為基礎顏色。之後,再在該選擇範圍內,確定與該游標的線段平行、超過預設長度以及顏色與基礎顏色不同的至少一條線段。最後,從確定出的各線段中,選擇距離游標最近的線段作為確定出的邊界。其中預設長度可以根據需要進行設置,本說明書對此不做限定。 例如,假設游標為貫穿螢幕的水平線段。首先,可以先確定游標對應的基礎顏色。之後以該游標所在的線段為起始點,向上或者向下,逐行確定長度超過預設長度且不是基礎顏色的線段。最後,將距離該線段垂直距離最小的線段作為邊界。 需要說明的是,對於程式介面中的元素來說,元素邊界在本說明書中可以視為是上述的線段。例如,假設圖5所示的10×10的色塊為程式介面中的一個元素。則其中虛線框所圍成的1×10的該色塊的邊界為本說明書的線段。也就是說若該色塊全都在某一個游標對應的選擇範圍內,可將該色塊確定為10條線段。 S108:將被執行所述操作的各游標分別移動至分別確定出的所述元素的邊界。 S110:顯示該對游標之間的距離。 在本說明書實施例中,以一對游標中的一個游標為例,當確定了出該游標對應的邊界後,便可將該游標線移動至確定出的邊界上。則對於被執行操作的每對游標來說,該對游標中的各游標均可通過上述步驟S102~S106確定分別對應的元素的邊界。則通過步驟S108,該對游標中的各游標均可分別移動至其對應的元素邊界。則此時再顯示該對游標之間距離時,由於游標均已移動至元素的邊界,所以顯示距離為準確的。 具體的,在步驟S102中對於每對游標來說,用戶通常只能分別對該對游標中的各游標分別執行操作。所以在步驟S110顯示游標對之間的距離時,存在該對游標中的一個游標移動至元素的邊界,而另一個游標線並沒有移動至元素的邊界的情況。則此時,也可顯示該游標對之間的距離,但是顯示的距離並不是元素的尺寸(如圖6a以及6b所示)。而在用戶對另一個游標執行操作後,重複上述步驟,則另一游標也可移動至確定出的元素的邊界。從而使得顯示游標對之間的距離為精確的元素尺寸(如,圖6c以及6d所示)。其中,上述距離可以以dp為單位進行顯示。 通過上述資訊顯示過程,可見無需精確將游標的移動至元素邊界。通過確定游標對應的選擇範圍,進而確定元素的邊界。再將游標移動至確定出的邊界,從而確定精確測量的元素尺寸。解決了無法在行動終端上精確測量元素尺寸的問題。 另外,在本說明書中,也可以不在步驟S100中獲取截圖,而是在本說明書步驟S102中獲取截圖。具體的,可將監測到用戶對游標執行操作,作為監測到用戶輸入指令。於是,可在監測到用戶對游標執行拖動操作時,獲取程式介面的截圖。 進一步地,由於用戶手指操作精度較低,所以可能會多次對游標執行拖動操作後,才將游標移動至需要測量的元素邊界附近的情況。則若每監測到用戶對游標執行操作,就獲取一次截圖可能導致獲取的截圖過多。導致終端的快取造成儲存壓力較大。並進一步導致終端執行垃圾回收機制(Garbage Collection,GC)的次數增加。 因此,在本說明書中為了降低快取壓力以及減少GC次數,在監測到用戶對游標執行拖動操作時,可先判斷在預設時間段內是否儲存過截圖,若是,則呼叫已儲存的所述截圖,若否,則對所述程式介面執行截圖操作,獲取截圖並儲存。其中,對程式介面執行截圖操作後獲取的截圖可以儲存在該行動終端的快取中。 具體的,該預設時間段對應預設的時長,該時長可根據需要進行設置。當在監測到用戶執行拖動操作時,回溯該預設的時長,確定該預設時間段。進而執行後續判斷的步驟。也就是說,當行動終端對程式介面執行截圖操作,並將截圖儲存之後。在預設時長內無論監測到用戶執行多少次拖動操作,均可使用快取中已儲存的截圖。而無需在每次監測拖動操作時,都對程式介面執行截圖操作。 更進一步地,在程式介面中,元素的在顯示的時可能並不會顯示元素邊界。例如,元素為透明背景上繪製的圖案。則通過現有確定邊界方法,只能確定該圖案的邊界。於是,為了方便確定元素邊界,在獲取該程式介面的截圖之前,還可以啟動現有的介面佈局邊界顯示工具,以顯示程式介面中各元素的邊界。 例如,假設圖7a為各元素均沒有顯示元素的邊界的情況。則在啟動介面佈局邊界顯示工具後,可顯示如圖7b所示的元素邊界。需要說明的是,程式介面對應的程式,執行資訊顯示過程的程式以及介面佈局邊界顯示工具可為三個不同的獨立程式。 需要說明的是,本發明實施例所提供方法的各步驟的執行主體均可以是同一設備,或者,該方法也由不同設備作為執行主體。例如,步驟S102和步驟S104的執行主體可以為設備1,步驟S106和步驟S108的執行主體可以為設備2;又例如,步驟S102和驟S106的執行主體可以為設備2,步驟S104和步驟S108的執行主體可以為設備1;等等。上述對本說明書特定實施例進行了描述。其它實施例在所附申請專利範圍的範圍內。在一些情況下,在申請專利範圍中記載的動作或步驟可以按照不同於實施例中的順序來執行並且仍然可以實現期望的結果。另外,在附圖中描繪的過程不一定要求顯示的特定順序或者連續順序才能實現期望的結果。在某些實施方式中,多工處理和並行處理也是可以的或者可能是有利的。 基於圖2所示的資訊顯示方法,本說明書實施例還提供一種資訊顯示方法,如圖8所示。 圖8為本說明書實施例提供的一種資訊顯示過程,具體可包括以下步驟: S200:獲取行動終端的程式介面的截圖,顯示至少一個游標,並監測用戶的操作。 S202:當監測到用戶對任一游標執行操作時,確定被執行所述操作的游標的位置。 在本說明書實施例中,該資訊顯示過程用於在行動終端中顯示字元的尺寸。與圖2所示的資訊顯示過程類似,可由行動終端自身或者安裝的程式執行該資訊顯示過程。 具體的,由於通常在程式介面中字元的大小要小於元素的大小,所以通過游標對測量字元時存在困難。因此在本說明書中,在測量字元尺寸時,可以顯示至少一個游標。並通過後續步驟顯示游標遮蓋的字元的字元尺寸。其中,在本說明書實施例中,該游標的形狀可以是矩形。游標的尺寸可以根據需要進行設置。 另外,對於步驟中其他操作均可參考步驟S100以及步驟S102中的描述,本說明書對此不再贅述。 S204:在所述截圖中確定在所述位置上的顏色。 S206:根據所述游標的邊界以及所述顏色,確定字元邊界。 在本說明書實施例中,在確定出游標的位置之後,還可在獲取的截圖中,確定該位置上的顏色。之後再根據該游標的邊界以及確定出的顏色,確定字元的邊界。 具體的,在本說明書實施例中,該游標可部分遮蓋待測量的字元,則在步驟S204中確定游標所在位置上的顏色時,可以確定出字元的顏色以及背景顏色。並在後續步驟S206中,根據確定出的字元的顏色、確定出的背景顏色以及游標邊界,確定出游標遮蓋的字元的邊界。 並且,由於字元的尺寸一般只能通過字元的高度或者字元的寬度確定,所以在確定字元的邊界時,可先確定游標上下邊界和/或游標的左右邊界。當然,由於現有技術中通常以字元的高度作為字元的尺寸,所以在本說明書以確定游標的高度為例進行後續說明。 首先,確定游標的上邊界以及下邊界。之後,根據步驟S204中確定出的顏色,進一步確定游標的上邊界對應的顏色,以及游標的下邊界對應的顏色。其中,游標的上邊界對應的顏色中包含字元的顏色以及上邊界對應的背景顏色,游標的下邊界對應的顏色中包含字元的顏色以及下邊界對應的背景顏色。接著,確定游標的左右邊界的延長線之間的各行像素,以游標的上邊界為起始行依次向上,從確定出的各行像素中,選擇與下一行像素的顏色不完全相同的一行像素,作為字元的上邊界。同理,針對游標的下邊界,採用相同的方法確定字元邊界的下邊界。當確定出字元邊界的上下邊界時,將上下邊界之間的距離作為字元邊界的高度。 例如圖9所示的確定字元邊界的上下邊界的過程。在圖9中,游標覆蓋在“人”字元上,可確定游標位置的顏色為黑色和白色。在步驟S206中,可以從游標的上下邊界開始,逐行判斷是否出現與該游標位置不完全相同的顏色,當判斷到“人”字元以外的一行時,該行中只存在白色,則可確定已經判斷過的上一行為字元的邊界,從而確定字元邊界的上下邊界。進而將上下邊界之間的距離作為字元邊界的高度。 同理,在本說明書實施例中,也可確定游標的上下邊界的延長線之間的各列像素。並以游標的左邊界為起始列依次向左,從確定出的各列像素中,選擇與下一列像素的顏色不完全相同的一列像素,作為字元的左邊界。以游標的右邊界為起始列依次向右,從確定出的各列像素中,選擇與下一列像素的顏色不完全相同的一列像素,作為字元的右邊界。將字元邊界的左右邊界之間的距離作為字元邊界的寬度。 S208:根據確定出的字元邊界,確定所述游標所覆蓋的字元的尺寸,並顯示。 在本說明書實施例中,由於不同的行動終端的螢幕尺寸、像素密度等等都不完全一致,所以通常設置的字元尺寸,與實際顯示在程式介面中的字元尺寸(如,字元邊界的高度或者字元邊界的寬度)不能保持一致。例如,程式開發人員設置的字元尺寸為12px,但是在程式介面中顯示的字元尺寸卻為10px。因此,字元邊界的高度或者寬度並不時準確的確定字元尺寸。 於是,在本說明書中,還可以根據預先獲取的擬合公式,確定與該字元邊界對應的字元尺寸,並顯示。 具體的,可由該行動終端自身或者執行該資訊顯示過程的程式,預先向伺服器發送行動終端的設備資訊(如,設備型號、螢幕尺寸、像素密度等),之後再接收伺服器返回的與該設備資訊對應的擬合公式並儲存。則在確定出字元邊界的高度或者寬度之後,可以將該高度或者寬度輸入該擬合公式中,從而得到對應的字元尺寸。 其中,伺服器可預先確定不同設備資訊分別對應的擬合公式,在接收到設備資訊時,確定對應的擬合公式並返回。例如,伺服器可針對每種型號的行動終端,採集在該行動終端中設置的字元尺寸,及其對應的實際顯示時字元尺寸,共同左右樣本。通過最小二乘法確定設置的字元尺寸與實際顯示的字元尺寸的擬合曲線,獲取該擬合曲線對應的擬合公式,如圖10所示。 通過圖10所示的擬合曲線對應的擬合公式,行動終端便可確定與該字元上下邊界的距離(即,實際顯示的字元尺寸)對應的字元尺寸(即,設置的字元尺寸)。 通過圖8所示的資訊顯示過程,可見只需將游標遮蓋在需要測量的字元上,便可得到準確的字元尺寸。解決了難以在行動終端上測量字元尺寸的問題。 另外,在本說明書實施例中,需要通過游標遮蓋字元才可確定字元尺寸。但是,程式介面中可能存在較大的字元也可能存在較小的字元,所以單一尺寸的游標可能對於測量字元尺寸帶來不便。因此,在步驟S200中可顯示多個游標,並且各游標的尺寸可不完全相同,以滿足對不同大小的字元的測量需求。 進一步地,在本說明書實施例中,圖2以及圖8所示的資訊顯示方法可以同時存在。於是在本說明書,元素尺寸可顯示在每對游標的中間,字元尺寸可顯示在游標旁邊,如,圖11所示。當然,具體該距離和尺寸如何顯示本說明書不做限定。 基於圖2所示的資訊顯示方法,本說明書實施例還提供一種資訊顯示裝置,如圖12所示。 圖12為本說明書實施例提供的一種資訊顯示裝置的結構示意圖,包括: 獲取顯示及監測模組300,獲取行動終端的程式介面的截圖,顯示至少一對游標,並監測用戶的操作; 第一確定模組302,針對每對游標,當監測到用戶對該對游標執行操作時,確定被執行所述操作的各游標分別對應的位置; 第二確定模組304,根據各游標分別對應位置,在所述截圖中確定各游標分別對應的選擇範圍; 第三確定模組306,根據預設的邊界演算法,在各游標分別對應的所述選擇範圍內,分別確定所述程式介面中的元素的邊界; 第四確定模組308,將被執行所述操作的各游標分別移動至分別確定出的所述元素的邊界; 顯示模組310,顯示該對游標之間的距離。 獲取顯示及監測模組300,顯示浮動視窗,在所述浮動視窗中顯示至少一對游標,其中,所述浮動視窗為透明視窗,所述浮動窗顯示於所述程式介面的上層。 獲取顯示及監測模組300,在所述行動終端的螢幕中顯示兩對游標,其中,一對游標在為水平的線段,另一對游標為垂直的線段。 獲取顯示及監測模組300,當監測到用戶輸入指令時,顯示所述浮動視窗和/或獲取所述程式介面的截圖。 第三確定模組306,針對該對游標中的每個游標,確定該游標的位置上所述程式介面顯示的顏色,作為基礎顏色,在該游標對應的所述選擇範圍內,確定與所述游標的線段平行、超過預設長度以及顏色與所述基礎顏色不同的線段,作為確定出的邊界。 第三確定模組306,在該游標對應的所述選擇範圍內,確定與所述游標的線段平行、超過預設長度以及顏色與所述基礎顏色不同的至少一條線段,從確定出的至少一條線段中,選擇與所述游標距離最近的線段,作為確定出的邊界。 獲取顯示及監測模組300,獲取行動終端上程式介面的截圖之前,啟動介面佈局邊界顯示工具,顯示所述程式介面中各元素的邊界。 基於圖8所示的資訊顯示方法,本說明書實施例還提供一種資訊顯示裝置,如圖13所示。 圖13為本說明書實施例提供的一種資訊顯示裝置的結構示意圖,包括: 獲取顯示及監測模組400,獲取行動終端的程式介面的截圖,顯示至少一個游標,並監測用戶的操作; 第一確定模組402,當監測到用戶對任一游標執行操作時,確定被執行所述操作的游標的位置; 第二確定模組404,在所述截圖中確定在所述位置上的顏色; 第三確定模組406,根據所述游標的邊界以及所述顏色,確定字元邊界; 顯示模組408,根據確定出的字元邊界,確定所述游標所覆蓋的字元的尺寸,並顯示。 所述游標的形狀為矩形; 第三確定模組406,確定所述游標的上下邊界和/或所述游標的左右邊界,根據所述顏色,在所述截圖中確定所述游標的上下邊界分別對應的顏色和/或所述游標的左右邊界分別對應的顏色,根據所述游標的上下邊界分別對應的顏色,確定所述字元邊界的高度,和/或根據所述游標的左右邊界分別對應的顏色,確定所述字元邊界的寬度。 第三確定模組406,確定所述游標的左右邊界的延長線之間的各行像素,以所述游標的上邊界為起始行依次向上,從確定出的各行像素中,選擇與下一行像素的顏色不完全相同的一行像素,作為所述字元的上邊界,以所述游標的下邊界為起始行依次向下,從確定出的各行像素中,選擇與下一行像素的顏色不完全相同的一行像素,作為所述字元的下邊界,將所述字元邊界的上下邊界之間的距離作為所述字元邊界的高度。 第三確定模組406,確定所述游標的上下邊界的延長線之間的各列像素,以所述游標的左邊界為起始列依次向左,從確定出的各列像素中,選擇與下一列像素的顏色不完全相同的一列像素,作為所述字元的左邊界,以所述游標的右邊界為起始列依次向右,從確定出的各列像素中,選擇與下一列像素的顏色不完全相同的一列像素,作為所述字元的右邊界,將所述字元邊界的左右邊界之間的距離作為所述字元邊界的寬度。 顯示模組408,根據預先獲取的擬合公式,確定所述字元邊界的高度對應的尺寸和/或確定所述字元邊界的寬度對應的尺寸。 顯示模組408,預先向伺服器發送所述行動終端的設備資訊,接收所述伺服器返回的與所述設備資訊對應的擬合公式並儲存。 基於圖2所示的資訊顯示方法,本說明書實施例還提供另一種行動終端,如圖14所示。 圖14為本說明書實施例提供的一種終端的結構示意圖,該終端,包括:一個或多個處理器及記憶體,所述程式被配置成由一個或多個處理器執行以下步驟: 獲取所述行動終端的程式介面的截圖,顯示至少一對游標,並監測用戶的操作; 針對每對游標,當監測到用戶對該對游標執行操作時,確定被執行所述操作的各游標分別對應的位置; 根據各游標分別對應位置,在所述截圖中確定各游標分別對應的選擇範圍; 根據預設的邊界演算法,在各游標分別對應的所述選擇範圍內,分別確定所述程式介面中的元素的邊界; 將被執行所述操作的各游標分別移動至分別確定出的所述元素的邊界; 顯示該對游標之間的距離。 基於圖8所示的資訊顯示方法,本說明書實施例還提供另一種行動終端,如圖15所示。 圖15為本說明書實施例提供的一種終端的結構示意圖,該終端,包括:一個或多個處理器及記憶體,所述程式被配置成由一個或多個處理器執行以下步驟: 獲取所述行動終端的程式介面的截圖,顯示至少一個游標,並監測用戶的操作; 當監測到用戶對任一游標執行操作時,確定被執行所述操作的游標的位置; 在所述截圖中確定在所述位置上的顏色; 根據所述游標的邊界以及所述顏色,確定字元邊界; 根據確定出的字元邊界,確定所述游標所覆蓋的字元的尺寸,並顯示。 需要說明的是,本說明書中的各個實施例均採用遞進的方式描述,各個實施例之間相同相似的部分互相參見即可,每個實施例重點說明的都是與其他實施例的不同之處。尤其,對於本發明實施例提供的行動終端以及伺服器而言,由於其基本相似於方法實施例,所以描述的比較簡單,相關之處參見方法實施例的部分說明即可。 在20世紀90年代,對於一個技術的改進可以很明顯地區分是硬體上的改進(例如,對二極體、電晶體、開關等電路結構的改進)還是軟體上的改進(對於方法流程的改進)。然而,隨著技術的發展,當今的很多方法流程的改進已經可以視為硬體電路結構的直接改進。設計人員幾乎都通過將改進的方法流程程式設計到硬體電路中來得到相應的硬體電路結構。因此,不能說一個方法流程的改進就不能用硬體實體模組來實現。例如,可程式設計邏輯裝置(Programmable Logic Device, PLD)(例如現場可程式設計閘陣列(Field Programmable Gate Array,FPGA))就是這樣一種積體電路,其邏輯功能由用戶對裝置程式設計來確定。由設計人員自行程式設計來把一個數位系統“集成”在一片PLD上,而不需要請晶片製造廠商來設計和製作專用的積體電路晶片。而且,如今,取代手工地製作積體電路晶片,這種程式設計也多半改用“邏輯編譯器(logic compiler)”軟體來實現,它與程式開發撰寫時所用的軟體編譯器相類似,而要編譯之前的原始代碼也得用特定的程式設計語言來撰寫,此稱之為硬體描述語言(Hardware Description Language,HDL),而HDL也並非僅有一種,而是有許多種,如ABEL(Advanced Boolean Expression Language)、AHDL(Altera Hardware Description Language)、Confluence、CUPL(Cornell University Programming Language)、HDCal、JHDL(Java Hardware Description Language)、Lava、Lola、MyHDL、PALASM、RHDL(Ruby Hardware Description Language)等,目前最普遍使用的是VHDL(Very-High-Speed Integrated Circuit Hardware Description Language)與Verilog。本領域技術人員也應該清楚,只需要將方法流程用上述幾種硬體描述語言稍作邏輯程式設計並程式設計到積體電路中,就可以很容易得到實現該邏輯方法流程的硬體電路。 控制器可以按任何適當的方式實現,例如,控制器可以採取例如微處理器或處理器以及儲存可由該(微)處理器執行的電腦可讀程式碼(例如軟體或韌體)的電腦可讀媒體、邏輯閘、開關、專用積體電路(Application Specific Integrated Circuit,ASIC)、可程式設計邏輯控制器和嵌入微控制器的形式,控制器的例子包括但不限於以下微控制器:ARC 625D、Atmel AT91SAM、Microchip PIC18F26K20 以及Silicone Labs C8051F320,記憶體控制器還可以被實現為記憶體的控制邏輯的一部分。本領域技術人員也知道,除了以純電腦可讀程式碼方式實現控制器以外,完全可以通過將方法步驟進行邏輯程式設計來使得控制器以邏輯閘、開關、專用積體電路、可程式設計邏輯控制器和嵌入微控制器等的形式來實現相同功能。因此這種控制器可以被認為是一種硬體部件,而對其內包括的用於實現各種功能的裝置也可以視為硬體部件內的結構。或者甚至,可以將用於實現各種功能的裝置視為既可以是實現方法的軟體模組又可以是硬體部件內的結構。 上述實施例闡明的系統、裝置、模組或單元,具體可以由電腦晶片或實體實現,或者由具有某種功能的產品來實現。一種典型的實現設備為電腦。具體的,電腦例如可以為個人電腦、膝上型電腦、蜂巢式電話、相機電話、智慧型電話、個人數位助理、媒體播放機、導航設備、電子郵件設備、遊戲控制台、平板電腦、可穿戴設備或者這些設備中的任何設備的組合。 為了描述的方便,描述以上裝置時以功能分為各種單元分別描述。當然,在實施本發明時可以把各單元的功能在同一個或多個軟體和/或硬體中實現。 本領域內的技術人員應明白,本發明的實施例可提供為方法、系統、或電腦程式產品。因此,本發明可採用完全硬體實施例、完全軟體實施例、或結合軟體和硬體態樣的實施例的形式。而且,本發明可採用在一個或多個其中包含有電腦可用程式碼的電腦可用儲存媒體(包括但不限於磁碟記憶體、CD-ROM、光學記憶體等)上實施的電腦程式產品的形式。 本發明是參照根據本發明實施例的方法、設備(系統)、和電腦程式產品的流程圖和/或方塊圖來描述的。應理解可由電腦程式指令實現流程圖和/或方塊圖中的每一流程和/或方塊、以及流程圖和/或方塊圖中的流程和/或方塊的結合。可提供這些電腦程式指令到通用電腦、專用電腦、嵌入式處理機或其他可程式設計資料處理設備的處理器以產生一個機器,使得通過電腦或其他可程式設計資料處理設備的處理器執行的指令產生用於實現在流程圖一個流程或多個流程和/或方塊圖一個方塊或多個方塊中指定的功能的裝置。 這些電腦程式指令也可儲存在能引導電腦或其他可程式設計資料處理設備以特定方式工作的電腦可讀記憶體中,使得儲存在該電腦可讀記憶體中的指令產生包括指令裝置的製造品,該指令裝置實現在流程圖一個流程或多個流程和/或方塊圖一個方塊或多個方塊中指定的功能。 這些電腦程式指令也可裝載到電腦或其他可程式設計資料處理設備上,使得在電腦或其他可程式設計設備上執行一系列操作步驟以產生電腦實現的處理,從而在電腦或其他可程式設計設備上執行的指令提供用於實現在流程圖一個流程或多個流程和/或方塊圖一個方塊或多個方塊中指定的功能的步驟。 在一個典型的配置中,計算設備包括一個或多個處理器(CPU)、輸入/輸出介面、網路介面和記憶體。 記憶體可能包括電腦可讀媒體中的非永久性記憶體,隨機存取記憶體(RAM)和/或非揮發性記憶體等形式,如唯讀記憶體(ROM)或快閃記憶體(flash RAM)。記憶體是電腦可讀媒體的示例。 電腦可讀媒體包括永久性和非永久性、可移動和非可移動媒體可以由任何方法或技術來實現資訊儲存。資訊可以是電腦可讀指令、資料結構、程式的模組或其他資料。電腦的儲存媒體的例子包括,但不限於相變記憶體(PRAM)、靜態隨機存取記憶體(SRAM)、動態隨機存取記憶體(DRAM)、其他類型的隨機存取記憶體(RAM)、唯讀記憶體(ROM)、電可抹除可程式設計唯讀記憶體(EEPROM)、快閃記憶體或其他記憶體技術、唯讀光碟唯讀記憶體(CD-ROM)、數位多功能光碟(DVD)或其他光學儲存、磁盒式磁帶,磁帶磁磁片儲存或其他磁性存放裝置或任何其他非傳輸媒體,可用於儲存可以被計算設備存取的資訊。按照本文中的界定,電腦可讀媒體不包括暫存電腦可讀媒體(transitory media),如調變的資料訊號和載波。 還需要說明的是,術語“包括”、“包含”或者其任何其他變體意在涵蓋非排他性的包含,從而使得包括一系列要素的過程、方法、商品或者設備不僅包括那些要素,而且還包括沒有明確列出的其他要素,或者是還包括為這種過程、方法、商品或者設備所固有的要素。在沒有更多限制的情況下,由語句“包括一個……”限定的要素,並不排除在包括所述要素的過程、方法、商品或者設備中還存在另外的相同要素。 本領域技術人員應明白,本發明的實施例可提供為方法、系統或電腦程式產品。因此,本發明可採用完全硬體實施例、完全軟體實施例或結合軟體和硬體態樣的實施例的形式。而且,本發明可採用在一個或多個其中包含有電腦可用程式碼的電腦可用儲存媒體(包括但不限於磁碟記憶體、CD-ROM、光學記憶體等)上實施的電腦程式產品的形式。 本發明可以在由電腦執行的電腦可執行指令的一般上下文中描述,例如程式模組。一般地,程式模組包括執行特定任務或實現特定抽象資料類型的常式、程式、物件、元件、資料結構等等。也可以在分散式運算環境中實踐本發明,在這些分散式運算環境中,由通過通訊網路而被連接的遠端處理設備來執行任務。在分散式運算環境中,程式模組可以位於包括存放裝置在內的本地和遠端電腦儲存媒體中。 本說明書中的各個實施例均採用遞進的方式描述,各個實施例之間相同相似的部分互相參見即可,每個實施例重點說明的都是與其他實施例的不同之處。尤其,對於系統實施例而言,由於其基本相似於方法實施例,所以描述的比較簡單,相關之處參見方法實施例的部分說明即可。 以上所述僅為本發明的實施例而已,並不用於限制本發明。對於本領域技術人員來說,本發明可以有各種更改和變化。凡在本發明的精神和原理之內所作的任何修改、等同替換、改進等,均應包含在本發明的申請專利範圍的範圍之內。In the prior art, When developing applications on mobile terminals, To enable the application to provide a better user experience, Usually an interactive designer, Visual designers and programmers work together to develop applications. The process of application development is usually, First, the interactive designer, The interface of the visual designer (hereinafter referred to as the designer for convenience), Design with interactive logic, Determine the design draft of the application (eg, Interface style, Dialogue mode, etc.), Afterwards, the program developers will follow the design draft, Write application. among them, When program developers write programs based on design drafts, It is necessary to restore the content of the design draft as far as possible visually. but, Because the developers and designers have a certain deviation in the understanding of the design draft, It is often difficult to accurately recreate the visual effects in the design draft. Therefore, designers also need to accept the written application, Determine whether there is content that does not meet the design requirements. If yes, propose amendments to the program developer, Then the program developers modify it, This is repeated until the application meets the design requirements. The above-mentioned acceptance and modification process is usually called visual restoration. among them, When designers accept the visual effects, Mainly for the color of the program interface, Accept the element size and character size. and, The element is usually a rectangle formed by parallel lines and vertical lines in the programming interface. The size is usually based on pixels (pixel, px) is determined, E.g, Density-independent pixels in the Android system, dp) represents the element size, Scale-independent pixels (Scale-independent Pixels, sp) represents the character size. But in the prior art, The measurement tool on the mobile terminal generally displays the distance between a pair of cursors, When users need to measure the size of elements or characters, Use your finger to move the cursor to the boundary of the element on the screen, And the distance between the cursors displayed by the size measurement tool, As element or character size. However, due to the low accuracy of human fingers on the screen, It is difficult to guarantee the accuracy of measurement. Or in the prior art, After the designer takes a screenshot of the application interface, Sent to a personal computer, With a larger screen (eg, (Enlarge the screenshot on the monitor screen), Then accurately measure the size of the element or character. But it will lead to cumbersome operations, Problems such as low measurement efficiency. therefore, The embodiments of the present specification provide an information display method and device, It is difficult to solve the existing technology, The problem of accurately determining the element size and character size of the program interface on the mobile terminal. For the purpose of this manual, The technical solutions and advantages are more clear, The technical solutions of the present invention will be clear below with reference to specific embodiments of the specification and corresponding drawings Describe it completely. Obviously, The described embodiments are only a part of the embodiments of the present invention, Not all embodiments. Based on the examples in the specification, All other embodiments obtained by those of ordinary skill in the art without making progressive labor, All belong to the protection scope of the present invention. The following in conjunction with the drawings, The technical solutions provided by the embodiments of the present invention are described in detail. FIG. 2 is a process of displaying information provided by an embodiment of the specification, It can include the following steps: S100: Get a screenshot of the program interface of the mobile terminal, Display at least one pair of cursors, And monitor user operations. Because the method provided in this specification is used to solve the problem that it is difficult to accurately measure the size of elements and characters in the application program interface on the mobile terminal, So it can be done by the mobile terminal itself or the program installed on the mobile terminal, Perform the information display process provided by the embodiments of this specification. among them, The mobile terminal can be a mobile phone, Tablets and other devices, This manual does not limit this. And if the information display process is executed through the program installed on the mobile terminal, Then the program may be a program installed in the system of the mobile terminal, And run the program to perform the above information display process. at this time, The program interface of the mobile terminal, It is the programming interface for the size of the element to be measured. The program corresponding to the program interface to be measured is a third-party program. Such as, System program (then, At this time, the program interface is the system interface) or other programs installed in the system program, As shown in Figure 3a. specific, Whether the information display process is executed through the mobile terminal itself or through the program installed on the mobile terminal, Both need to obtain a screenshot of the program interface to be measured and display at least a pair of cursors, To monitor the user's follow-up operations on the cursor pair. among them, This manual does not limit the shape of the cursor, For the convenience of description, The following description uses the cursor as a line segment as an example. specific, Each pair of cursors can be parallel to each other, And the length of the line segment can be set as needed. E.g, The line segment of the cursor may be a line segment through the floating window, It can also be a line segment with a preset length, As shown in Figure 3b. 3a is a schematic diagram of a program interface to be measured provided by an embodiment of the present specification, FIG. 3b is a schematic diagram of displaying cursor lines and cursors on a program interface provided by an embodiment of the present specification. further, The cursor can be displayed in a floating window (Float Window). Then the floating window is the interface of the program that executes the information display process, The floating window may be a transparent window. and, The window Z order of the floating window is higher than the window Z order of the program interface. then, When the floating window is displayed, Although the window Z sequence of the floating window is above the program interface, But it will not obscure the contents of the program interface. and, Since the cursor is displayed in the floating window, So when the user operates on the cursor, Do not accidentally touch the elements of the program interface to be measured (eg, button). In addition, Through the schematic diagram of the program interface shown in Figure 1, The elements visible in the programming interface are usually rectangular. therefore, In order to easily determine the vertical and horizontal lengths of the elements, Two pairs of cursors can be displayed in this manual. among them, A pair of cursors is on a horizontal line segment, Another pair of cursors are vertical line segments, As shown in Figure 3c. further, In this manual, Get screenshots, There is no order of execution between displaying cursor pairs and monitoring user operations. You can get the screenshot first, Then display the cursor and finally monitor the user's operation, You can also monitor user operations first, Then take a screenshot and finally display the cursor, This manual does not limit this. specific, When the user input instruction is monitored, The floating window is displayed. E.g, The program corresponding to the floating window can display a floating button after starting, The window Z sequence of the floating button is higher than the window Z sequence of the program interface to be measured. Then after the subsequent program to be measured is started, The program interface will not block the floating button. therefore, When it is detected that the user performs a click operation on the floating button (ie, When monitoring user input command), Display the floating window on the program interface. The above process can be shown in Figures 4a to 4d. FIG. 4a is a schematic diagram of a system interface of a mobile terminal provided by this specification. among them, APP1 in the system interface is the program corresponding to the floating window, When the user starts the program, a floating button can be displayed. Figure 4b shows the program corresponding to the floating window, A schematic diagram of floating buttons is displayed on the system interface. among them, APP4 in the system interface is the program corresponding to the program interface to be measured, When the user starts APP4, the program interface can be displayed. Figure 4c shows the program corresponding to the program interface to be measured after it is started. A schematic diagram of floating buttons is displayed on the program interface. among them, The window Z order of the floating keys is higher than the window Z order of the program interface, So it will not be blocked by the program interface. When it is detected that the user performs a click operation on the floating button, The floating window can be displayed. Figure 4d is after monitoring that the user performs a click operation on the floating button, Show the schematic diagram of the floating window on the program interface. among them, Two pairs of cursors are displayed in the floating window. and, Since the floating window is a transparent window, So it will not obscure the content in the program interface. further, In the embodiment of the present specification, a screenshot of the program interface can also be obtained when a user input command is detected. The command to take a screenshot and the command to display a floating window can be the same command, Then when monitoring the user input instruction, Can display floating windows and get screenshots. or, You can also display screenshot buttons in the floating window, When it is detected that the user clicks the screenshot button, Determine user input instructions, And get a screenshot of the program interface. S102: For each pair of cursors, When it is detected that the user performs an operation on the pair of cursors, Determine the positions corresponding to the cursors where the operations are performed. In the embodiments of this specification, For each pair of cursors, When it is detected that the user performs an operation on the pair of cursors, The positions corresponding to the cursors of the executed operations can be further determined. For ease of description, In this manual, a cursor in a pair of cursors is used as an example for description. specific, Since the cursor is usually used for dragging, Therefore, the operation may be a drag operation. Therefore, when the drag operation performed by the user on the cursor is monitored, Determine the position corresponding to the cursor. of course, This manual does not limit what kind of operation this operation is. Can be set as needed. E.g, It can also be monitored when the user clicks on the cursor, When you double-click and so on, Determine the position corresponding to the cursor. In addition, In this manual, For example, a monitoring user performs a drag operation on a cursor. Since the user is performing a drag operation on the cursor, The position of the cursor may be constantly changing, So you can monitor the end of the drag operation, Then determine the position of the cursor. To reduce the number of times to determine the position of the cursor, Reduce resource consumption. It should be noted, The position of the cursor determined at this time, It is the position of the cursor on the screen of the mobile terminal. and, Since the screenshot of the obtained program interface is also displayed on the screen of the mobile terminal, So it can also be seen as, The determined position of the cursor is the position of the cursor in the program interface. S104: According to the position of each cursor, The selection range corresponding to each cursor is determined in the screenshot. In the embodiments of this specification, Continue to use one cursor in a pair of cursors as an example. After the position corresponding to the cursor is determined in step S102, Further in the screenshots obtained, Determine the selection range corresponding to the location. In other words, Determine the selection range corresponding to the location of each cursor. In order to follow the preset boundary algorithm, Within the determined range of choices, Determine the boundaries of elements in the program interface, To perform the next steps. specific, Since there are usually multiple elements in the programming interface, And the elements farther away from the cursor, Obviously, the user is less likely to measure the size of the element. In other words, Usually the user will move the cursor near the boundary of the element, To measure element size. therefore, In order to avoid determining the boundary of the wrong element, After determining the position of the cursor, The selection range corresponding to the position can be determined first. and, Regard the boundary of the elements within the selection range as the boundary to be selected, Then, step S106 determines the boundary. among them, The length unit of the selection range can be expressed in dp. Such as, The selection range is within 10dp from the cursor. among them, The value of this selection range can be set as required, This manual does not limit this. and, When the cursor is a line segment, The length of the line segment can also be set as needed, Such as, As shown in Figure 3b. therefore, The selection range may include a vertical range and / or a horizontal range. E.g, When the cursor is a horizontal line that runs through the screen of the mobile terminal, The selection range may be only the vertical range. When the cursor is a vertical line that runs through the screen of the mobile terminal, The selection range may be only the horizontal range. When the cursor is a line segment with a length of 10dp, The selection range may include both vertical and horizontal ranges. S106: According to the preset boundary algorithm, Within the selection range corresponding to each cursor, Determine the boundaries of the elements in the programming interface, respectively. In the embodiments of this specification, When the selection range corresponding to the cursor is determined, You can continue to use the preset boundary algorithm, Determine the boundary of the element. specific, In this specification, the first method for determining the boundary of an element is provided. First of all, According to the preset boundary algorithm, Determine the boundary of each element in the program interface. after that, Then determine the boundary within the selection range corresponding to the cursor. At last, Then from the boundaries within the selection range, Select the border closest to the cursor. among them, The preset boundary algorithm may be the Sobel edge detection algorithm, Roberts operands, etc., This manual does not limit this. In addition, In the second method for determining the boundary of an element provided in this specification, The cursor can be a line segment. First of all, Can determine the position of the cursor, The colors displayed in the program interface, As the base color. after that, Within this selection range, Make sure the line segment parallel to the cursor, At least one line segment that exceeds the preset length and the color is different from the basic color. At last, From the determined line segments, Select the line segment closest to the cursor as the determined boundary. The preset length can be set as needed, This manual does not limit this. E.g, Assume that the cursor is a horizontal line that runs through the screen. First of all, The basic color corresponding to the cursor can be determined first. Then use the line segment where the cursor is located as the starting point, Up or down, Line by line determines the line segment whose length exceeds the preset length and is not the base color. At last, The line segment with the smallest vertical distance from the line segment is used as the boundary. It should be noted, For the elements in the programming interface, The element boundary can be regarded as the above-mentioned line segment in this specification. E.g, Assume that the 10 × 10 color block shown in FIG. 5 is an element in the programming interface. Then the boundary of the 1 × 10 color block enclosed by the dotted frame is the line segment of the specification. In other words, if the color blocks are all within the selection range corresponding to a cursor, The color patch can be determined as 10 line segments. S108: Move each cursor on which the operation is performed to the boundary of the element determined separately. S110: Displays the distance between the pair of cursors. In the embodiments of this specification, Take a cursor in a pair of cursors as an example, When the boundary corresponding to the cursor is determined, You can move the cursor line to the determined boundary. Then for each pair of cursors being operated on, Each cursor in the pair of cursors can determine the boundary of the corresponding element through the above steps S102 to S106. Then through step S108, Each cursor in the pair of cursors can move to its corresponding element boundary. Then when displaying the distance between the pair of cursors at this time, Since the cursor has moved to the boundary of the element, So the display distance is accurate. specific, In step S102, for each pair of cursors, Users can usually only perform operations on the cursors of the pair of cursors. So when displaying the distance between the cursor pair in step S110, One of the cursors in the pair moves to the boundary of the element, The other cursor line does not move to the boundary of the element. Then at this time, The distance between the cursor pair can also be displayed, But the displayed distance is not the size of the element (as shown in Figures 6a and 6b). And after the user performs an operation on another cursor, Repeat the above steps, Then another cursor can also move to the determined element boundary. Thus, the distance between the displayed cursor pairs is the exact element size (eg, 6c and 6d). among them, The above distance can be displayed in units of dp. Through the above information display process, It can be seen that there is no need to accurately move the cursor to the element boundary. By determining the selection range corresponding to the cursor, Then determine the boundary of the element. Then move the cursor to the determined boundary, Thereby determining the accurately measured element size. Solve the problem that the size of the element cannot be accurately measured on the mobile terminal. In addition, In this manual, It is not necessary to obtain the screenshot in step S100, Instead, a screenshot is obtained in step S102 of this specification. specific, You can monitor the user to perform operations on the cursor, The user input instructions as monitored. then, When it is detected that the user performs a drag operation on the cursor, Get a screenshot of the program interface. further, Due to the low accuracy of the user ’s finger operation, Therefore, after dragging the cursor multiple times, Only move the cursor near the boundary of the element to be measured. Then every time the user is monitored to perform an operation on the cursor, Taking a screenshot once may result in too many screenshots. Caching of the terminal causes greater storage pressure. And further cause the terminal to implement a garbage collection mechanism (Garbage Collection, GC) increased. therefore, In this manual, in order to reduce the cache pressure and reduce the number of GCs, When it is detected that the user performs a drag operation on the cursor, You can first determine whether a screenshot has been saved within a preset time period, if, Then call the stored screenshot, If not, Then perform a screenshot operation on the program interface, Take a screenshot and save it. among them, The screenshot obtained after the screenshot operation is performed on the program interface can be stored in the cache of the mobile terminal. specific, The preset time period corresponds to the preset duration, The duration can be set as required. When it is detected that the user performs a drag operation, Back to the preset duration, Determine the preset time period. Then perform the steps of subsequent judgment. In other words, When the mobile terminal performs a screenshot operation on the program interface, After saving the screenshot. No matter how many times the user performs drag operation within the preset time, All screenshots stored in the cache can be used. Without having to monitor the drag operation every time, All perform screenshot operations on the program interface. go a step further, In the program interface, Elements may not display element boundaries when displayed. E.g, The elements are patterns drawn on a transparent background. Then through the existing method of determining the boundary, Only the boundaries of the pattern can be determined. then, In order to facilitate the determination of element boundaries, Before taking a screenshot of the program interface, You can also start the existing interface layout boundary display tool, To show the boundaries of elements in the program interface. E.g, It is assumed that FIG. 7a is a case where each element does not display the boundary of the element. After starting the interface layout display tool, Element boundaries as shown in Figure 7b can be displayed. It should be noted, The program corresponding to the program interface, The program that executes the information display process and the interface layout boundary display tool can be three different independent programs. It should be noted, The execution body of each step of the method provided in the embodiment of the present invention may be the same device, or, This method is also performed by different devices. E.g, The execution subject of steps S102 and S104 may be the device 1, The execution subject of step S106 and step S108 may be device 2; Another example, The execution subject of steps S102 and S106 may be the device 2, The execution subject of steps S104 and S108 may be the device 1; and many more. The foregoing describes specific embodiments of the present specification. Other embodiments are within the scope of the attached patent application. In some cases, The actions or steps described in the scope of the patent application may be performed in a different order than in the embodiment and still achieve the desired result. In addition, The processes depicted in the drawings do not necessarily require the particular order shown or sequential order to achieve the desired results. In some embodiments, Multiplexing and parallel processing are also possible or may be advantageous. Based on the information display method shown in Figure 2, Embodiments of this specification also provide an information display method, As shown in Figure 8. FIG. 8 is an information display process provided by an embodiment of this specification, It can include the following steps: S200: Get a screenshot of the program interface of the mobile terminal, Display at least one cursor, And monitor user operations. S202: When it is detected that the user performs an operation on any cursor, Determine the position of the cursor where the operation was performed. In the embodiments of this specification, The information display process is used to display the size of characters in the mobile terminal. Similar to the information display process shown in Figure 2, The information display process can be executed by the mobile terminal itself or the installed program. specific, Since the size of characters in the programming interface is usually smaller than the size of elements, Therefore, there are difficulties in measuring characters through the cursor. Therefore, in this manual, When measuring the character size, At least one cursor can be displayed. And display the character size of the character covered by the cursor through the subsequent steps. among them, In the embodiments of this specification, The shape of the cursor may be rectangular. The size of the cursor can be set as needed. In addition, For other operations in the step, refer to the description in step S100 and step S102, This manual will not repeat them here. S204: The color at the location is determined in the screenshot. S206: According to the border of the cursor and the color, Determine character boundaries. In the embodiments of this specification, After determining the position of the cursor, Also in the screenshots obtained, Determine the color at that location. Then, based on the boundary of the cursor and the determined color, Determine the character boundaries. specific, In the embodiments of this specification, The cursor can partially cover the character to be measured, Then, in step S204, when the color at the position of the cursor is determined, The color of the characters and the background color can be determined. And in the subsequent step S206, According to the color of the determined character, The determined background color and cursor boundary, Determine the boundary of the characters covered by the cursor. and, Since the size of a character can only be determined by the height of the character or the width of the character, So when determining the boundaries of characters, The upper and lower boundaries of the cursor and / or the left and right boundaries of the cursor can be determined first. of course, Since the height of the character is usually used as the size of the character in the prior art, So in this manual, determine the height of the cursor as an example for subsequent description. First of all, Determine the upper and lower boundaries of the cursor. after that, According to the color determined in step S204, Further determine the color corresponding to the upper border of the cursor, And the color corresponding to the lower border of the cursor. among them, The color corresponding to the upper boundary of the cursor includes the color of the character and the background color corresponding to the upper boundary, The color corresponding to the lower boundary of the cursor includes the color of the character and the background color corresponding to the lower boundary. then, Determine the rows of pixels between the extension lines of the left and right borders of the cursor, Using the cursor's upper boundary as the starting line, move up, From the determined rows of pixels, Select a row of pixels that are not exactly the same color as the pixels in the next row, As the upper boundary of the character. Similarly, For the lower boundary of the cursor, Use the same method to determine the lower boundary of the character boundary. When determining the upper and lower boundaries of the character boundary, Take the distance between the upper and lower boundaries as the height of the character boundary. For example, the process of determining the upper and lower boundaries of the character boundary shown in FIG. 9. In Figure 9, The cursor is overlaid on the "person" character, The color of the cursor position can be determined as black and white. In step S206, You can start from the upper and lower boundaries of the cursor, Determine whether there is a color that is not exactly the same as the position of the cursor line by line, When judging a line other than the character "人", There is only white in this row, Then the boundary of the character in the previous line that has been judged can be determined, Thereby determining the upper and lower boundaries of the character boundary. Furthermore, the distance between the upper and lower boundaries is taken as the height of the character boundary. Similarly, In the embodiments of this specification, The columns of pixels between the extension lines of the upper and lower boundaries of the cursor can also be determined. And starting from the left border of the cursor to the left, From the determined columns of pixels, Select a column of pixels that is not exactly the same color as the next column of pixels, As the left border of the character. Using the right border of the cursor as the starting column, turn to the right, From the determined columns of pixels, Select a column of pixels that is not exactly the same color as the next column of pixels, As the right border of the character. Let the distance between the left and right boundaries of the character boundary be the width of the character boundary. S208: According to the determined character boundary, Determine the size of the characters covered by the cursor, And display. In the embodiments of this specification, Due to different mobile terminal screen sizes, Pixel density, etc. are not exactly the same, So the character size usually set, And the actual character size displayed in the program interface (e.g., The height of the character boundary or the width of the character boundary cannot be consistent. E.g, The character size set by the program developer is 12px, However, the character size displayed in the program interface is 10px. therefore, The height or width of the character boundary does not accurately determine the character size from time to time. then, In this manual, According to the fitting formula obtained in advance, Determine the character size corresponding to the character boundary, And display. specific, The mobile terminal itself or the program that executes the information display process, Send the device information of the mobile terminal to the server in advance (eg, Device model, Screen size, Pixel density, etc.), After that, the fitting formula corresponding to the device information returned by the server is received and stored. Then after determining the height or width of the character boundary, You can enter the height or width into the fitting formula, So as to get the corresponding character size. among them, The server can pre-determine the corresponding fitting formulas of different equipment information, When receiving device information, Determine the corresponding fitting formula and return. E.g, The server can target each type of mobile terminal, Collect the character size set in the mobile terminal, And its corresponding actual display character size, Commonly control the sample. Determine the fitting curve of the set character size and the actual displayed character size by least square method, Get the fitting formula corresponding to the fitting curve, As shown in Figure 10. Through the fitting formula corresponding to the fitting curve shown in Figure 10, The mobile terminal can determine the distance from the upper and lower boundaries of the character (ie, The character size actually displayed corresponds to the character size (ie, Set the character size). Through the information display process shown in Figure 8, It can be seen that only the cursor needs to be covered on the character to be measured, You can get the exact character size. Solve the problem that it is difficult to measure the character size on the mobile terminal. In addition, In the embodiments of this specification, The character size needs to be determined by covering the character with the cursor. but, There may be larger characters or smaller characters in the program interface. Therefore, a cursor of a single size may be inconvenient for measuring the size of characters. therefore, Multiple cursors can be displayed in step S200, And the size of each cursor may not be the same, To meet the measurement needs of characters of different sizes. further, In the embodiments of this specification, The information display methods shown in FIG. 2 and FIG. 8 can coexist. So in this manual, The element size can be displayed in the middle of each pair of cursors, Character size can be displayed next to the cursor, Such as, As shown in Figure 11. of course, The specific how the distance and size are displayed in this manual is not limited. Based on the information display method shown in Figure 2, An embodiment of this specification also provides an information display device, As shown in Figure 12. 12 is a schematic structural diagram of an information display device provided by an embodiment of the present specification, include: Obtain display and monitoring module 300, Get a screenshot of the program interface of the mobile terminal, Display at least one pair of cursors, And monitor the user's operation; The first determining module 302, For each pair of cursors, When it is detected that the user performs an operation on the pair of cursors, Determine the positions corresponding to the cursors where the operations are performed; Second determination module 304, According to the position of each cursor, Determine the selection range corresponding to each cursor in the screenshot; The third determination module 306, According to the preset boundary algorithm, Within the selection range corresponding to each cursor, Determine the boundaries of the elements in the programming interface respectively; The fourth determination module 308, Move each cursor on which the operation is performed to the boundary of the element determined separately; Display module 310, Displays the distance between the pair of cursors. Obtain display and monitoring module 300, Show floating window, Displaying at least one pair of cursors in the floating window, among them, The floating window is a transparent window, The floating window is displayed on the upper layer of the programming interface. Obtain display and monitoring module 300, Displaying two pairs of cursors on the screen of the mobile terminal, among them, A pair of cursors is on a horizontal line segment, The other pair of cursors are vertical line segments. Obtain display and monitoring module 300, When the user input instruction is monitored, Display the floating window and / or obtain a screenshot of the program interface. The third determination module 306, For each cursor in the pair of cursors, Determine the color of the program interface displayed on the position of the cursor, As the basic color, Within the selection range corresponding to the cursor, Determine that the line segment parallel to the cursor, A line segment that exceeds a preset length and has a color different from the basic color, As the determined boundary. The third determination module 306, Within the selection range corresponding to the cursor, Determine that the line segment parallel to the cursor, At least one line segment exceeding a preset length and having a color different from the basic color, From at least one line segment determined, Select the line segment closest to the cursor, As the determined boundary. Obtain display and monitoring module 300, Before taking a screenshot of the program interface on the mobile terminal, Start the interface layout display tool, Displays the boundaries of the elements in the programming interface. Based on the information display method shown in Figure 8, An embodiment of this specification also provides an information display device, As shown in Figure 13. 13 is a schematic structural diagram of an information display device provided by an embodiment of the present specification, include: Obtain the display and monitoring module 400, Get a screenshot of the program interface of the mobile terminal, Display at least one cursor, And monitor the user's operation; The first determination module 402, When it is detected that the user performs an operation on any cursor, Determine the position of the cursor on which the operation is performed; Second determination module 404, Determine the color at the location in the screenshot; The third determining module 406, According to the border of the cursor and the color, Determine character boundaries; Display module 408, According to the determined character boundary, Determine the size of the characters covered by the cursor, And display. The shape of the cursor is rectangular; The third determining module 406, Determine the upper and lower boundaries of the cursor and / or the left and right boundaries of the cursor, According to the color, Determining in the screenshot the colors corresponding to the upper and lower boundaries of the cursor and / or the colors corresponding to the left and right boundaries of the cursor According to the colors corresponding to the upper and lower boundaries of the cursor, Determine the height of the character boundary, And / or colors corresponding to the left and right borders of the cursor, Determine the width of the character boundary. The third determining module 406, Determine each row of pixels between the extension lines of the left and right borders of the cursor, Using the upper boundary of the cursor as the starting line, go up in sequence, From the determined rows of pixels, Select a row of pixels that are not exactly the same color as the pixels in the next row, As the upper boundary of the character, Taking the lower boundary of the cursor as the starting line and going down, From the determined rows of pixels, Select a row of pixels that are not exactly the same color as the pixels in the next row, As the lower boundary of the character, The distance between the upper and lower boundaries of the character boundary is taken as the height of the character boundary. The third determining module 406, Determine the columns of pixels between the extension lines of the upper and lower boundaries of the cursor, Using the left border of the cursor as the starting column, turn left From the determined columns of pixels, Select a column of pixels that is not exactly the same color as the next column of pixels, As the left boundary of the character, Using the right border of the cursor as the starting column, turn to the right, From the determined columns of pixels, Select a column of pixels that is not exactly the same color as the next column of pixels, As the right boundary of the character, The distance between the left and right boundaries of the character boundary is taken as the width of the character boundary. Display module 408, According to the fitting formula obtained in advance, Determining the size corresponding to the height of the character boundary and / or determining the size corresponding to the width of the character boundary. Display module 408, Send the device information of the mobile terminal to the server in advance, The fitting formula corresponding to the device information returned by the server is received and stored. Based on the information display method shown in Figure 2, The embodiments of this specification also provide another mobile terminal, As shown in Figure 14. 14 is a schematic structural diagram of a terminal according to an embodiment of the present specification, The terminal, include: One or more processors and memory, The program is configured to perform the following steps by one or more processors: Obtain a screenshot of the program interface of the mobile terminal, Display at least one pair of cursors, And monitor the user's operation; For each pair of cursors, When it is detected that the user performs an operation on the pair of cursors, Determine the positions corresponding to the cursors where the operations are performed; According to the position of each cursor, Determine the selection range corresponding to each cursor in the screenshot; According to the preset boundary algorithm, Within the selection range corresponding to each cursor, Determine the boundaries of the elements in the programming interface respectively; Move each cursor on which the operation is performed to the boundary of the element determined separately; Displays the distance between the pair of cursors. Based on the information display method shown in Figure 8, The embodiments of this specification also provide another mobile terminal, As shown in Figure 15. 15 is a schematic structural diagram of a terminal according to an embodiment of the present specification, The terminal, include: One or more processors and memory, The program is configured to perform the following steps by one or more processors: Obtain a screenshot of the program interface of the mobile terminal, Display at least one cursor, And monitor the user's operation; When it is detected that the user performs an operation on any cursor, Determine the position of the cursor on which the operation is performed; Determine the color at the location in the screenshot; According to the border of the cursor and the color, Determine character boundaries; According to the determined character boundary, Determine the size of the characters covered by the cursor, And display. It should be noted, Each embodiment in this specification is described in a progressive manner, The same or similar parts between the various embodiments may refer to each other, Each embodiment focuses on the differences from other embodiments. especially, For the mobile terminal and the server provided by the embodiments of the present invention, Since it is basically similar to the method embodiment, So the description is relatively simple, For the relevant parts, please refer to the description of the method embodiments. In the 1990s, Improvements in a technology can be clearly distinguished as improvements in hardware (for example, For diodes, Transistor, The improvement of circuit structures such as switches) is also an improvement in software (improvement of method flow). however, with the development of technology, Many of today's method and process improvements can already be regarded as direct improvements in the hardware circuit structure. Designers almost get the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. therefore, It can't be said that the improvement of a method and process cannot be realized by hardware physical modules. E.g, Programmable Logic Device (Programmable Logic Device, PLD) (such as Field Programmable Gate Array, FPGA)) is such an integrated circuit, Its logical function is determined by the user programming the device. Designed by the designer to "integrate" a digital system on a PLD, There is no need to ask chip manufacturers to design and manufacture special integrated circuit chips. and, now, Instead of manually making integrated circuit chips, This kind of programming is also mostly implemented with "logic compiler" software. It is similar to the software compiler used in the development of the program, And the original code to be compiled must also be written in a specific programming language, This is called the hardware description language (Hardware Description Language, HDL), And HDL is not the only one, But there are many kinds, Such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc., Currently the most commonly used are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also be clear, Only need to use the above hardware description languages for logic programming and programming into integrated circuits. It is easy to get the hardware circuit that implements this logic method flow. The controller can be implemented in any suitable way, E.g, The controller may be, for example, a microprocessor or processor and a computer-readable medium storing computer-readable program code (such as software or firmware) executable by the (micro) processor, Logic gate, switch, Application Specific Integrated Circuit (Application Specific Integrated Circuit, ASIC), Programmable logic controllers and embedded microcontrollers, Examples of controllers include but are not limited to the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20 and Silicone Labs C8051F320, The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art also know that In addition to implementing the controller in pure computer readable code, It is entirely possible to program the method steps by logic programming to make the controller switch, Dedicated integrated circuit, Logic controllers and embedded microcontrollers can be programmed to achieve the same function. So this controller can be considered as a hardware component, The devices included therein for realizing various functions can also be regarded as structures within the hardware components. Or even, The device for realizing various functions can be regarded as both a software module of an implementation method and a structure in a hardware component. The system illustrated in the above embodiment, Device, Module or unit, It can be realized by computer chip or entity, Or it can be realized by a product with a certain function. A typical implementation device is a computer. specific, The computer can be, for example, a personal computer, Laptop, Cellular phone, Camera phone, Smart phone, Personal digital assistant, Media player, Navigation equipment, Email equipment, Game console, tablet, Wearable devices or any combination of these devices. For the convenience of description, When describing the above devices, the functions are divided into various units and described separately. of course, When implementing the present invention, the functions of each unit can be implemented in one or more software and / or hardware. Those skilled in the art should understand that Embodiments of the present invention can be provided as methods, system, Or computer program products. therefore, The present invention can use a complete hardware embodiment, Complete software embodiment, Or a combination of software and hardware. and, The present invention may use one or more computer-usable storage media (including but not limited to disk memory, CD-ROM, The form of computer program products implemented on optical memory, etc.). The present invention refers to the method according to the embodiment of the present invention, Equipment (system), It is described by the flow chart and / or block diagram of the computer program product. It should be understood that each flow and / or block in the flowchart and / or block diagram can be implemented by computer program instructions, And a combination of processes and / or blocks in flowcharts and / or block diagrams. These computer program instructions can be provided to general-purpose computers, Dedicated computer, Embedded processor or other programmable data processing equipment processor to produce a machine, A device that causes instructions executed by a processor of a computer or other programmable data processing device to generate functions specified in a block or blocks of a flowchart or a flow and / or a block diagram. These computer program instructions can also be stored in computer readable memory that can guide the computer or other programmable data processing equipment to work in a specific way. Causing instructions stored in the computer-readable memory to produce a manufactured product including an instruction device, The instruction device implements the functions specified in one block or multiple blocks in one flow or multiple processes in the flowchart and / or one block in the block diagram. These computer program instructions can also be loaded onto a computer or other programmable data processing equipment, Allows a series of operating steps to be performed on a computer or other programmable device to produce computer-implemented processing The instructions executed on the computer or other programmable equipment thus provide steps for implementing the functions specified in one block or multiple blocks of one flow or multiple flows in the flowchart and / or one block or multiple block diagrams. In a typical configuration, The computing device includes one or more processors (CPU), Input / output interface, Network interface and memory. Memory may include non-permanent memory in computer-readable media, Random access memory (RAM) and / or non-volatile memory, etc., Such as read only memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media. Computer-readable media includes permanent and non-permanent, Removable and non-removable media can be stored by any method or technology. Information can be computer readable instructions, Data structure, Program modules or other data. Examples of computer storage media include, But not limited to phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Other types of random access memory (RAM), Read only memory (ROM), Electrically erasable and programmable read-only memory (EEPROM), Flash memory or other memory technology, CD-ROM, CD-ROM, Digital Versatile Disc (DVD) or other optical storage, Magnetic cassette tape, Magnetic tape storage or other magnetic storage devices or any other non-transmission media, It can be used to store information that can be accessed by computing devices. According to the definition in this article, Computer-readable media does not include temporary computer-readable media (transitory media), Such as modulated data signals and carrier waves. It should also be noted that The term "including", "Contains" or any other variation thereof is intended to cover non-exclusive inclusions, So that the process including a series of elements, method, Goods or equipment includes not only those elements, And also includes other elements that are not explicitly listed, Or is it also included for this process, method, Elements inherent in goods or equipment. Without more restrictions, Elements defined by the sentence "include a ...", Does not exclude the process of including the elements, method, There are other identical elements in goods or equipment. Those skilled in the art should understand that Embodiments of the present invention can be provided as methods, System or computer program products. therefore, The present invention can use a complete hardware embodiment, A complete software embodiment or a form of embodiment combining software and hardware. and, The present invention may use one or more computer-usable storage media (including but not limited to disk memory, CD-ROM, The form of computer program products implemented on optical memory, etc.). The invention can be described in the general context of computer executable instructions executed by a computer, For example, program modules. normally, Program modules include routines that perform specific tasks or implement specific abstract data types, Program, object, element, Data structure, etc. The invention can also be practiced in a distributed computing environment, In these distributed computing environments, The tasks are performed by remote processing equipment connected through the communication network. In a distributed computing environment, Program modules can be located in local and remote computer storage media including storage devices. Each embodiment in this specification is described in a progressive manner, The same or similar parts between the various embodiments may refer to each other, Each embodiment focuses on the differences from other embodiments. especially, For the system embodiment, Since it is basically similar to the method embodiment, So the description is relatively simple, For the relevant parts, please refer to the description of the method embodiments. The above is only an embodiment of the present invention, It is not intended to limit the invention. For those skilled in the art, The present invention can have various modifications and changes. Any modification made within the spirit and principle of the present invention, Equivalent replacement, Improvement, etc., All should be included in the scope of the patent application of the present invention.
S100-S110‧‧‧步驟S100-S110‧‧‧Step
S200-S208‧‧‧步驟S200-S208‧‧‧Step
300‧‧‧獲取顯示及監測模組300‧‧‧ Get display and monitoring module
302‧‧‧第一確定模組302‧‧‧ First confirmation module
304‧‧‧第二確定模組304‧‧‧ second confirmation module
306‧‧‧第三確定模組306‧‧‧ third confirmation module
308‧‧‧第四確定模組308‧‧‧The fourth module
310‧‧‧顯示模組310‧‧‧Display module
400‧‧‧獲取顯示及監測模組400‧‧‧Get display and monitoring module
402‧‧‧第一確定模組402‧‧‧ First confirmation module
404‧‧‧第二確定模組404‧‧‧ second confirmation module
406‧‧‧第三確定模組406‧‧‧ third confirmation module
408‧‧‧顯示模組408‧‧‧Display module
此處所說明的附圖用來提供對本發明的進一步理解,構成本發明的一部分,本發明的示意性實施例及其說明用於解釋本發明,並不構成對本發明的不當限定。在附圖中: 圖1為現有程式介面的元素尺寸及字元尺寸的示意圖; 圖2為本說明書實施例提供的一種資訊顯示的過程; 圖3a為本說明書實施例提供的程式介面的示意圖; 圖3b為本說明書實施例提供的程式介面中顯示不同游標對的示意圖; 圖3c為本說明書實施例提供的另一種程式介面中顯示游標對的示意圖; 圖4a至4d為本說明書實施例提供的在浮動視窗顯示游標線及游標的過程示意圖; 圖5為本說明書實施例提供的線段示意圖; 圖6a至6d為本說明書實施例提供的準確確定元素尺寸的過程示意圖; 圖7a以及圖7b為本說明書實施例提供的顯示元素邊界的過程示意圖; 圖8為本說明書實施例提供的另一種資訊顯示的過程; 圖9為本說明書實施例提供的確定字元的邊界示意圖 圖10為本說明書實施例提供的擬合曲線的示意圖; 圖11為本說明書實施例提供的顯示元素尺寸以及字元尺寸的示意圖; 圖12為本說明書實施例提供的一種資訊顯示裝置的結構示意圖; 圖13為本說明書實施例提供的另一種資訊顯示裝置的結構示意圖; 圖14為本說明書實施例提供的一種行動終端的結構示意圖; 圖15為本說明書實施例提供的另一種行動終端的結構示意圖。The drawings described herein are used to provide a further understanding of the present invention and constitute a part of the present invention. The schematic embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an undue limitation on the present invention. In the drawings: FIG. 1 is a schematic diagram of the element size and character size of an existing programming interface; FIG. 2 is a process of displaying information provided by an embodiment of the specification; FIG. 3a is a schematic diagram of the programming interface provided by an embodiment of the specification; 3b is a schematic diagram showing different cursor pairs in a program interface provided by an embodiment of the specification; FIG. 3c is a schematic diagram showing cursor pairs in another program interface provided by an embodiment of the specification; FIGS. 4a to 4d are provided by an embodiment of the specification A schematic diagram of a process of displaying cursor lines and cursors in a floating window; FIG. 5 is a schematic diagram of line segments provided by embodiments of the specification; FIGS. 6a to 6d are schematic diagrams of processes for accurately determining the size of elements provided by the embodiments of the specification; FIGS. 7a and 7b are A schematic diagram of a process of displaying a boundary of an element provided by an embodiment of the specification; FIG. 8 is another process of displaying information provided by an embodiment of the specification; FIG. 9 is a schematic diagram of determining a boundary of a character provided by an embodiment of the specification. FIG. 10 is an embodiment of the specification Provide a schematic diagram of the fitting curve; Figure 11 A schematic diagram of the display element size and the character size provided by the embodiment of the Mingshu; FIG. 12 is a schematic structural diagram of an information display device provided by the embodiment of the specification; FIG. 13 is a schematic structural diagram of another information display device provided by the embodiment of the specification FIG. 14 is a schematic structural diagram of a mobile terminal provided by an embodiment of the specification; FIG. 15 is a schematic structural diagram of another mobile terminal provided by an embodiment of the specification.
Claims (18)
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710979325.2A CN107831965B (en) | 2017-10-19 | 2017-10-19 | Information display method and device |
??201710979325.2 | 2017-10-19 |
Publications (2)
Publication Number | Publication Date |
---|---|
TW201917554A true TW201917554A (en) | 2019-05-01 |
TWI671675B TWI671675B (en) | 2019-09-11 |
Family
ID=61648405
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
TW107128734A TWI671675B (en) | 2017-10-19 | 2018-08-17 | Information display method and device |
Country Status (3)
Country | Link |
---|---|
CN (1) | CN107831965B (en) |
TW (1) | TWI671675B (en) |
WO (1) | WO2019076118A1 (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107831965B (en) * | 2017-10-19 | 2020-04-24 | 阿里巴巴集团控股有限公司 | Information display method and device |
CN108920241B (en) * | 2018-06-29 | 2021-07-27 | 创新先进技术有限公司 | Display state adjusting method, device and equipment |
CN114428576A (en) * | 2021-12-20 | 2022-05-03 | 北京镁伽科技有限公司 | Cursor color determination method and device, PG (program guide) equipment and storage medium |
CN115858613B (en) * | 2022-11-18 | 2023-11-17 | 中节能风力发电股份有限公司 | Wind power data display method and system based on time sequence information |
Family Cites Families (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130125066A1 (en) * | 2011-11-14 | 2013-05-16 | Microsoft Corporation | Adaptive Area Cursor |
CN103150153B (en) * | 2011-12-06 | 2016-03-02 | 阿里巴巴集团控股有限公司 | A kind of method for designing of user interface and device |
US20130167072A1 (en) * | 2011-12-22 | 2013-06-27 | Sap Portals Israel Ltd. | Smart and Flexible Layout Context Manager |
CN102811290B (en) * | 2012-08-15 | 2015-05-13 | 小米科技有限责任公司 | Widget regulating method, device and terminal |
CN103645890B (en) * | 2013-11-29 | 2017-12-01 | 北京奇虎科技有限公司 | A kind of method and apparatus for being used for orient control in graphical user interfaces |
TWI592838B (en) * | 2017-01-10 | 2017-07-21 | Univ Nat Central | System and method for measuring screen resolution associated with mouse movement speed, recording media and computer program product |
CN107831965B (en) * | 2017-10-19 | 2020-04-24 | 阿里巴巴集团控股有限公司 | Information display method and device |
-
2017
- 2017-10-19 CN CN201710979325.2A patent/CN107831965B/en active Active
-
2018
- 2018-08-10 WO PCT/CN2018/099951 patent/WO2019076118A1/en active Application Filing
- 2018-08-17 TW TW107128734A patent/TWI671675B/en active
Also Published As
Publication number | Publication date |
---|---|
CN107831965B (en) | 2020-04-24 |
TWI671675B (en) | 2019-09-11 |
WO2019076118A1 (en) | 2019-04-25 |
CN107831965A (en) | 2018-03-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102999229B (en) | Device with display and method of interacting with display using photovoltaic array | |
TWI671675B (en) | Information display method and device | |
US10416874B2 (en) | Methods, apparatuses, and devices for processing interface displays | |
US8291348B2 (en) | Computing device and method for selecting display regions responsive to non-discrete directional input actions and intelligent content analysis | |
TW202008328A (en) | Data processing method and device for map region merging | |
CN111475097B (en) | Handwriting selection method and device, computer equipment and storage medium | |
US20110107269A1 (en) | Graphic user interface management system and method | |
US20180101298A1 (en) | Graph display apparatus, graph display method and storage medium | |
US9304680B2 (en) | Methods, devices, and computer readable storage device for touchscreen navigation | |
US20100238126A1 (en) | Pressure-sensitive context menus | |
TW201525733A (en) | Graphical analysis system and graphical analysis method | |
TWI691206B (en) | Watermark adding processing method, device and client | |
WO2019119975A1 (en) | Information input method and device | |
US10345932B2 (en) | Disambiguation of indirect input | |
US11704330B2 (en) | User interface for generating data visualizations that use table calculations | |
WO2019047226A1 (en) | Touch operation response method and device | |
CN108228065B (en) | Method and device for detecting UI control information and electronic equipment | |
CN111400177A (en) | Debugging method, device, electronic device and storage medium | |
TWI610220B (en) | Apparatus and method for automatically controlling display screen density | |
CN111025039B (en) | Method, device, equipment and medium for testing accuracy of touch display screen | |
CN104978135B (en) | A kind of icon display method, device and mobile terminal | |
CN110427139B (en) | Text processing method and device, computer storage medium and electronic equipment | |
US20160034101A1 (en) | Operation method of a touch screen and touch screen device | |
WO2024066759A1 (en) | Application switching method, apparatus and device, and medium | |
CN108073339B (en) | Floating layer display method, client and electronic equipment |