WO2016173306A1 - 文本选取方法和装置、文本处理方法和装置 - Google Patents

文本选取方法和装置、文本处理方法和装置 Download PDF

Info

Publication number
WO2016173306A1
WO2016173306A1 PCT/CN2016/071981 CN2016071981W WO2016173306A1 WO 2016173306 A1 WO2016173306 A1 WO 2016173306A1 CN 2016071981 W CN2016071981 W CN 2016071981W WO 2016173306 A1 WO2016173306 A1 WO 2016173306A1
Authority
WO
WIPO (PCT)
Prior art keywords
touch
text
touch point
touch points
display area
Prior art date
Application number
PCT/CN2016/071981
Other languages
English (en)
French (fr)
Inventor
杜霁轩
马骏
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2016173306A1 publication Critical patent/WO2016173306A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0488Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures

Definitions

  • the present application relates to, but is not limited to, the field of terminal technologies, and in particular, to a text selection method and apparatus, a text processing method and apparatus.
  • the embodiment of the invention provides a text selection method and device, a text processing method and a device, which can solve the technical problem that the user operation with the current text selection method is cumbersome and the user experience is poor.
  • An embodiment of the present invention provides a text selection method, including the following steps:
  • Corresponding text content is selected according to position information of the first selected touch point and the second selected touch point in the text display area.
  • the determining the two touch points from the at least two touch points as the first selected touch point and the second selected touch point respectively
  • the steps include:
  • the two touch points are directly used as the first selected touch point and the second selected touch point, respectively.
  • the two touch points include: two first touch points, or one first touch point and one new second touch point.
  • the determining the two touch points from the at least two touch points as the first selected touch point and the second selected touch respectively the steps of the point include:
  • Two touch points are determined from the at least three touch points as the first selected touch point and the second selected touch point, respectively, according to a text content selection principle.
  • the two touch points include: two first touch points, or one first touch point and one new second touch point, or two new second touch points.
  • the step of selecting the corresponding text content according to the location information of the first selected touch point and the second selected touch point in the text display area comprises:
  • Corresponding text content is selected according to the positional relationship.
  • the method further includes:
  • Corresponding text content is selected according to position information of the first selected touch point and the second selected touch point in the text display area.
  • the embodiment of the invention further provides a text processing method, comprising the following steps:
  • the extracted text content is processed.
  • the step of processing the extracted text content includes:
  • the embodiment of the invention further provides a text selection device, comprising: a detection module and a selection module;
  • the detecting module is configured to: when the terminal displays the text, detecting whether there are at least two first touch points located in the text display area of the terminal on the touch screen of the current terminal; and at the at least one of the first touch points Detecting whether there are at least two touch points in the current text display area during the existence period;
  • the selecting module is configured to: when the detecting module detects that there are at least two first touch points located in the text display area of the terminal on the touch screen of the current terminal, at least one of the first touch points During the period of existence, when the detecting module detects that there are at least two touch points in the current text display area, determining two touch points from the at least two touch points as the first selected touch points and the first Second, the touch point is selected, and the corresponding text content is selected according to the position information of the first selected touch point and the second selected touch point in the text display area.
  • the selecting module is configured to: when detecting that there are two touch points in the current text display area, directly using the two touch points as the first selected touch point and the second selected touch point respectively .
  • the selecting module is configured to: when detecting that there are at least three touch points in the current text display area, determine two touch points from the at least three touch points according to a maximum selection principle of the text content. As the first selected touch point and the second selected touch point, respectively.
  • the embodiment of the invention further provides a text processing device, comprising: a text selection device, an extraction module and a processing module as described above;
  • the extraction module is configured to: when all the touch points disappear, extract the text content selected by the text selection device;
  • the processing module is configured to process the text content extracted by the extraction module.
  • an embodiment of the present invention further provides a terminal, including: a display, a sensor, and a processor.
  • the sensor is configured to: when the display displays text, detect whether there are at least two first touch points located in the text display area of the display on the touch screen of the current display; and presence at the at least one of the first touch points During the period, detecting whether there are at least two touch points in the current text display area;
  • the processor is configured to: after the sensor detects that at least two first touch points in the text display area of the display are present on the touch screen of the current display, during the presence of at least one of the first touch points When the sensor detects that there are at least two touch points in the current text display area, determining two touch points from the at least two touch points as the first selected touch point and the second selected touch point, respectively. And selecting corresponding text content according to the location information of the first selected touch point and the second selected touch point in the text display area.
  • an embodiment of the present invention further provides a terminal, including: a display, a sensor, and a processor.
  • the sensor is configured to: when the display displays text, detect whether there are at least two first touch points located in the text display area of the display on the touch screen of the current display; and presence at the at least one of the first touch points During the period, detecting whether there are at least two touch points in the current text display area;
  • the processor is configured to: after the sensor detects that at least two first touch points in the text display area of the display are present on the touch screen of the current display, during the presence of at least one of the first touch points When the sensor detects that there are at least two touch points in the current text display area, determining two touch points from the at least two touch points as the first selected touch point and the second selected touch point, respectively. Selecting corresponding text content according to position information of the first selected touch point and the second selected touch point in the text display area, and when all touch points disappear, extracting the selected text content, and performing the extracted text content deal with.
  • an embodiment of the present invention further provides a computer readable storage medium, where computer executable instructions are stored, and the text selection method is implemented when the computer executable instructions are executed.
  • an embodiment of the present invention further provides a computer readable storage medium storing computer executable instructions, the text processing method being implemented when the computer executable instructions are executed.
  • the text selection method provided by the embodiment of the present invention detects, when the terminal displays the text, whether there are at least two first touch points located in the text display area of the terminal on the touch screen of the current terminal; if yes, at least one During the period in which the first touch point exists, when it is detected that there are at least two touch points in the current text display area, two touch points are determined from the plurality of touch points as the first selected touch point and the first Selecting a touch point; selecting corresponding text content according to position information of the first selected touch point and the second selected touch point in the text display area.
  • the text selection method provided by the embodiment of the invention relies on the multi-touch technology, and can support the user to perform multi-touch operation.
  • the user After triggering the selected text, the user can select a desired text content by using one touch operation;
  • the text selection method provided by the example simplifies the user operation of selecting the text content, and improves the efficiency of selecting the text content and improves the user experience.
  • FIG. 1 is a schematic flowchart of a text selection method according to Embodiment 1 of the present invention.
  • FIG. 2 is a schematic flowchart of a text processing method according to Embodiment 2 of the present invention.
  • FIG. 3 is a schematic diagram of copying text content according to Embodiment 2 of the present invention.
  • FIG. 4 is a schematic diagram of another copy text content according to Embodiment 2 of the present invention.
  • FIG. 5 is a schematic structural diagram of a text selection apparatus according to Embodiment 3 of the present invention.
  • FIG. 6 is a schematic structural diagram of a text processing apparatus according to Embodiment 3 of the present invention.
  • the present embodiment provides a text selection method, as shown in FIG. 1 , including the following steps:
  • Step 101 When the terminal displays the text, it is detected whether there are at least two first touch points located in the text display area of the terminal on the touch screen of the current terminal; if yes, step 102 is performed; if not, step 104 is performed.
  • this step includes:
  • the terminal When the terminal displays the text, when it is detected that there are at least two first touch points on the touch screen of the current terminal, acquiring the position information of the at least two first touch points on the touch screen and the text display area of the current terminal are Position information on the touch screen; for example, acquiring coordinate information of the first touch point on the touch screen and coordinate information of the text display area on the touch screen;
  • the triggering terminal when it is detected that there are at least two first touch points located in the text display area of the terminal on the touch screen of the current terminal, the triggering terminal performs a text selection function, that is, the terminal enters a text selection mode.
  • the touch point can be formed by clicking or pressing the touch screen.
  • Step 102 During the period in which at least one of the first touch points exists, when it is detected that there are at least two touch points in the current text display area, determining two touch points from the at least two touch points respectively As the first selected touch point and the second selected touch point.
  • This step is a text content selection process performed after the user triggers the terminal to perform the text selection function.
  • the first selected touch point and the second selected touch point may be in a text display area in which one page is displayed, or in a text display area in which a plurality of different pages are displayed.
  • the step includes:
  • the two touch points are directly used as the first selected touch point and the second selected touch point, respectively.
  • two touch points in the current text display area may be Including: two first touch points, or one first touch point and one new second touch point.
  • the user forms two touch points A and touch points B located in the text display area by clicking or pressing the touch screen, and triggers the terminal to enter the text selection mode; wherein the touch point A and the touch point B are respectively located in the user's desired selection.
  • the terminal detects that there are two touch points (touch points A, B) on the touch screen, and then the terminal uses touch point A as the first selected touch point, and touch point B as The second touch point is selected.
  • the user forms three touch points A, touch points B, and touch points C located in the text display area by clicking the touch screen to trigger the terminal to enter the text selection mode; then, if the user cancels the touch point C, respectively, the touch points are moved.
  • a and touch point B to both ends of the text content to be selected, for example, moving the touch point A to the beginning of the desired selected text content, and moving the touch point B to the end of the desired selected text content;
  • the terminal detects that there are two touch points (touch points A, B) on the touch screen, and then the terminal uses the touch point A as the first selected touch point and the touch point B as the second selected touch point.
  • the step includes:
  • Two touch points are determined from the at least three touch points as the first selected touch point and the second selected touch point, respectively, according to a text content selection principle.
  • the principle of selecting the most content of the text content means that the text content between the selected two touch points is more than the text content between any two other touch points.
  • the location information of each touch point on the touch screen can be used to determine which of the two touch points has the most text content; for example, the coordinates (X, Y) of each touch point on the touch screen can be obtained. Then select the touch point with the largest and smallest Y value. If there is one touch point with the largest Y value and one touch point with the smallest Y value, then the two touch points with the largest and smallest Y values can be taken as the first.
  • Selecting the touch point and the second selected touch point if there are multiple touch points having the largest Y value and/or having the smallest Y value, in this case, it is necessary to compare the X values of the plurality of touch points having the largest Y value and / or comparing the X values of the plurality of touch points with the smallest Y value, determining the first selected touch points from the plurality of touch points having the largest Y value according to the comparison result, and determining the first from the plurality of touch points having the smallest Y value according to the comparison result Second, select the touch point.
  • the present embodiment may also adopt other methods to implement the text content selection principle, that is, determine which of the two touch points has the most text content.
  • the two touch points determined from the at least three touch points may include: two first touch points, or one first touch point and one new second touch point, or two new points.
  • the second touch point may include: two first touch points, or one first touch point and one new second touch point, or two new points.
  • Two newly added second touch points for example, the user forms two touch points A and touch points B located in the text display area by clicking or pressing the touch screen, and triggers the terminal to enter the text selection mode;
  • the text content between the touch point A and the touch point B is not the content that the user wants to select; after that, the user keeps the touch point A unchanged, cancels the touch point B, and adds the touch points D and E on the touch screen, wherein the touch point D and E are respectively located at the two ends of the text content that the user wants to select, and the text content between the touch points D and E is the most.
  • the terminal detects that there are touch points A, D, and E in the text display area, because The text content between the touch points D and E is the most, and the terminal will use the touch points D and E as the first selected touch point and the second selected touch point, respectively.
  • the user forms two touch points A and touch points B located in the text display area by clicking or pressing the touch screen, and triggering the terminal to enter the text selection Mode; at this time, the touch point A is located at the beginning of the text content that the user wants to select, and the touch point B is located at the middle of the text content that the user wants to select (the touch point B is not at the end of the text content that the user wants to select)
  • the user can keep the touch points A and B unchanged, and add a touch point C at the end of the text content that the user wants to select; at this time, the terminal will detect that there are three touch points (touch points A, B, C) ), since the text content between the touch point A and the touch point C is the most, the terminal will use the touch point A as the first selected touch point and the touch point C as the second selected touch point.
  • the terminal detects that there are two touch points (touch points A, B) on the touch screen, and then the terminal takes the touch point A as the first As soon as the touch point is selected, the touch point B is taken as the second selected touch point.
  • the user forms three touch points A, a touch point B, and a touch point C located in the text display area by clicking or pressing the touch screen, and triggers the terminal to enter the text selection mode; wherein the touch point A is located at the user's desired selection.
  • the touch point B is located in the middle of the text content that the user wants to select
  • the touch point C is located at the end of the text content that the user wants to select; at this time, the user keeps the touch points A, B, and C unchanged.
  • the terminal detects that there are three touch points in the text display area, and the text content between the touch point A and the touch point C is the most, and the terminal will use the touch point A as the first selected touch point and the touch point C as the second. Pick a touch point.
  • Step 103 Select corresponding text content according to location information of the first selected touch point and the second selected touch point in the text display area.
  • this step includes:
  • Corresponding text content is selected according to the positional relationship.
  • the touch point A is determined to be the first selected touch point and the touch point B is the second selected touch point
  • the coordinate La of the touch point A in the text display area and the coordinate Lb of the touch point B in the text display area are obtained, and then According to La and Lb, the positional relationship between the touch points A and B in the text display area is calculated, and finally the corresponding text content is selected according to the positional relationship, for example, all the text contents between the touch points A and B are selected.
  • a text selection box is created according to the positional relationship between the first selected touch point and the second selected touch point, and all text content located in the text selection box is selected.
  • the corresponding text content is selected according to the positional relationship, and all text content or partial text content between the first selected touch point and the second selected touch point may be selected.
  • Step 104 Do nothing.
  • the text selection method of the embodiment relies on the multi-touch technology, and can support the user to perform multi-touch operation to select text content; after triggering the selected text, the user can select a desired text content by using one touch operation; Compared with the prior art, the text selection method of the example simplifies the user operation of selecting the text content, and improves the efficiency of selecting the text content and improves the user experience.
  • the user forms two touch points A and touch points B located in the text display area by clicking the touch screen;
  • the user selects the desired text content by sliding the touch points A and B respectively in the text display area or simultaneously;
  • the user keeps the touch point A unchanged, and slides the touch point B to select the desired text content;
  • the user keeps the touch point A unchanged, cancels the touch point B, and then adds a touch point C or E to select the desired text content.
  • the user forms three touch points A, touch points B, and touch points C located in the text display area by clicking the touch screen;
  • the user keeps the touch points A and B unchanged, and selects the text content by sliding the touch point C.
  • the terminal determines the touch points A and C as the first selected touch point and the second selected touch point according to the principle of maximum text selection, and then, Selecting corresponding text content according to position information of the touch points A and C in the text display area, for example, selecting all text contents between the touch points A and C;
  • the user keeps the touch points A and B unchanged, cancels the touch point C, and adds a new touch point D to select the text content.
  • the terminal determines the touch points A and D as the first selected touch points according to the principle of maximum text selection.
  • the second touch point is selected, and then the corresponding text content is selected according to the position information of the touch points A, D in the text display area, for example, all the text contents between the touch points A and D are selected;
  • the user keeps the touch point A unchanged, cancels the touch points B and C, and adds a new touch point D.
  • And E to select the text content.
  • the terminal determines the touch points D and E as the first selected touch point and the second selected touch point according to the principle of maximum text selection, and then, according to the position of the touch points D and E in the text display area.
  • the information is selected to correspond to the text content, for example, all text content between touch points D and E is selected.
  • the method provided in this embodiment further includes:
  • Corresponding text content is selected according to position information of the first selected touch point and the second selected touch point in the text display area.
  • the method provided in this embodiment may be in a period in which at least one new touch point exists, and all the first touch points disappear, for example, the terminal detects that at least one new touch point exists, and the user removes all formations. Pressing of the first touch point, the terminal detecting whether there are at least two touch points in the text display area during the existence of the at least one new touch point, and if so, determining from the at least two touch points The two touch points are used as the first selected touch point and the second selected touch point, and the corresponding text content is selected according to the position information of the first selected touch point and the second selected touch point in the text display area.
  • the two touch points are directly directly As a first selected touch point and a second selected touch point;
  • the two touch points are determined from the at least three touch points as the first selected touch point and the second selected touch point, respectively, according to the text content selection principle.
  • the two touch points determined from the at least two touch points may include: two A new third touch point, or a new third touch point and a previously added second touch point, or two previously added second touch points.
  • the two touch points may be determined from the at least three touch points as the first selected touch point and the second selected touch point respectively according to the principle of selecting the text content. For details, please refer to the above description of the principle of selecting the most text content.
  • the user forms three touch points A, touch points B, and touch points C located in the text display area by clicking the touch screen;
  • the touch point A is located at the beginning of the text content that the user wants to select
  • the touch point B is located at the middle of the text content that the user wants to select
  • the touch point C is located at the end of the text content that the user wants to select
  • the terminal Since the text content between the touch point A and the touch point C is the most, the terminal will use the touch point A as the first selected touch point and the touch point C as the second selected touch point; , the text content between the touch points A and C is selected; afterwards, the user can add a touch point D at the beginning of the text content that is desired to be selected again, keep the touch point D unchanged, and cancel the touch points A, C; Adding a touch point E to the end of the text content to be selected again to select the desired text content.
  • the terminal detects that there are two touch points (touch points D, E), and directly touches the touch point D and touch.
  • the point E is used as the first selected touch point and the second selected touch point, respectively, and the text content between the touch point D and the touch point E is selected.
  • the touch point A is located at the beginning of the text content that the user wants to select, and the touch points B and C are located at the middle of the text content that the user wants to select; the user can keep the touch point A unchanged, and the user wants to select A new touch point D is added to the end of the text content. Since the text content between the touch point A and the touch point D is the most, the terminal will use the touch point A as the first selected touch point and the touch point D as the second selected touch point. Then, the text content between the touch points A and D is selected; after that, the user can keep the touch point D unchanged, cancel the touch point A, and add a touch point respectively at the beginning end and the end end of the text content to be selected again. E and F, since the text content between the touch point E and the touch point F is the most, the terminal will use the touch point E as the first selected touch point and the touch point F as the second selected touch point; then, select the touch point E and The text content between F.
  • the method of the embodiment can continue to enable the user to select the desired content by using a multi-touch operation, without triggering the text selection mode again, thereby improving the efficiency of the text selection and the user experience.
  • this embodiment provides a text processing method, including the following steps:
  • Step 201 Select the text content by using the text selection method described in Embodiment 1.
  • the text content between the two first touch points is selected, or the text content between the first touch point and the new second touch point is selected.
  • Step 202 Extract the selected text content when all the touch points disappear.
  • the selected text is extracted, or when all of the first touch points, the second touch points, and the third touch points disappear, the selected text is extracted.
  • the selected text content is extracted.
  • Step 203 Process the extracted text content.
  • the extracted text content is copied and the copied text content is stored.
  • other operations can be performed on the extracted text content.
  • the first step as shown in FIG. 3, the terminal detects that there are multiple touch points in the current screen, wherein the touch point A is at the position S301 and the touch point B is at the position S302;
  • Step 2 The terminal determines whether both touch points fall within the text display area, and if yes, performs the next step;
  • the third step as shown in FIG. 3, the user operates on the screen such that the touch point A and the touch point B slide on the screen respectively, slide the touch point A to S303, and slide the touch point B to S304; at this time, at the touch point During the period in which A and B exist, the terminal detects that there are touch point A and touch point B in the text display area;
  • the terminal directly uses the touch point A as the first selected touch point and the touch point B as the second selected touch point. At this point, touch point A is at the beginning of the string to be selected, and touch point B is at the end of the string to be selected.
  • the fourth step the terminal acquires the coordinates LA and LB of the touch points A and B in the text display area, respectively.
  • Step 5 The terminal calculates the coordinates LA and LB to obtain the positional relationship of the touch points A and B in the text display area.
  • Step 6 Mark all text content between touch points A and B according to the positional relationship, that is, all characters B.
  • Step 7 After the touch point A and the touch point B disappear, the terminal extracts and copies the marked character string "BBB...B” and saves it in the cache.
  • First step as shown in FIG. 4, the terminal detects that there are multiple touch points in the current screen, wherein the touch point A is at the position S401, the touch point B is at the position S402, and the terminal marks the touch point A coordinate La, and The coordinate Lb1 appears for the first time at the touch point B.
  • the second step keeping the touch point A unchanged at the position S401, the user can make the touch point B in the text display area constantly changing positions S403, S404, S405, etc., in order to select the desired text content; the terminal will record The touch point B appears last time at the coordinate Lbn of the position S405 of the text display area, and the terminal marks all the text between the coordinate La and the coordinate Lbn;
  • Step 3 When touch points A and B disappear on the touch screen, the terminal extracts all the text between La and Lbn, copies and saves them to the cache.
  • the embodiment provides a text selection device, including: a detection module and a selection module;
  • the detecting module is configured to: when the terminal displays the text, detecting whether there are at least two first touch points located in the text display area of the terminal on the touch screen of the current terminal; and at the at least one of the first touch points Detecting whether there are at least two touch points in the current text display area during the existence period;
  • the selecting module is configured to: when the detecting module detects that there are at least two first touch points located in the text display area of the terminal on the touch screen of the current terminal, at least one of the first touch points During the existence period, when the detecting module detects the current text display area When there are at least two touch points, determining two touch points from the at least two touch points as the first selected touch point and the second selected touch point, respectively, and according to the first selected touch point and the second selection The corresponding text content is selected by the touch point in the position information in the text display area.
  • the selecting module is configured to: when detecting that there are two touch points in the current text display area, directly using the two touch points as the first selected touch point and the second selected touch point respectively .
  • the selecting module is configured to: when detecting that there are at least three touch points in the current text display area, determine two touch points from the at least three touch points according to a maximum selection principle of the text content. As the first selected touch point and the second selected touch point, respectively.
  • the embodiment further provides a text processing apparatus, including: a text selection apparatus, an extraction module, and a processing module as described above;
  • the extracting module is configured to: when all touch points disappear, extract text content selected by the text selection device;
  • the processing module is configured to process the text content extracted by the extraction module.
  • the text selection device of the embodiment is dependent on the multi-touch technology, and can support the user to perform a multi-touch operation to select the desired text content.
  • the text selection device of the embodiment can be used by the user to perform a touch operation.
  • Text content; the text selection device of the embodiment simplifies user operations for selecting text content, and improves the efficiency of text content selection and improves user experience.
  • an embodiment of the present invention further provides a terminal, including: a display, a sensor, and a processor.
  • the sensor is configured to: when the display displays text, detect whether there are at least two first touch points located in the text display area of the display on the touch screen of the current display; and presence at the at least one of the first touch points During the period, detecting whether there are at least two touch points in the current text display area;
  • the processor is configured to: after the sensor detects that at least two first touch points in the text display area of the display are present on the touch screen of the current display, during the presence of at least one of the first touch points The sensor detects that at least the current text display area has And two touch points are determined as the first selected touch point and the second selected touch point respectively from the at least two touch points, and according to the first selected touch point and the second selected touch point The location information in the text display area selects the corresponding text content.
  • an embodiment of the present invention further provides a terminal, including: a display, a sensor, and a processor.
  • the sensor is configured to: when the display displays text, detect whether there are at least two first touch points located in the text display area of the display on the touch screen of the current display; and presence at the at least one of the first touch points During the period, detecting whether there are at least two touch points in the current text display area;
  • the processor is configured to: after the sensor detects that at least two first touch points in the text display area of the display are present on the touch screen of the current display, during the presence of at least one of the first touch points When the sensor detects that there are at least two touch points in the current text display area, determining two touch points from the at least two touch points as the first selected touch point and the second selected touch point, respectively. Selecting corresponding text content according to position information of the first selected touch point and the second selected touch point in the text display area, and when all touch points disappear, extracting the selected text content, and performing the extracted text content deal with.
  • an embodiment of the present invention further provides a computer readable storage medium, where computer executable instructions are stored, and the text selection method is implemented when the computer executable instructions are executed.
  • an embodiment of the present invention further provides a computer readable storage medium storing computer executable instructions, the text processing method being implemented when the computer executable instructions are executed.
  • each module/unit in the above embodiment may be implemented in the form of hardware, for example, by implementing an integrated circuit to implement its corresponding function, or may be implemented in the form of a software function module, for example, executing a program stored in the memory by a processor. / instruction to achieve its corresponding function.
  • the invention is not limited to any specific form of combination of hardware and software.
  • the embodiment of the invention provides a text selection method and device, a text processing method and a device, and can support a user to perform a multi-touch operation based on the multi-touch technology. After triggering the selected text, the user can select the user by one touch operation.
  • the required text content simplifies the user operation of text content selection, and improves the efficiency of text content selection and enhances the user experience.

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)

Abstract

一种文本选取方法,包括:在终端显示文本时,检测当前所述终端的触摸屏上是否有至少两个位于终端的文本显示区域内的第一触摸点;若有,则在至少一个所述第一触摸点存在的期间内,在检测到当前所述文本显示区域内有至少两个触摸点时,从所述至少两个触摸点中确定两个触摸点分别作为第一选取触摸点和第二选取触摸点;根据所述第一选取触摸点和第二选取触摸点在所述文本显示区域内的位置信息选中对应的文本内容。该文本选取方法能够解决采用目前文本选取方法选取文本内容存在的用户操作比较繁琐和用户体验较差的技术问题。

Description

文本选取方法和装置、文本处理方法和装置 技术领域
本申请涉及但不限于终端技术领域,尤其涉及一种文本选取方法和装置、文本处理方法和装置。
背景技术
目前在触摸屏设备中,用户对文本的操作往往通过单点触摸操作来完成。在触摸屏设备显示的文本页面中,如果用户需要去选中和复制大量的文本内容,往往面临着繁琐的操作。现有文本选取和复制技术通常是:通过长按等方式,触发两个游标,分别代表段首和段尾,用户需要分别移动两个游标,去确定选择的文本范围,然后通过二级菜单来选择复制等操作。同时,如果用户想同时选择离散的多段文字,则只能逐个依次进行选择、复制、粘贴,操作繁琐,且依赖于单点触摸。
由此可见,采用现有文本选取方法选取文本内容存在用户操作比较繁琐、用户体验较差的问题。
发明内容
以下是对本文详细描述的主题的概述。本概述并非是为了限制权利要求的保护范围。
本发明实施例提供一种文本选取方法和装置、文本处理方法和装置,能够解决采用目前文本选取方法选取文本内容存在的用户操作比较繁琐和用户体验较差的技术问题。
本发明实施例提供一种文本选取方法,包括如下步骤:
在终端显示文本时,检测当前所述终端的触摸屏上是否有至少两个位于终端的文本显示区域内的第一触摸点;
若有,则在至少一个所述第一触摸点存在的期间内,当检测到当前所述文本显示区域内有至少两个触摸点时,从所述至少两个触摸点中确定两个触 摸点分别作为第一选取触摸点和第二选取触摸点;
根据所述第一选取触摸点和第二选取触摸点在所述文本显示区域内的位置信息选中对应的文本内容。
可选地,当检测到当前所述文本显示区域内有两个触摸点时,所述从所述至少两个触摸点中确定两个触摸点分别作为第一选取触摸点和第二选取触摸点的步骤包括:
直接将所述两个触摸点分别作为第一选取触摸点和第二选取触摸点。
可选地,所述两个触摸点包括:两个第一触摸点,或者一个第一触摸点和一个新增的第二触摸点。
可选地,当检测到当前所述文本显示区域内有至少三个触摸点时,所述从所述至少两个触摸点中确定两个触摸点分别作为第一选取触摸点和第二选取触摸点的步骤包括:
根据文本内容选取最多原则从所述至少三个触摸点中确定两个触摸点分别作为第一选取触摸点和第二选取触摸点。
可选地,所述两个触摸点包括:两个第一触摸点、或者一个第一触摸点和一个新增的第二触摸点、或者两个新增的第二触摸点。
可选地,所述根据所述第一选取触摸点和第二选取触摸点在所述文本显示区域内的位置信息选中对应的文本内容的步骤包括:
获取所述第一选取触摸点和所述第二选取触摸点分别在所述文本显示区域内的位置信息;
根据所述第一选取触摸点和所述第二选取触摸点的位置信息获取所述第一选取触摸点和所述第二选取触摸点在所述文本显示区域内的位置关系;
根据所述位置关系选中对应的文本内容。
可选地,所述方法还包括:
当在至少一个新增的触摸点存在的期间内,所有所述第一触摸点消失后,如果检测到在所述文本显示区域内有至少两个触摸点,则从所述至少两个触摸点中确定两个触摸点作为第一选取触摸点和第二选取触摸点;
根据所述第一选取触摸点和第二选取触摸点在所述文本显示区域内的位置信息选中对应的文本内容。
本发明实施例还提供了一种文本处理方法,包括如下步骤:
利用如上所述的文本选取方法选中文本内容;
在所有触摸点消失时,提取选中的文本内容;
对提取的文本内容进行处理。
可选地,所述对提取的文本内容进行处理的步骤包括:
对提取的文本内容进行复制并存储复制的文本内容。
本发明实施例还提供了一种文本选取装置,包括:检测模块和选取模块;
所述检测模块,设置为:在终端显示文本时,检测当前所述终端的触摸屏上是否有至少两个位于终端的文本显示区域内的第一触摸点;以及在至少一个所述第一触摸点存在的期间内,检测当前所述文本显示区域内是否有至少两个触摸点;
所述选取模块,设置为:在所述检测模块检测到当前所述终端的触摸屏上有至少两个位于终端的文本显示区域内的第一触摸点时,则在至少一个所述第一触摸点存在的期间内,当所述检测模块检测到当前所述文本显示区域内有至少两个触摸点时,从所述至少两个触摸点中确定两个触摸点分别作为第一选取触摸点和第二选取触摸点,并根据所述第一选取触摸点和第二选取触摸点在所述文本显示区域内的位置信息选中对应的文本内容。
可选地,所述选取模块是设置为:当检测到当前所述文本显示区域内有两个触摸点时,直接将所述两个触摸点分别作为第一选取触摸点和第二选取触摸点。
可选地,所述选取模块是设置为:当检测到当前所述文本显示区域内有至少三个触摸点时,根据文本内容选取最多原则从所述至少三个触摸点中确定两个触摸点分别作为第一选取触摸点和第二选取触摸点。
本发明实施例还提供了一种文本处理装置,包括:如上所述的文本选取装置、提取模块和处理模块;
所述提取模块设置为:在所有触摸点消失时,提取所述文本选取装置选中的文本内容;
所述处理模块设置为:对所述提取模块提取的文本内容进行处理。
此外,本发明实施例还提供一种终端,包括:显示器、传感器以及处理器,
所述传感器设置为:在显示器显示文本时,检测当前所述显示器的触摸屏上是否有至少两个位于显示器的文本显示区域内的第一触摸点;以及在至少一个所述第一触摸点存在的期间内,检测当前所述文本显示区域内是否有至少两个触摸点;
所述处理器设置为:在所述传感器检测到当前所述显示器的触摸屏上有至少两个位于显示器的文本显示区域内的第一触摸点后,在至少一个所述第一触摸点存在的期间内,所述传感器检测到当前所述文本显示区域内有至少两个触摸点时,从所述至少两个触摸点中确定两个触摸点分别作为第一选取触摸点和第二选取触摸点,并根据所述第一选取触摸点和第二选取触摸点在所述文本显示区域内的位置信息选中对应的文本内容。
此外,本发明实施例还提供一种终端,包括:显示器、传感器以及处理器,
所述传感器设置为:在显示器显示文本时,检测当前所述显示器的触摸屏上是否有至少两个位于显示器的文本显示区域内的第一触摸点;以及在至少一个所述第一触摸点存在的期间内,检测当前所述文本显示区域内是否有至少两个触摸点;
所述处理器设置为:在所述传感器检测到当前所述显示器的触摸屏上有至少两个位于显示器的文本显示区域内的第一触摸点后,在至少一个所述第一触摸点存在的期间内,所述传感器检测到当前所述文本显示区域内有至少两个触摸点时,从所述至少两个触摸点中确定两个触摸点分别作为第一选取触摸点和第二选取触摸点,根据所述第一选取触摸点和第二选取触摸点在所述文本显示区域内的位置信息选中对应的文本内容,并在所有触摸点消失时,提取选中的文本内容,对提取的文本内容进行处理。
此外,本发明实施例还提供一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令被执行时实现上述文本选取方法。
此外,本发明实施例还提供一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令被执行时实现上述文本处理方法。
本发明实施例提供的文本选取方法,在终端显示文本时,检测当前所述终端的触摸屏上是否有至少两个位于终端的文本显示区域内的第一触摸点;若有,则在至少一个所述第一触摸点存在的期间内,在检测到当前所述文本显示区域内有至少两个触摸点时,从所述多个触摸点中确定两个触摸点分别作为第一选取触摸点和第二选取触摸点;根据所述第一选取触摸点和第二选取触摸点在所述文本显示区域内的位置信息选中对应的文本内容。本发明实施例提供的文本选取方法依赖于多点触摸技术,可支持用户进行多点触摸操作,在触发选取文本后,可使用户采用一次触摸操作即可选取所需的文本内容;本发明实施例提供的文本选取方法与现有技术相比,简化了对文本内容选取的用户操作,而且提升了文本内容选取的效率,提升了用户体验。
在阅读并理解了附图和详细描述后,可以明白其他方面。
附图概述
图1为本发明实施例一提供的一种文本选取方法的流程示意图;
图2为本发明实施例二提供的一种文本处理方法的流程示意图;
图3为本发明实施例二提供的一种复制文本内容的示意图;
图4为本发明实施例二提供的另一种复制文本内容的示意图;
图5为本发明实施例三提供的一种文本选取装置的结构示意图;
图6为本发明实施例三提供的一种文本处理装置的结构示意图。
本发明的实施方式
下面通过具体实施方式结合附图对本申请作进一步详细说明。
实施例一
考虑到采用目前文本选取方法选取文本内容存在的用户操作比较繁琐和用户体验较差的技术问题,本实施例提供了一种文本选取方法,如图1所示,包括如下步骤:
步骤101:在终端显示文本时,检测当前所述终端的触摸屏上是否有至少两个位于终端的文本显示区域内的第一触摸点;若有,执行步骤102,若没有,执行步骤104。
可选地,本步骤包括:
在终端显示文本时,当检测到当前所述终端的触摸屏上有至少两个第一触摸点时,获取所述至少两个第一触摸点在触摸屏上的位置信息和当前终端的文本显示区域在触摸屏上的位置信息;例如获取第一触摸点在触摸屏上的坐标信息和文本显示区域在触摸屏上的坐标信息;
根据第一触摸点的位置信息和文本显示区域的位置信息判断所述至少两个第一触摸点是否在所述文本显示区域内,
若是,则判定有至少两个位于终端的文本显示区域内的第一触摸点。
本实施例在检测到当前所述终端的触摸屏上有至少两个位于终端的文本显示区域内的第一触摸点时,触发终端执行文本选取功能,即终端进入文本选取模式。
于本实施例中,触摸点可以通过点击或者按压触摸屏的方式形成。
步骤102:在至少一个所述第一触摸点存在的期间内,当检测到当前所述文本显示区域内有至少两个触摸点时,从所述至少两个触摸点中确定两个触摸点分别作为第一选取触摸点和第二选取触摸点。
本步骤是在用户触发了终端执行文本选取功能之后进行的文字内容选取过程。于本实施例中,第一选取触摸点和第二选取触摸点可以在显示一个页面的文本显示区域内,也可以在显示多个不同页面的文本显示区域内。
可选地,当检测到当前所述文本显示区域内有两个触摸点时,本步骤包括:
直接将所述两个触摸点分别作为第一选取触摸点和第二选取触摸点。
在实际应用中,于本实施例中,当前文本显示区域内的两个触摸点可以 包括:两个第一触摸点,或者一个第一触摸点和一个新增的第二触摸点。
例如,用户通过点击或按压触摸屏的方式形成两个位于文本显示区域内的触摸点A、触摸点B,触发终端进入文本选取模式;其中,触摸点A和触摸点B分别位于用户想要选取的文本内容的起始端和结束端,此时,终端会检测到触摸屏上存在两个触摸点(触摸点A、B),然后,终端将触摸点A作为第一选取触摸点,将触摸点B作为第二选取触摸点。
又例如,用户通过点击触摸屏的方式形成三个位于文本显示区域内的触摸点A、触摸点B、触摸点C,触发终端进入文本选取模式;之后,若用户取消触摸点C,分别移动触摸点A和触摸点B至想要选取的文本内容的两端,例如,将触摸点A移动至所需选取文本内容的起始端,将触摸点B移动至所需选取文本内容的结束端;此时,终端检测到触摸屏上存在两个触摸点(触摸点A、B),然后,终端将触摸点A作为第一选取触摸点,将触摸点B作为第二选取触摸点。
可选地,当检测到当前所述文本显示区域内有至少三个触摸点时,本步骤包括:
根据文本内容选取最多原则从所述至少三个触摸点中确定两个触摸点分别作为第一选取触摸点和第二选取触摸点。
在本实施例中,文本内容选取最多原则指的是:选取的两个触摸点之间的文本内容比其他任意两个触摸点之间的文本内容多。
在实际应用中,可以根据每个触摸点在触摸屏上的位置信息来确定哪两个触摸点之间的文本内容最多;例如,可以获取每个触摸点在触摸屏上的坐标(X、Y),然后选择Y值最大和最小的触摸点,若Y值最大的触摸点有一个、Y值最小的触摸点有一个,此时,即可将Y值最大和最小的两个触摸点分别作为第一选取触摸点和第二选取触摸点;若Y值最大的触摸点有多个和/或Y值最小的触摸点有多个,此时,需要比较Y值最大的多个触摸点的X值和/或比较Y值最小的多个触摸点的X值,根据比较结果从Y值最大的多个触摸点中确定第一选取触摸点,根据比较结果从Y值最小的多个触摸点中确定第二选取触摸点。
另外,在实际应用中,还可以根据每个触摸点在文本的位置信息来确定哪两个触摸点之间的文本内容最多。例如,在显示纯文本内容时,获取每个触摸点在文本内容中的行数和所处行的字符位置,然后,根据每个触摸点在文本内容中的行数和所处行的字符位置来确定哪两个触摸点之间的文本内容最多。
应当理解的是,本实施例还可以采用其他方式来实现文本内容选取原则,即确定哪个两个触摸点之间的文本内容最多。
在本实施例中,从至少三个触摸点中确定的两个触摸点可以包括:两个第一触摸点、或者一个第一触摸点和一个新增的第二触摸点、或者两个新增的第二触摸点。
下面对从至少三个触摸点中确定的两个触摸点的不同情况进行举例说明:
(一)两个新增的第二触摸点;例如,用户通过点击或按压触摸屏的方式形成两个位于文本显示区域内的触摸点A、触摸点B,触发终端进入文本选取模式;此时,触摸点A和触摸点B之间的文本内容不是用户想要选取的内容;之后,用户会保持触摸点A不变,取消触摸点B,在触摸屏上增加触摸点D和E,其中,触摸点D和E分别位于用户想要选取的文本内容的两端,且触摸点D和E之间的文本内容最多,此时,终端会检测到文本显示区域内有触摸点A、D、E,由于触摸点D和E之间的文本内容最多,终端会将触摸点D和E分别作为第一选取触摸点和第二选取触摸点。
(二)一个第一触摸点和一个新增的第二触摸点;例如,用户通过点击或按压触摸屏的方式形成两个位于文本显示区域内的触摸点A、触摸点B,触发终端进入文本选取模式;此时,触摸点A位于用户想要选取的文本内容的起始端,触摸点B位于用户想要选取的文本内容的中间位置(触摸点B不在用户想要选取的文本内容的结束端);之后,用户可以保持触摸点A和B不变,在用户想要选取的文本内容的结束端增加一个触摸点C;此时,终端将检测到有三个触摸点(触摸点A、B、C),由于触摸点A和触摸点C之间的文本内容最多,终端会将触摸点A作为第一选取触摸点,将触摸点C作为第二选取触摸点。
(三)两个第一触摸点;例如,用户通过点击或按压触摸屏的方式形成两个位于文本显示区域内的触摸点A、触摸点B,触发终端进入文本选取模式;其中,触摸点A和触摸点B分别位于用户想要选取的文本内容的起始端和结束端,此时,终端会检测到触摸屏上存在两个触摸点(触摸点A、B),然后,终端将触摸点A作为第一选取触摸点,将触摸点B作为第二选取触摸点。
又例如,用户通过点击或按压触摸屏的方式形成三个位于文本显示区域内的触摸点A、触摸点B、触摸点C,触发终端进入文本选取模式;其中,触摸点A位于用户想要选取的文本内容的起始端,触摸点B位于用户想要选取的文本内容的中间位置,触摸点C位于用户想要选取的文本内容的结束端;此时,用户保持触摸点A、B、C不变,终端检测到在文本显示区域内有三个触摸点,且触摸点A与触摸点C之间的文本内容最多,终端就会将触摸点A作为第一选取触摸点,将触摸点C作为第二选取触摸点。
步骤103:根据所述第一选取触摸点和第二选取触摸点在所述文本显示区域内的位置信息选中对应的文本内容。
可选地,本步骤包括:
获取所述第一选取触摸点和所述第二选取触摸点分别在所述文本显示区域内的位置信息;
根据所述第一选取触摸点和所述第二选取触摸点的位置信息获取所述第一选取触摸点和所述第二选取触摸点在所述文本显示区域内的位置关系;
根据所述位置关系选中对应的文本内容。
例如,确定触摸点A为第一选取触摸点、触摸点B为第二选取触摸点后,获取触摸点A在文本显示区域内的坐标La、触摸点B在文本显示区域内的坐标Lb,然后,根据La和Lb计算触摸点A和B在文本显示区域内的位置关系,最后根据位置关系选中对应的文本内容,例如,选中触摸点A和B之间所有的文本内容。
可选地,在本实施例中,根据第一选取触摸点和第二选取触摸点的位置关系建立一文本选择框,选中位于文本选择框内的全部文本内容。
在本实施例中,根据位置关系选中对应的文本内容,可以为选中第一选取触摸点和第二选取触摸点之间的所有文本内容或者部分文本内容。
步骤104:不做任何处理。
本实施例的文本选取方法依赖于多点触摸技术,可支持用户进行多点触摸操作选取文本内容;在触发选取文本后,可使用户采用一次触摸操作即可选取所需的文本内容;本实施例的文本选取方法与现有技术相比,简化了对文本内容选取的用户操作,而且提升了文本内容选取的效率,提升了用户体验。
下面以两个触摸点为例来介绍文本内容选取的过程。
例如,用户通过点击触摸屏的方式形成两个位于文本显示区域内的触摸点A、触摸点B;
用户在文本显示区域内分别或者同时滑动触摸点A和B选取所需的文本内容;
或者,用户保持触摸点A不变,滑动触摸点B选取所需的文本内容;
或者,用户保持触摸点A不变,撤销触摸点B,然后新增一个触摸点C或E来选取所需的文本内容。
又例如,用户通过点击触摸屏的方式形成三个位于文本显示区域内的触摸点A、触摸点B、触摸点C;
用户保持触摸点A、B不变,通过滑动触摸点C来选取文本内容,此时,终端根据文本选取最多原则确定触摸点A、C为第一选取触摸点和第二选取触摸点,然后,根据触摸点A、C在文本显示区域内的位置信息选中对应的文本内容,例如,选中触摸点A和C之间的所有文本内容;
或者,用户保持触摸点A和B不变,撤销触摸点C、增加新的触摸点D来选取文本内容,此时,终端根据文本选取最多原则确定触摸点A、D为第一选取触摸点和第二选取触摸点,然后,根据触摸点A、D在文本显示区域内的位置信息选中对应的文本内容,例如,选中触摸点A和D之间的所有文本内容;
或者,用户保持触摸点A不变,撤销触摸点B和C,增加新的触摸点D 和E来选取文本内容,此时,终端根据文本选取最多原则确定触摸点D、E为第一选取触摸点和第二选取触摸点,然后,根据触摸点D、E在文本显示区域内的位置信息选中对应的文本内容,例如,选中触摸点D和E之间的所有文本内容。
可选地,为了进一步方便用户选取文本提升用户体验,本实施例提供的方法在上述基础上还包括:
在至少一个新增的触摸点存在的期间内,当所有所述第一触摸点消失后,如果检测到在所述文本显示区域内有至少两个触摸点,则从所述至少两个触摸点中确定两个触摸点作为第一选取触摸点和第二选取触摸点;
根据所述第一选取触摸点和第二选取触摸点在所述文本显示区域内的位置信息选中对应的文本内容。
本实施例提供的方法可以在至少一个新增的触摸点存在的期间内,且所有第一触摸点消失的情况下,例如终端检测到存在至少一个新增的触摸点,且用户撤掉所有形成第一触摸点的按压,那么终端在至少一个新增的触摸点存在的期间内,检测在文本显示区域内是否有至少两个触摸点,若有,则从所述至少两个触摸点中确定两个触摸点作为第一选取触摸点和第二选取触摸点,根据所述第一选取触摸点和第二选取触摸点在所述文本显示区域内的位置信息选中对应的文本内容。
同样地,在本实施例中,在至少一个新增的触摸点存在的期间内,且所有第一触摸点消失的情况下,如果检测到有两个触摸点,则直接将这两个触摸点作为第一选取触摸点和第二选取触摸点;
如果检测到有至少三个触摸点,则根据文本内容选取最多原则从至少三个触摸点中确定两个触摸点分别作为第一选取触摸点和第二选取触摸点。
在至少一个新增的触摸点存在的期间内,且所有第一触摸点消失的情况下,在本实施例中,从所述至少两个触摸点中确定的两个触摸点可以包括:两个新增的第三触摸点、或者一个新增的第三触摸点和一个之前新增的第二触摸点、或者两个之前新增的第二触摸点。
在至少一个新增的触摸点存在的期间内,且所有第一触摸点消失的情况 下,本实施例可以根据文本内容选取最多原则从所述至少三个触摸点中确定两个触摸点分别作为第一选取触摸点和第二选取触摸点。具体内容可参考上述对文本内容选取最多原则的描述。
下面以三个触摸点为例来介绍文本内容选取的过程。
例如,用户通过点击触摸屏的方式形成三个位于文本显示区域内的触摸点A、触摸点B、触摸点C;
此时,触摸点A位于用户想要选取的文本内容的起始端、触摸点B位于用户想要选取的文本内容的中间位置、触摸点C位于用户想要选取的文本内容的结束端;此时,终端将检测到有三个触摸点,由于触摸点A和触摸点C之间的文本内容最多,终端会将触摸点A作为第一选取触摸点、将触摸点C作为第二选取触摸点;然后,选中触摸点A和C之间的文本内容;之后,用户可以新增一个触摸点D位于再次想要选取的文本内容的起始端,保持触摸点D不变,且撤销触摸点A、C;在再次想要选取的文本内容的结束端增加一个触摸点E来选取所需的文本内容,此时,终端检测到有两个触摸点(触摸点D、E),直接将触摸点D和触摸点E分别作为第一选取触摸点和第二选取触摸点,选中触摸点D和触摸点E之间的文本内容。
又例如,触摸点A位于用户想要选取的文本内容的起始端、触摸点B和C位于用户想要选取的文本内容的中间位置;用户可以保持触摸点A不变,在用户想要选取的文本内容的结束端增加一个新触摸点D,由于触摸点A和触摸点D之间的文本内容最多,终端会将触摸点A作为第一选取触摸点、将触摸点D作为第二选取触摸点;然后,选中触摸点A和D之间的文本内容;之后,用户可以保持触摸点D不变,撤销触摸点A,在再次想要选取的文本内容的起始端和结束端分别增加一个触摸点E和F,由于触摸点E和触摸点F之间的文本内容最多,终端会将触摸点E作为第一选取触摸点、将触摸点F作为第二选取触摸点;然后,选中触摸点E和F之间的文本内容。
本实施例方法可以在第一触摸点消失后,继续使用户采用多点触摸操作来选取所需的内容,无需再次触发文本选取模式,提升了文本选取的效率和用户体验。
实施例二
如图2所示,本实施例提供了一种文本处理方法,包括如下步骤:
步骤201:利用实施例一所述的文本选取方法选中文本内容。
例如,选中两个第一触摸点之间的文字内容,或者选中第一触摸点和新增第二触摸点之间的文字内容等。
步骤202:在所有触摸点消失时,提取选中的文本内容。
例如,在所有第一触摸点和第二触摸点消失时,提取选中的文本,或者,在所有第一触摸点、第二触摸点和第三触摸点消失时,提取选中的文本。
可选地,在本实施例中,在所有触摸点消失后预定时间内若没有检测到新增的触摸点,则提取选中的文本内容。
步骤203:对提取的文本内容进行处理。
可选地,对提取的文本内容进行复制并存储复制的文本内容。当然还可以对提取的文本内容进行其他操作。
下面以对文本选取复制为例来介绍本实施例的处理方法。
如图3所示,当前屏幕中存在一文本显示区域S300,用户需要去复制整段文本里面的字符串“BBB……B”,即所有的B;
第一步:如图3所示,终端检测到当前屏幕中同时存在多个触摸点,其中,触摸点A在位置S301处、触摸点B在位置S302处;
第二步:终端判断两个触摸点是否均落在文本显示区域内,若是,则执行步骤下一步;
第三步:如图3所示,用户在屏幕上操作使触摸点A和触摸点B分别在屏幕滑动,将触摸点A滑动到S303,将触摸点B滑动到S304;此时,在触摸点A和B存在的期间内,终端检测到在文本显示区域内有触摸点A和触摸点B;
由于此时在文本显示区域内仅有两个触摸点,终端直接将触摸点A作为第一选取触摸点、将触摸点B作为第二选取触摸点。此时,触摸点A位于需要选取的字符串的开头,触摸点B位于需要选取的字符串的结尾。
第四步:终端获取触摸点A和B分别在文本显示区域内的坐标LA和LB。
第五步:终端计算坐标LA和LB获取触摸点A和B在文本显示区域内的位置关系。
第六步:根据位置关系标记触摸点A和B之间的所有文本内容,即所有的字符B。
第七步:在触摸点A和触摸点B消失后,终端提取并复制标记的字符串“BBB……B”,并保存在缓存中。
下面结合如图4来具体描述本实施例的文本处理方法。
当前屏幕中存在一文本显示区域S400,用户需要去复制整段文本里面的字符串;
第一步:如图4所示,终端检测到当前屏幕中同时存在多个触摸点,其中,触摸点A在位置S401处、触摸点B在位置S402处;终端标记触摸点A坐标La,以及触摸点B首次出现坐标Lb1。
第二步:保持触摸点A在位置S401处不变,用户可使触摸点B在文本显示区域中不断变化的位置S403、S404、S405等等,以便选取想要的文本内容;终端将会记录触摸点B最后一次出现在文本显示区域的位置S405的坐标Lbn,终端标记坐标La和坐标Lbn之间的所有文本;
第三步:在触摸点A和B在触摸屏上消失时,终端提取La和Lbn之间的所有文本,复制并保存到缓存中。
实施例三
如图5所示,本实施例提供了一种文本选取装置,包括:检测模块和选取模块;
所述检测模块,设置为:在终端显示文本时,检测当前所述终端的触摸屏上是否有至少两个位于终端的文本显示区域内的第一触摸点;以及在至少一个所述第一触摸点存在的期间内,检测当前所述文本显示区域内是否有至少两个触摸点;
所述选取模块,设置为:在所述检测模块检测到当前所述终端的触摸屏上有至少两个位于终端的文本显示区域内的第一触摸点时,则在至少一个所述第一触摸点存在的期间内,当所述检测模块检测到当前所述文本显示区域 内有至少两个触摸点时,从所述至少两个触摸点中确定两个触摸点分别作为第一选取触摸点和第二选取触摸点,并根据所述第一选取触摸点和第二选取触摸点在所述文本显示区域内的位置信息选中对应的文本内容。
可选地,所述选取模块是设置为:当检测到当前所述文本显示区域内有两个触摸点时,直接将所述两个触摸点分别作为第一选取触摸点和第二选取触摸点。
可选地,所述选取模块是设置为:当检测到当前所述文本显示区域内有至少三个触摸点时,根据文本内容选取最多原则从所述至少三个触摸点中确定两个触摸点分别作为第一选取触摸点和第二选取触摸点。
如图6所示,本实施例还提供了一种文本处理装置,包括:如上所述的文本选取装置、提取模块和处理模块;
所述提取模块,设置为:在所有触摸点消失时,提取所述文本选取装置选中的文本内容;
所述处理模块,设置为对所述提取模块提取的文本内容进行处理。
本实施例的文本选取装置依赖于多点触摸技术,可支持用户进行多点触摸操作来选取所需的文本内容;应用本实施例的文本选取装置可以供用户进行一次触摸操作即可选取所需文本内容;本实施例的文本选取装置简化了对文本内容选取的用户操作,而且提升了文本内容选取的效率,提升了用户体验。
此外,本发明实施例还提供一种终端,包括:显示器、传感器以及处理器,
所述传感器设置为:在显示器显示文本时,检测当前所述显示器的触摸屏上是否有至少两个位于显示器的文本显示区域内的第一触摸点;以及在至少一个所述第一触摸点存在的期间内,检测当前所述文本显示区域内是否有至少两个触摸点;
所述处理器设置为:在所述传感器检测到当前所述显示器的触摸屏上有至少两个位于显示器的文本显示区域内的第一触摸点后,在至少一个所述第一触摸点存在的期间内,所述传感器检测到当前所述文本显示区域内有至少 两个触摸点时,从所述至少两个触摸点中确定两个触摸点分别作为第一选取触摸点和第二选取触摸点,并根据所述第一选取触摸点和第二选取触摸点在所述文本显示区域内的位置信息选中对应的文本内容。
此外,本发明实施例还提供一种终端,包括:显示器、传感器以及处理器,
所述传感器设置为:在显示器显示文本时,检测当前所述显示器的触摸屏上是否有至少两个位于显示器的文本显示区域内的第一触摸点;以及在至少一个所述第一触摸点存在的期间内,检测当前所述文本显示区域内是否有至少两个触摸点;
所述处理器设置为:在所述传感器检测到当前所述显示器的触摸屏上有至少两个位于显示器的文本显示区域内的第一触摸点后,在至少一个所述第一触摸点存在的期间内,所述传感器检测到当前所述文本显示区域内有至少两个触摸点时,从所述至少两个触摸点中确定两个触摸点分别作为第一选取触摸点和第二选取触摸点,根据所述第一选取触摸点和第二选取触摸点在所述文本显示区域内的位置信息选中对应的文本内容,并在所有触摸点消失时,提取选中的文本内容,对提取的文本内容进行处理。
此外,本发明实施例还提供一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令被执行时实现上述文本选取方法。
此外,本发明实施例还提供一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令被执行时实现上述文本处理方法。
本领域普通技术人员可以理解上述方法中的全部或部分步骤可通过程序来指令相关硬件(例如处理器)完成,所述程序可以存储于计算机可读存储介质中,如只读存储器、磁盘或光盘等。可选地,上述实施例的全部或部分步骤也可以使用一个或多个集成电路来实现。相应地,上述实施例中的各模块/单元可以采用硬件的形式实现,例如通过集成电路来实现其相应功能,也可以采用软件功能模块的形式实现,例如通过处理器执行存储于存储器中的程序/指令来实现其相应功能。本发明不限制于任何特定形式的硬件和软件的结合。
以上内容是结合具体的实施方式对本申请所作的进一步详细说明,不能认定本申请的具体实施只局限于这些说明。对于本申请所属技术领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干简单推演或替换,都应当视为属于本申请的保护范围。
工业实用性
本发明实施例提供一种文本选取方法和装置、文本处理方法和装置,基于多点触摸技术,可支持用户进行多点触摸操作,在触发选取文本后,通过用户的一次触摸操作即可选取所需的文本内容,从而简化了对文本内容选取的用户操作,而且提升了文本内容选取的效率,提升了用户体验。

Claims (15)

  1. 一种文本选取方法,包括如下步骤:
    在终端显示文本时,检测当前所述终端的触摸屏上是否有至少两个位于终端的文本显示区域内的第一触摸点;
    若有,则在至少一个所述第一触摸点存在的期间内,当检测到当前所述文本显示区域内有至少两个触摸点时,从所述至少两个触摸点中确定两个触摸点分别作为第一选取触摸点和第二选取触摸点;
    根据所述第一选取触摸点和第二选取触摸点在所述文本显示区域内的位置信息选中对应的文本内容。
  2. 如权利要求1所述的文本选取方法,其中,当检测到当前所述文本显示区域内有两个触摸点时,所述从所述至少两个触摸点中确定两个触摸点分别作为第一选取触摸点和第二选取触摸点的步骤包括:
    直接将所述两个触摸点分别作为第一选取触摸点和第二选取触摸点。
  3. 如权利要求2所述的文本选取方法,其中,所述两个触摸点包括:两个第一触摸点,或者一个第一触摸点和一个新增的第二触摸点。
  4. 如权利要求1所述的文本选取方法,其中,当检测到当前所述文本显示区域内有至少三个触摸点时,所述从所述至少两个触摸点中确定两个触摸点分别作为第一选取触摸点和第二选取触摸点的步骤包括:
    根据文本内容选取最多原则从所述至少三个触摸点中确定两个触摸点分别作为第一选取触摸点和第二选取触摸点。
  5. 如权利要求4所述的文本选取方法,其中,所述两个触摸点包括:两个第一触摸点、或者一个第一触摸点和一个新增的第二触摸点、或者两个新增的第二触摸点。
  6. 如权利要求1-5任一项所述的文本选取方法,其中,所述根据所述第一选取触摸点和第二选取触摸点在所述文本显示区域内的位置信息选中对应的文本内容的步骤包括:
    获取所述第一选取触摸点和所述第二选取触摸点分别在所述文本显示区 域内的位置信息;
    根据所述第一选取触摸点和所述第二选取触摸点的位置信息获取所述第一选取触摸点和所述第二选取触摸点在所述文本显示区域内的位置关系;
    根据所述位置关系选中对应的文本内容。
  7. 如权利要求1-5任一项所述的文本选取方法,所述方法还包括:
    当在至少一个新增的触摸点存在的期间内,所有所述第一触摸点消失后,如果检测到在所述文本显示区域内有至少两个触摸点,则从所述至少两个触摸点中确定两个触摸点作为第一选取触摸点和第二选取触摸点;
    根据所述第一选取触摸点和第二选取触摸点在所述文本显示区域内的位置信息选中对应的文本内容。
  8. 一种文本处理方法,包括如下步骤:
    利用如权利要求1-7任一项所述的文本选取方法选中文本内容;
    在所有触摸点消失时,提取选中的文本内容;
    对提取的文本内容进行处理。
  9. 如权利要求8所述的方法,其中,所述对提取的文本内容进行处理的步骤包括:
    对提取的文本内容进行复制并存储复制的文本内容。
  10. 一种文本选取装置,包括:检测模块和选取模块;
    所述检测模块,设置为:在终端显示文本时,检测当前所述终端的触摸屏上是否有至少两个位于终端的文本显示区域内的第一触摸点;以及在至少一个所述第一触摸点存在的期间内,检测当前所述文本显示区域内是否有至少两个触摸点;
    所述选取模块,设置为:在所述检测模块检测到当前所述终端的触摸屏上有至少两个位于终端的文本显示区域内的第一触摸点时,则在至少一个所述第一触摸点存在的期间内,当所述检测模块检测到当前所述文本显示区域内有至少两个触摸点时,从所述至少两个触摸点中确定两个触摸点分别作为第一选取触摸点和第二选取触摸点,并根据所述第一选取触摸点和第二选取 触摸点在所述文本显示区域内的位置信息选中对应的文本内容。
  11. 如权利要求10所述的文本选取装置,其中,所述选取模块是设置为:当检测到当前所述文本显示区域内有两个触摸点时,直接将所述两个触摸点分别作为第一选取触摸点和第二选取触摸点。
  12. 如权利要求10所述的文本选取装置,其中,所述选取模块是设置为:当检测到当前所述文本显示区域内有至少三个触摸点时,根据文本内容选取最多原则从所述至少三个触摸点中确定两个触摸点分别作为第一选取触摸点和第二选取触摸点。
  13. 一种文本处理装置,包括:提取模块、处理模块以及如权利要求10-12任一项所述的文本选取装置;
    所述提取模块设置为:在所有触摸点消失时,提取所述文本选取装置选中的文本内容;
    所述处理模块设置为:对所述提取模块提取的文本内容进行处理。
  14. 一种终端,包括:显示器、传感器以及处理器,
    所述传感器设置为:在显示器显示文本时,检测当前所述显示器的触摸屏上是否有至少两个位于显示器的文本显示区域内的第一触摸点;以及在至少一个所述第一触摸点存在的期间内,检测当前所述文本显示区域内是否有至少两个触摸点;
    所述处理器设置为:在所述传感器检测到当前所述显示器的触摸屏上有至少两个位于显示器的文本显示区域内的第一触摸点后,在至少一个所述第一触摸点存在的期间内,所述传感器检测到当前所述文本显示区域内有至少两个触摸点时,从所述至少两个触摸点中确定两个触摸点分别作为第一选取触摸点和第二选取触摸点,并根据所述第一选取触摸点和第二选取触摸点在所述文本显示区域内的位置信息选中对应的文本内容。
  15. 一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令被执行时实现权利要求1-7任一项所述的文本选取方法。
PCT/CN2016/071981 2015-04-29 2016-01-25 文本选取方法和装置、文本处理方法和装置 WO2016173306A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510212024.8 2015-04-29
CN201510212024.8A CN106201293B (zh) 2015-04-29 2015-04-29 文本选取方法和装置、文本处理方法和装置

Publications (1)

Publication Number Publication Date
WO2016173306A1 true WO2016173306A1 (zh) 2016-11-03

Family

ID=57198140

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/071981 WO2016173306A1 (zh) 2015-04-29 2016-01-25 文本选取方法和装置、文本处理方法和装置

Country Status (2)

Country Link
CN (1) CN106201293B (zh)
WO (1) WO2016173306A1 (zh)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107404583A (zh) * 2017-07-30 2017-11-28 安徽云帮邦网络技术有限公司 一种手机文本的复制程序
CN110754073A (zh) * 2017-09-25 2020-02-04 深圳市欢太科技有限公司 内容选取方法、电子设备、存储介质及计算机程序产品
CN110096200B (zh) * 2019-04-09 2020-12-22 网易(杭州)网络有限公司 文本处理方法及装置、存储介质、电子设备
CN110865751A (zh) * 2019-10-09 2020-03-06 上海掌门科技有限公司 一种内容选择方法及电子设备
CN111813295A (zh) * 2020-05-26 2020-10-23 维沃移动通信有限公司 内容选择方法、装置、电子设备及可读存储介质
CN115079913A (zh) * 2021-03-16 2022-09-20 深圳市万普拉斯科技有限公司 文本选取方法、装置、计算机设备和存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101526881A (zh) * 2008-03-04 2009-09-09 苹果公司 使用手势选择文本
CN102362252A (zh) * 2009-03-27 2012-02-22 索尼爱立信移动通讯有限公司 用于基于触摸的文本输入的系统和方法
CN103136180A (zh) * 2013-02-25 2013-06-05 北京极兴莱博信息科技有限公司 一种文段复制粘贴的方法、装置及终端
CN103186345A (zh) * 2013-02-25 2013-07-03 北京极兴莱博信息科技有限公司 一种文段选择方法、字段选择方法、装置及终端
US20130285928A1 (en) * 2012-04-30 2013-10-31 Research In Motion Limited Method and apparatus for text selection

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8873858B2 (en) * 2006-06-29 2014-10-28 Rpx Corporation Apparatus, method, device and computer program product providing enhanced text copy capability with touch input display
CN102033642B (zh) * 2009-09-29 2012-10-10 联想(北京)有限公司 一种手势识别的方法及电子设备
US8786559B2 (en) * 2010-01-06 2014-07-22 Apple Inc. Device, method, and graphical user interface for manipulating tables using multi-contact gestures
WO2012162895A1 (en) * 2011-06-03 2012-12-06 Google Inc. Gestures for selecting text

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101526881A (zh) * 2008-03-04 2009-09-09 苹果公司 使用手势选择文本
CN102362252A (zh) * 2009-03-27 2012-02-22 索尼爱立信移动通讯有限公司 用于基于触摸的文本输入的系统和方法
US20130285928A1 (en) * 2012-04-30 2013-10-31 Research In Motion Limited Method and apparatus for text selection
CN103136180A (zh) * 2013-02-25 2013-06-05 北京极兴莱博信息科技有限公司 一种文段复制粘贴的方法、装置及终端
CN103186345A (zh) * 2013-02-25 2013-07-03 北京极兴莱博信息科技有限公司 一种文段选择方法、字段选择方法、装置及终端

Also Published As

Publication number Publication date
CN106201293A (zh) 2016-12-07
CN106201293B (zh) 2020-06-26

Similar Documents

Publication Publication Date Title
WO2016173306A1 (zh) 文本选取方法和装置、文本处理方法和装置
JP6132644B2 (ja) 情報処理装置、表示制御方法、コンピュータプログラム、及び記憶媒体
WO2016173305A1 (zh) 文本选取方法和装置、文本处理方法和装置
KR20100130671A (ko) 터치 인터페이스에서 선택 영역의 제공 장치 및 그 방법
US9092118B2 (en) Display controller, display control method, and computer-readable storage medium
US9081497B2 (en) Information processing apparatus, information processing method, and program
US10607574B2 (en) Information processing device and information processing method
RU2613739C2 (ru) Способ, устройство и терминальное устройство для управления перемещением интерфейса приложения
JP6448639B2 (ja) テキスト選択方法、装置および端末
US11119622B2 (en) Window expansion method and associated electronic device
US20130246975A1 (en) Gesture group selection
US20170083195A1 (en) Method and apparatus for performing url linkage function using the keypad
US10216401B2 (en) Information processing device and method for multi-touch user interface
JP2011034216A (ja) 選択オブジェクト決定方法、オブジェクトの前後関係の決定方法及びその装置
JPWO2013039023A1 (ja) 電子付箋の書込情報処理装置及び方法
JP6359862B2 (ja) タッチ操作入力装置、タッチ操作入力方法及びプログラム
US9170733B2 (en) Information processing apparatus, information processing method, and non-transitory computer readable medium
US20150185975A1 (en) Information processing device, information processing method, and recording medium
JP5690317B2 (ja) 情報表示装置及び情報表示方法
WO2013184106A1 (en) Method and apparatus for entering symbols from a touch-sensitive screen
JP5620895B2 (ja) 表示制御装置、方法及びプログラム
US9690464B2 (en) Terminal device and method for selecting object
JP6274132B2 (ja) 楽譜表示装置および楽譜表示方法
JP2015022382A (ja) ウェブページ表示装置および方法
CN104156038A (zh) 电子阅读设备

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: 16785737

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: 16785737

Country of ref document: EP

Kind code of ref document: A1