[go: up one dir, main page]

WO2019076118A1 - Information display method and apparatus - Google Patents

Information display method and apparatus Download PDF

Info

Publication number
WO2019076118A1
WO2019076118A1 PCT/CN2018/099951 CN2018099951W WO2019076118A1 WO 2019076118 A1 WO2019076118 A1 WO 2019076118A1 CN 2018099951 W CN2018099951 W CN 2018099951W WO 2019076118 A1 WO2019076118 A1 WO 2019076118A1
Authority
WO
WIPO (PCT)
Prior art keywords
cursor
boundary
determining
cursors
character
Prior art date
Legal status (The legal status 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 status listed.)
Ceased
Application number
PCT/CN2018/099951
Other languages
French (fr)
Chinese (zh)
Inventor
王继民
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding Ltd
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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Publication of WO2019076118A1 publication Critical patent/WO2019076118A1/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction 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/04812Interaction techniques based on cursor appearance or behaviour, e.g. being affected by the presence of displayed objects
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction 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/04847Interaction techniques to control parameter settings, e.g. interaction with sliders or dials

Definitions

  • the present application relates to the field of information technology, and in particular, to a method and an apparatus for displaying information.
  • the element size usually refers to the size of the button, window and other areas designed in the interface
  • the character size is usually the size of the text in the interface, as shown in Figure 1.
  • the tool for measuring the size in the mobile terminal needs to drag the cursor by the user's finger and only displays the distance between the cursors.
  • the size measurement of elements and characters needs to be accurate to the pixel level. It can be seen that there is a need for a method for accurately displaying element size and character size on a mobile terminal. Based on the prior art, the present specification provides a new information display method. .
  • the embodiment of the present specification provides a method and an apparatus for information display, which are used to solve the problem that the prior art is difficult to conveniently and accurately determine the element size and character size of the program interface on the mobile terminal.
  • a method for displaying information includes:
  • the size of the character covered by the cursor is determined according to the determined character boundary and displayed.
  • An information display device comprising:
  • Obtaining a display and monitoring module 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;
  • a first determining module for each pair of cursors, when detecting that the user performs an operation on the pair of cursors, determining a position corresponding to each of the cursors on which the operation is performed;
  • a second determining module according to each cursor corresponding to the position, determining, in the screenshot, a selection range corresponding to each cursor;
  • a third determining module respectively, determining, according to a preset boundary algorithm, a boundary of an element in the program interface in the selection range corresponding to each cursor;
  • a fourth determining module respectively moving each cursor that is to perform the operation to a boundary of the respectively determined element
  • a display module that displays the distance between the pair of cursors.
  • An information display device comprising:
  • Obtaining a display and monitoring module obtaining a screenshot of the program interface of the mobile terminal, displaying at least one cursor, and monitoring the operation of the user;
  • a first determining module when detecting that the user performs an operation on any of the cursors, determining a position of the cursor on which the operation is performed;
  • a second determining module determining a color at the location in the screenshot
  • a third determining module determining a character boundary according to the boundary of the cursor and the color
  • 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 comprising: one or more processors and a memory, the program being configured to perform the following steps by one or more processors:
  • a mobile terminal comprising: one or more processors and a memory, the program being configured to perform the following steps by one or more processors:
  • the size of the character covered by the cursor is determined according to the determined character boundary and displayed.
  • the cursor is adsorbed onto the determined element boundary, so that it is possible to determine without moving the cursor line to the element boundary accurately. Accurately measured element size.
  • the character boundary is determined, and the size of the character is accurately determined, so that the size of the character can be obtained by simply overlaying the cursor on the character.
  • the accurate element size and the character size are obtained, which makes up for the defect that the prior art is difficult to accurately measure the element size and the character size on the mobile terminal, so that The size of the elements and characters in the program interface can be conveniently and accurately determined on the mobile terminal.
  • 1 is a schematic diagram of element sizes and character sizes of an existing program interface
  • Figure 3a is a schematic diagram of a program interface provided by an embodiment of the present specification.
  • FIG. 3b is a schematic diagram showing different cursor pairs in a program interface provided by an embodiment of the present disclosure
  • FIG. 3 is a schematic diagram of displaying a cursor pair in another program interface according to an embodiment of the present disclosure
  • FIGS. 4a to 4d are schematic diagrams showing a process of displaying a cursor line and a cursor in a floating window according to an embodiment of the present disclosure
  • Figure 5 is a schematic view of a line segment provided by an embodiment of the present specification.
  • 6a to 6d are schematic diagrams of processes for accurately determining element sizes provided by embodiments of the present specification.
  • FIG. 7a and 7b are schematic diagrams showing processes of displaying element boundaries according to an embodiment of the present disclosure.
  • FIG. 8 is another process of displaying information according to an embodiment of the present disclosure.
  • FIG. 9 is a schematic diagram of determining a boundary of a character according to an embodiment of the present disclosure
  • Figure 10 is a schematic diagram of a fitting curve provided by an embodiment of the present specification.
  • FIG. 11 is a schematic diagram showing display element size and character size according to an embodiment of the present disclosure.
  • FIG. 12 is a schematic structural diagram of an information display apparatus according to an embodiment of the present disclosure.
  • FIG. 13 is a schematic structural diagram of another information display apparatus according to an embodiment of the present disclosure.
  • FIG. 14 is a schematic structural diagram of a mobile terminal according to an embodiment of the present disclosure.
  • FIG. 15 is a schematic structural diagram of another mobile terminal according to an embodiment of the present disclosure.
  • the process of application development usually consists of designing the interface of the application, interaction logic, etc. by the interaction designer and visual designer (for the convenience of describing the following collectively referred to as the designer), and determining the design draft of the application (eg, interface style, interaction). The method, etc.), and then the application developer writes the application according to the design draft.
  • the designer when designing the visual effect, the designer mainly accepts the color, element size and character size of the program interface.
  • the element is usually a rectangle composed of parallel lines and vertical lines in the program interface.
  • the size of the size is usually determined based on the number of pixels (pixels, px). For example, in the Android system, the density of the pixels (Density-independent Pixels, dp) is used to represent the element size, and the scale-independent Pixels (sp) Represents the character size.
  • the tool for measuring the size on the mobile terminal generally displays the distance between a pair of cursors, and when the user needs to measure the element or the character size, the cursor is separated from the cursor to the boundary of the element by the finger, and The distance between the cursors displayed by the tool for measuring dimensions, as an element or character size. Due to the low precision of the operation of the human finger on the screen, the accuracy of the measurement is difficult to ensure.
  • the designer takes a screenshot of the application interface and sends it to the personal computer to enlarge the screenshot on a larger screen (eg, the screen of the display), and then to the element or character.
  • the dimensions are measured accurately.
  • it will lead to cumbersome operations and low measurement efficiency.
  • the embodiments of the present specification provide a method and an apparatus for displaying information, which solves the problem that the prior art is difficult to conveniently and accurately determine the element size and character size of the program interface on the mobile terminal.
  • S100 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.
  • the embodiment of the present specification may be implemented by the mobile terminal itself or a program installed on the mobile terminal.
  • the information shows the process.
  • the mobile terminal may be a device such as a mobile phone or a tablet computer, which is not limited in this specification.
  • the program can be a program installed in the system of the mobile terminal, and the above information display process can be executed by running the program.
  • the program interface of the mobile terminal is a program interface of the size of the element to be measured.
  • the program corresponding to the program interface to be measured is a third-party program.
  • the system program that is, the program interface is the system interface at this time
  • other programs installed in the system program as shown in Figure 3a.
  • each pair of cursors may be line segments parallel to each other, and the length of the line segments may be set as needed.
  • the line segment of the cursor may be a line segment running through the floating window, or may be a line segment of a preset length, as shown in FIG. 3b.
  • FIG. 3 is a schematic diagram of a program interface to be measured according to an embodiment of the present disclosure
  • FIG. 3b is a schematic diagram of displaying a cursor line and a cursor on a program interface according to an embodiment of the present disclosure.
  • the cursor can be displayed in a floating window (Float Window).
  • the floating window is an interface of a program that executes the information display process, and the floating window can be a transparent window.
  • the window Z order of the floating window is higher than the window Z order of the program interface.
  • the elements in the program interface are generally rectangular. Therefore, in order to facilitate the determination of the longitudinal side length of the element and the horizontal side length, two pairs of cursors can be displayed in this specification. Among them, one pair of cursors is a horizontal line segment, and the other pair of cursors is a vertical line segment, as shown in Fig. 3c.
  • the floating window can be displayed when a user input instruction is detected.
  • the program corresponding to the floating window can display a floating button after the startup, and 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 program to be measured is started, the program interface does not block the floating button. Therefore, the floating window can be displayed on the program interface when the user is monitored to perform a click operation on the floating button (ie, when the user inputs an instruction is monitored).
  • the above process can be as shown in Figures 4a to 4d.
  • FIG. 4a is a schematic diagram of a system interface of a mobile terminal provided by the present specification.
  • APP1 in the system interface is a program corresponding to the floating window, and the floating button can be displayed when the user starts the program.
  • FIG. 4b is a schematic diagram showing floating keys displayed on the system interface after the program corresponding to the floating window is started.
  • the APP4 in the system interface is a program corresponding to the program interface to be measured, and the program interface can be displayed when the user starts the APP4.
  • FIG. 4c is a schematic diagram of displaying a floating button on the program interface after starting the program corresponding to the program interface to be measured.
  • FIG. 4d is a schematic diagram of displaying a floating window on the program interface after the user performs a click operation on the floating button. Among them, two pairs of cursors are displayed in the floating window. Moreover, since the floating window is a transparent window, the content in the program interface is not blocked.
  • a screenshot of the program interface may also be acquired when the user inputs an instruction.
  • the instruction to obtain the screenshot and the instruction to display the floating window may be the same instruction, and when the user inputs the instruction, the floating window and the screenshot may be displayed.
  • the screenshot button may also be displayed in the floating window.
  • the positions corresponding to the respective cursors of the performed operations may be further determined.
  • a pair of cursors will be described as an example in this specification.
  • the operation can be a drag operation. Then, when the user performs a drag operation on the cursor, the position corresponding to the cursor is determined.
  • this specification does not limit the specific operation of the operation, and can be set as needed. For example, when the user performs a click operation, a double-click operation, or the like on the cursor, the position corresponding to the cursor may be determined.
  • the monitoring user performs a drag operation on the cursor. Since the position of the cursor may be constantly changing when the user performs a drag operation on the cursor, the position of the cursor can be determined when the end of the drag operation is detected. To reduce the number of times the cursor position is determined, reducing resource consumption.
  • the position of the cursor determined at this time is the position of the cursor in the screen of the mobile terminal.
  • the screenshot of the acquired program interface is also displayed on the screen of the mobile terminal, it can also be regarded as the position of the determined cursor as the position of the cursor in the program interface.
  • S104 Determine, according to each cursor, a selection range corresponding to each cursor in the screenshot.
  • one of the pair of cursors continues to be described as an example.
  • the selected range corresponding to the location may be further determined in the acquired screenshot. That is to say, the selection range corresponding to the position of each cursor is determined.
  • the subsequent steps are performed.
  • the selection range corresponding to the position may be determined first.
  • the boundary of the element within the selection range is regarded as the boundary to be selected, and the boundary is determined by step S106.
  • the length unit of the selection range can be represented by dp.
  • the selection range is within a range of 10 dp from the cursor.
  • the value of the selection range can be set as needed, which is not limited in this specification. Moreover, since the cursor is a line segment, the length of the line segment can also be set as needed, as shown in Figure 3b.
  • the selection range can include a vertical range and/or a horizontal range. For example, when the cursor is a horizontal line segment that runs through the screen of the mobile terminal, the selection range may be only a vertical range. When the cursor is a vertical line segment that runs through the screen of the mobile terminal, the selection range may be only a horizontal range. When the cursor is a line segment having a length of 10 dp, the selection range may include both a vertical range and a horizontal range.
  • S106 Determine, according to a preset boundary algorithm, a boundary of an element in the program interface, respectively, in the selection range corresponding to each cursor.
  • the boundary of the element may be determined according to the preset boundary algorithm.
  • the present specification provides a first method of determining the boundary of an element.
  • the boundary of each element in the program interface can be determined according to a preset boundary algorithm.
  • the boundary within the selection range corresponding to the cursor is determined.
  • select the boundary closest to the cursor is selected.
  • the preset boundary algorithm may be a Sobel edge detection algorithm, a Roberts operator, etc., which is not limited in this specification.
  • the cursor may be a line segment.
  • the color displayed by the program interface at the position of the cursor can be determined as the base color.
  • at least one line segment parallel to the line segment of the cursor, exceeding a preset length, and having a different color from the base color is determined.
  • the line segment closest to the cursor is selected as the determined boundary.
  • the preset length can be set as needed, which is not limited in this specification.
  • the cursor is a horizontal line segment that runs through the screen.
  • the element boundary can be regarded as the above line segment in the present specification.
  • the 10x10 color block shown in Figure 5 is an element in the program interface.
  • the boundary of the 1 ⁇ 10 color block enclosed by the dotted line frame is the line segment of the present specification. That is to say, if the color blocks are all within the selection range corresponding to a certain cursor, the color block can be determined as 10 line segments.
  • the cursor line can be moved to the determined boundary.
  • each cursor in the pair of cursors can determine the boundary of the corresponding element by the above steps S102 to S106.
  • step S108 each of the cursors in the pair of cursors can be respectively moved to their corresponding element boundaries. Then, when the distance between the pair of cursors is displayed at this time, since the cursor has moved to the boundary of the element, the display distance is accurate.
  • step S102 the user can usually only perform operations on the respective cursors in the pair of cursors. Therefore, when the distance between the pair of cursors is displayed in step S110, there is a case where one of the pair of cursors moves to the boundary of the element, and the other of the cursor lines does not move to the boundary of the element. At this point, the distance between the pair of cursors can also be displayed, but the displayed distance is not the size of the element (as shown in Figures 6a and 6b). After the user repeats the above steps after performing another operation on the cursor, another cursor can also be moved to the boundary of the determined element. Thereby the distance between the displayed cursor pairs is the exact element size (as shown in Figures 6c and 6d). Wherein, the above distance can be displayed in units of dp.
  • the boundary of the element is determined by determining the selection range corresponding to the cursor.
  • the cursor is then moved to the determined boundary to determine the element size for the exact measurement. Solved the problem of not being able to accurately measure the element size on a mobile terminal.
  • the screenshot may not be acquired in step S100, but the screenshot may be acquired in step S102 of the present specification.
  • the user can be monitored to perform an operation on the cursor as a user input instruction is monitored. Therefore, a screenshot of the program interface can be obtained when the user is monitored to perform a drag operation on the cursor.
  • the cursor may be moved to the vicinity of the boundary of the element to be measured after performing the drag operation on the cursor multiple times. If every time the user is monitored to perform an operation on the cursor, obtaining a screenshot may result in too many screenshots being acquired. As a result, the cache of the terminal causes a large storage pressure. And further increase the number of times the terminal performs the Garbage Collection (GC).
  • GC Garbage Collection
  • the present specification in order to reduce the buffer pressure and reduce the number of GCs, when monitoring the user performing a drag operation on the cursor, it may first determine whether the screenshot is stored in the preset time period, and if so, calling the stored Screenshot, if not, perform a screenshot operation on the program interface, take a screenshot and store.
  • the screenshot obtained after performing the screenshot operation on the program interface may be stored in the cache of the mobile terminal.
  • the preset time period corresponds to a preset duration, and the duration can be set as needed.
  • the preset duration is backtracked, and the preset time period is determined. Then, the steps of subsequent judgment are performed. That is to say, when the mobile terminal performs a screenshot operation on the program interface and stores the screenshot.
  • the screenshots already stored in the cache can be used regardless of how many times the user performs a drag operation within the preset duration. There is no need to perform a screenshot operation on the program interface each time the drag operation is monitored.
  • element boundaries may not be displayed when displayed.
  • an element is a pattern drawn on a transparent background. Then, by the existing method of determining the boundary, only the boundary of the pattern can be determined. Therefore, in order to conveniently determine the boundary of the element, before acquiring the screenshot of the program interface, the existing interface layout boundary display tool can also be activated to display the boundary of each element in the program interface.
  • FIG. 7a is a case where each element does not display the boundary of an element. Then, after starting the interface layout boundary display tool, the element boundary shown in Figure 7b can be displayed.
  • the program corresponding to the program interface, the program for executing the information display process, and the interface layout boundary display tool can be three different independent programs.
  • the execution bodies of the steps of the method provided by the embodiment of the present application may all be the same device, or the method may also be performed by different devices.
  • the execution body of step S102 and step S104 may be device 1
  • the execution body of step S106 and step S108 may be device 2; for example, the execution bodies of steps S102 and S106 may be device 2, step S104 and step S108.
  • the execution subject can be device 1; and so on.
  • the embodiment of the present specification further provides an information display method, as shown in FIG. 8.
  • FIG. 8 is an information display process according to an embodiment of the present disclosure, which may specifically include the following steps:
  • S200 Obtain a screenshot of the program interface of the mobile terminal, display at least one cursor, and monitor the operation of the user.
  • the information display process is for displaying the size of a character in the mobile terminal. Similar to the information display process shown in FIG. 2, the information display process can be performed by the mobile terminal itself or an installed program.
  • the size of the character is usually smaller than the size of the element in the program interface, it is difficult to measure the character by the cursor pair. Therefore, in the present specification, at least one cursor can be displayed when measuring the character size.
  • the character size of the character covered by the cursor is displayed in the subsequent steps.
  • the shape of the cursor may be a rectangle. The size of the cursor can be set as needed.
  • step S100 and step S102 can be referred to, and the description is not repeated herein.
  • the color at the position may also be determined in the acquired screenshot.
  • the boundary of the character is then determined based on the boundary of the cursor and the determined color.
  • the cursor may partially cover the character to be measured, and when the color at the position of the cursor is determined in step S204, the color of the character and the background color may be determined. And in the subsequent step S206, the boundary of the character covered by the cursor is determined according to the determined color of the character, the determined background color, and the cursor boundary.
  • the size of the character can generally only be determined by the height of the character or the width of the character, when determining the boundary of the character, the upper and lower boundaries of the cursor and/or the left and right boundaries of the cursor can be determined first.
  • the height of a character is usually taken as the size of a character in the prior art, the description will be made by taking the height of the cursor as an example in the present specification.
  • the color corresponding to the upper boundary of the cursor and the color corresponding to the lower boundary of the cursor are further determined.
  • 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.
  • step S206 it may be determined line by line from the upper and lower boundaries of the cursor whether or not a color that is not exactly the same as the position of the cursor appears.
  • a line other than the "person" character is judged, only white is present in the line, and then it can be determined.
  • each column of pixels between the extension lines of the upper and lower boundaries of the cursor can also be determined. And starting from the left boundary of the cursor to the left, from the determined columns of pixels, a column of pixels that are not exactly the same color as the pixels of the next column is selected as the left boundary of the character.
  • the right column of the cursor is used as a starting column to the right. From among the determined columns of pixels, a column of pixels that are not exactly the same color as the pixels of the next column is selected 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.
  • S208 Determine, according to the determined character boundary, the size of the character covered by the cursor, and display the size.
  • the character size that is usually set is the size of the character actually displayed in the program interface (eg, the height of the character boundary or The width of the character boundary) cannot be consistent.
  • the program developer sets a character size of 12px, but 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.
  • the character size corresponding to the character boundary can also be determined and displayed according to the fitting formula acquired in advance.
  • the mobile terminal can send the device information (such as the device model, the screen size, the pixel density, and the like) of the mobile terminal to the server in advance by the mobile terminal itself or a program for executing the information display process, and then receive the information returned by the server and the device.
  • the device information such as the device model, the screen size, the pixel density, and the like
  • Corresponding fitting formulas are stored. Then, after determining the height or width of the character boundary, the height or width may be input into the fitting formula to obtain a corresponding character size.
  • the server may predetermine a fitting formula corresponding to different device information, and when receiving the device information, determine a corresponding fitting formula and return. For example, the server may collect the character size set in the mobile terminal for each type of mobile terminal, and the corresponding actual display character size, and the left and right samples. A fitting curve of the set character size and the actually displayed character size is determined by a least square method, and a fitting formula corresponding to the fitting curve is obtained, as shown in FIG.
  • the mobile terminal can determine the character size corresponding to the distance between the upper and lower boundaries of the character (ie, the actually displayed character size) (ie, the set character size).
  • the accurate character size can be obtained by simply covering the cursor on the character to be measured. It solves the problem that it is difficult to measure the character size on the mobile terminal.
  • the cursor it is necessary to cover the characters by the cursor to determine the character size.
  • a single-size cursor may be inconvenient for measuring the character size. Therefore, a plurality of cursors can be displayed in step S200, and the sizes of the respective cursors may not be identical to meet the measurement requirements for characters of different sizes.
  • the information display methods illustrated in FIGS. 2 and 8 may exist simultaneously.
  • the element size can be displayed in the middle of each pair of cursors, and the character size can be displayed next to the cursor, as shown in FIG.
  • the specific distance and size are not limited in this description.
  • the embodiment of the present specification further provides an information display device, as shown in FIG.
  • FIG. 12 is a schematic structural diagram of an information display apparatus according to an embodiment of the present disclosure, including:
  • Obtaining the display and monitoring module 300 acquiring a screenshot of the program interface of the mobile terminal, displaying at least one pair of cursors, and monitoring the operation of the user;
  • the first determining module 302 is configured, for each pair of cursors, when detecting that the user performs an operation on the pair of cursors, determining a position corresponding to each of the cursors on which the operation is performed;
  • the second determining module 304 determines, according to the corresponding positions of the cursors, the selection ranges corresponding to the respective cursors in the screenshots;
  • the third determining module 306 determines, according to a preset boundary algorithm, a boundary of an element in the program interface, respectively, in the selection range corresponding to each cursor;
  • a fourth determining module 308 respectively, moving each cursor that is to perform the operation to a boundary of the respectively determined element
  • the display module 310 displays the distance between the pair of cursors.
  • Obtaining the display and monitoring module 300 displaying a floating window, displaying at least one pair of cursors in the floating window, wherein the floating window is a transparent window, and the floating window is displayed on an upper layer of the program interface.
  • the display and monitoring module 300 is configured to display two pairs of cursors in the screen of the mobile terminal, wherein one pair of cursors is in a horizontal line segment and the other pair of cursors is a vertical line segment.
  • the display and monitoring module 300 is configured to display the floating window and/or obtain a screenshot of the program interface when a user input command is detected.
  • a third determining module 306 for each cursor in the pair of cursors, determining a color displayed by the program interface at a position of the cursor as a base color, and determining, in the selection range corresponding to the cursor, the cursor
  • the line segments are parallel, beyond a preset length, and a line segment having a different color from the base color as the determined boundary.
  • a third determining module 306 in the selected range corresponding to the cursor, determining at least one line segment parallel to the line segment of the cursor, exceeding a preset length, and having a color different from the base color, from the determined at least one line segment In the middle, the line segment closest to the cursor is selected as the determined boundary.
  • the embodiment of the present specification further provides an information display device, as shown in FIG.
  • FIG. 13 is a schematic structural diagram of an information display apparatus according to an embodiment of the present disclosure, including:
  • Obtaining the display and monitoring module 400 acquiring a screenshot of the program interface of the mobile terminal, displaying at least one cursor, and monitoring the operation of the user;
  • the first determining module 402 determines, when the user performs an operation on any of the cursors, the position of the cursor on which the operation is performed;
  • a second determining module 404 determining a color at the location in the screenshot
  • a third determining module 406 determining a character boundary according to the boundary of the cursor and the color
  • the display module 408 determines the size of the character covered by the cursor according to the determined character boundary and displays it.
  • the shape of the cursor is a rectangle
  • a third determining module 406 determining an upper and lower boundary of the cursor and/or a left and right boundary of the cursor, and determining, according to the color, a color corresponding to an upper and lower boundary of the cursor and/or the cursor according to the color
  • the color corresponding to the left and right borders respectively determines the height of the character boundary according to the color corresponding to the upper and lower boundaries of the cursor, and/or determines the width of the character boundary according to the color corresponding to the left and right boundaries of the cursor respectively.
  • a third determining module 406 determining each row of pixels between the extension lines of the left and right boundaries of the cursor, starting from the upper boundary of the cursor, and selecting the row of pixels from the determined row of pixels.
  • a row of pixels, as the lower boundary of the character takes the distance between the upper and lower boundaries of the character boundary as the height of the character boundary.
  • a third determining module 406 determining each column of pixels between the extension lines of the upper and lower boundaries of the cursor, starting from the left boundary of the cursor to the left, and selecting from the determined columns of pixels
  • a column of pixels of a column of pixels having different colors is used as the left boundary of the character
  • the right column of the cursor is used as a starting column to be rightward. From among the determined columns of pixels, the color of the pixel corresponding to the next column is selected.
  • a column of pixels that are not identical, 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.
  • the display module 408 determines a size corresponding to the height of the character boundary and/or a size corresponding to the width of the character boundary according to a fitting formula acquired in advance.
  • the embodiment of the present specification further provides another mobile terminal, as shown in FIG.
  • FIG. 14 is a schematic structural diagram of a terminal according to an embodiment of the present disclosure.
  • the terminal includes: one or more processors and a memory, where the program is configured to perform the following steps by one or more processors:
  • the embodiment of the present specification further provides another mobile terminal, as shown in FIG. 8.
  • FIG. 15 is a schematic structural diagram of a terminal according to an embodiment of the present disclosure.
  • the terminal includes: one or more processors and a memory, where the program is configured to perform the following steps by one or more processors:
  • the size of the character covered by the cursor is determined according to the determined character boundary and displayed.
  • PLD Programmable Logic Device
  • FPGA Field Programmable Gate Array
  • HDL Hardware Description Language
  • the controller can be implemented in any suitable manner, for example, the controller can take the form of, for example, a microprocessor or processor and a computer readable medium storing computer readable program code (eg, software or firmware) executable by the (micro)processor.
  • computer readable program code eg, software or firmware
  • examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, The Microchip PIC18F26K20 and the Silicone Labs C8051F320, the memory controller can also be implemented as part of the memory's control logic.
  • the controller can be logically programmed by means of logic gates, switches, ASICs, programmable logic controllers, and embedding.
  • Such a controller can therefore be considered a hardware component, and the means for implementing various functions included therein can also be considered as a structure within the hardware component.
  • a device for implementing various functions can be considered as a software module that can be both a method of implementation and a structure within a hardware component.
  • the system, device, module or unit illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product having a certain function.
  • a typical implementation device is a computer.
  • the computer can be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or A combination of any of these devices.
  • embodiments of the present invention can be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or a combination of software and hardware. Moreover, the invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
  • computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
  • These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device.
  • the instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.
  • the memory may include non-persistent memory, random access memory (RAM), and/or non-volatile memory in a computer readable medium, such as read only memory (ROM) or flash memory.
  • RAM random access memory
  • ROM read only memory
  • Memory is an example of a computer readable medium.
  • Computer readable media includes both permanent and non-persistent, removable and non-removable media.
  • Information storage can be implemented by any method or technology.
  • the information can be computer readable instructions, data structures, modules of programs, or other data.
  • Examples of computer storage media include, but are 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 programmable read only memory (EEPROM), flash memory or other memory technology, compact disk read only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, Magnetic tape cartridges, magnetic tape storage or other magnetic storage devices or any other non-transportable media can be used to store information that can be accessed by a computing device.
  • computer readable media does not include temporary storage of computer readable media, such as modulated data signals and carrier waves.
  • embodiments of the present application can be provided as a method, system, or computer program product.
  • the present application can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment in combination of software and hardware.
  • the application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
  • the application can be described in the general context of computer-executable instructions executed by a computer, such as a program module.
  • program modules include routines, programs, objects, components, data structures, and the like that perform particular tasks or implement particular abstract data types.
  • the present application can also be practiced in distributed computing environments where tasks are performed by remote processing devices that are connected through a communication network.
  • program modules can be located in both local and remote computer storage media including storage devices.

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

Disclosed in the present application are an information display method and apparatus: acquiring a screenshot of a program interface and displaying a pair of pointers or a cursor; when monitoring an operation executed by the user on the pair of pointers or the cursor, determining the position of each pointer in the pair of pointers or the position of the cursor; for the pair of pointers, further determining the element boundaries corresponding respectively to each pointer, respectively moving each executed pointer to the boundary, and displaying the distance between the pair of pointers; for the cursor, further determining the colour corresponding to the cursor; on the basis of the cursor boundary and the determined colour, determining a character boundary; and thereby determining the character size and displaying same.

Description

一种信息显示的方法及装置Method and device for displaying information 技术领域Technical field

本申请涉及信息技术领域,尤其涉及一种信息显示的方法及装置。The present application relates to the field of information technology, and in particular, to a method and an apparatus for displaying information.

背景技术Background technique

目前,在移动终端测量程序界面中的元素或者字符的尺寸时,通常是通过使用测量尺寸的工具进行测量。其中,元素尺寸通常是指在界面中设计的按键、窗口等区域的大小尺寸,字符尺寸通常为界面中文字的大小,如图1所示。Currently, when a mobile terminal measures the size of an element or a character in a program interface, it is usually measured by using a tool for measuring the size. Among them, the element size usually refers to the size of the button, window and other areas designed in the interface, and the character size is usually the size of the text in the interface, as shown in Figure 1.

而在现有技术中,移动终端中的测量尺寸的工具,需要通过用户手指拖动游标,并且只是显示游标之间的距离。In the prior art, the tool for measuring the size in the mobile terminal needs to drag the cursor by the user's finger and only displays the distance between the cursors.

但是,通常对于元素以及字符的尺寸测量需要精确到像素级别,可见需要一种可以在移动终端上精确显示元素尺寸、字符尺寸的方法,基于现有技术,本说明书提供一种新的信息显示方法。However, generally, the size measurement of elements and characters needs to be accurate to the pixel level. It can be seen that there is a need for a method for accurately displaying element size and character size on a mobile terminal. Based on the prior art, the present specification provides a new information display method. .

发明内容Summary of the invention

本说明书实施例提供一种信息显示的方法及装置,用于解决现有技术难以方便、精确的确定移动终端上的程序界面的元素尺寸以及字符尺寸的问题。The embodiment of the present specification provides a method and an apparatus for information display, which are used to solve the problem that the prior art is difficult to conveniently and accurately determine the element size and character size of the program interface on the mobile terminal.

本说明书实施例采用下述技术方案:The embodiments of the present specification adopt the following technical solutions:

一种信息显示的方法,方法包括:A method for displaying information 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 it is detected that the user performs an operation on the pair of cursors, determining a position corresponding to each of the cursors on which the operation is performed;

根据各游标分别对应位置,在所述截图中确定各游标分别对应的选择范围;Determining, according to each cursor, a selection range corresponding to each cursor in the screenshot;

根据预设的边界算法,在各游标分别对应的所述选择范围内,分别确定所述程序界面中的元素的边界;Determining, according to a preset boundary algorithm, a boundary of an element in the program interface, respectively, in the selection range corresponding to each cursor;

将被执行所述操作的各游标分别移动至分别确定出的所述元素的边界;Moving each cursor of the operation to the boundary of the respectively determined element;

显示该对游标之间的距离。Shows the distance between the pair of cursors.

一种信息显示方法,包括:An information display method includes:

获取移动终端的程序界面的截图,显示至少一个光标,并监测用户的操作;Obtaining a screenshot of the program interface of the mobile terminal, displaying at least one cursor, and monitoring the operation of the user;

当监测到用户对任一光标执行操作时,确定被执行所述操作的光标的位置;Determining the position of the cursor on which the operation is performed when it is detected that the user performs an operation on any of the cursors;

在所述截图中确定在所述位置上的颜色;Determining the color at the location in the screenshot;

根据所述光标的边界以及所述颜色,确定字符边界;Determining a character boundary according to the boundary of the cursor and the color;

根据确定出的字符边界,确定所述光标所覆盖的字符的尺寸,并显示。The size of the character covered by the cursor is determined according to the determined character boundary and displayed.

一种信息显示装置,包括:An information display device comprising:

获取显示及监测模块,获取移动终端的程序界面的截图,显示至少一对游标,并监测用户的操作;Obtaining a display and monitoring module, 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;

第一确定模块,针对每对游标,当监测到用户对该对游标执行操作时,确定被执行所述操作的各游标分别对应的位置;a first determining module, for each pair of cursors, when detecting that the user performs an operation on the pair of cursors, determining a position corresponding to each of the cursors on which the operation is performed;

第二确定模块,根据各游标分别对应位置,在所述截图中确定各游标分别对应的选择范围;a second determining module, according to each cursor corresponding to the position, determining, in the screenshot, a selection range corresponding to each cursor;

第三确定模块,根据预设的边界算法,在各游标分别对应的所述选择范围内,分别确定所述程序界面中的元素的边界;a third determining module, respectively, determining, according to a preset boundary algorithm, a boundary of an element in the program interface in the selection range corresponding to each cursor;

第四确定模块,将被执行所述操作的各游标分别移动至分别确定出的所述元素的边界;a fourth determining module, respectively moving each cursor that is to perform the operation to a boundary of the respectively determined element;

显示模块,显示该对游标之间的距离。A display module that displays the distance between the pair of cursors.

一种信息显示装置,包括:An information display device comprising:

获取显示及监测模块,获取移动终端的程序界面的截图,显示至少一个光标,并监测用户的操作;Obtaining a display and monitoring module, obtaining a screenshot of the program interface of the mobile terminal, displaying at least one cursor, and monitoring the operation of the user;

第一确定模块,当监测到用户对任一光标执行操作时,确定被执行所述操作的光标的位置;a first determining module, when detecting that the user performs an operation on any of the cursors, determining a position of the cursor on which the operation is performed;

第二确定模块,在所述截图中确定在所述位置上的颜色;a second determining module determining a color at the location in the screenshot;

第三确定模块,根据所述光标的边界以及所述颜色,确定字符边界;a third determining module, determining a character boundary according to the boundary of the cursor and the color;

显示模块,根据确定出的字符边界,确定所述光标所覆盖的字符的尺寸,并显示。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 comprising: one or more processors and a memory, the program being configured to perform the following steps by one or more processors:

获取所述移动终端的程序界面的截图,显示至少一对游标,并监测用户的操作;Obtaining a screenshot of the program interface of the mobile terminal, displaying at least one pair of cursors, and monitoring user operations;

针对每对游标,当监测到用户对该对游标执行操作时,确定被执行所述操作的各游标分别对应的位置;For each pair of cursors, when it is detected that the user performs an operation on the pair of cursors, determining a position corresponding to each of the cursors on which the operation is performed;

根据各游标分别对应位置,在所述截图中确定各游标分别对应的选择范围;Determining, according to each cursor, a selection range corresponding to each cursor in the screenshot;

根据预设的边界算法,在各游标分别对应的所述选择范围内,分别确定所述程序界面中的元素的边界;Determining, according to a preset boundary algorithm, a boundary of an element in the program interface, respectively, in the selection range corresponding to each cursor;

将被执行所述操作的各游标分别移动至分别确定出的所述元素的边界;Moving each cursor of the operation to the boundary of the respectively determined element;

显示该对游标之间的距离。Shows the distance between the pair of cursors.

一种移动终端,包括:一个或多个处理器及存储器,所述程序被配置成由一个或多个处理器执行以下步骤:A mobile terminal comprising: one or more processors and a memory, the program being configured to perform the following steps by one or more processors:

获取所述移动终端的程序界面的截图,显示至少一个光标,并监测用户的操作;Obtaining a screenshot of the program interface of the mobile terminal, displaying at least one cursor, and monitoring the operation of the user;

当监测到用户对任一光标执行操作时,确定被执行所述操作的光标的位置;Determining the position of the cursor on which the operation is performed when it is detected that the user performs an operation on any of the cursors;

在所述截图中确定在所述位置上的颜色;Determining the color at the location in the screenshot;

根据所述光标的边界以及所述颜色,确定字符边界;Determining a character boundary according to the boundary of the cursor and the color;

根据确定出的字符边界,确定所述光标所覆盖的字符的尺寸,并显示。The size of the character covered by the cursor is determined according to the determined character boundary and displayed.

本说明书实施例采用的上述至少一个技术方案能够达到以下有益效果:The above at least one technical solution adopted by the embodiments of the present specification can achieve the following beneficial effects:

通过本说明书提供的方法,通过获取在程序界面的截图,以及监测用户对游标的操作,将游标吸附至确定出的元素边界上,使得无需精确将游标线的移动至元素边界,便可以确定精确测量的元素尺寸。同理,通过确定该光标的边界以及光标所在位置的颜色,从而确定字符边界,进而准确的确定字符的尺寸,使得只需将光标覆盖在字符上,便可得到字符的尺寸。使得在移动终端上,即使用户的手指无法精确的移动游标或者光标,也以得到精确的元素尺寸以及字符尺寸,弥补了现有技术难以在移动终端上精确测量元素尺寸以及字符尺寸的缺陷,使得在移动终端上就可以方便、准确的确定程序界面中元素以及字符的尺寸。Through the method provided in this specification, by taking a screenshot of the program interface and monitoring the user's operation on the cursor, the cursor is adsorbed onto the determined element boundary, so that it is possible to determine without moving the cursor line to the element boundary accurately. Accurately measured element size. Similarly, by determining the boundary of the cursor and the color of the cursor position, the character boundary is determined, and the size of the character is accurately determined, so that the size of the character can be obtained by simply overlaying the cursor on the character. Therefore, on the mobile terminal, even if the user's finger cannot accurately move the cursor or the cursor, the accurate element size and the character size are obtained, which makes up for the defect that the prior art is difficult to accurately measure the element size and the character size on the mobile terminal, so that The size of the elements and characters in the program interface can be conveniently and accurately determined on the mobile terminal.

附图说明DRAWINGS

此处所说明的附图用来提供对本申请的进一步理解,构成本申请的一部分,本申请的示意性实施例及其说明用于解释本申请,并不构成对本申请的不当限定。在附图中:The drawings described herein are intended to provide a further understanding of the present application, and are intended to be a part of this application. In the drawing:

图1为现有程序界面的元素尺寸及字符尺寸的示意图;1 is a schematic diagram of element sizes and character sizes of an existing program interface;

图2为本说明书实施例提供的一种信息显示的过程;2 is a process of information display provided by an embodiment of the present disclosure;

图3a为本说明书实施例提供的程序界面的示意图;Figure 3a is a schematic diagram of a program interface provided by an embodiment of the present specification;

图3b为本说明书实施例提供的程序界面中显示不同游标对的示意图;FIG. 3b is a schematic diagram showing different cursor pairs in a program interface provided by an embodiment of the present disclosure;

图3c为本说明书实施例提供的另一种程序界面中显示游标对的示意图;FIG. 3 is a schematic diagram of displaying a cursor pair in another program interface according to an embodiment of the present disclosure;

图4a至4d为本说明书实施例提供的在浮动窗口显示游标线及光标的过程示意图;4a to 4d are schematic diagrams showing a process of displaying a cursor line and a cursor in a floating window according to an embodiment of the present disclosure;

图5为本说明书实施例提供的线段示意图;Figure 5 is a schematic view of a line segment provided by an embodiment of the present specification;

图6a至6d为本说明书实施例提供的准确确定元素尺寸的过程示意图;6a to 6d are schematic diagrams of processes for accurately determining element sizes provided by embodiments of the present specification;

图7a以及图7b为本说明书实施例提供的显示元素边界的过程示意图;7a and 7b are schematic diagrams showing processes of displaying element boundaries according to an embodiment of the present disclosure;

图8为本说明书实施例提供的另一种信息显示的过程;FIG. 8 is another process of displaying information according to an embodiment of the present disclosure;

图9为本说明书实施例提供的确定字符的边界示意图FIG. 9 is a schematic diagram of determining a boundary of a character according to an embodiment of the present disclosure

图10为本说明书实施例提供的拟合曲线的示意图;Figure 10 is a schematic diagram of a fitting curve provided by an embodiment of the present specification;

图11为本说明书实施例提供的显示元素尺寸以及字符尺寸的示意图;FIG. 11 is a schematic diagram showing display element size and character size according to an embodiment of the present disclosure; FIG.

图12为本说明书实施例提供的一种信息显示装置的结构示意图;FIG. 12 is a schematic structural diagram of an information display apparatus according to an embodiment of the present disclosure;

图13为本说明书实施例提供的另一种信息显示装置的结构示意图;FIG. 13 is a schematic structural diagram of another information display apparatus according to an embodiment of the present disclosure;

图14为本说明书实施例提供的一种移动终端的结构示意图;FIG. 14 is a schematic structural diagram of a mobile terminal according to an embodiment of the present disclosure;

图15为本说明书实施例提供的另一种移动终端的结构示意图。FIG. 15 is a schematic structural diagram of another mobile terminal according to an embodiment of the present disclosure.

具体实施方式Detailed ways

现有技术中,在移动终端上开发应用时,为了使应用能够提供更好的用户体验,通常会由交互设计师、视觉设计师以及程序员共同协作进行应用开发。In the prior art, when an application is developed on a mobile terminal, in order to enable the application to provide a better user experience, application development is usually performed by an interaction designer, a visual designer, and a programmer.

应用开发的流程通常是,先由交互设计师、视觉设计师(为方便描述以下统一称为 设计人员)对应用的界面、交互逻辑等进行设计,确定应用的设计稿(如,界面样式、交互方式等等),之后再由程序开发人员根据该设计稿,进行应用编写。The process of application development usually consists of designing the interface of the application, interaction logic, etc. by the interaction designer and visual designer (for the convenience of describing the following collectively referred to as the designer), and determining the design draft of the application (eg, interface style, interaction). The method, etc.), and then the application developer writes the application according to the design draft.

其中,程序开发人员在根据设计稿进行程序编写时,需要从视觉上尽量还原设计稿的内容。但是,由于程序开发人员和设计人员对于设计稿的理解存在一定的偏差,通常编写好的应用难以准确的还原出设计稿中的视觉效果。因此还需要设计人员对编写好的应用进行验收,判断是否存在不满足设计需求的内容。若是则向程序开发人员提出修改意见,再由程序开发人员进行修改,如此反复直至应用符合设计需求为止。上述验收以及修改的过程通常称为视觉还原。Among them, when the program developer writes the program according to the design draft, it is necessary to visually restore the content of the design draft. However, due to the deviation of the understanding of the design draft by the program developers and designers, it is often difficult to accurately restore the visual effects in the design draft. Therefore, the designer is required to check and write the written application to determine whether there is content that does not meet the design requirements. If so, propose changes to the program developer, and then modify it by the program developer, and repeat until the application meets the design requirements. The process of acceptance and modification described above is commonly referred to as visual restoration.

其中,设计人员在进行视觉效果的验收时,主要对程序界面的颜色、元素尺寸以及字符尺寸等进行验收。并且,元素通常为在程序界面中的由平行线以及垂直线构成的矩形。尺寸的大小通常基于像素点(pixel,px)的数量确定,例如,在安卓系统中以密度独立像素(Density-independent Pixels,dp)表示元素尺寸,以比例尺独立像素(Scale-independent Pixels,sp)表示字符尺寸。Among them, when designing the visual effect, the designer mainly accepts the color, element size and character size of the program interface. Also, the element is usually a rectangle composed of parallel lines and vertical lines in the program interface. The size of the size is usually determined based on the number of pixels (pixels, px). For example, in the Android system, the density of the pixels (Density-independent Pixels, dp) is used to represent the element size, and the scale-independent Pixels (sp) Represents the character size.

但是现有技术中,移动终端上的测量尺寸的工具一般是显示一对游标之间的距离,当用户需要测量元素或者字符尺寸时,通过手指在屏幕上将游标分别至元素的边界,并将测量尺寸的工具显示的光标之间的距离,作为元素或者字符尺寸。而由于人手指在屏幕上的操作精度较低,导致测量的精度难以保证。However, in the prior art, the tool for measuring the size on the mobile terminal generally displays the distance between a pair of cursors, and when the user needs to measure the element or the character size, the cursor is separated from the cursor to the boundary of the element by the finger, and The distance between the cursors displayed by the tool for measuring dimensions, as an element or character size. Due to the low precision of the operation of the human finger on the screen, the accuracy of the measurement is difficult to ensure.

或者在现有技术中,由设计人员将应用的界面进行截图后,发送至个人电脑上,以在尺寸较大的屏幕(如,显示器的屏幕)上对截图进行放大后,再对元素或者字符的尺寸进行精确测量。但又会导致操作繁琐,测量效率低等问题。Or in the prior art, the designer takes a screenshot of the application interface and sends it to the personal computer to enlarge the screenshot on a larger screen (eg, the screen of the display), and then to the element or character. The dimensions are measured accurately. However, it will lead to cumbersome operations and low measurement efficiency.

因此,本说明书各实施例提供一种信息显示的方法以及装置,解决现有技术难以方便、精确的确定移动终端上的程序界面的元素尺寸以及字符尺寸的问题。Therefore, the embodiments of the present specification provide a method and an apparatus for displaying information, which solves the problem that the prior art is difficult to conveniently and accurately determine the element size and character size of the program interface on the mobile terminal.

为使本说明书的目的、技术方案和优点更加清楚,下面将结合本说明书具体实施例及相应的附图对本申请技术方案进行清楚、完整地描述。显然,所描述的实施例仅是本申请一部分实施例,而不是全部的实施例。基于说明书中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions of the present application will be clearly and completely described in the following with reference to the specific embodiments of the specification and the accompanying drawings. It is apparent that the described embodiments are only a part of the embodiments of the present application, and not all of them. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the specification without departing from the inventive scope are the scope of the application.

以下结合附图,详细说明本申请各实施例提供的技术方案。The technical solutions provided by the embodiments of the present application are described in detail below with reference to the accompanying drawings.

图2为说明书实施例提供的一种信息显示的过程,具体可包括以下步骤:2 is a process of information display provided by an embodiment of the present invention, which may specifically include the following steps:

S100:获取移动终端的程序界面的截图,显示至少一对游标,并监测用户的操作。S100: 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.

由于本说明书提供的方法用于解决在移动终端上难以方便精确测量应用的程序界面中元素以及字符的尺寸的问题,所以可由移动终端自身或者安装在移动终端上的程序,执行本说明书实施例提供的信息显示过程。Since the method provided by the present specification is for solving the problem that it is difficult to conveniently and accurately measure the size of elements and characters in the program interface of the application on the mobile terminal, the embodiment of the present specification may be implemented by the mobile terminal itself or a program installed on the mobile terminal. The information shows the process.

其中,该移动终端可以是手机、平板电脑等设备,本说明书对此不做限定。而若通过安装在移动终端上的程序执行该信息显示过程,则该程序可以为安装在移动终端的系统中的程序,并通过运行该程序执行上述信息显示过程。此时,该移动终端的程序界面,为待测量元素尺寸的程序界面。而待测量的程序界面对应的程序为第三方程序。如,系统程序(则,此时程序界面为系统界面)或者安装在系统程序中的其他程序,如图3a所示。The mobile terminal may be a device such as a mobile phone or a tablet computer, which is not limited in this specification. On the other hand, if the information display process is executed by a program installed on the mobile terminal, the program can be a program installed in the system of the mobile terminal, and the above information display process can be executed by running the program. At this time, the program interface of the mobile terminal is a program interface of the size of the element to be measured. The program corresponding to the program interface to be measured is a third-party program. For example, the system program (that is, the program interface is the system interface at this time) or other programs installed in the system program, as shown in Figure 3a.

具体的,无论是通过移动终端自身还是通过移动终端上安装的程序执行该信息显示过程,都需要获取待测量的程序界面的截图且显示至少一对游标,以监测用户对游标对的操作执行后续操作。其中,本说明书对于游标的形状不做限定,为了方便描述,后续以游标是线段为例进行说明。具体的,每对游标可为相互平行的线段,并且该线段的长度可以根据需要进行设置。例如,该游标的线段可为贯穿浮动窗口的线段,也可以是预设长度的线段,如图3b所示。Specifically, whether the information display process is performed by the mobile terminal itself or by a program installed on the mobile terminal, it is necessary to obtain a screenshot of the program interface to be measured and display at least one pair of cursors to monitor the user's subsequent execution of the cursor pair operation. operating. The description does not limit the shape of the cursor. For convenience of description, the following description is made by taking the cursor as a line segment as an example. Specifically, each pair of cursors may be line segments parallel to each other, and the length of the line segments may be set as needed. For example, the line segment of the cursor may be a line segment running through the floating window, or may be a line segment of a preset length, as shown in FIG. 3b.

图3a为本说明书实施例提供的待测量的程序界面的示意图,图3b为本说明书实施例提供的在程序界面上显示游标线以及光标的示意图。FIG. 3 is a schematic diagram of a program interface to be measured according to an embodiment of the present disclosure, and FIG. 3b is a schematic diagram of displaying a cursor line and a cursor on a program interface according to an embodiment of the present disclosure.

进一步地,该游标可以显示在浮动窗口(Float Window)中。则该浮动窗口为执行该信息显示过程的程序的界面,该浮动窗口可为透明窗口。并且,该浮动窗口的窗口Z序高于该程序界面的窗口Z序。于是,当显示该浮动窗口后,虽然该浮动窗口的窗口Z序在程序界面之上,但是并不会遮挡程序界面中的内容。并且,由于将游标显示在浮动窗口中,所以当用户对游标操作时,不会误触待测量的程序界面中的元素(如,按键)。Further, the cursor can be displayed in a floating window (Float Window). Then the floating window is an interface of a program that executes the information display process, and the floating window can be a transparent window. Moreover, the window Z order of the floating window is higher than the window Z order of the program interface. Thus, when the floating window is displayed, although the window Z sequence of the floating window is above the program interface, the content in the program interface is not obscured. Moreover, since the cursor is displayed in the floating window, when the user operates the cursor, the elements (eg, buttons) in the program interface to be measured are not accidentally touched.

另外,通过如图1所示的程序界面的示意图,可见在程序界面中的元素通常为矩形。因此,为了方便确定元素的纵向边长以及水平边长,在本说明书中可显示两对游标。其中,一对游标在为水平的线段,另一对游标为垂直的线段,如图3c所示。In addition, through the schematic diagram of the program interface as shown in FIG. 1, it can be seen that the elements in the program interface are generally rectangular. Therefore, in order to facilitate the determination of the longitudinal side length of the element and the horizontal side length, two pairs of cursors can be displayed in this specification. Among them, one pair of cursors is a horizontal line segment, and the other pair of cursors is a vertical line segment, as shown in Fig. 3c.

进一步地,在本说明书中,获取截图、显示游标对以及监测用户的操作之间不存在执行先后顺序。既可以先获取截图,再显示游标最后监测用户的操作,也可以先监测用户的操作,再获取截图最后显示游标,本说明书对此不做限定。Further, in the present specification, there is no execution order between obtaining a screenshot, displaying a cursor pair, and monitoring a user's operation. You can get the screenshot first, then display the cursor to monitor the user's operation at the end, or you can monitor the user's operation first, and then get the screenshot and finally display the cursor. This specification does not limit this.

具体的,可在当监测到用户输入指令时,显示该浮动窗口。例如,该浮动窗口对应 的程序在启动之后可以显示浮动按键,该浮动按键的窗口Z序高于待测量的程序界面的窗口Z序。则在后续该待测量的程序启动后,该程序界面不会遮挡该浮动按键。因此,可在监测到用户对该浮动按键执行点击操作时(即,监测到用户输入指令时),在该程序界面上显示该浮动窗口。上述过程可如图4a至4d所示。Specifically, the floating window can be displayed when a user input instruction is detected. For example, the program corresponding to the floating window can display a floating button after the startup, and 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 program to be measured is started, the program interface does not block the floating button. Therefore, the floating window can be displayed on the program interface when the user is monitored to perform a click operation on the floating button (ie, when the user inputs an instruction is monitored). The above process can be as shown in Figures 4a to 4d.

图4a为本说明书提供的移动终端的系统界面的示意图。其中,系统界面中的APP1为浮动窗口对应的程序,当用户启动该程序后可显示浮动按键。图4b为启动浮动窗口对应的程序后,在该系统界面上显示浮动按键的示意图。其中,系统界面中的APP4为待测量的程序界面对应的程序,当用户启动APP4后可显示程序界面。图4c为启动待测量的程序界面对应的程序启动后,在程序界面上显示浮动按键的示意图。其中,浮动按键的窗口Z序高于程序界面的窗口Z序,所以不会被程序界面遮挡。当监测到用户对该浮动按键执行点击操作后,可显示该浮动窗口。图4d为监测到用户对浮动按键执行点击操作后,在程序界面上显示浮动窗口的示意图。其中,浮动窗口中显示两对游标。并且,由于浮动窗口为透明窗口,所以并不会遮挡程序界面中的内容。4a is a schematic diagram of a system interface of a mobile terminal provided by the present specification. Among them, APP1 in the system interface is a program corresponding to the floating window, and the floating button can be displayed when the user starts the program. FIG. 4b is a schematic diagram showing floating keys displayed on the system interface after the program corresponding to the floating window is started. The APP4 in the system interface is a program corresponding to the program interface to be measured, and the program interface can be displayed when the user starts the APP4. FIG. 4c is a schematic diagram of displaying a floating button on the program interface after starting the program corresponding to the program interface to be measured. Among them, the window Z order of the floating button is higher than the window Z order of the program interface, so it is not blocked by the program interface. The floating window can be displayed when the user is monitored to perform a click operation on the floating button. FIG. 4d is a schematic diagram of displaying a floating window on the program interface after the user performs a click operation on the floating button. Among them, two pairs of cursors are displayed in the floating window. Moreover, since the floating window is a transparent window, the content in the program interface is not blocked.

进一步地,在本说明书实施例中也可在监测到用户输入指令时获取程序界面的截图。而获取截图的指令与显示浮动窗口的指令可以是同一个指令,则在监测到用户输入指令时,可显示浮动窗口以及获取截图。或者,也可以在该浮动窗口中显示截图按键,当监测到用户点击截图按键时,确定用户输入指令,并获取程序界面的截图。Further, in the embodiment of the present specification, a screenshot of the program interface may also be acquired when the user inputs an instruction. The instruction to obtain the screenshot and the instruction to display the floating window may be the same instruction, and when the user inputs the instruction, the floating window and the screenshot may be displayed. Alternatively, the screenshot button may also be displayed in the floating window. When the user clicks the screenshot button, it is determined that the user inputs an instruction and obtains a screenshot of the program interface.

S102:针对每对游标,当监测到用户对该对游标执行操作时,确定被执行所述操作的各游标分别对应的位置。S102: For each pair of cursors, when it is detected that the user performs an operation on the pair of cursors, determine a position corresponding to each of the cursors on which the operation is performed.

在本说明书实施例中,针对每对游标,当监测到用户对该对游标执行操作时,可进一步确定被执行操作的各游标分别对应的位置。为方便描述,在本说明书中以一对游标中的一个游标为例进行说明。In the embodiment of the present specification, for each pair of cursors, when the user is monitored to perform an operation on the pair of cursors, the positions corresponding to the respective cursors of the performed operations may be further determined. For convenience of description, one of a pair of cursors will be described as an example in this specification.

具体的,由于游标通常为拖动使用的,所以该操作可以是拖动操作。于是可当监测到用户对游标执行的拖动操作时,确定游标对应的位置。当然,本说明书并不限定该操作具体为何种操作,可以根据需要进行设置。例如,也可当监测到用户对游标执行点击操作、双击操作等等操作时,确定游标对应的位置。Specifically, since the cursor is usually used for dragging, the operation can be a drag operation. Then, when the user performs a drag operation on the cursor, the position corresponding to the cursor is determined. Of course, this specification does not limit the specific operation of the operation, and can be set as needed. For example, when the user performs a click operation, a double-click operation, or the like on the cursor, the position corresponding to the cursor may be determined.

另外,在本说明书中,若以监测用户对游标执行拖动操作为例进行说明。由于用户在对游标执行拖动操时,游标的位置可能在不断变化,所以可以在监测到拖动操作结束时,再确定游标的位置。以减少确定游标位置的次数,减少资源消耗。In addition, in the present specification, a description will be given by taking an example in which the monitoring user performs a drag operation on the cursor. Since the position of the cursor may be constantly changing when the user performs a drag operation on the cursor, the position of the cursor can be determined when the end of the drag operation is detected. To reduce the number of times the cursor position is determined, reducing resource consumption.

需要说明的是,此时确定的游标的位置,是游标在移动终端的屏幕中的位置。并且,由于获取的程序界面的截图也是显示移动终端的屏幕中的,所以也可视为,确定出的游标的位置为游标在程序界面中的位置。It should be noted that the position of the cursor determined at this time is the position of the cursor in the screen of the mobile terminal. Moreover, since the screenshot of the acquired program interface is also displayed on the screen of the mobile terminal, it can also be regarded as the position of the determined cursor as the position of the cursor in the program interface.

S104:根据各游标分别对应位置,在所述截图中确定各游标分别对应的选择范围。S104: Determine, according to each cursor, a selection range corresponding to each cursor in the screenshot.

在本说明书实施例中,继续以一对游标中的一个游标为例进行说明。当在步骤S102中确定了游标对应的位置之后,可进一步在获取的截图中,确定该位置对应的选择范围。也就是说,确定每一个游标所在位置对应的选择范围。以便后续再根据预设的边界算法,在确定出的选择范围内,确定程序界面中元素的边界,以执行后续步骤。In the embodiment of the present specification, one of the pair of cursors continues to be described as an example. After the location corresponding to the cursor is determined in step S102, the selected range corresponding to the location may be further determined in the acquired screenshot. That is to say, the selection range corresponding to the position of each cursor is determined. In order to subsequently determine the boundary of the elements in the program interface within the determined selection range according to the preset boundary algorithm, the subsequent steps are performed.

具体的,由于通常在程序界面中存在多个元素,而距离游标较远的元素,显然是用户需要测量尺寸的元素的可能性较低。也就是说,通常用户会将游标移动至元素的边界附近,以测量元素尺寸。因此,为了避免确定出的错误的元素的边界,在确定出游标位置之后,可先确定该位置对应的选择范围。并且,将在该选择范围内的元素的边界视为待选的边界,再通过步骤S106确定边界。其中,该选择范围的长度单位可以以dp表示。如,选择范围为距离该游标10dp以内的范围。Specifically, since there are usually multiple elements in the program interface and elements farther from the cursor, it is obviously less likely that the user needs to measure the size of the element. That is, the user usually moves the cursor near the border of the element to measure the element size. Therefore, in order to avoid the boundary of the determined erroneous element, after determining the position of the vernier, the selection range corresponding to the position may be determined first. And, the boundary of the element within the selection range is regarded as the boundary to be selected, and the boundary is determined by step S106. Wherein, the length unit of the selection range can be represented by dp. For example, the selection range is within a range of 10 dp from the cursor.

其中,该选择范围的数值可以根据需要进进行设置,本说明书对此不做限定。并且,由于游标为线段时,该线段的长度也可以根据需要设置,如,图3b所示。因此,该选择范围可包括垂直范围和/或水平范围。例如,当游标为贯穿移动终端屏幕的水平线段时,该选择范围可以仅为垂直范围。当游标为贯穿移动终端屏幕的垂直线段时,该选择范围可以仅为水平范围。当游标为长度10dp的线段时,则该选择范围可包括既垂直范围也水平范围。The value of the selection range can be set as needed, which is not limited in this specification. Moreover, since the cursor is a line segment, the length of the line segment can also be set as needed, as shown in Figure 3b. Thus, the selection range can include a vertical range and/or a horizontal range. For example, when the cursor is a horizontal line segment that runs through the screen of the mobile terminal, the selection range may be only a vertical range. When the cursor is a vertical line segment that runs through the screen of the mobile terminal, the selection range may be only a horizontal range. When the cursor is a line segment having a length of 10 dp, the selection range may include both a vertical range and a horizontal range.

S106:根据预设的边界算法,在各游标分别对应的所述选择范围内,分别确定所述程序界面中的元素的边界。S106: Determine, according to a preset boundary algorithm, a boundary of an element in the program interface, respectively, in the selection range corresponding to each cursor.

在本说明书实施例中,当确定游标对应的选择范围后,可以继续根据预设的边界算法,确定元素的边界。In the embodiment of the present specification, after determining the selection range corresponding to the cursor, the boundary of the element may be determined according to the preset boundary algorithm.

具体的,在本说明书提供第一种确定元素的边界的方法中。首先,可根据预设的边界算法,确定程序界面中各元素的边界。之后,再确定在该游标对应的选择范围内的边界。最后,再从在选择范围内各边界中,选择距离该游标最近的边界。其中,该预设的边界算法可以是Sobel边缘检测算法、Roberts算子等等,本说明书对此不做限定。Specifically, the present specification provides a first method of determining the boundary of an element. First, the boundary of each element in the program interface can be determined according to a preset boundary algorithm. After that, the boundary within the selection range corresponding to the cursor is determined. Finally, from the boundaries within the selection range, select the boundary closest to the cursor. The preset boundary algorithm may be a Sobel edge detection algorithm, a Roberts operator, etc., which is not limited in this specification.

另外,在本说明书提供的第二种确定元素的边界的方法中,该游标可为线段。首先, 可确定在该游标的位置上,该程序界面显示的颜色,作为基础颜色。之后,再在该选择范围内,确定与该游标的线段平行、超过预设长度以及颜色与基础颜色不同的至少一条线段。最后,从确定出的各线段中,选择距离游标最近的线段作为确定出的边界。其中预设长度可以根据需要进行设置,本说明书对此不做限定。In addition, in the second method of determining the boundary of an element provided by the present specification, the cursor may be a line segment. First, the color displayed by the program interface at the position of the cursor can be determined as the base color. Then, within the selection range, at least one line segment parallel to the line segment of the cursor, exceeding a preset length, and having a different color from the base color is determined. Finally, from among the determined line segments, the line segment closest to the cursor is selected as the determined boundary. The preset length can be set as needed, which is not limited in this specification.

例如,假设游标为贯穿屏幕的水平线段。首先,可以先确定游标对应的基础颜色。之后以该游标所在的线段为起始点,向上或者向下,逐行确定长度超过预设长度且不是基础颜色的线段。最后,将距离该线段垂直距离最小的线段作为边界。For example, suppose the cursor is a horizontal line segment that runs through the screen. First, you can first determine the base color corresponding to the cursor. Then, starting from the line segment where the cursor is located, up or down, line segments whose length exceeds the preset length and are not the base color are determined line by line. Finally, the line segment with the smallest vertical distance from the line segment is used as the boundary.

需要说明的是,对于程序界面中的元素来说,元素边界在本说明书中可以视为是上述的线段。例如,假设图5所示的10×10的色块为程序界面中的一个元素。则其中虚线框所围成的1×10的该色块的边界为本说明书的线段。也就是说若该色块全都在某一个游标对应的选择范围内,可将该色块确定为10条线段。It should be noted that, for the elements in the program interface, the element boundary can be regarded as the above line segment in the present specification. For example, assume that the 10x10 color block shown in Figure 5 is an element in the program interface. Then, the boundary of the 1×10 color block enclosed by the dotted line frame is the line segment of the present specification. That is to say, if the color blocks are all within the selection range corresponding to a certain cursor, the color block can be determined as 10 line segments.

S108:将被执行所述操作的各游标分别移动至分别确定出的所述元素的边界。S108: Move each cursor that is to perform the operation to a boundary of the respectively determined element.

S110:显示该对游标之间的距离。S110: Display the distance between the pair of cursors.

在本说明书实施例中,以一对游标中的一个游标为例,当确定了出该游标对应的边界后,便可将该游标线移动至确定出的边界上。则对于被执行操作的每对游标来说,该对游标中的各游标均可通过上述步骤S102~S106确定分别对应的元素的边界。则通过步骤S108,该对游标中的各游标均可分别移动至其对应的元素边界。则此时再显示该对游标之间距离时,由于游标均已移动至元素的边界,所以显示距离为准确的。In the embodiment of the present specification, taking one cursor of a pair of cursors as an example, when the boundary corresponding to the cursor is determined, the cursor line can be moved to the determined boundary. Then, for each pair of cursors to be operated, each cursor in the pair of cursors can determine the boundary of the corresponding element by the above steps S102 to S106. Then, in step S108, each of the cursors in the pair of cursors can be respectively moved to their corresponding element boundaries. Then, when the distance between the pair of cursors is displayed at this time, since the cursor has moved to the boundary of the element, the display distance is accurate.

具体的,在步骤S102中对于每对游标来说,用户通常只能分别对该对游标中的各游标分别执行操作。所以在步骤S110显示游标对之间的距离时,存在该对游标中的一个游标移动至元素的边界,而另一个游标线并没有移动至元素的边界的情况。则此时,也可显示该游标对之间的距离,但是显示的距离并不是元素的尺寸(如图6a以及6b所示)。而在用户对另一个游标执行操作后,重复上述步骤,则另一游标也可移动至确定出的元素的边界。从而使得显示游标对之间的距离为精确的元素尺寸(如,图6c以及6d所示)。其中,上述距离可以以dp为单位进行显示。Specifically, for each pair of cursors in step S102, the user can usually only perform operations on the respective cursors in the pair of cursors. Therefore, when the distance between the pair of cursors is displayed in step S110, there is a case where one of the pair of cursors moves to the boundary of the element, and the other of the cursor lines does not move to the boundary of the element. At this point, the distance between the pair of cursors can also be displayed, but the displayed distance is not the size of the element (as shown in Figures 6a and 6b). After the user repeats the above steps after performing another operation on the cursor, another cursor can also be moved to the boundary of the determined element. Thereby the distance between the displayed cursor pairs is the exact element size (as shown in Figures 6c and 6d). Wherein, the above distance can be displayed in units of dp.

通过上述信息显示过程,可见无需精确将游标的移动至元素边界。通过确定游标对应的选择范围,进而确定元素的边界。再将游标移动至确定出的边界,从而确定精确测量的元素尺寸。解决了无法在移动终端上精确测量元素尺寸的问题。Through the above information display process, it can be seen that it is not necessary to accurately move the cursor to the element boundary. The boundary of the element is determined by determining the selection range corresponding to the cursor. The cursor is then moved to the determined boundary to determine the element size for the exact measurement. Solved the problem of not being able to accurately measure the element size on a mobile terminal.

另外,在本说明书中,也可以不在步骤S100中获取截图,而是在本说明书步骤 S102中获取截图。具体的,可将监测到用户对游标执行操作,作为监测到用户输入指令。于是,可在监测到用户对游标执行拖动操作时,获取程序界面的截图。Further, in the present specification, the screenshot may not be acquired in step S100, but the screenshot may be acquired in step S102 of the present specification. Specifically, the user can be monitored to perform an operation on the cursor as a user input instruction is monitored. Therefore, a screenshot of the program interface can be obtained when the user is monitored to perform a drag operation on the cursor.

进一步地,由于用户手指操作精度较低,所以可能会多次对游标执行拖动操作后,才将游标移动至需要测量的元素边界附近的情况。则若每监测到用户对游标执行操作,就获取一次截图可能导致获取的截图过多。导致终端的缓存造成存储压力较大。并进一步导致终端执行垃圾回收机制(Garbage Collection,GC)的次数增加。Further, since the user's finger operation precision is low, the cursor may be moved to the vicinity of the boundary of the element to be measured after performing the drag operation on the cursor multiple times. If every time the user is monitored to perform an operation on the cursor, obtaining a screenshot may result in too many screenshots being acquired. As a result, the cache of the terminal causes a large storage pressure. And further increase the number of times the terminal performs the Garbage Collection (GC).

因此,在本说明书中为了降低缓存压力以及减少GC次数,在监测到用户对游标执行拖动操作时,可先判断在预设时间段内是否存储过截图,若是,则调用已存储的所述截图,若否,则对所述程序界面执行截图操作,获取截图并存储。其中,对程序界面执行截图操作后获取的截图可以存储在该移动终端的缓存中。Therefore, in the present specification, in order to reduce the buffer pressure and reduce the number of GCs, when monitoring the user performing a drag operation on the cursor, it may first determine whether the screenshot is stored in the preset time period, and if so, calling the stored Screenshot, if not, perform a screenshot operation on the program interface, take a screenshot and store. The screenshot obtained after performing the screenshot operation on the program interface may be stored in the cache of the mobile terminal.

具体的,该预设时间段对应预设的时长,该时长可根据需要进行设置。当在监测到用户执行拖动操作时,回溯该预设的时长,确定该预设时间段。进而执行后续判断的步骤。也就是说,当移动终端对程序界面执行截图操作,并将截图存储之后。在预设时长内无论监测到用户执行多少次拖动操作,均可使用缓存中已存储的截图。而无需在每次监测拖动操作时,都对程序界面执行截图操作。Specifically, the preset time period corresponds to a preset duration, and the duration can be set as needed. When the user is monitored to perform the drag operation, the preset duration is backtracked, and the preset time period is determined. Then, the steps of subsequent judgment are performed. That is to say, when the mobile terminal performs a screenshot operation on the program interface and stores the screenshot. The screenshots already stored in the cache can be used regardless of how many times the user performs a drag operation within the preset duration. There is no need to perform a screenshot operation on the program interface each time the drag operation is monitored.

更进一步地,在程序界面中,元素的在显示的时可能并不会显示元素边界。例如,元素为透明背景上绘制的图案。则通过现有确定边界方法,只能确定该图案的边界。于是,为了方便确定元素边界,在获取该程序界面的截图之前,还可以启动现有的界面布局边界显示工具,以显示程序界面中各元素的边界。Further, in the program interface, element boundaries may not be displayed when displayed. For example, an element is a pattern drawn on a transparent background. Then, by the existing method of determining the boundary, only the boundary of the pattern can be determined. Therefore, in order to conveniently determine the boundary of the element, before acquiring the screenshot of the program interface, the existing interface layout boundary display tool can also be activated to display the boundary of each element in the program interface.

例如,假设图7a为各元素均没有显示元素的边界的情况。则在启动界面布局边界显示工具后,可显示如图7b所示的元素边界。需要说明的是,程序界面对应的程序,执行信息显示过程的程序以及界面布局边界显示工具可为三个不同的独立程序。For example, assume that FIG. 7a is a case where each element does not display the boundary of an element. Then, after starting the interface layout boundary display tool, the element boundary shown in Figure 7b can be displayed. It should be noted that the program corresponding to the program interface, the program for executing the information display process, and the interface layout boundary display tool can be three different independent programs.

需要说明的是,本申请实施例所提供方法的各步骤的执行主体均可以是同一设备,或者,该方法也由不同设备作为执行主体。比如,步骤S102和步骤S104的执行主体可以为设备1,步骤S106和步骤S108的执行主体可以为设备2;又比如,步骤S102和骤S106的执行主体可以为设备2,步骤S104和步骤S108的执行主体可以为设备1;等等。上述对本说明书特定实施例进行了描述。其它实施例在所附权利要求书的范围内。在一些情况下,在权利要求书中记载的动作或步骤可以按照不同于实施例中的顺序来执行并且仍然可以实现期望的结果。另外,在附图中描绘的过程不一定要求示出的特定顺 序或者连续顺序才能实现期望的结果。在某些实施方式中,多任务处理和并行处理也是可以的或者可能是有利的。It should be noted that the execution bodies of the steps of the method provided by the embodiment of the present application may all be the same device, or the method may also be performed by different devices. For example, the execution body of step S102 and step S104 may be device 1, and the execution body of step S106 and step S108 may be device 2; for example, the execution bodies of steps S102 and S106 may be device 2, step S104 and step S108. The execution subject can be device 1; and so on. The foregoing description of the specific embodiments of the specification has been described. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims can be performed in a different order than the embodiments and still achieve the desired results. In addition, the processes depicted in the figures are not necessarily required to be in a particular order or in a sequential order to achieve a desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

基于图2所示的信息显示方法,本说明书实施例还提供一种信息显示方法,如图8所示。Based on the information display method shown in FIG. 2, the embodiment of the present specification further provides an information display method, as shown in FIG. 8.

图8为本说明书实施例提供的一种信息显示过程,具体可包括以下步骤:FIG. 8 is an information display process according to an embodiment of the present disclosure, which may specifically include the following steps:

S200:获取移动终端的程序界面的截图,显示至少一个光标,并监测用户的操作。S200: Obtain a screenshot of the program interface of the mobile terminal, display at least one cursor, and monitor the operation of the user.

S202:当监测到用户对任一光标执行操作时,确定被执行所述操作的光标的位置。S202: When it is detected that the user performs an operation on any of the cursors, determine the position of the cursor on which the operation is performed.

在本说明书实施例中,该信息显示过程用于在移动终端中显示字符的尺寸。与图2所示的信息显示过程类似,可由移动终端自身或者安装的程序执行该信息显示过程。In the embodiment of the present specification, the information display process is for displaying the size of a character in the mobile terminal. Similar to the information display process shown in FIG. 2, the information display process can be performed by the mobile terminal itself or an installed program.

具体的,由于通常在程序界面中字符的大小要小于元素的大小,所以通过游标对测量字符时存在困难。因此在本说明书中,在测量字符尺寸时,可以显示至少一个光标。并通过后续步骤显示光标遮盖的字符的字符尺寸。其中,在本说明书实施例中,该光标的形状可以是矩形。光标的尺寸可以根据需要进行设置。Specifically, since the size of the character is usually smaller than the size of the element in the program interface, it is difficult to measure the character by the cursor pair. Therefore, in the present specification, at least one cursor can be displayed when measuring the character size. The character size of the character covered by the cursor is displayed in the subsequent steps. Wherein, in the embodiment of the present specification, the shape of the cursor may be a rectangle. The size of the cursor can be set as needed.

另外,对于步骤中其他操作均可参考步骤S100以及步骤S102中的描述,本说明书对此不再赘述。In addition, for the other operations in the step, the descriptions in step S100 and step S102 can be referred to, and the description is not repeated herein.

S204:在所述截图中确定在所述位置上的颜色。S204: Determine a color at the position in the screenshot.

S206:根据所述光标的边界以及所述颜色,确定字符边界。S206: Determine a character boundary according to the boundary of the cursor and the color.

在本说明书实施例中,在确定出光标的位置之后,还可在获取的截图中,确定该位置上的颜色。之后再根据该光标的边界以及确定出的颜色,确定字符的边界。In the embodiment of the present specification, after determining the position of the cursor, the color at the position may also be determined in the acquired screenshot. The boundary of the character is then determined based on the boundary of the cursor and the determined color.

具体的,在本说明书实施例中,该光标可部分遮盖待测量的字符,则在步骤S204中确定光标所在位置上的颜色时,可以确定出字符的颜色以及背景颜色。并在后续步骤S206中,根据确定出的字符的颜色、确定出的背景颜色以及光标边界,确定出光标遮盖的字符的边界。Specifically, in the embodiment of the present specification, the cursor may partially cover the character to be measured, and when the color at the position of the cursor is determined in step S204, the color of the character and the background color may be determined. And in the subsequent step S206, the boundary of the character covered by the cursor is determined according to the determined color of the character, the determined background color, and the cursor boundary.

并且,由于字符的尺寸一般只能通过字符的高度或者字符的宽度确定,所以在确定字符的边界时,可先确定光标上下边界和/或光标的左右边界。当然,由于现有技术中通常以字符的高度作为字符的尺寸,所以在本说明书以确定光标的高度为例进行后续 说明。Moreover, since the size of the character can generally only be determined by the height of the character or the width of the character, when determining the boundary of the character, 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 a character is usually taken as the size of a character in the prior art, the description will be made by taking the height of the cursor as an example in the present specification.

首先,确定光标的上边界以及下边界。之后,根据步骤S204中确定出的颜色,进一步确定光标的上边界对应的颜色,以及光标的下边界对应的颜色。其中,光标的上边界对应的颜色中包含字符的颜色以及上边界对应的背景颜色,光标的下边界对应的颜色中包含字符的颜色以及下边界对应的背景颜色。然后,确定光标的左右边界的延长线之间的各行像素,以光标的上边界为起始行依次向上,从确定出的各行像素中,选择与下一行像素的颜色不完全相同的一行像素,作为字符的上边界。同理,针对光标的下边界,采用相同的方法确定字符边界的下边界。当确定出字符边界的上下边界时,将上下边界之间的距离作为字符边界的高度。First, determine the upper and lower boundaries of the cursor. Thereafter, according to the color determined in step S204, the color corresponding to the upper boundary of the cursor and the color corresponding to the lower boundary of the cursor are further determined. 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, and 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, determining each row of pixels between the extension lines of the left and right boundaries of the cursor, starting from the upper boundary of the cursor, and selecting a row of pixels that are not exactly the same color as the pixels of the next row from the determined pixels of each row. As the upper boundary of the character. Similarly, for the lower boundary of the cursor, the same method is used to determine the lower boundary of the character boundary. When the upper and lower boundaries of the character boundary are determined, the distance between the upper and lower boundaries is taken as the height of the character boundary.

例如图9所示的确定字符边界的上下边界的过程。在图9中,光标覆盖在“人”字符上,可确定光标位置的颜色为黑色和白色。在步骤S206中,可以从光标的上下边界开始,逐行判断是否出现与该光标位置不完全相同的颜色,当判断到“人”字符以外的一行时,该行中只存在白色,则可确定已经判断过的上一行为字符的边界,从而确定字符边界的上下边界。进而将上下边界之间的距离作为字符边界的高度。For example, the process of determining the upper and lower boundaries of a character boundary as shown in FIG. In Figure 9, the cursor is overlaid on the "person" character, which determines that the color of the cursor position is black and white. In step S206, it may be determined line by line from the upper and lower boundaries of the cursor whether or not a color that is not exactly the same as the position of the cursor appears. When a line other than the "person" character is judged, only white is present in the line, and then it can be determined. The boundary of the last character that has been judged to determine the upper and lower boundaries of the character boundary. Further, the distance between the upper and lower boundaries is taken as the height of the character boundary.

同理,在本说明书实施例中,也可确定光标的上下边界的延长线之间的各列像素。并以光标的左边界为起始列依次向左,从确定出的各列像素中,选择与下一列像素的颜色不完全相同的一列像素,作为字符的左边界。以光标的右边界为起始列依次向右,从确定出的各列像素中,选择与下一列像素的颜色不完全相同的一列像素,作为字符的右边界。将字符边界的左右边界之间的距离作为字符边界的宽度。Similarly, in the embodiment of the present specification, each column of pixels between the extension lines of the upper and lower boundaries of the cursor can also be determined. And starting from the left boundary of the cursor to the left, from the determined columns of pixels, a column of pixels that are not exactly the same color as the pixels of the next column is selected as the left boundary of the character. The right column of the cursor is used as a starting column to the right. From among the determined columns of pixels, a column of pixels that are not exactly the same color as the pixels of the next column is selected 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.

S208:根据确定出的字符边界,确定所述光标所覆盖的字符的尺寸,并显示。S208: Determine, according to the determined character boundary, the size of the character covered by the cursor, and display the size.

在本说明书实施例中,由于不同的移动终端的屏幕尺寸、像素密度等等都不完全一致,所以通常设置的字符尺寸,与实际显示在程序界面中的字符尺寸(如,字符边界的高度或者字符边界的宽度)不能保持一致。例如,程序开发人员设置的字符尺寸为12px,但是在程序界面中显示的字符尺寸却为10px。因此,字符边界的高度或者宽度并不时准确的确定字符尺寸。In the embodiment of the present specification, since the screen size, pixel density, and the like of different mobile terminals are not completely consistent, the character size that is usually set is the size of the character actually displayed in the program interface (eg, the height of the character boundary or The width of the character boundary) cannot be consistent. For example, the program developer sets a character size of 12px, but 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.

于是,在本说明书中,还可以根据预先获取的拟合公式,确定与该字符边界对应的字符尺寸,并显示。Therefore, in the present specification, the character size corresponding to the character boundary can also be determined and displayed according to the fitting formula acquired in advance.

具体的,可由该移动终端自身或者执行该信息显示过程的程序,预先向服务器发送移动终端的设备信息(如,设备型号、屏幕尺寸、像素密度等),之后再接收服务 器返回的与该设备信息对应的拟合公式并存储。则在确定出字符边界的高度或者宽度之后,可以将该高度或者宽度输入该拟合公式中,从而得到对应的字符尺寸。Specifically, the mobile terminal can send the device information (such as the device model, the screen size, the pixel density, and the like) of the mobile terminal to the server in advance by the mobile terminal itself or a program for executing the information display process, and then receive the information returned by the server and the device. Corresponding fitting formulas are stored. Then, after determining the height or width of the character boundary, the height or width may be input into the fitting formula to obtain a corresponding character size.

其中,服务器可预先确定不同设备信息分别对应的拟合公式,在接收到设备信息时,确定对应的拟合公式并返回。例如,服务器可针对每种型号的移动终端,采集在该移动终端中设置的字符尺寸,及其对应的实际显示时字符尺寸,共同左右样本。通过最小二乘法确定设置的字符尺寸与实际显示的字符尺寸的拟合曲线,获取该拟合曲线对应的拟合公式,如图10所示。The server may predetermine a fitting formula corresponding to different device information, and when receiving the device information, determine a corresponding fitting formula and return. For example, the server may collect the character size set in the mobile terminal for each type of mobile terminal, and the corresponding actual display character size, and the left and right samples. A fitting curve of the set character size and the actually displayed character size is determined by a least square method, and a fitting formula corresponding to the fitting curve is obtained, as shown in FIG.

通过图10所示的拟合曲线对应的拟合公式,移动终端便可确定与该字符上下边界的距离(即,实际显示的字符尺寸)对应的字符尺寸(即,设置的字符尺寸)。By the fitting formula corresponding to the fitting curve shown in FIG. 10, the mobile terminal can determine the character size corresponding to the distance between the upper and lower boundaries of the character (ie, the actually displayed character size) (ie, the set character size).

通过图8所示的信息显示过程,可见只需将光标遮盖在需要测量的字符上,便可得到准确的字符尺寸。解决了难以在移动终端上测量字符尺寸的问题。Through the information display process shown in FIG. 8, it can be seen that the accurate character size can be obtained by simply covering the cursor on the character to be measured. It solves the problem that it is difficult to measure the character size on the mobile terminal.

另外,在本说明书实施例中,需要通过光标遮盖字符才可确定字符尺寸。但是,程序界面中可能存在较大的字符也可能存在较小的字符,所以单一尺寸的光标可能对于测量字符尺寸带来不便。因此,在步骤S200中可显示多个光标,并且各光标的尺寸可不完全相同,以满足对不同大小的字符的测量需求。In addition, in the embodiment of the present specification, it is necessary to cover the characters by the cursor to determine the character size. However, there may be larger characters in the program interface, and there may be smaller characters, so a single-size cursor may be inconvenient for measuring the character size. Therefore, a plurality of cursors can be displayed in step S200, and the sizes of the respective cursors may not be identical to meet the measurement requirements for characters of different sizes.

进一步地,在本说明书实施例中,图2以及图8所示的信息显示方法可以同时存在。于是在本说明书,元素尺寸可显示在每对游标的中间,字符尺寸可显示在光标旁边,如,图11所示。当然,具体该距离和尺寸如何显示本说明书不做限定。Further, in the embodiment of the present specification, the information display methods illustrated in FIGS. 2 and 8 may exist simultaneously. Thus, in this specification, the element size can be displayed in the middle of each pair of cursors, and the character size can be displayed next to the cursor, as shown in FIG. Of course, the specific distance and size are not limited in this description.

基于图2所示的信息显示方法,本说明书实施例还提供一种信息显示装置,如图12所示。Based on the information display method shown in FIG. 2, the embodiment of the present specification further provides an information display device, as shown in FIG.

图12为本说明书实施例提供的一种信息显示装置的结构示意图,包括:FIG. 12 is a schematic structural diagram of an information display apparatus according to an embodiment of the present disclosure, including:

获取显示及监测模块300,获取移动终端的程序界面的截图,显示至少一对游标,并监测用户的操作;Obtaining the display and monitoring module 300, acquiring a screenshot of the program interface of the mobile terminal, displaying at least one pair of cursors, and monitoring the operation of the user;

第一确定模块302,针对每对游标,当监测到用户对该对游标执行操作时,确定被执行所述操作的各游标分别对应的位置;The first determining module 302 is configured, for each pair of cursors, when detecting that the user performs an operation on the pair of cursors, determining a position corresponding to each of the cursors on which the operation is performed;

第二确定模块304,根据各游标分别对应位置,在所述截图中确定各游标分别对应的选择范围;The second determining module 304 determines, according to the corresponding positions of the cursors, the selection ranges corresponding to the respective cursors in the screenshots;

第三确定模块306,根据预设的边界算法,在各游标分别对应的所述选择范围内, 分别确定所述程序界面中的元素的边界;The third determining module 306 determines, according to a preset boundary algorithm, a boundary of an element in the program interface, respectively, in the selection range corresponding to each cursor;

第四确定模块308,将被执行所述操作的各游标分别移动至分别确定出的所述元素的边界;a fourth determining module 308, respectively, moving each cursor that is to perform the operation to a boundary of the respectively determined element;

显示模块310,显示该对游标之间的距离。The display module 310 displays the distance between the pair of cursors.

获取显示及监测模块300,显示浮动窗口,在所述浮动窗口中显示至少一对游标,其中,所述浮动窗口为透明窗口,所述浮动窗显示于所述程序界面的上层。Obtaining the display and monitoring module 300, displaying a floating window, displaying at least one pair of cursors in the floating window, wherein the floating window is a transparent window, and the floating window is displayed on an upper layer of the program interface.

获取显示及监测模块300,在所述移动终端的屏幕中显示两对游标,其中,一对游标在为水平的线段,另一对游标为垂直的线段。The display and monitoring module 300 is configured to display two pairs of cursors in the screen of the mobile terminal, wherein one pair of cursors is in a horizontal line segment and the other pair of cursors is a vertical line segment.

获取显示及监测模块300,当监测到用户输入指令时,显示所述浮动窗口和/或获取所述程序界面的截图。The display and monitoring module 300 is configured to display the floating window and/or obtain a screenshot of the program interface when a user input command is detected.

第三确定模块306,针对该对游标中的每个游标,确定该游标的位置上所述程序界面显示的颜色,作为基础颜色,在该游标对应的所述选择范围内,确定与所述游标的线段平行、超过预设长度以及颜色与所述基础颜色不同的线段,作为确定出的边界。a third determining module 306, for each cursor in the pair of cursors, determining a color displayed by the program interface at a position of the cursor as a base color, and determining, in the selection range corresponding to the cursor, the cursor The line segments are parallel, beyond a preset length, and a line segment having a different color from the base color as the determined boundary.

第三确定模块306,在该游标对应的所述选择范围内,确定与所述游标的线段平行、超过预设长度以及颜色与所述基础颜色不同的至少一条线段,从确定出的至少一条线段中,选择与所述游标距离最近的线段,作为确定出的边界。a third determining module 306, in the selected range corresponding to the cursor, determining at least one line segment parallel to the line segment of the cursor, exceeding a preset length, and having a color different from the base color, from the determined at least one line segment In the middle, the line segment closest to the cursor is selected as the determined boundary.

获取显示及监测模块300,获取移动终端上程序界面的截图之前,启动界面布局边界显示工具,显示所述程序界面中各元素的边界。Obtaining the display and monitoring module 300, before acquiring the screenshot of the program interface on the mobile terminal, launching the interface layout boundary display tool to display the boundary of each element in the program interface.

基于图8所示的信息显示方法,本说明书实施例还提供一种信息显示装置,如图13所示。Based on the information display method shown in FIG. 8, the embodiment of the present specification further provides an information display device, as shown in FIG.

图13为本说明书实施例提供的一种信息显示装置的结构示意图,包括:FIG. 13 is a schematic structural diagram of an information display apparatus according to an embodiment of the present disclosure, including:

获取显示及监测模块400,获取移动终端的程序界面的截图,显示至少一个光标,并监测用户的操作;Obtaining the display and monitoring module 400, acquiring a screenshot of the program interface of the mobile terminal, displaying at least one cursor, and monitoring the operation of the user;

第一确定模块402,当监测到用户对任一光标执行操作时,确定被执行所述操作的光标的位置;The first determining module 402 determines, when the user performs an operation on any of the cursors, the position of the cursor on which the operation is performed;

第二确定模块404,在所述截图中确定在所述位置上的颜色;a second determining module 404, determining a color at the location in the screenshot;

第三确定模块406,根据所述光标的边界以及所述颜色,确定字符边界;a third determining module 406, determining a character boundary according to the boundary of the cursor and the color;

显示模块408,根据确定出的字符边界,确定所述光标所覆盖的字符的尺寸,并显示。The display module 408 determines the size of the character covered by the cursor according to the determined character boundary and displays it.

所述光标的形状为矩形;The shape of the cursor is a rectangle;

第三确定模块406,确定所述光标的上下边界和/或所述光标的左右边界,根据所述颜色,在所述截图中确定所述光标的上下边界分别对应的颜色和/或所述光标的左右边界分别对应的颜色,根据所述光标的上下边界分别对应的颜色,确定所述字符边界的高度,和/或根据所述光标的左右边界分别对应的颜色,确定所述字符边界的宽度。a third determining module 406, determining an upper and lower boundary of the cursor and/or a left and right boundary of the cursor, and determining, according to the color, a color corresponding to an upper and lower boundary of the cursor and/or the cursor according to the color The color corresponding to the left and right borders respectively determines the height of the character boundary according to the color corresponding to the upper and lower boundaries of the cursor, and/or determines the width of the character boundary according to the color corresponding to the left and right boundaries of the cursor respectively. .

第三确定模块406,确定所述光标的左右边界的延长线之间的各行像素,以所述光标的上边界为起始行依次向上,从确定出的各行像素中,选择与下一行像素的颜色不完全相同的一行像素,作为所述字符的上边界,以所述光标的下边界为起始行依次向下,从确定出的各行像素中,选择与下一行像素的颜色不完全相同的一行像素,作为所述字符的下边界,将所述字符边界的上下边界之间的距离作为所述字符边界的高度。a third determining module 406, determining each row of pixels between the extension lines of the left and right boundaries of the cursor, starting from the upper boundary of the cursor, and selecting the row of pixels from the determined row of pixels. A row of pixels whose colors are not exactly the same, as the upper boundary of the character, starting from the lower boundary of the cursor, and selecting from the determined rows of pixels, the color of the pixels in the next row is not completely the same. A row of pixels, as the lower boundary of the character, takes the distance between the upper and lower boundaries of the character boundary as the height of the character boundary.

第三确定模块406,确定所述光标的上下边界的延长线之间的各列像素,以所述光标的左边界为起始列依次向左,从确定出的各列像素中,选择与下一列像素的颜色不完全相同的一列像素,作为所述字符的左边界,以所述光标的右边界为起始列依次向右,从确定出的各列像素中,选择与下一列像素的颜色不完全相同的一列像素,作为所述字符的右边界,将所述字符边界的左右边界之间的距离作为所述字符边界的宽度。a third determining module 406, determining each column of pixels between the extension lines of the upper and lower boundaries of the cursor, starting from the left boundary of the cursor to the left, and selecting from the determined columns of pixels A column of pixels of a column of pixels having different colors is used as the left boundary of the character, and the right column of the cursor is used as a starting column to be rightward. From among the determined columns of pixels, the color of the pixel corresponding to the next column is selected. A column of pixels that are not identical, 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.

显示模块408,根据预先获取的拟合公式,确定所述字符边界的高度对应的尺寸和/或确定所述字符边界的宽度对应的尺寸。The display module 408 determines a size corresponding to the height of the character boundary and/or a size corresponding to the width of the character boundary according to a fitting formula acquired in advance.

显示模块408,预先向服务器发送所述移动终端的设备信息,接收所述服务器返回的与所述设备信息对应的拟合公式并存储。The display module 408 sends the device information of the mobile terminal to the server in advance, and receives a fitting formula corresponding to the device information returned by the server and stores the same.

基于图2所示的信息显示方法,本说明书实施例还提供另一种移动终端,如图14所示。Based on the information display method shown in FIG. 2, the embodiment of the present specification further provides another mobile terminal, as shown in FIG.

图14为本说明书实施例提供的一种终端的结构示意图,该终端,包括:一个或多个处理器及存储器,所述程序被配置成由一个或多个处理器执行以下步骤:FIG. 14 is a schematic structural diagram of a terminal according to an embodiment of the present disclosure. The terminal includes: one or more processors and a memory, where the program is configured to perform the following steps by one or more processors:

获取所述移动终端的程序界面的截图,显示至少一对游标,并监测用户的操作;Obtaining a screenshot of the program interface of the mobile terminal, displaying at least one pair of cursors, and monitoring user operations;

针对每对游标,当监测到用户对该对游标执行操作时,确定被执行所述操作的各游标分别对应的位置;For each pair of cursors, when it is detected that the user performs an operation on the pair of cursors, determining a position corresponding to each of the cursors on which the operation is performed;

根据各游标分别对应位置,在所述截图中确定各游标分别对应的选择范围;Determining, according to each cursor, a selection range corresponding to each cursor in the screenshot;

根据预设的边界算法,在各游标分别对应的所述选择范围内,分别确定所述程序界面中的元素的边界;Determining, according to a preset boundary algorithm, a boundary of an element in the program interface, respectively, in the selection range corresponding to each cursor;

将被执行所述操作的各游标分别移动至分别确定出的所述元素的边界;Moving each cursor of the operation to the boundary of the respectively determined element;

显示该对游标之间的距离。Shows the distance between the pair of cursors.

基于图8所示的信息显示方法,本说明书实施例还提供另一种移动终端,如图15所示。Based on the information display method shown in FIG. 8, the embodiment of the present specification further provides another mobile terminal, as shown in FIG.

图15为本说明书实施例提供的一种终端的结构示意图,该终端,包括:一个或多个处理器及存储器,所述程序被配置成由一个或多个处理器执行以下步骤:FIG. 15 is a schematic structural diagram of a terminal according to an embodiment of the present disclosure. The terminal includes: one or more processors and a memory, where the program is configured to perform the following steps by one or more processors:

获取所述移动终端的程序界面的截图,显示至少一个光标,并监测用户的操作;Obtaining a screenshot of the program interface of the mobile terminal, displaying at least one cursor, and monitoring the operation of the user;

当监测到用户对任一光标执行操作时,确定被执行所述操作的光标的位置;Determining the position of the cursor on which the operation is performed when it is detected that the user performs an operation on any of the cursors;

在所述截图中确定在所述位置上的颜色;Determining the color at the location in the screenshot;

根据所述光标的边界以及所述颜色,确定字符边界;Determining a character boundary according to the boundary of the cursor and the color;

根据确定出的字符边界,确定所述光标所覆盖的字符的尺寸,并显示。The size of the character covered by the cursor is determined according to the determined character boundary and displayed.

需要说明的是,本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于本申请实施例提供的移动终端以及服务器而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。It is to be noted that the various embodiments in the present specification are described in a progressive manner, and the same similar parts between the various embodiments may be referred to each other, and each embodiment focuses on different embodiments from other embodiments. At the office. In particular, for the mobile terminal and the server provided by the embodiment of the present application, since it is basically similar to the method embodiment, the description is relatively simple, and the related parts can be referred to the description of the method embodiment.

在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。本领域技术人员也应该清楚,只需要将方法流程用上述几种硬件描述语言稍作逻辑编程并编程到集成电路中,就可以很容易得到实现该逻辑方法流程的硬件电路。In the 1990s, improvements to a technology could clearly distinguish between hardware improvements (eg, improvements to circuit structures such as diodes, transistors, switches, etc.) or software improvements (for process flow improvements). However, as technology advances, many of today's method flow improvements can be seen as direct improvements in hardware circuit architecture. Designers almost always get the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that the improvement of a method flow cannot be implemented by hardware entity modules. For example, a Programmable Logic Device (PLD) (such as a Field Programmable Gate Array (FPGA)) is an integrated circuit whose logic function is determined by the user programming the device. Designers can program themselves to "integrate" a digital system on a single PLD without having to ask the chip manufacturer to design and fabricate a dedicated integrated circuit chip. Moreover, today, instead of manually making integrated circuit chips, this programming is mostly implemented using "logic compiler" software, which is similar to the software compiler used in programming development, but before compiling The original code has to be written in a specific programming language. This is called the Hardware Description Language (HDL). 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., are currently the most commonly used VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. It should also be apparent to those skilled in the art that the hardware flow for implementing the logic method flow can be easily obtained by simply programming the method flow into the integrated circuit with a few hardware description languages.

控制器可以按任何适当的方式实现,例如,控制器可以采取例如微处理器或处理器以及存储可由该(微)处理器执行的计算机可读程序代码(例如软件或固件)的计算机可读介质、逻辑门、开关、专用集成电路(Application Specific Integrated Circuit,ASIC)、可编程逻辑控制器和嵌入微控制器的形式,控制器的例子包括但不限于以下微控制器:ARC 625D、Atmel AT91SAM、Microchip PIC18F26K20以及Silicone Labs C8051F320,存储器控制器还可以被实现为存储器的控制逻辑的一部分。本领域技术人员也知道,除了以纯计算机可读程序代码方式实现控制器以外,完全可以通过将方法步骤进行逻辑编程来使得控制器以逻辑门、开关、专用集成电路、可编程逻辑控制器和嵌入微控制器等的形式来实现相同功能。因此这种控制器可以被认为是一种硬件部件,而对其内包括的用于实现各种功能的装置也可以视为硬件部件内的结构。或者甚至,可以将用于实现各种功能的装置视为既可以是实现方法的软件模块又可以是硬件部件内的结构。The controller can be implemented in any suitable manner, for example, the controller can take the form of, for example, a microprocessor or processor and a computer readable medium storing computer readable program code (eg, software or firmware) executable by the (micro)processor. In the form of logic gates, switches, application specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers, examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, The Microchip PIC18F26K20 and the Silicone Labs C8051F320, the memory controller can also be implemented as part of the memory's control logic. Those skilled in the art will also appreciate that in addition to implementing the controller in purely computer readable program code, the controller can be logically programmed by means of logic gates, switches, ASICs, programmable logic controllers, and embedding. The form of a microcontroller or the like to achieve the same function. Such a controller can therefore be considered a hardware component, and the means for implementing various functions included therein can also be considered as a structure within the hardware component. Or even a device for implementing various functions can be considered as a software module that can be both a method of implementation and a structure within a hardware component.

上述实施例阐明的系统、装置、模块或单元,具体可以由计算机芯片或实体实现,或者由具有某种功能的产品来实现。一种典型的实现设备为计算机。具体的,计算机例如可以为个人计算机、膝上型计算机、蜂窝电话、相机电话、智能电话、个人数字助理、媒体播放器、导航设备、电子邮件设备、游戏控制台、平板计算机、可穿戴设备或者这些设备中的任何设备的组合。The system, device, module or unit illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product having a certain function. A typical implementation device is a computer. Specifically, the computer can be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or A combination of any of these devices.

为了描述的方便,描述以上装置时以功能分为各种单元分别描述。当然,在实施本申请时可以把各单元的功能在同一个或多个软件和/或硬件中实现。For the convenience of description, the above devices are described separately by function into various units. Of course, the functions of each unit may be implemented in the same software or software and/or hardware when implementing the present application.

本领域内的技术人员应明白,本发明的实施例可提供为方法、系统、或计算机 程序产品。因此,本发明可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art will appreciate that embodiments of the present invention can be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or a combination of software and hardware. Moreover, the invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.

本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present invention has been described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (system), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or FIG. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing device to produce a machine for the execution of instructions for execution by a processor of a computer or other programmable data processing device. Means for implementing the functions specified in one or more of the flow or in a block or blocks of the flow chart.

这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。The computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device. The apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.

这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device. The instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.

在一个典型的配置中,计算设备包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.

内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。内存是计算机可读介质的示例。The memory may include non-persistent memory, random access memory (RAM), and/or non-volatile memory in a computer readable medium, such as read only memory (ROM) or flash memory. Memory is an example of a computer readable medium.

计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只 读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括暂存电脑可读媒体(transitory media),如调制的数据信号和载波。Computer readable media includes both permanent and non-persistent, removable and non-removable media. Information storage can be implemented by any method or technology. The information can be computer readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are 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 programmable read only memory (EEPROM), flash memory or other memory technology, compact disk read only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, Magnetic tape cartridges, magnetic tape storage or other magnetic storage devices or any other non-transportable media can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary storage of computer readable media, such as modulated data signals and carrier waves.

还需要说明的是,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、商品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、商品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、商品或者设备中还存在另外的相同要素。It is also to be understood that the terms "comprises" or "comprising" or "comprising" or any other variations are intended to encompass a non-exclusive inclusion, such that a process, method, article, Other elements not explicitly listed, or elements that are inherent to such a process, method, commodity, or equipment. An element defined by the phrase "comprising a ..." does not exclude the presence of additional equivalent elements in the process, method, item, or device including the element.

本领域技术人员应明白,本申请的实施例可提供为方法、系统或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art will appreciate that embodiments of the present application can be provided as a method, system, or computer program product. Thus, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment in combination of software and hardware. Moreover, the application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.

本申请可以在由计算机执行的计算机可执行指令的一般上下文中描述,例如程序模块。一般地,程序模块包括执行特定任务或实现特定抽象数据类型的例程、程序、对象、组件、数据结构等等。也可以在分布式计算环境中实践本申请,在这些分布式计算环境中,由通过通信网络而被连接的远程处理设备来执行任务。在分布式计算环境中,程序模块可以位于包括存储设备在内的本地和远程计算机存储介质中。The application can be described in the general context of computer-executable instructions executed by a computer, such as a program module. Generally, program modules include routines, programs, objects, components, data structures, and the like that perform particular tasks or implement particular abstract data types. The present application can also be practiced in distributed computing environments where tasks are performed by remote processing devices that are connected through a communication network. In a distributed computing environment, program modules can be located in both local and remote computer storage media including storage devices.

本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于系统实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。The various embodiments in the specification are described in a progressive manner, and the same or similar parts between the various embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment.

以上所述仅为本申请的实施例而已,并不用于限制本申请。对于本领域技术人员来说,本申请可以有各种更改和变化。凡在本申请的精神和原理之内所作的任何修改、等同替换、改进等,均应包含在本申请的权利要求范围之内。The above description is only an embodiment of the present application and is not intended to limit the application. Various changes and modifications can be made to the present application by those skilled in the art. Any modifications, equivalents, improvements, etc. made within the spirit and scope of the present application are intended to be included within the scope of the appended claims.

Claims (18)

一种信息显示的方法,包括:A method of displaying information, including: 获取移动终端的程序界面的截图,显示至少一对游标,并监测用户的操作;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 it is detected that the user performs an operation on the pair of cursors, determining a position corresponding to each of the cursors on which the operation is performed; 根据各游标分别对应位置,在所述截图中确定各游标分别对应的选择范围;Determining, according to each cursor, a selection range corresponding to each cursor in the screenshot; 根据预设的边界算法,在各游标分别对应的所述选择范围内,分别确定所述程序界面中的元素的边界;Determining, according to a preset boundary algorithm, a boundary of an element in the program interface, respectively, in the selection range corresponding to each cursor; 将被执行所述操作的各游标分别移动至分别确定出的所述元素的边界;Moving each cursor of the operation to the boundary of the respectively determined element; 显示该对游标之间的距离。Shows the distance between the pair of cursors. 如权利要求1所述的方法,显示至少一对游标,具体包括:The method of claim 1, displaying at least one pair of cursors, specifically comprising: 显示浮动窗口;Display a floating window; 在所述浮动窗口中显示至少一对游标,其中,所述浮动窗口为透明窗口,所述浮动窗显示于所述程序界面的上层。At least one pair of cursors are displayed in the floating window, wherein the floating window is a transparent window, and the floating window is displayed on an upper layer of the program interface. 如权利要求1所述的方法,显示至少一对游标,具体包括:The method of claim 1, displaying at least one pair of cursors, specifically comprising: 在所述移动终端的屏幕中显示两对游标,其中,一对游标在为水平的线段,另一对游标为垂直的线段。Two pairs of cursors are displayed in the screen of the mobile terminal, wherein one pair of cursors is in a horizontal line segment and the other pair of cursors is a vertical line segment. 如权利要求2所述的方法,在所述程序界面上显示浮动窗口,具体包括:The method of claim 2, wherein displaying the floating window on the program interface comprises: 当监测到用户输入指令时,显示所述浮动窗口和/或获取所述程序界面的截图。When the user input instruction is monitored, the floating window is displayed and/or a screenshot of the program interface is obtained. 如权利要求3所述的方法,根据预设的边界算法,在该对游标分别对应的所述选择范围内确定所述程序界面中的元素的边界,具体包括:The method of claim 3, determining a boundary of an element in the program interface in the selection range corresponding to the pair of cursors according to a preset boundary algorithm, specifically comprising: 针对该对游标中的每个游标,确定该游标的位置上所述程序界面显示的颜色,作为基础颜色;Determining, according to each cursor in the pair of cursors, a color displayed by the program interface at the position of the cursor as a base color; 在该游标对应的所述选择范围内,确定与所述游标的线段平行、超过预设长度以及颜色与所述基础颜色不同的线段,作为确定出的边界。Within the selected range corresponding to the cursor, a line segment parallel to the line segment of the cursor, exceeding a preset length, and a color different from the base color is determined as the determined boundary. 如权利要器5所述的方法,在该游标对应的所述选择范围内中,确定与所述游标的线段平行、超过预设长度以及颜色与所述基础颜色不同的线段,作为确定出的边界,具体包括:The method according to claim 5, wherein within the selection range corresponding to the cursor, a line segment parallel to the line segment of the cursor, exceeding a preset length, and a color different from the base color is determined as the determined The boundary includes: 在该游标对应的所述选择范围内,确定与所述游标的线段平行、超过预设长度以及颜色与所述基础颜色不同的至少一条线段;Determining, in the selection range corresponding to the cursor, at least one line segment that is parallel to the line segment of the cursor, exceeds a preset length, and has a color different from the base color; 从确定出的至少一条线段中,选择与所述游标距离最近的线段,作为确定出的边界。From among the determined at least one line segment, the line segment closest to the cursor is selected as the determined boundary. 如权利要求1所述的方法,获取移动终端上程序界面的截图之前,所述方法还包括:The method of claim 1, before the obtaining a screenshot of the program interface on the mobile terminal, the method further comprising: 启动界面布局边界显示工具,显示所述程序界面中各元素的边界。The interface layout boundary display tool is activated to display the boundaries of the elements in the program interface. 一种信息显示方法,包括:An information display method includes: 获取移动终端的程序界面的截图,显示至少一个光标,并监测用户的操作;Obtaining a screenshot of the program interface of the mobile terminal, displaying at least one cursor, and monitoring the operation of the user; 当监测到用户对任一光标执行操作时,确定被执行所述操作的光标的位置;Determining the position of the cursor on which the operation is performed when it is detected that the user performs an operation on any of the cursors; 在所述截图中确定在所述位置上的颜色;Determining the color at the location in the screenshot; 根据所述光标的边界以及所述颜色,确定字符边界;Determining a character boundary according to the boundary of the cursor and the color; 根据确定出的字符边界,确定所述光标所覆盖的字符的尺寸,并显示。The size of the character covered by the cursor is determined according to the determined character boundary and displayed. 如权利要求8所述的方法,所述光标的形状为矩形;The method of claim 8 wherein the shape of the cursor is a rectangle; 根据所述光标的边界以及所述颜色,确定所述字符边界,具体包括:Determining the character boundary according to the boundary of the cursor and the color, specifically including: 确定所述光标的上下边界和/或所述光标的左右边界;Determining upper and lower boundaries of the cursor and/or left and right boundaries of the cursor; 根据所述颜色,在所述截图中确定所述光标的上下边界分别对应的颜色和/或所述光标的左右边界分别对应的颜色;Determining, in the screenshot, the color corresponding to the upper and lower boundaries of the cursor and/or the left and right boundaries of the cursor respectively according to the color; 根据所述光标的上下边界分别对应的颜色,确定所述字符边界的高度,和/或根据所述光标的左右边界分别对应的颜色,确定所述字符边界的宽度。Determining a height of the character boundary according to a color corresponding to the upper and lower boundaries of the cursor, and/or determining a width of the character boundary according to a color corresponding to each of the left and right boundaries of the cursor. 如权利要求9所述的方法,根据所述光标的上下边界分别对应的颜色,确定所述字符边界的高度,具体包括:The method of claim 9, determining the height of the character boundary according to the color corresponding to the upper and lower boundaries of the cursor, specifically including: 确定所述光标的左右边界的延长线之间的各行像素;Determining each row of pixels between the extension lines of the left and right boundaries of the cursor; 以所述光标的上边界为起始行依次向上,从确定出的各行像素中,选择与下一行像素的颜色不完全相同的一行像素,作为所述字符的上边界;Starting from the upper boundary of the cursor as a starting line, from the determined rows of pixels, selecting a row of pixels that are not exactly the same color as the pixels of the next row, as the upper boundary of the character; 以所述光标的下边界为起始行依次向下,从确定出的各行像素中,选择与下一行像素的颜色不完全相同的一行像素,作为所述字符的下边界;Starting from the lower boundary of the cursor as a starting line, from the determined rows of pixels, selecting a row of pixels that are not exactly the same color as the pixels of 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. 如权利要求9所述的方法,根据所述光标的左右边界分别对应的颜色,确定所述字符边界的宽度,具体包括:The method of claim 9, determining the width of the character boundary according to the color corresponding to the left and right boundaries of the cursor, specifically including: 确定所述光标的上下边界的延长线之间的各列像素;Determining columns of pixels between extension lines of the upper and lower boundaries of the cursor; 以所述光标的左边界为起始列依次向左,从确定出的各列像素中,选择与下一列像素的颜色不完全相同的一列像素,作为所述字符的左边界;Starting from the left boundary of the cursor to the left, from the determined columns of pixels, selecting a column of pixels that are not exactly the same color as the pixels of the next column, as the left boundary of the character; 以所述光标的右边界为起始列依次向右,从确定出的各列像素中,选择与下一列像素的颜色不完全相同的一列像素,作为所述字符的右边界;Starting from the right border of the cursor to the right, from the determined columns of pixels, selecting a column of pixels that are not exactly the same color as the pixels of the next column, 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. 如权利要求9所述的方法,根据确定出的字符的边界,确定所述字符的尺寸,具体包括:The method of claim 9, determining the size of the character according to the determined boundary of the character, specifically comprising: 根据预先获取的拟合公式,确定所述字符边界的高度对应的尺寸和/或确定所述字符边界的宽度对应的尺寸。The size corresponding to the height of the character boundary and/or the size corresponding to the width of the character boundary is determined according to a fitting formula acquired in advance. 如权利要求12所述的方法,预先获取拟合公式,具体包括:The method according to claim 12, wherein the fitting formula is obtained in advance, specifically comprising: 预先向服务器发送所述移动终端的设备信息;Sending device information of the mobile terminal to the server in advance; 接收所述服务器返回的与所述设备信息对应的拟合公式并存储。A fitting formula corresponding to the device information returned by the server is received and stored. 如权利要求9所述的方法,所述光标存在多个,且各光标的尺寸不完全相同。The method of claim 9, wherein the cursor is present in plurality and the sizes of the respective cursors are not identical. 一种信息显示装置,包括:An information display device comprising: 获取显示及监测模块,获取移动终端的程序界面的截图,显示至少一对游标,并监测用户的操作;Obtaining a display and monitoring module, 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; 第一确定模块,针对每对游标,当监测到用户对该对游标执行操作时,确定被执行所述操作的各游标分别对应的位置;a first determining module, for each pair of cursors, when detecting that the user performs an operation on the pair of cursors, determining a position corresponding to each of the cursors on which the operation is performed; 第二确定模块,根据各游标分别对应位置,在所述截图中确定各游标分别对应的选择范围;a second determining module, according to each cursor corresponding to the position, determining, in the screenshot, a selection range corresponding to each cursor; 第三确定模块,根据预设的边界算法,在各游标分别对应的所述选择范围内,分别确定所述程序界面中的元素的边界;a third determining module, respectively, determining, according to a preset boundary algorithm, a boundary of an element in the program interface in the selection range corresponding to each cursor; 第四确定模块,将被执行所述操作的各游标分别移动至分别确定出的所述元素的边界;a fourth determining module, respectively moving each cursor that is to perform the operation to a boundary of the respectively determined element; 显示模块,显示该对游标之间的距离。A display module that displays the distance between the pair of cursors. 一种信息显示装置,包括:An information display device comprising: 获取显示及监测模块,获取移动终端的程序界面的截图,显示至少一个光标,并监测用户的操作;Obtaining a display and monitoring module, obtaining a screenshot of the program interface of the mobile terminal, displaying at least one cursor, and monitoring the operation of the user; 第一确定模块,当监测到用户对任一光标执行操作时,确定被执行所述操作的光标的位置;a first determining module, when detecting that the user performs an operation on any of the cursors, determining a position of the cursor on which the operation is performed; 第二确定模块,在所述截图中确定在所述位置上的颜色;a second determining module determining a color at the location in the screenshot; 第三确定模块,根据所述光标的边界以及所述颜色,确定字符边界;a third determining module, determining a character boundary according to the boundary of the cursor and the color; 显示模块,根据确定出的字符边界,确定所述光标所覆盖的字符的尺寸,并显示。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 comprising: one or more processors and a memory, the program being configured to perform the following steps by one or more processors: 获取所述移动终端的程序界面的截图,显示至少一对游标,并监测用户的操作;Obtaining a screenshot of the program interface of the mobile terminal, displaying at least one pair of cursors, and monitoring user operations; 针对每对游标,当监测到用户对该对游标执行操作时,确定被执行所述操作的各游标分别对应的位置;For each pair of cursors, when it is detected that the user performs an operation on the pair of cursors, determining a position corresponding to each of the cursors on which the operation is performed; 根据各游标分别对应位置,在所述截图中确定各游标分别对应的选择范围;Determining, according to each cursor, a selection range corresponding to each cursor in the screenshot; 根据预设的边界算法,在各游标分别对应的所述选择范围内,分别确定所述程序界面中的元素的边界;Determining, according to a preset boundary algorithm, a boundary of an element in the program interface, respectively, in the selection range corresponding to each cursor; 将被执行所述操作的各游标分别移动至分别确定出的所述元素的边界;Moving each cursor of the operation to the boundary of the respectively determined element; 显示该对游标之间的距离。Shows the distance between the pair of cursors. 一种移动终端,包括:一个或多个处理器及存储器,所述程序被配置成由一个或多个处理器执行以下步骤:A mobile terminal comprising: one or more processors and a memory, the program being configured to perform the following steps by one or more processors: 获取所述移动终端的程序界面的截图,显示至少一个光标,并监测用户的操作;Obtaining a screenshot of the program interface of the mobile terminal, displaying at least one cursor, and monitoring the operation of the user; 当监测到用户对任一光标执行操作时,确定被执行所述操作的光标的位置;Determining the position of the cursor on which the operation is performed when it is detected that the user performs an operation on any of the cursors; 在所述截图中确定在所述位置上的颜色;Determining the color at the location in the screenshot; 根据所述光标的边界以及所述颜色,确定字符边界;Determining a character boundary according to the boundary of the cursor and the color; 根据确定出的字符边界,确定所述光标所覆盖的字符的尺寸,并显示。The size of the character covered by the cursor is determined according to the determined character boundary and displayed.
PCT/CN2018/099951 2017-10-19 2018-08-10 Information display method and apparatus Ceased WO2019076118A1 (en)

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
CN201710979325.2 2017-10-19

Publications (1)

Publication Number Publication Date
WO2019076118A1 true WO2019076118A1 (en) 2019-04-25

Family

ID=61648405

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/099951 Ceased WO2019076118A1 (en) 2017-10-19 2018-08-10 Information display method and apparatus

Country Status (3)

Country Link
CN (1) CN107831965B (en)
TW (1) TWI671675B (en)
WO (1) WO2019076118A1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
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
CN114428576B (en) * 2021-12-20 2025-05-30 北京镁伽科技有限公司 Cursor color determination method, device, PG device and storage medium
CN115858613B (en) * 2022-11-18 2023-11-17 中节能风力发电股份有限公司 Wind power data display method and system based on time sequence information

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102811290A (en) * 2012-08-15 2012-12-05 北京小米科技有限责任公司 Widget regulating method, device and terminal
CN102981707A (en) * 2011-11-14 2013-03-20 微软公司 Self-adaptive area cursor
US20130167072A1 (en) * 2011-12-22 2013-06-27 Sap Portals Israel Ltd. Smart and Flexible Layout Context Manager
CN103645890A (en) * 2013-11-29 2014-03-19 北京奇虎科技有限公司 Method and device for positioning control part in graphical user interface
CN107831965A (en) * 2017-10-19 2018-03-23 阿里巴巴集团控股有限公司 A kind of method and device of presentation of information

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103150153B (en) * 2011-12-06 2016-03-02 阿里巴巴集团控股有限公司 A kind of method for designing of user interface and device
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

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102981707A (en) * 2011-11-14 2013-03-20 微软公司 Self-adaptive area cursor
US20130167072A1 (en) * 2011-12-22 2013-06-27 Sap Portals Israel Ltd. Smart and Flexible Layout Context Manager
CN102811290A (en) * 2012-08-15 2012-12-05 北京小米科技有限责任公司 Widget regulating method, device and terminal
CN103645890A (en) * 2013-11-29 2014-03-19 北京奇虎科技有限公司 Method and device for positioning control part in graphical user interface
CN107831965A (en) * 2017-10-19 2018-03-23 阿里巴巴集团控股有限公司 A kind of method and device of presentation of information

Also Published As

Publication number Publication date
TWI671675B (en) 2019-09-11
CN107831965A (en) 2018-03-23
TW201917554A (en) 2019-05-01
CN107831965B (en) 2020-04-24

Similar Documents

Publication Publication Date Title
CN102999229B (en) Device with display and method of interacting with display using photovoltaic array
US10042546B2 (en) Systems and methods to present multiple frames on a touch screen
TWI671675B (en) Information display method and device
US10416874B2 (en) Methods, apparatuses, and devices for processing interface displays
TW202008328A (en) Data processing method and device for map region merging
TWI691206B (en) Watermark adding processing method, device and client
WO2019085653A1 (en) Page information display method, device, and client
WO2019101073A1 (en) Toolbar display control method and apparatus, and readable storage medium and computer device
WO2019119975A1 (en) Information input method and device
CN107943381A (en) Hot-zone method of adjustment and device, client
CN103455245B (en) Method and device for regulating area of widget
US10345932B2 (en) Disambiguation of indirect input
CN108228065B (en) Method and device for detecting UI control information and electronic equipment
CN106598928B (en) A method and system for annotating on a display screen
CN104978135B (en) A kind of icon display method, device and mobile terminal
CN114201164A (en) Magnetic attraction method and device for graphical programming module, electronic equipment and medium
EP2876540B1 (en) Information processing device
CN106933486A (en) Touch implementation method and device for android system
CN108073339B (en) Floating layer display method, client and electronic equipment
JP5585239B2 (en) Information processing apparatus, control program, recording medium, and display control apparatus
CN115543168A (en) Method, device, equipment and medium for switching application
HK1249784A1 (en) Information displaying method and device
HK1249784B (en) Information displaying method and device
KR20200031598A (en) Control method of favorites mode and device including touch screen performing the same
WO2016206438A1 (en) Touch screen control method and device and mobile terminal

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18868262

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18868262

Country of ref document: EP

Kind code of ref document: A1