Text selection method, device, computer equipment and storage medium
By obtaining the user's touch operations and the location of the touch point, and determining and displaying multiple text contents, the problem of cumbersome copying and pasting discontinuous text operations in the prior art is solved, and the effect of simplifying the operation process and saving time is achieved.
Patent Information
- Application Number
- CN202110282475.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-03-16
- Publication Date
- 2025-03-07
- Estimated Expiration
- 2041-03-16
AI Technical Summary
In the prior art, users need to perform multiple copy and paste operations when copying and pasting discontinuous text, which is cumbersome and time-consuming.
By obtaining the number of touch operations of the user on the text selection page and the touch point position of each touch operation, the selected multi-segment text content is determined and displayed. The specific method includes determining multiple text selection positions based on the number of touch operations and the position of the touch point, pairing them in pairs, and determining that the text content between the pairs is the selected text.
When copying and pasting multiple discontinuous texts, you only need to click on the starting and ending positions of each piece of text, and the terminal can automatically select the required text without copying and pasting multiple times, which greatly simplifies the operation process, improves operation convenience and saves operation time.
Smart Images

Figure CN115079913B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of text processing, and in particular to a text selection method, apparatus, computer equipment and storage medium. Background Art
[0002] Currently, the Android system usually uses the system's built-in operation panel to copy and paste text, which has "Copy", "Select All", "Cut", and "Paste" options, such as Figure 1 As shown, if the user wants to copy and paste a certain text, he will drag the two selection handles, select the text in the range, and then copy and paste it to the corresponding location.
[0003] However, in the current text selection method, if the user wants to copy some discontinuous text in a large paragraph, the user can only copy and paste the discontinuous text multiple times, which is cumbersome and time-consuming. Summary of the invention
[0004] Based on this, it is necessary to provide a text selection method, device, computer equipment and storage medium to address the technical problems of the above-mentioned method of copying and pasting discontinuous text, which is cumbersome and time-consuming.
[0005] A text selection method, the method comprising:
[0006] Acquire the number of touch operations and the touch point position of each touch operation for the touch operation on the text selection page displayed by the terminal; wherein each touch operation is used to determine a text selection position on the text selection page;
[0007] The selected multiple paragraphs of text content are determined and displayed according to the number of touch operations and the touch point position of each touch operation.
[0008] In one embodiment, determining and displaying the selected multiple text contents according to the number of touch operations and the touch point position of each touch operation includes:
[0009] Determine multiple text selection positions according to the touch point position of each touch operation;
[0010] Pairing the text selection positions in pairs, and determining the text between each pair of text selection positions as the selected text content;
[0011] The multiple sections of text content are obtained according to the selected text content.
[0012] In one embodiment, pairing the text selection positions in pairs comprises:
[0013] According to the order of the text selection positions in the text selection page, two text selection positions are selected in sequence for pairing.
[0014] In one embodiment, selecting two text selection positions for pairing in sequence according to the order of the text selection positions in the text selection page includes:
[0015] If the text in the text selection page is arranged horizontally, two text selection positions are selected in order from left to right for pairing;
[0016] If the text in the text selection page is arranged vertically, two text selection positions are selected in sequence from top to bottom for pairing.
[0017] In one embodiment, the method further comprises:
[0018] If the number of touch operations is an odd number, the text selection position at the end of the text selection page is ignored, and the other text selection positions are paired in pairs;
[0019] or,
[0020] If the number of touch operations is an odd number, the text selection position at the front of the text selection page is ignored, and other text selection positions are paired up in pairs.
[0021] In one of the embodiments, after obtaining the touch point position of each touch operation, the method further includes:
[0022] inserting a marking pattern at each of the touch point positions;
[0023] If an adjustment operation for the touch point position is detected, the text selection position determined by the touch point position is replaced by the text selection position determined by the new touch point position after performing the adjustment operation, and a marking pattern is inserted at the new touch point position; the adjustment operation is used to adjust the touch point position.
[0024] In one of the embodiments, after determining and displaying the selected multiple paragraphs of text content according to the number of touch operations and the touch point position of each touch operation, the method further includes:
[0025] Copying and storing the selected multiple text contents;
[0026] A touch operation on a pasting position of the multiple text contents is received, and the multiple text contents are copied to the pasting position.
[0027] A text selection device, comprising:
[0028] An information acquisition module, used to acquire the number of touch operations and the touch point position of each touch operation for the touch operation on the text selection page displayed by the terminal; wherein each touch operation is used to determine a text selection position on the text selection page;
[0029] The text determination module is used to determine and display the selected multiple text contents according to the number of touch operations and the touch point position of each touch operation.
[0030] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0031] Acquire the number of touch operations and the touch point position of each touch operation for the touch operation on the text selection page displayed by the terminal; wherein each touch operation is used to determine a text selection position on the text selection page;
[0032] The selected multiple paragraphs of text content are determined and displayed according to the number of touch operations and the touch point position of each touch operation.
[0033] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the following steps:
[0034] Acquire the number of touch operations and the touch point position of each touch operation for the touch operation on the text selection page displayed by the terminal; wherein each touch operation is used to determine a text selection position on the text selection page;
[0035] The selected multiple paragraphs of text content are determined and displayed according to the number of touch operations and the touch point position of each touch operation.
[0036] The above-mentioned text selection method, device, computer equipment and storage medium obtain the number of touch operations of the user on the text selection page displayed by the terminal and the touch point position of each touch operation, and then determine and display the selected multiple paragraphs of text content according to the number of touch operations and the touch point position of each touch operation. When performing the copy and paste operation of multiple paragraphs of text, this method only needs to click once at the starting position and the ending position of each paragraph of text to be copied, and the terminal can select the multiple paragraphs of text that the user needs to copy at one time according to the user's touch point position and the number of touch operations, without having to perform multiple copy and paste operations, which greatly simplifies the operation process of copying multiple paragraphs of text, is convenient to operate and can save operation time. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 A schematic diagram of a text selection method in the prior art;
[0038] Figure 2 A flowchart of a text selection method in one embodiment;
[0039] Figure 3 A schematic diagram of a selection operation for discontinuous text in one embodiment;
[0040] Figure 4 A schematic diagram of a long text selection operation across pages in one embodiment;
[0041] Figure 5 A flowchart of a text selection method in another embodiment;
[0042] Figure 6 A structural block diagram of a text selection device in an embodiment;
[0043] Figure 7 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0044] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0045] In one embodiment, Figure 2 As shown, a text selection method is provided. This embodiment takes the method applied to a terminal as an example for illustration, wherein the terminal may be, but is not limited to, various smart phones and tablet computers, personal computers, laptop computers, portable wearable devices, etc. In this embodiment, the method includes the following steps:
[0046] Step S202, obtaining the number of touch operations on the text selection page displayed on the terminal and the touch point position of each touch operation; wherein each touch operation is used to determine a text selection position on the text selection page.
[0047] The touch operation may be a click operation or a press operation, and the click operation may be a single click or a double click.
[0048] It should be noted that since the present application is for the selection operation of discontinuous text, the number of touch operations should be at least four, and the touch point positions of these four touch operations are at different positions. It can be understood that if a selection operation is performed on a section of text, the text selection method of the present application is also applicable.
[0049] In a specific implementation, when a user needs to copy and paste discontinuous text, multiple touch operations can be performed on the text selection page displayed by the terminal. After the terminal detects these touch operations, the number of touch operations and the touch point position of each touch operation are obtained. It can be understood that each touch operation is used to determine a text selection position on the text selection page, so the touch point position of each touch operation should be different. However, if two identical touch point positions are detected, the two identical touch point positions can be processed as one touch point position, and one of the touch times is ignored (for example, the second touch operation for the same touch point position is ignored).
[0050] refer to Figure 3 , Figure 3 This is a schematic diagram of a selection operation for discontinuous text in an embodiment. In the figure, the touch point positions of each touch operation are position 31, position 32, position 33, position 34, position 35 and position 36 respectively, and the number of touch operations is 6 times. After determining the touch point position, the text selection position is determined, and then the selected text can be determined based on these 6 touch operations and the touch point position of each touch operation.
[0051] Furthermore, if the copied multiple paragraphs of text are on different pages, the user can enter the next page by sliding, scrolling or other operations after completing the text selection touch operation on the current page, and continue the text selection touch operation on the next page. Specifically, after the terminal receives a trigger operation for the current text selection page, if it receives a page switching instruction, it will respond to the page switching instruction, switch the current text selection page to the next text selection page, and retain the text selection operation completed on the current text selection page, thereby realizing the multi-paragraph text selection operation across pages. Among them, the current text selection page and the next text selection page can have overlapping text content. For example, when switching pages by sliding operation, the sliding amplitude is small, so that the next text selection page still contains the text content in the current text selection page. Among them, the page switching instruction is used to switch the current text selection page displayed by the terminal to the next text selection page. Therefore, the page switching instruction can be an instruction generated according to the user's sliding operation, an instruction generated according to the user's scrolling operation, or an instruction generated according to other operations.
[0052] Similarly, if one of the copied text contents is long and located on a different page, after completing the triggering operation on the starting position of the long text content on the current text selection page, the current text selection page can be switched to the next text selection page, and the triggering operation on the ending position can be continued on the next text selection page, thereby realizing the selection operation of the long text across pages. Figure 4, Figure 4 A schematic diagram showing the operation of selecting a longer text across pages. First, a touch operation is performed at the starting position 41. After the starting position is determined, the text is scrolled to the end position to be selected, and a touch operation is performed at the end position 42. The terminal will automatically use the text between the starting position 41 and the end position 42 as the selected text content.
[0053] Step S204: determining and displaying the selected multiple text contents according to the number of touch operations and the touch point position of each touch operation.
[0054] Among them, the multiple paragraphs of text content in this application means at least two paragraphs of text content.
[0055] It is understandable that a section of text content is determined by two touch point positions. Therefore, when the number of touch operations is at least four, the number of touch point positions is generally at least four, so at least two discontinuous sections of text content can be determined.
[0056] In a specific implementation, after obtaining the number of touch operations and the touch point position of each touch operation, multiple text selection positions can be determined according to the touch point position of each touch operation, and the text selection positions can be paired with each other, and the text between each pair of text selection positions can be determined as the selected text content. More specifically, when pairing the text selection positions with each other, two adjacent text selection positions can be selected in sequence according to the order of the text selection positions in the text selection page, and then the text between the paired text selection positions is used as the selected text content, and the selected text content is marked. For example, the font color of the selected text content can be changed, the font background color can be added, the font can be bolded, italicized, underlined, etc., and this application does not impose specific restrictions on this.
[0057] For example, refer to Figure 3 , Figure 3 The order of the text selection positions in the text selection page is position 31 → position 32 → position 33 → position 34 → position 35 → position 36. Therefore, by pairing the text selection positions from front to back, three paired positions will be obtained, namely, position 31 is paired with position 32, position 33 is paired with position 34, and position 35 is paired with position 36. Then, the text between the paired text selection positions is selected as the selected text content, and the following is obtained. Figure 3 The three selected text contents are the text between position 31 and position 32, the text between position 33 and position 34, and the text between position 35 and position 36.
[0058] Furthermore, in one embodiment, after the above step S204, it also includes: copying and storing the selected multiple paragraphs of text content; receiving a touch operation on a pasting position of the multiple paragraphs of text content, and copying the multiple paragraphs of text content to the pasting position.
[0059] In a specific implementation, after determining the selected multiple paragraphs of text content, the selected multiple paragraphs of text content are first copied and stored, so that after receiving a touch operation on the paste position of the selected multiple paragraphs of text content, the selected multiple paragraphs of text content can be copied to the paste position.
[0060] In the above-mentioned text selection method, by obtaining the number of touch operations of the user on the text selection page displayed by the terminal and the touch point position of each touch operation, and then determining and displaying the selected multiple paragraphs of text content according to the number of touch operations and the touch point position of each touch operation, when performing the copy and paste operation of multiple paragraphs of text, this method only needs to click once at the starting position and the ending position of each paragraph of text to be copied, and the terminal can select the multiple paragraphs of text that the user needs to copy at one time according to the user's touch point position and the number of touch operations, without the need to perform multiple copy and paste operations, which greatly simplifies the operation process of copying multiple paragraphs of text, is convenient to operate and can save operation time.
[0061] In one embodiment, the above step S204 specifically includes: determining multiple text selection positions based on the touch point position of each touch operation; pairing each text selection position in pairs, and determining the text between each pair of text selection positions as the selected text content; and obtaining multiple paragraphs of text content based on the selected text content.
[0062] The touch point position of each touch operation is the text selection position. For example, Figure 3 In the example, the touch point position 31 is also the text selection position.
[0063] Furthermore, in one embodiment, the step of pairing the text selection positions in pairs includes: selecting two text selection positions for pairing in sequence according to the order of the text selection positions in the text selection page.
[0064] Among them, pairing means pairing two text selection positions that are adjacent to each other. Adjacent means the proximity of the text selection positions in the reading order of the text selection positions in the text selection page, not the proximity in distance. For example, in Figure 3 In the text reading order, the next position of position 33 is position 34, not position 36 which is close in distance.
[0065] Furthermore, according to the order of each text selection position in the text selection page, two text selection positions are selected in sequence for pairing, including: if the text in the text selection page is horizontally laid out, then two text selection positions are selected in sequence from left to right for pairing; if the text in the text selection page is vertically laid out, then two text selection positions are selected in sequence from top to bottom for pairing.
[0066] In the specific implementation, the text reading order is determined by the layout order. If the text in the text selection page is horizontally laid out, for example Figure 3 , the method for pairing each text selection position is to determine the order of each text selection position row by row from left to right. If the text in the text selection page is arranged vertically, the method for pairing each text selection position is to determine the order of each text selection position column by column from top to bottom.
[0067] In this embodiment, by determining the layout direction of the text in the text selection page, the order of each text selection position in the text selection page is determined, so as to improve the accuracy of pairing each text selection position, thereby accurately selecting multiple paragraphs of text content that the user needs to select.
[0068] In one embodiment, the above method also includes: if the number of touch operations is an odd number, ignoring the text selection position at the end of the text selection page, and pairing the other text selection positions in pairs; or, if the number of touch operations is an odd number, ignoring the text selection position at the front of the text selection page, and pairing the other text selection positions in pairs.
[0069] In the specific implementation, in order to avoid a text selection position being generated due to an erroneous operation before or after the user performs a touch operation on multiple paragraphs of text, it is also possible to ignore the text selection position at the end or the front of the text selection page after obtaining the number of touch operations and determining that the number of touch operations is an odd number, thereby ensuring that other text selection positions can be paired in pairs.
[0070] In this embodiment, when determining that the number of touch operations is an odd number, the text selection position at the end or the front of the text selection page is ignored, thereby avoiding the problem of inaccurate selected text content due to user's misoperation.
[0071] In one embodiment, after the step of obtaining the touch point position of each touch operation, it also includes: inserting a marking pattern at each touch point position; if an adjustment operation for the touch point position is detected, the text selection position determined by the touch point position is replaced with the text selection position determined by the new touch point position after the adjustment operation is performed, and the marking pattern is inserted at the new touch point position; the adjustment operation is used to adjust the touch point position.
[0072] In a specific implementation, after obtaining the touch point position of each touch operation, a marking pattern may be inserted at each touch point position, for example, Figure 3 As shown, a cursor is inserted at a touch point position 31, a position 32, etc. to mark the position, so that the user can confirm whether the selected touch point position is accurate. If the touch point position needs to be adjusted, the touch point position can be adjusted. When the terminal detects an adjustment operation on the touch point position, such as a drag operation on the touch point position, the text selection position determined by the touch point position is replaced with the text selection position determined by the new touch point position after the adjustment operation is performed, and a marking pattern is inserted at the new touch point position.
[0073] In this embodiment, by inserting a marking pattern at the touch point position, the user can confirm whether the selected touch point position is accurate, and by providing a method for adjusting the touch point position, the touch point position can be adjusted, thereby increasing the diversity of touch point position determination methods.
[0074] In another embodiment, Figure 5 As shown, a text selection method is provided. In this embodiment, the method includes the following steps:
[0075] Step S502, obtaining the number of touch operations for the text selection page displayed by the terminal and the touch point position of each touch operation; wherein each touch operation is used to determine a text selection position on the text selection page;
[0076] Step S504, determining multiple text selection positions according to the touch point position of each touch operation;
[0077] Step S506, selecting two text selection positions in sequence for pairing according to the order of the text selection positions in the text selection page, and determining the text between each pair of text selection positions as the selected text content;
[0078] Step S508, copying and storing the selected multiple text contents;
[0079] Step S510: receiving a touch operation on a pasting position of multiple text contents, and copying the multiple text contents to the pasting position.
[0080] In this embodiment, by obtaining the number of touch operations of the user on the text selection page displayed on the terminal and the touch point position of each touch operation, and then determining and displaying the selected multiple paragraphs of text content according to the number of touch operations and the touch point position of each touch operation, when performing the copy and paste operation of multiple paragraphs of text, this method only needs to click once at the starting position and the ending position of each paragraph of text to be copied, and the terminal can select the multiple paragraphs of text that the user needs to copy at one time according to the user's touch point position and the number of touch operations, without having to perform multiple copy and paste operations, which greatly simplifies the operation process of copying multiple paragraphs of text, is convenient to operate and can save operation time.
[0081] It should be understood that although Figure 2 and Figure 5 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 2 and Figure 5 At least part of the steps may include multiple steps or multiple stages. These steps or stages are not necessarily performed at the same time, but can be performed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed in turn or alternately with other steps or at least part of the steps or stages in other steps.
[0082] In one embodiment, Figure 6 As shown, a text selection device is provided, including: an information acquisition module 602 and a text determination module 604, wherein:
[0083] The information acquisition module 602 is used to acquire the number of touch operations and the touch point position of each touch operation for the touch operation on the text selection page displayed by the terminal; wherein each touch operation is used to determine a text selection position on the text selection page;
[0084] The text determination module 604 is used to determine and display the selected multiple text contents according to the number of touch operations and the touch point position of each touch operation.
[0085] In one embodiment, the text determination module 604 includes:
[0086] A position determination submodule, used to determine multiple text selection positions according to the touch point position of each touch operation;
[0087] The position matching submodule is used to match each text selection position with each other, and determine the text between each pair of text selection positions as the selected text content, and obtain multiple paragraphs of text content based on the selected text content.
[0088] In one embodiment, the position pairing submodule is specifically used to select two text selection positions for pairing in sequence according to the order of the text selection positions in the text selection page.
[0089] In one embodiment, the above-mentioned position matching submodule is also used to select two text selection positions for matching in order from left to right if the text in the text selection page is horizontally arranged; if the text in the text selection page is vertically arranged, select two text selection positions for matching in order from top to bottom.
[0090] In one embodiment, the above-mentioned position pairing submodule is also used to ignore the text selection position at the end of the text selection page if the number of touch operations is an odd number, and pair the other text selection positions in pairs; or, if the number of touch operations is an odd number, ignore the text selection position at the front of the text selection page, and pair the other text selection positions in pairs.
[0091] In one embodiment, the above device further comprises:
[0092] A marking pattern display module, used for inserting a marking pattern at each touch point position;
[0093] A position adjustment module is used to replace the text selection position determined by the touch point position with the text selection position determined by the new touch point position after the adjustment operation is performed if an adjustment operation for the touch point position is detected, and insert a marking pattern at the new touch point position; the adjustment operation is used to adjust the touch point position.
[0094] In one embodiment, the above device also includes: a text copying module, used to copy and store the selected multiple paragraphs of text content; receive a touch operation on the pasting position of the multiple paragraphs of text content, and copy the multiple paragraphs of text content to the pasting position.
[0095] It should be noted that the text selection device of the present application corresponds one-to-one to the text selection method of the present application. The technical features and beneficial effects described in the embodiment of the above-mentioned text selection method are all applicable to the embodiment of the text selection device. For specific contents, please refer to the description in the embodiment of the method of the present application. It will not be repeated here. This is hereby declared.
[0096] In addition, each module in the above-mentioned text selection device can be implemented in whole or in part by software, hardware, or a combination thereof. Each of the above-mentioned modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.
[0097] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 7 As shown. The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, an operator network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a text selection method is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a key, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.
[0098] Those skilled in the art will understand that Figure 7 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0099] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:
[0100] Acquire the number of touch operations for a text selection page displayed on the terminal and the touch point position of each touch operation; wherein each touch operation is used to determine a text selection position on the text selection page;
[0101] According to the number of touch operations and the touch point position of each touch operation, the selected multiple paragraphs of text content are determined and displayed.
[0102] In one embodiment, when the processor executes the computer program, the following steps are also implemented: based on the touch point position of each touch operation, multiple text selection positions are determined; each text selection position is paired, and the text between each pair of text selection positions is determined as the selected text content; based on the selected text content, multiple paragraphs of text content are obtained.
[0103] In one embodiment, when the processor executes the computer program, the following steps are also implemented: according to the order of the text selection positions in the text selection page, two text selection positions are selected in sequence for pairing.
[0104] In one embodiment, when the processor executes the computer program, the following steps are also implemented: if the text in the text selection page is laid out horizontally, two text selection positions are selected in sequence from left to right for pairing; if the text in the text selection page is laid out vertically, two text selection positions are selected in sequence from top to bottom for pairing.
[0105] In one embodiment, the processor further implements the following steps when executing the computer program: if the number of touch operations is an odd number, the text selection position at the end of the text selection page is ignored, and the other text selection positions are paired in pairs; or, if the number of touch operations is an odd number, the text selection position at the front of the text selection page is ignored, and the other text selection positions are paired in pairs.
[0106] In one embodiment, the processor also implements the following steps when executing the computer program: inserting a marking pattern at each touch point position; if an adjustment operation for the touch point position is detected, replacing the text selection position determined by the touch point position with the text selection position determined by the new touch point position after the adjustment operation is performed, and inserting a marking pattern at the new touch point position; the adjustment operation is used to adjust the touch point position.
[0107] In one embodiment, when the processor executes the computer program, the following steps are also implemented: copying and storing the selected multiple paragraphs of text content; receiving a touch operation on a pasting position of the multiple paragraphs of text content, and copying the multiple paragraphs of text content to the pasting position.
[0108] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0109] Acquire the number of touch operations for a text selection page displayed on the terminal and the touch point position of each touch operation; wherein each touch operation is used to determine a text selection position on the text selection page;
[0110] According to the number of touch operations and the touch point position of each touch operation, the selected multiple paragraphs of text content are determined and displayed.
[0111] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: determining multiple text selection positions based on the touch point position of each touch operation; pairing the text selection positions in pairs, and determining the text between each pair of text selection positions as the selected text content; and obtaining multiple paragraphs of text content based on the selected text content.
[0112] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: according to the order of the text selection positions in the text selection page, two text selection positions are selected in sequence for pairing.
[0113] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: if the text in the text selection page is laid out horizontally, two text selection positions are selected in sequence from left to right for pairing; if the text in the text selection page is laid out vertically, two text selection positions are selected in sequence from top to bottom for pairing.
[0114] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: if the number of touch operations is an odd number, the text selection position at the end of the text selection page is ignored, and the other text selection positions are paired up in pairs; or, if the number of touch operations is an odd number, the text selection position at the front of the text selection page is ignored, and the other text selection positions are paired up in pairs.
[0115] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: inserting a marking pattern at each touch point position; if an adjustment operation for the touch point position is detected, replacing the text selection position determined by the touch point position with the text selection position determined by the new touch point position after the adjustment operation is performed, and inserting a marking pattern at the new touch point position; the adjustment operation is used to adjust the touch point position.
[0116] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: copying and storing the selected multiple paragraphs of text content; receiving a touch operation on a pasting position of the multiple paragraphs of text content, and copying the multiple paragraphs of text content to the pasting position.
[0117] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0118] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0119] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A text selection method, characterized in that: Applied to a terminal, the method comprises: Acquire the number of touch operations and the touch point position of each touch operation for the touch operation on the text selection page displayed by the terminal; wherein each touch operation is used to determine a text selection position on the text selection page; Determine multiple text selection positions according to the touch point position of each touch operation; Pairing each of the text selection positions in pairs, and determining the text between each pair of text selection positions as the selected text content, to obtain multiple paragraphs of text content; The method also includes: after receiving a touch operation on the current text selection page, if a page switching instruction is received, in response to the page switching instruction, the current text selection page is switched to the next text selection page, and the text selection operation completed on the current text selection page is retained to implement multi-segment text selection operations across pages.
2. The method according to claim 1, characterized in that: If two identical touch point positions are detected, the two identical touch point positions are regarded as one touch point position, and one of the touch times is ignored.
3. The method according to claim 1, characterized in that The pairing of the text selection positions in pairs comprises: According to the order of the text selection positions in the text selection page, two text selection positions are selected in sequence for pairing.
4. The method according to claim 3, characterized in that The selecting two text selection positions in sequence for pairing according to the order of the text selection positions in the text selection page includes: If the text in the text selection page is arranged horizontally, two text selection positions are selected in order from left to right for pairing; If the text in the text selection page is arranged vertically, two text selection positions are selected in sequence from top to bottom for pairing.
5. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: If the number of touch operations is an odd number, the text selection position at the end of the text selection page is ignored, and the other text selection positions are paired in pairs; or, If the number of touch operations is an odd number, the text selection position at the front of the text selection page is ignored, and other text selection positions are paired up in pairs.
6. The method according to claim 1, characterized in that After getting the touch point position for each touch operation, it also includes: inserting a marking pattern at each of the touch point positions; If an adjustment operation for the touch point position is detected, the text selection position determined by the touch point position is replaced by the text selection position determined by the new touch point position after performing the adjustment operation, and a marking pattern is inserted at the new touch point position; the adjustment operation is used to adjust the touch point position.
7. The method according to claim 1, characterized in that After determining and displaying the selected multiple text contents according to the number of touch operations and the touch point position of each touch operation, the method further includes: Copying and storing the selected multiple text contents; A touch operation on a pasting position of the multiple text contents is received, and the multiple text contents are copied to the pasting position.
8. A text selection device, characterized in that: The device comprises: An information acquisition module, used to acquire the number of touch operations and the touch point position of each touch operation for a touch operation on a text selection page displayed on a terminal; wherein each touch operation is used to determine a text selection position on the text selection page; A text determination module is used to determine multiple text selection positions according to the touch point position of each touch operation; pair the text selection positions in pairs, and determine the text between each pair of text selection positions as the selected text content, so as to obtain multiple paragraphs of text content; A cross-page selection module is used to, after receiving a touch operation on the current text selection page, if a page switching instruction is received, respond to the page switching instruction, switch the current text selection page to the next text selection page, and retain the text selection operation completed on the current text selection page, thereby realizing a cross-page multi-segment text selection operation.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Text selection method and device, and text processing method and device
CN106201293A
Method of copying multiple text segments and mobile terminal
CN107967093A
