CN112748842A - Text selection method and device - Google Patents

Text selection method and device Download PDF

Info

Publication number
CN112748842A
CN112748842A CN202011620115.2A CN202011620115A CN112748842A CN 112748842 A CN112748842 A CN 112748842A CN 202011620115 A CN202011620115 A CN 202011620115A CN 112748842 A CN112748842 A CN 112748842A
Authority
CN
China
Prior art keywords
text
input
character
display
user
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.)
Pending
Application number
CN202011620115.2A
Other languages
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.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication Co 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 Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN202011620115.2A priority Critical patent/CN112748842A/en
Publication of CN112748842A publication Critical patent/CN112748842A/en
Pending legal-status Critical Current

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/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/04842Selection of displayed objects or displayed text elements
    • 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

Abstract

The invention provides a text selection method and a text selection device. The method comprises the following steps: receiving a first input of a user for a first character on a text display interface; in response to the first input, setting a start mark according to the position of the first character in the displayed text; receiving a second input of the user for a second character; in response to the second input, setting a termination mark according to the position of the second character in the displayed text; selecting a first text according to the starting mark and the ending mark; the first text is the text content from the start mark to the end mark in the display text, the first character is the first character in the target text, and the second character is the last character in the target text. According to the method and the device, the starting mark and the ending mark are arranged in the displayed text, so that the text selection mode is more accurate, the characters are prevented from being selected in an omission mode or in a wrong mode, and the text selection efficiency is improved.

Description

Text selection method and device
Technical Field
The application belongs to the technical field of text processing, and particularly relates to a text selection method and device.
Background
As electronic devices, especially mobile terminals, are popular with users, the applications of the electronic devices are more and more widespread, and more users choose to use the electronic devices to read documents such as office materials and electronic books.
Currently, in the process of reading a document, if operations such as copying, cutting, editing, or annotating certain texts in the document are required, a user needs to select a corresponding text first. The existing text selection method generally includes that a user presses a text display area of a terminal, and after a cursor pops up in the display area, the cursor is moved to select a corresponding text. Thus, the user may miss or mistakenly select the text due to improper operation, which results in low efficiency of text selection.
Disclosure of Invention
The embodiment of the application aims to provide a text selection method and a text selection device, and the technical problem that the existing text selection method is easy to miss or miss, so that the text selection efficiency is low can be solved.
In order to solve the technical problem, the present application is implemented as follows:
in a first aspect, an embodiment of the present application provides a text selection method, including:
receiving a first input of a user for a first character on a text display interface;
setting a start mark according to the position of the first character in the displayed text in response to the first input;
receiving a second input of the user for a second character;
in response to the second input, setting a termination marker according to a position of the second character in the display text;
selecting a first text according to the starting mark and the ending mark;
the first text is the text content from the start mark to the end mark in the display text, the first character is the first-ordered character in the target text, and the second character is the last-ordered character in the target text.
In a second aspect, an embodiment of the present application provides a text selection apparatus, including:
the first receiving module is used for receiving first input of a user for a first character on a text display interface;
a first response module, configured to, in response to the first input, set a start marker according to a position of the first character in a display text;
the second receiving module is used for receiving a second input aiming at a second character from the user;
a second response module, configured to, in response to the second input, set a termination flag according to a position of the second character in the display text;
the selection module is used for selecting a first text according to the starting mark and the ending mark;
the first text is the text content from the start mark to the end mark in the display text, the first character is the first-ordered character in the target text, and the second character is the last-ordered character in the target text.
In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor, a memory, and a program or instructions stored on the memory and executable on the processor, and when executed by the processor, the program or instructions implement the steps of the method according to the first aspect.
In a fourth aspect, embodiments of the present application provide a readable storage medium, on which a program or instructions are stored, which when executed by a processor implement the steps of the method according to the first aspect.
In a fifth aspect, an embodiment of the present application provides a chip, where the chip includes a processor and a communication interface, where the communication interface is coupled to the processor, and the processor is configured to execute a program or instructions to implement the method according to the first aspect.
In the embodiment of the application, a starting mark is set in the display text in response to a first input of a first character by a user; setting a termination flag in the displayed text in response to a second input by the user for a second character; and determining the text content from the start mark to the end mark as the text selected by the user. By setting the starting mark and the ending mark in the displayed text, the text selection mode is more accurate, missed selection or wrong selection of characters is avoided, and the text selection efficiency is improved.
Drawings
Fig. 1 is a flowchart of a text selection method provided in an embodiment of the present application;
FIG. 2 is a schematic diagram of an application scenario for determining a start mark in an embodiment of the present application;
FIG. 3 is a schematic diagram of an application scenario for determining a termination marker in an embodiment of the present application;
fig. 4 is a schematic view of an application scenario of a text selection method according to an embodiment of the present application;
5 a-5 b are schematic diagrams of an application scenario showing an annotation input box in the embodiment of the present application;
FIG. 6 is a schematic diagram of another application scenario for displaying an annotation input box in the embodiment of the present application;
7 a-7 b are schematic diagrams of application scenarios of saving annotations in the embodiment of the present application;
8 a-8 b are schematic diagrams of application scenarios of deleting annotations in the embodiment of the present application;
FIG. 9 is a diagram illustrating an application scenario for displaying target text in an embodiment of the present application;
FIG. 10 is a schematic diagram of another application scenario for displaying target text in the embodiment of the present application;
fig. 11 is a schematic view of another application scenario of the text selection method according to the embodiment of the present application;
FIG. 12 is a diagram illustrating an application scenario for editing text in an embodiment of the present application;
FIG. 13 is a diagram illustrating another application scenario for editing text in an embodiment of the present application;
fig. 14 is a block diagram of a text selection apparatus according to an embodiment of the present application;
fig. 15 is a block diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some, but not all, embodiments of the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terms first, second and the like in the description and in the claims of the present application are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application are capable of operation in sequences other than those illustrated or described herein. In addition, "and/or" in the specification and claims means at least one of connected objects, a character "/" generally means that a preceding and succeeding related objects are in an "or" relationship.
The text selection method provided by the embodiment of the present application is described in detail below with reference to the accompanying drawings through specific embodiments and application scenarios thereof.
Referring to fig. 1, fig. 1 is a flowchart of a text selection method according to an embodiment of the present application. The text selection method provided by the embodiment of the application comprises the following steps:
s101, receiving a first input aiming at a first character by a user on a text display interface.
In this embodiment, a first input of a user for a first character is received on a display interface of a text, where the first input may be a touch input, an operation gesture, or a combination of the operation gesture and the touch input, and is not limited specifically herein. The first character may be a letter, or a symbol, and the embodiment is not particularly limited herein.
And S102, responding to the first input, and setting a starting mark according to the position of the first character in the displayed text.
In response to the first input, an alternative embodiment is to set a start marker between the first character and a character preceding the first character; in another alternative embodiment, a start marker is set between the first character and a character subsequent to the first character. The start mark may be an anchor cursor or other mark capable of serving as an identifier.
S103, receiving a second input of the user for a second character.
Receiving a second input of the user for the second character on the display interface of the text, where the second input may be a touch input, an operation gesture, or a combination of the operation gesture and the touch input, and is not limited specifically herein. The second character may be a letter, or a symbol, and the embodiment is not particularly limited herein.
And S104, responding to the second input, and setting a termination mark according to the position of the second character in the display text.
In response to the second input, an alternative embodiment is to set a termination flag between the second character and a character preceding the second character; in another alternative embodiment, a termination flag is set between the second character and a character subsequent to the second character. The end mark may be the same mark as the start mark or a mark different from the start mark.
And S105, selecting a first text according to the starting mark and the ending mark.
And determining the text content from the start mark to the end mark in the display text as a first text, wherein the first character is the first-ranked character in the first text, and the second character is the last-ranked character in the first text.
In the embodiment of the application, a starting mark is set in the display text in response to a first input of a first character by a user; setting a termination flag in the displayed text in response to a second input by the user for a second character; and determining the text content from the start mark to the end mark as the text selected by the user. By setting the starting mark and the ending mark in the displayed text, the text selection mode is more accurate, missed selection or wrong selection of characters is avoided, and the text selection efficiency is improved.
Further, the first input includes a first gesture input and a first touch input, and the setting, in response to the first input, a start mark according to a position of the first character in the displayed text includes:
in response to a first gesture input of a user for a first area in a display text, displaying N candidate first characters associated with the first area, wherein N is a positive integer; receiving a first touch input of a user for the candidate first character; in response to the first touch input, determining a first character of the N candidate first characters based on a location of the first touch input; the start mark is set between the first character and a character preceding the first character.
In this embodiment, the first input includes a first gesture input and a first touch input, and optionally, the first gesture input may be an "L" type gesture.
Referring to fig. 2, as shown in fig. 2, an input area of the first gesture input may be defined as a first area, i.e., an area where the user slides in the "L" type gesture in fig. 2. The initial input position of the first gesture input is located before the "next" character of the displayed text, in an alternative embodiment, the number of the candidate first characters is set to 4, and then the "next" character and 3 characters following the "next" character may be determined as the candidate first characters associated with the first region.
It should be noted that, in this embodiment, the number of the candidate first characters may be set to other numerical values, or the "next" character and the 3 characters before the "next" character may be determined as the candidate first characters, and there may be other setting manners for the candidate first characters, and this embodiment is not limited specifically here.
With reference to fig. 2, a first touch input of the user for the candidate first character is received, and the first character is determined. As shown in fig. 2, the position of the first touch input of the user is before the "receive" character, and an optional implementation is to determine the "receive" character in the display text as the first character and set a start mark between the "receive" character and the "receive" character. Another alternative embodiment is to determine that the character preceding the "received" character in the displayed text, i.e. the "next" character, is the first character, and to set a start flag before the "next" character.
After the starting mark is set, the user can execute the sliding operation again by the L-shaped gesture on the text display interface, and reset the starting mark; the user may also undo the start mark by clicking the text display interface three times in a row.
In the embodiment, the user needs to determine the starting mark by using gesture operation and touch operation, and misoperation of text selection is reduced by means of multiple interactions, so that the efficiency of text selection is improved.
Further, the second input includes a second gesture input and a second touch input, and the setting, in response to the second input, a termination mark according to a position of the second character in the text includes:
in response to a second gesture input of a user for a second region in the display text, displaying M candidate second characters associated with the second region, wherein M is a positive integer; receiving a second touch input of the user for the candidate second character; in response to the second touch input, determining a second character of the M candidate second characters based on a location of the second touch input; setting the termination flag between the second character and a character preceding the second character.
In this embodiment, the second input includes a second gesture input and a second touch input, and optionally, the second gesture input may be a reverse "L" type gesture as shown in fig. 3.
Referring to fig. 3, as shown in fig. 3, an input area of the second gesture input may be defined as a second area, i.e., an area where the user slides in the reverse "L" type gesture in fig. 3. The initial input position of the second gesture input is located before the "to" character of the displayed text, in an alternative embodiment, the number of candidate second characters is set to 4, and then the "to" character and 3 characters before the "to" character may be determined as candidate second characters associated with the second region.
It should be noted that, in this embodiment, the number of the candidate second characters may be set to other numerical values, or the "to" character and the 3 characters after the "to" character may be determined as the candidate second characters, and there may be other setting manners for the candidate second characters, and this embodiment is not limited specifically herein.
With reference to fig. 3, a second touch input of the user for the candidate second character is received, and the second character is determined. As shown in fig. 3, after the location of the second touch input by the user is the "middle" character, an optional implementation is to determine that the "middle" character in the display text is the second character, and set a termination flag between the "middle" character and the "character. Another alternative embodiment is to determine that the character next to the "middle" character in the displayed text, i.e. the "character" is the second character, and to set a start flag after the "character".
After the termination mark is set, the user can execute the sliding operation again by the reverse L-shaped gesture on the text display interface to reset the termination mark; the user may also deactivate the termination marker by clicking the text display interface three consecutive times.
In the embodiment, the user needs to determine the termination mark by using gesture operation and touch operation, and misoperation of text selection is reduced by means of multiple interactions, so that the efficiency of text selection is improved.
Further, after the selecting the first text according to the start mark and the end mark, the method further includes:
receiving a third input of the user for the first text, wherein the third input is used for annotating the first text; and responding to the third input, displaying the first text in the first display area, and displaying the annotation input box in the second display area.
Please refer to fig. 4, after the start mark and the end mark are set, the text content covered by the start mark and the end mark is determined as a first text, and the first text is in a selected state. In this case, the font of the first text is set to bold italics, and at the same time, the pop-up window is popped up, and the user can further operate according to the prompt of the pop-up window to copy the text, cut the text, edit the text, or annotate the text.
And taking the comment text clicked in the popup by the user as a third input, responding to the third input, displaying the first text in the first display area, and displaying a comment input box in the second display area, wherein the comment input box can be input by the user aiming at the first text.
In a possible case, please refer to fig. 5a to 5b, in a case that the electronic device applying the text selection method is a single-screen mobile phone, a first display area and a second display area are set on a same display interface of a same display screen.
As shown in fig. 5a, in a state where the electronic device is in a portrait screen, the first display region may be set above the second display region.
As shown in fig. 5b, the first display area may be set to the left of the second display area in a state where the electronic device is in a landscape state.
Another possible situation is that, referring to fig. 6, when the electronic device applying the text selection method is a multi-screen mobile phone, the first display area is set on the display interface of the first display screen, and the second display area is set on the display interface of the second display screen, where the first display screen and the second display screen are located in the same terminal.
Further, in a case that the first display area and the second display area are located on the same display interface of the same display screen, in response to the third input, the first text is displayed in the first display area, and after the annotation input box is displayed in the second display area, the method further includes:
receiving user input for the first display area and the second display area; and responding to the input, and saving or deleting the annotation corresponding to the first text.
Under the condition that a first display area and a second display area are arranged on the same display interface of the same display screen, the annotations corresponding to the first text are saved or deleted according to sliding input of a user aiming at the first display area and the second display area.
Referring to fig. 7 a-7 b, as shown in the figure, the electronic device is in the landscape state, and the first display area is disposed on the left side of the second display area. If the user performs a sliding input from the first display area to the second display area, where the sliding input may be that the user slides from the first display area to the second display area using three fingers, the annotation corresponding to the first text is saved, and the annotation state of the first text is closed, that is, only the first text is displayed in the display interface.
Referring to fig. 8 a-8 b, as shown in the figure, the electronic device is in the landscape state, and the first display area is disposed on the left side of the second display area. If the user executes sliding input from the second display area to the first display area, wherein the sliding input can be that the user slides from the second display area to the first display area by using three fingers, deleting the annotation corresponding to the first text, popping a popup window corresponding to the popup window, prompting the user whether to determine to delete the annotation, and if the user clicks 'yes' in the popup window, deleting the annotation and closing the annotation state of the first text; and if the user clicks 'no' in the popup window, the annotation is not deleted, and the first text is displayed in the display interface.
In the embodiment, the user only executes one operation, so that the aim of storing or deleting the annotations corresponding to the first text is fulfilled, and the convenience of text processing is improved.
Further, the text display interface includes K second texts arranged according to a preset order, where K is a positive integer, the K second texts include the first text, and each of the second texts includes a corresponding annotation, and after the third input is responded, the first text is displayed in the first display area, and the annotation input box is displayed in the second display area, the method further includes:
receiving a fourth input of a user for the second display area; and responding to the fourth input, and displaying the annotation corresponding to the target text in the second display area.
The text display interface comprises a plurality of second texts which are arranged according to a preset sequence, and the first texts also belong to the second texts. The second text is an annotated text in the same text file, and the preset sequence may be ordered according to annotation creation time of the second text or ordered according to a position of the second text in the text file.
The fourth input may be a sliding input, and an optional implementation manner is that, in a case that the fourth input is a sliding input pointing from the second display area to the first display area, one of the plurality of second texts that is located after the first text is determined as a target text, and an annotation corresponding to the target text is displayed in the second display area.
Referring to fig. 9, as shown in the figure, the electronic device shown in the figure is a multi-screen mobile phone, the first display area is located on the display interface of the first display screen, and the second display area is located on the display interface of the second display screen. And under the condition that the target text is the last text in the plurality of second texts, displaying a reminding message of 'annotating to the end, namely skipping to the application C' in the second display area, and if the user performs a sliding operation from the second display area to the first display area, exiting the current application and skipping to the application C.
Another optional embodiment is that, in a case that the fourth input is a slide input pointing from the first display area to the second display area, one of the plurality of second texts that is located before the first text is determined as a target text, and an annotation corresponding to the target text is displayed in the second display area.
Referring to fig. 10, as shown in the figure, the electronic device shown in the figure is a multi-screen mobile phone, the first display area is located on the display interface of the first display screen, and the second display area is located on the display interface of the second display screen. And under the condition that the target text is the first text in the plurality of second texts, displaying a reminding message of 'annotating to the head, namely skipping to the application A' in the second display area, and if the user performs a sliding operation from the first display area to the second display area, exiting the current application and skipping to the application A.
In the embodiment, the user can check other annotations of the same text file through one-time sliding operation, so that the convenience of text processing is improved.
It should be noted that, when a user browses a text file, a touch operation may be performed on a certain text, and if the text is a second text, that is, the text is an annotated text in the text file, a font of the text is set to be a bold italic font, and a start mark and an end mark of the text are displayed.
Referring to fig. 11, as described above, the user performs a touch operation on a certain text, and when the text is the second text, the user may perform a sliding operation in any direction, as shown in the figure, when the user performs the sliding operation below the display interface, a second display area is displayed below the display interface, and the annotation content or the annotation input box corresponding to the text is displayed in the second display area.
Further, after the selecting the first text according to the start mark and the end mark, the method further includes:
receiving a fifth input of the user for the first text, wherein the fifth input is used for editing the first text; responding to the fifth input, and displaying L texts to be edited, wherein L is a positive integer, and the L texts to be edited comprise the first text and an edited text; receiving editing input of a user for H texts to be edited, wherein the H texts to be edited comprise the first text and/or at least partial edited texts in the L texts to be edited, and H is a positive integer less than or equal to L; and responding to the editing input, and displaying the text contents of the H texts to be edited on a text editing interface.
It should be noted that, after responding to the input of the user for editing the first text, the text editing state is entered, and a clipboard is displayed, where L texts to be edited are displayed in the clipboard. The display duration of the clipboard can be set, and if the editing input of the user is not received within the display duration, the clipboard is hidden, and the text editing state exits.
The present embodiment will be described below with reference to fig. 12 in the specification.
Referring to fig. 12, in response to a touch input of a user for editing a first text, 2 texts to be edited are displayed, where it should be noted that the texts to be edited include the first text and an edited text.
As shown in the figure, the user may select the first text by means of touch input to edit the first text, and display the first text on the text editing interface.
Optionally, the user may also select the first text and the plurality of texts to be edited by means of touch input, display the first text and the plurality of texts to be edited on the text editing interface, and perform operations such as text splicing and text cutting on the first text and the plurality of texts to be edited.
In the embodiment, a user can select a plurality of texts to be edited through editing input, and the plurality of texts are subjected to text splicing, text cutting and other operations on the text editing interface without returning to the text display interface to select the texts to be edited for multiple times, so that repeated operation of the user is avoided, and the efficiency of text editing is improved.
In addition, in this embodiment, the filter words of the text to be edited can also be filtered.
Referring to FIG. 13, as shown, the filter word may be set to "computer". The filter words may be preset, or may be words input by the user in the corresponding filter word input box. The user may click on the filter button on the display interface, replacing "computer" in the text with ". star".
As shown in fig. 14, the text selection apparatus 200 includes:
a first receiving module 201, configured to receive, at a text display interface, a first input of a first character by a user;
a first response module 202, configured to, in response to the first input, set a start mark according to a position of the first character in a display text;
a second receiving module 203, configured to receive a second input of a second character from the user;
a second response module 204, configured to, in response to the second input, set a termination flag according to a position of the second character in the display text;
a selecting module 205, configured to select a first text according to the start mark and the end mark.
Optionally, the first response module is further configured to:
displaying N candidate first characters associated with a first area in display text in response to a first gesture input by a user for the first area;
receiving a first touch input of a user for the candidate first character;
in response to the first touch input, determining a first character of the N candidate first characters based on a location of the first touch input;
the start mark is set between the first character and a character preceding the first character.
Optionally, the second response module is further configured to:
in response to a user's second gesture input directed to a second region in the displayed text, displaying M candidate second characters associated with the second region;
receiving a second touch input of the user for the candidate second character;
in response to the second touch input, determining a second character of the M candidate second characters based on a location of the second touch input;
setting the termination flag between the second character and a character preceding the second character.
Optionally, the apparatus further comprises:
a third receiving module, configured to receive a third input of the first text by the user;
and the third response module is used for responding to the third input, displaying the first text in the first display area and displaying the annotation input box in the second display area.
Optionally, the apparatus further comprises:
a fourth receiving module, configured to receive a fourth input by the user for the second display area;
and the fourth response module is used for responding to the fourth input and displaying the annotation corresponding to the target text in the second display area.
Optionally, the apparatus further comprises:
a fifth receiving module, configured to receive a fifth input of the first text by the user;
a fifth response module, configured to respond to the fifth input and display L texts to be edited;
the sixth receiving module is used for receiving the editing input of the user for the H texts to be edited;
and the sixth response module is used for responding to the editing input and displaying the text contents of the H texts to be edited on a text editing interface.
The text selection device in the embodiment of the present application may be a mobile terminal, or may be a component, an integrated circuit, or a chip in the terminal. The device can be mobile electronic equipment or non-mobile electronic equipment. By way of example, the mobile electronic device may be a mobile phone, a tablet computer, a notebook computer, a palm top computer, a vehicle-mounted electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook or a Personal Digital Assistant (PDA), and the like, and the non-mobile electronic device may be a server, a Network Attached Storage (NAS), a Personal Computer (PC), a Television (TV), a teller machine or a self-service machine, and the like, and the embodiments of the present application are not particularly limited.
The text selection device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android (Android) operating system, an ios operating system, or other possible operating systems, and embodiments of the present application are not limited specifically.
The text selection device provided in the embodiment of the present application can implement each process implemented by the text selection method in the method embodiment of fig. 1, and is not described here again to avoid repetition.
In the embodiment of the application, a starting mark is set in the display text in response to a first input of a first character by a user; setting a termination flag in the displayed text in response to a second input by the user for a second character; and determining the text content from the start mark to the end mark as the text selected by the user. By setting the starting mark and the ending mark in the displayed text, the text selection mode is more accurate, missed selection or wrong selection of characters is avoided, and the text selection efficiency is improved.
Optionally, referring to fig. 15, an electronic device is further provided in an embodiment of the present application, and includes a processor 310, a memory 309, and a program or an instruction stored in the memory 309 and executable on the processor 310, where the program or the instruction is executed by the processor 310 to implement each process of the text selection method embodiment, and can achieve the same technical effect, and no further description is provided here to avoid repetition.
It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and the non-mobile electronic devices described above.
Fig. 15 is a schematic hardware structure diagram of an electronic device implementing an embodiment of the present application.
The electronic device 300 includes, but is not limited to: radio frequency unit 301, network module 302, audio output unit 303, input unit 304, sensor 305, display unit 306, user input unit 307, interface unit 308, memory 309, and processor 310.
Those skilled in the art will appreciate that the electronic device 300 may further include a power source (e.g., a battery) for supplying power to various components, and the power source may be logically connected to the processor 310 through a power management system, so as to implement functions of managing charging, discharging, and power consumption through the power management system. The electronic device structure shown in fig. 6 does not constitute a limitation of the electronic device, and the electronic device may include more or less components than those shown, or combine some components, or arrange different components, and thus, the description is omitted here.
The processor 310 is configured to receive, at a text display interface, a first input of a user for a first character;
setting a start mark according to the position of the first character in the displayed text in response to the first input;
receiving a second input of the user for a second character;
in response to the second input, setting a termination marker according to a position of the second character in the display text;
and selecting a first text according to the starting mark and the ending mark.
Optionally, the processor 310 is further configured to, in response to a first gesture input by a user for a first region in the displayed text, cause the display unit 306 to display N candidate first characters associated with the first region;
receiving a first touch input of a user for the candidate first character;
in response to the first touch input, determining a first character of the N candidate first characters based on a location of the first touch input;
the start mark is set between the first character and a character preceding the first character.
Optionally, the processor 310 is further configured to, in response to a second gesture input by the user for a second region in the display text, cause the display unit 306 to display M candidate second characters associated with the second region;
receiving a second touch input of the user for the candidate second character;
in response to the second touch input, determining a second character of the M candidate second characters based on a location of the second touch input;
setting the termination flag between the second character and a character preceding the second character.
Optionally, the processor 310 is further configured to receive a third input of the first text from the user;
in response to the third input, the display unit 306 is caused to display the first text in the first display area and the comment input box in the second display area.
Optionally, the processor 310 is further configured to receive a fourth input from the user for the second display area;
in response to the fourth input, the display unit 306 is caused to display the annotation corresponding to the target text in the second display area.
Optionally, the processor 310 is further configured to receive a fifth input by the user for the first text;
in response to the fifth input, causing the display unit 306 to display L texts to be edited;
receiving editing input of a user for H texts to be edited;
in response to the editing input, the display unit 306 is caused to display the text contents of the H texts to be edited on a text editing interface.
In the embodiment of the application, a starting mark is set in the display text in response to a first input of a first character by a user; setting a termination flag in the displayed text in response to a second input by the user for a second character; and determining the text content from the start mark to the end mark as the text selected by the user. By setting the starting mark and the ending mark in the displayed text, the text selection mode is more accurate, missed selection or wrong selection of characters is avoided, and the text selection efficiency is improved.
The embodiment of the present application further provides a readable storage medium, where a program or an instruction is stored on the readable storage medium, and when the program or the instruction is executed by a processor, the program or the instruction implements each process of the above-mentioned text selection method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here.
The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and so on.
The embodiment of the present application further provides a chip, where the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is configured to execute a program or an instruction to implement each process of the foregoing embodiments, and can achieve the same technical effect, and for avoiding repetition, details are not repeated here.
It should be understood that the chips mentioned in the embodiments of the present application may also be referred to as system-on-chip, system-on-chip or system-on-chip, etc.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element. Further, it should be noted that the scope of the methods and apparatus of the embodiments of the present application is not limited to performing the functions in the order illustrated or discussed, but may include performing the functions in a substantially simultaneous manner or in a reverse order based on the functions involved, e.g., the methods described may be performed in an order different than that described, and various steps may be added, omitted, or combined. In addition, features described with reference to certain examples may be combined in other examples.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present application.
While the present embodiments have been described with reference to the accompanying drawings, it is to be understood that the invention is not limited to the precise embodiments described above, which are meant to be illustrative and not restrictive, and that various changes may be made therein by those skilled in the art without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (12)

1. A text selection method is characterized by comprising the following steps:
receiving a first input of a user for a first character on a text display interface;
setting a start mark according to the position of the first character in the displayed text in response to the first input;
receiving a second input of the user for a second character;
in response to the second input, setting a termination marker according to a position of the second character in the display text;
selecting a first text according to the starting mark and the ending mark;
the first text is the text content from the start mark to the end mark in the display text, the first character is the first-ranked character in the first text, and the second character is the last-ranked character in the first text.
2. The method of claim 1, wherein the first input comprises a first gesture input and a first touch input, and wherein setting a start marker according to a position of the first character in displayed text in response to the first input comprises:
in response to a first gesture input of a user for a first area in a display text, displaying N candidate first characters associated with the first area, wherein N is a positive integer;
receiving a first touch input of a user for the candidate first character;
in response to the first touch input, determining a first character of the N candidate first characters based on a location of the first touch input;
the start mark is set between the first character and a character preceding the first character.
3. The method of claim 1, wherein the second input comprises a second gesture input and a second touch input, and wherein setting, in response to the second input, a termination flag according to a position of the second character in the text comprises:
in response to a second gesture input of a user for a second region in the display text, displaying M candidate second characters associated with the second region, wherein M is a positive integer;
receiving a second touch input of the user for the candidate second character;
in response to the second touch input, determining a second character of the M candidate second characters based on a location of the second touch input;
setting the termination flag between the second character and a character preceding the second character.
4. The method of claim 1, wherein after selecting the first text based on the start tag and the end tag, the method further comprises:
receiving a third input of the user for the first text, wherein the third input is used for annotating the first text;
in response to the third input, displaying the first text in a first display area and displaying an annotation input box in a second display area;
the first display area and the second display area are located on the same display interface of the same display screen, or the first display area is located on the display interface of the first display screen, and the second display area is located on the display interface of the second display screen of the same terminal as the first display screen.
5. The method according to claim 4, wherein the text display interface includes K second texts arranged in a preset order, where K is a positive integer, the K second texts include the first text, and each second text includes a corresponding annotation, and in response to the third input, the first text is displayed in a first display area, and after an annotation input box is displayed in a second display area, the method further includes:
receiving a fourth input of a user for the second display area;
responding to the fourth input, and displaying an annotation corresponding to the target text in the second display area;
wherein, in a case where the fourth input is a slide input directed from the second display area to the first display area, the target text is one of the K second texts located after the first text;
in a case where the fourth input is a slide input directed from the second display area to the first display area, the target text is one of the K second texts located before the first text.
6. The method of claim 1, wherein after selecting the first text based on the start tag and the end tag, the method further comprises:
receiving a fifth input of the user for the first text, wherein the fifth input is used for editing the first text;
responding to the fifth input, and displaying L texts to be edited, wherein L is a positive integer, and the L texts to be edited comprise the first text and an edited text;
receiving editing input of a user for H texts to be edited, wherein the H texts to be edited comprise the first text and/or at least partial edited texts in the L texts to be edited, and H is a positive integer less than or equal to L;
and responding to the editing input, and displaying the text contents of the H texts to be edited on a text editing interface.
7. A text selection apparatus, comprising:
the first receiving module is used for receiving first input of a user for a first character on a text display interface;
a first response module, configured to, in response to the first input, set a start marker according to a position of the first character in a display text;
the second receiving module is used for receiving a second input aiming at a second character from the user;
a second response module, configured to, in response to the second input, set a termination flag according to a position of the second character in the display text;
the selection module is used for selecting a first text according to the starting mark and the ending mark;
the first text is the text content from the start mark to the end mark in the display text, the first character is the first-ranked character in the first text, and the second character is the last-ranked character in the first text.
8. The apparatus of claim 7, wherein the first response module is further configured to:
in response to a first gesture input of a user for a first area in a display text, displaying N candidate first characters associated with the first area, wherein N is a positive integer;
receiving a first touch input of a user for the candidate first character;
in response to the first touch input, determining a first character of the N candidate first characters based on a location of the first touch input;
the start mark is set between the first character and a character preceding the first character.
9. The apparatus of claim 7, wherein the second response module is further configured to:
in response to a second gesture input of a user for a second region in the display text, displaying M candidate second characters associated with the second region, wherein M is a positive integer;
receiving a second touch input of the user for the candidate second character;
in response to the second touch input, determining a second character of the M candidate second characters based on a location of the second touch input;
setting the termination flag between the second character and a character preceding the second character.
10. The apparatus of claim 7, further comprising:
a third receiving module, configured to receive a third input of the user for the first text, where the third input is used to annotate the first text;
a third response module, configured to, in response to the third input, display the first text in the first display area, and display the annotation input box in the second display area;
the first display area and the second display area are located on the same display interface of the same display screen, or the first display area is located on the display interface of the first display screen, and the second display area is located on the display interface of the second display screen of the same terminal as the first display screen.
11. The apparatus of claim 10, further comprising:
a fourth receiving module, configured to receive a fourth input by the user for the second display area;
the fourth response module is used for responding to the fourth input and displaying the annotation corresponding to the target text in the second display area;
wherein, in a case where the fourth input is a slide input directed from the second display area to the first display area, the target text is one of K second texts located after the first text;
in a case where the fourth input is a slide input directed from the second display area to the first display area, the target text is one of the K second texts located before the first text.
12. The apparatus of claim 7, further comprising:
a fifth receiving module, configured to receive a fifth input of the first text by the user, where the fifth input is used to edit the first text;
a fifth response module, configured to, in response to the fifth input, display L texts to be edited, where L is a positive integer, and the L texts to be edited include the first text and an edited text;
a sixth receiving module, configured to receive editing input of a user for H texts to be edited, where the H texts to be edited include the first text and/or at least part of edited texts in the L texts to be edited, and H is a positive integer less than or equal to L;
and the sixth response module is used for responding to the editing input and displaying the text contents of the H texts to be edited on a text editing interface.
CN202011620115.2A 2020-12-31 2020-12-31 Text selection method and device Pending CN112748842A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011620115.2A CN112748842A (en) 2020-12-31 2020-12-31 Text selection method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011620115.2A CN112748842A (en) 2020-12-31 2020-12-31 Text selection method and device

Publications (1)

Publication Number Publication Date
CN112748842A true CN112748842A (en) 2021-05-04

Family

ID=75650201

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011620115.2A Pending CN112748842A (en) 2020-12-31 2020-12-31 Text selection method and device

Country Status (1)

Country Link
CN (1) CN112748842A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113934357A (en) * 2021-11-12 2022-01-14 掌阅科技股份有限公司 Refreshing processing method of ink screen device, electronic device and storage medium
CN114265525A (en) * 2021-12-27 2022-04-01 咪咕数字传媒有限公司 Text selection method and device, electronic equipment and readable storage medium
WO2022247718A1 (en) * 2021-05-25 2022-12-01 维沃移动通信有限公司 Information selection method and apparatus
WO2022247814A1 (en) * 2021-05-27 2022-12-01 维沃移动通信有限公司 Method and apparatus for selecting target character, electronic device, and storage medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101893956A (en) * 2009-05-21 2010-11-24 索尼公司 Display control apparatus, display control method and computer program
CN101968716A (en) * 2010-10-20 2011-02-09 鸿富锦精密工业(深圳)有限公司 Electronic reading device and method thereof for adding comments
CN102053769A (en) * 2009-11-02 2011-05-11 宏达国际电子股份有限公司 Data selection and display method and system
CN102609404A (en) * 2012-02-08 2012-07-25 刘津立 Document editing method realized through two-point touch technology
CN103608760A (en) * 2011-06-03 2014-02-26 谷歌公司 Gestures for selecting text
JP2015197900A (en) * 2014-04-03 2015-11-09 シャープ株式会社 Substring selection device, substring selection method, and substring selecting
US20170220538A1 (en) * 2016-01-29 2017-08-03 Microsoft Technology Licensing, Llc Smart annotation of content on computing devices
CN108055399A (en) * 2017-12-19 2018-05-18 维沃移动通信有限公司 A kind of text clone method and mobile terminal
CN108804002A (en) * 2018-04-25 2018-11-13 广州视源电子科技股份有限公司 The text annotation method and apparatus of interactive intelligence equipment
CN111506185A (en) * 2019-01-31 2020-08-07 珠海金山办公软件有限公司 Method and device for operating document, electronic equipment and storage medium

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101893956A (en) * 2009-05-21 2010-11-24 索尼公司 Display control apparatus, display control method and computer program
CN102053769A (en) * 2009-11-02 2011-05-11 宏达国际电子股份有限公司 Data selection and display method and system
CN101968716A (en) * 2010-10-20 2011-02-09 鸿富锦精密工业(深圳)有限公司 Electronic reading device and method thereof for adding comments
CN103608760A (en) * 2011-06-03 2014-02-26 谷歌公司 Gestures for selecting text
CN102609404A (en) * 2012-02-08 2012-07-25 刘津立 Document editing method realized through two-point touch technology
JP2015197900A (en) * 2014-04-03 2015-11-09 シャープ株式会社 Substring selection device, substring selection method, and substring selecting
US20170220538A1 (en) * 2016-01-29 2017-08-03 Microsoft Technology Licensing, Llc Smart annotation of content on computing devices
CN108055399A (en) * 2017-12-19 2018-05-18 维沃移动通信有限公司 A kind of text clone method and mobile terminal
CN108804002A (en) * 2018-04-25 2018-11-13 广州视源电子科技股份有限公司 The text annotation method and apparatus of interactive intelligence equipment
CN111506185A (en) * 2019-01-31 2020-08-07 珠海金山办公软件有限公司 Method and device for operating document, electronic equipment and storage medium

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022247718A1 (en) * 2021-05-25 2022-12-01 维沃移动通信有限公司 Information selection method and apparatus
WO2022247814A1 (en) * 2021-05-27 2022-12-01 维沃移动通信有限公司 Method and apparatus for selecting target character, electronic device, and storage medium
CN113934357A (en) * 2021-11-12 2022-01-14 掌阅科技股份有限公司 Refreshing processing method of ink screen device, electronic device and storage medium
CN114265525A (en) * 2021-12-27 2022-04-01 咪咕数字传媒有限公司 Text selection method and device, electronic equipment and readable storage medium

Similar Documents

Publication Publication Date Title
CN112748842A (en) Text selection method and device
CN113518026B (en) Message processing method and device and electronic equipment
CN102937948B (en) A kind of image, text and data edit methods of mobile terminal
CN113467660A (en) Information sharing method and electronic equipment
CN114385049A (en) Message processing method, device, equipment and storage medium
CN112181253A (en) Information display method and device and electronic equipment
CN112783592B (en) Information issuing method, device, equipment and storage medium
CN114579240A (en) Message processing method and device
CN114443203A (en) Information display method and device, electronic equipment and readable storage medium
CN113849092A (en) Content sharing method and device and electronic equipment
CN112291414B (en) Message display method and device and electronic equipment
EP3975010A1 (en) Online collaborative document processing method and device
US20230161951A1 (en) Content editing method and apparatus, and electronic device
CN112416143B (en) Text information editing method and device and electronic equipment
CN112328149B (en) Picture format setting method and device and electronic equipment
CN112269523B (en) Object editing processing method and device and electronic equipment
CN112486366A (en) Control display method and device and electronic equipment
CN113885743A (en) Text content selection method and device
CN113807057A (en) Method and device for editing characters
CN113436297A (en) Picture processing method and electronic equipment
CN113342241A (en) Target character selection method and device, electronic equipment and storage medium
CN111752428A (en) Icon arrangement method and device, electronic equipment and medium
CN111985183A (en) Character input method and device and electronic equipment
CN112612400B (en) Text content processing method and electronic equipment
KR20140045395A (en) Transitioning between an editing view and a backstage view of an electronic document

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20210504