Search

CN-118227025-B - Text selection method

CN118227025BCN 118227025 BCN118227025 BCN 118227025BCN-118227025-B

Abstract

The embodiment of the invention provides a text selection method, which relates to the field of communication, and can reduce the phenomenon of multiple selection or fewer selection when a text is selected, and improve the operation efficiency of a terminal when the text is selected. The method comprises the steps that a terminal displays a user graphical interface in a touch screen, the terminal receives a first gesture acting on the user graphical interface, the first gesture comprises a closed track, the terminal determines a target area corresponding to the closed track in the user graphical interface in response to the first gesture, the terminal determines a first target text contained in the target area, the terminal performs semantic analysis on the first target text, determines a second target text, the second target text is different from the first target text, and marks the second target text in the user graphical interface.

Inventors

  • LI ANG

Assignees

  • 荣耀终端有限公司

Dates

Publication Date
20260508
Application Date
20180412
Priority Date
20180111

Claims (13)

  1. 1. A text selection method implemented in a terminal having a touch screen, comprising: the terminal displays a user graphical interface in the touch screen; The terminal receives a second gesture acting on the user graphical interface; The terminal responds to the second gesture, and a first selection control and a selection frame are displayed on the user graphical interface, wherein the first selection control comprises a first cursor and a second cursor, and the first cursor and the second cursor are used for adjusting the selected text; the terminal receives a first gesture of a user for circling text in the user graphical interface by using the selection frame; responding to the first gesture, forming a closed track in the user graphical interface by the terminal, and marking a text of a target area corresponding to the closed track; the terminal receives clicking operation acting on a first character in the user graphical interface, wherein the first character is a character outside the target area; and the terminal responds to the clicking operation, and expands the target area by taking the row and the column where the first character is located as boundaries.
  2. 2. The method according to claim 1, wherein the method further comprises: the terminal receives a third gesture; and responding to the third gesture, and adjusting the position or the size of the target area by the terminal according to the third gesture.
  3. 3. The method according to claim 2, wherein the method further comprises: and when the terminal displays the target area, setting at least one control block on the boundary of the target area.
  4. 4. A method according to claim 3, wherein the third gesture is an operation to drag the control block.
  5. 5. The method of claim 4, wherein the terminal adjusting the size of the target area according to the third gesture comprises: And the terminal enlarges or reduces the target area along the direction of dragging the control block.
  6. 6. The method of claim 1, wherein the forming, by the terminal, a closed track in the user graphical interface in response to the first gesture and marking text of a target area corresponding to the closed track comprises: in response to the first gesture, the terminal determines a target area and a first target text contained in the target area; The terminal performs semantic analysis on the first target text, determines a text to be corrected with incomplete semantic meaning or word meaning in the first target text, and corrects the text to be corrected with incomplete semantic meaning contained in the first target text according to the context of the text to be corrected to obtain a second target text; The terminal marks the second target text in the user graphical interface.
  7. 7. The method of claim 6, wherein the terminal marks the second target text in the user graphical interface, comprising: the terminal displays the first cursor at the initial position of the second target text, and displays the second cursor at the end position of the second target text.
  8. 8. The method of claim 7, further comprising, after the terminal displays the first cursor and the second cursor at the start position and the end position of the second target text, respectively: the terminal receives a drag operation acting on the first cursor or the second cursor; and the terminal expands the second target text into a third target text by taking the phrase as a unit in response to the dragging operation, or cancels the selected text in the second target text by taking the phrase as a unit in response to the dragging operation.
  9. 9. The method of claim 8, further comprising, after the terminal receives a drag operation on the first cursor or the second cursor: the terminal does not display the first cursor or the second cursor until it is detected that the user's finger is not leaving the touch screen.
  10. 10. The method of any of claims 1-9, wherein the second gesture comprises a long press gesture.
  11. 11. The method according to any one of claims 1 to 9, wherein, The user graphic interface is a short message interface, or The user graphic interface is an interface containing pictures, or The user graphical interface is an interface comprising pictures and words.
  12. 12. A terminal comprising a touch screen, a memory, one or more processors, a plurality of application programs, and one or more programs, wherein the one or more programs are stored in the memory, characterized in that the terminal is configured to perform the text selection method according to any of claims 1 to 11.
  13. 13. A computer readable storage medium having instructions stored therein, which when run on a terminal, cause the terminal to perform the text selection method of any of claims 1 to 11.

Description

Text selection method The present application is a divisional application, the application number of the original application is 201810327466.0, the original application date is 2018, 04, 12, and the whole content of the original application is incorporated by reference. The present application claims priority from the chinese patent application filed on 1 month 11 2018, filed under the national intellectual property agency, application number 201810025128.1, entitled "method of processing on-screen text", the entire contents of which are incorporated herein by reference. Technical Field The invention relates to the field of communication, in particular to a text selection method. Background The text view is one of controls for displaying character strings, and when a terminal such as a mobile phone displays text through a text view type control, if a user input of a specified operation (e.g., a long press operation) for editing text is detected, as shown in fig. 1, the terminal may display the text in the text view as an editable state and display editing options (e.g., copy 11, translation 12, or delete 13 in fig. 1) supported by the text. At this time, the user may drag the first cursor 14a and the second cursor 14b located at two ends of the selected text to expand or delete the selected text word by word, so as to select a desired editing option to implement a corresponding editing function. However, when the fonts in the text are smaller or the number of characters is larger, the user drags the first cursor 14a or the second cursor 14b to select the text, so that the problem of multiple selection or fewer selection easily occurs, and the operation efficiency of the terminal when the text is selected is reduced. Disclosure of Invention The embodiment of the invention provides a text selection method, which can reduce the phenomenon of multi-selection or less-selection when a text is selected and improve the operation efficiency of a terminal when the text is selected. In order to achieve the above purpose, the application adopts the following technical scheme: In a first aspect, the application provides a text selection method, which comprises the steps that a Graphical User Interface (GUI) is displayed in a touch screen by a terminal, the terminal further receives a first gesture acted on the user graphical interface, the first gesture can generate a closed track in the user graphical interface, a target area corresponding to the closed track in the user graphical interface can be determined by the terminal in response to the first gesture, a first target text contained in the target area is determined by the terminal, semantic analysis is carried out on the first target text by the terminal, so that a second target text different from the first target text is determined, and the second target text is marked in the user graphical interface. That is, when the user performs the first gesture to select the target text on the user graphical interface, the terminal can modify the first target text actually selected by the user into the second target text according to the semantics, so that the final terminal is more prepared for the semantics of the second target text selected by the user, the phenomenon of multiple selection or less selection when the user selects the text is reduced, and the operation efficiency of the terminal when the text is selected is improved. In one possible design method, after the terminal displays the user graphical interface in the touch screen and before the terminal receives the first gesture acting on the user graphical interface, the method further comprises the step that the terminal displays a first prompt in the user graphical interface, wherein the first prompt comprises a selection box for circling text information, and the step that the terminal receives the first gesture acting on the user graphical interface specifically comprises the step that the terminal receives the first gesture of a user circling a first target text in the user graphical interface by using the selection box. That is, before the user circles the text, the terminal can prompt the user to circle the target text by using the selection box provided by the terminal, so that the probability of multiple or fewer text selections caused when the user manually slides on the user graphical interface to draw the first gesture of the closed track is reduced, and the user experience is improved. In one possible design method, after the terminal marks the second target text in the user graphical interface, the method further comprises the steps of receiving a clicking operation on a first character, wherein the first character is text except the second target text in the user graphical interface, and expanding the text in a closed area formed by the first target text and the rows and columns where the first character are located into a third target text by the terminal in response to the clicking operation.