WO2023174369A1 - Text selection method, text selection apparatus, electronic device and readable storage medium - Google Patents

Text selection method, text selection apparatus, electronic device and readable storage medium Download PDF

Info

Publication number
WO2023174369A1
WO2023174369A1 PCT/CN2023/081875 CN2023081875W WO2023174369A1 WO 2023174369 A1 WO2023174369 A1 WO 2023174369A1 CN 2023081875 W CN2023081875 W CN 2023081875W WO 2023174369 A1 WO2023174369 A1 WO 2023174369A1
Authority
WO
WIPO (PCT)
Prior art keywords
cursor
speed
coordinate value
display position
moving
Prior art date
Application number
PCT/CN2023/081875
Other languages
French (fr)
Chinese (zh)
Inventor
黄鼎民
Original Assignee
维沃移动通信有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 维沃移动通信有限公司 filed Critical 维沃移动通信有限公司
Publication of WO2023174369A1 publication Critical patent/WO2023174369A1/en

Links

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/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/04812Interaction techniques based on cursor appearance or behaviour, e.g. being affected by the presence of displayed objects
    • GPHYSICS
    • G06COMPUTING; 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/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/0483Interaction with page-structured environments, e.g. book metaphor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting

Definitions

  • This application belongs to the field of text processing technology, and specifically relates to a text selection method, text selection device, electronic equipment and readable storage medium.
  • the purpose of the embodiments of the present application is to provide a text selection method, text selection device, electronic device and readable storage medium, which can solve the problem of poor text selection operation experience.
  • embodiments of the present application provide a text selection method, including:
  • a text selection device including:
  • Display module used to display cursors and controls on the display interface
  • the receiving module is used to receive the first input to the control
  • a movement module configured to update the display position of the cursor in response to the first input
  • the selection module is used to select the target text corresponding to the display interface based on the display position of the cursor before and after updating.
  • embodiments of the present application provide an electronic device, including a processor and a memory.
  • the memory stores programs or instructions that can be run on the processor.
  • the program or instructions are executed by the processor, the method of the first aspect is implemented. step.
  • embodiments of the present application provide a readable storage medium that stores a program or instructions, and when the program or instructions are executed by a processor, the steps of the method in the first aspect are implemented.
  • inventions of the present application provide a chip.
  • the chip includes a processor and a communication interface.
  • the communication interface is coupled to the processor.
  • the processor is used to run programs or instructions to implement the steps of the method in the first aspect. .
  • embodiments of the present application provide a computer program product, the program product is stored in a storage medium, and the program product is executed by at least one processor to implement the method as described in the first aspect.
  • embodiments of the present application provide an electronic device configured to implement the method of the first aspect.
  • the cursor and control display can be triggered by double-clicking, where the cursor is used to indicate the text editing or operation position.
  • the control is used to precisely adjust the position of the cursor to control the process of text editing and text selection.
  • the user updates the display position of the cursor by operating the control. During the movement of the cursor position, the corresponding text will be selected, thereby providing precise control over text editing and text selection within a time limit. The user does not need to make large changes in the process. Swipe across the screen and operate the controls with one hand to select text, which improves the efficiency and experience of text editing and text selection.
  • Figure 1 shows a flow chart of a text selection method according to an embodiment of the present application
  • Figure 2 shows one of the interface schematic diagrams of a text selection method according to an embodiment of the present application
  • Figure 3 shows the second schematic interface diagram of the text selection method according to the embodiment of the present application.
  • Figure 4 shows the third schematic interface diagram of the text selection method according to the embodiment of the present application.
  • Figure 5 shows a structural block diagram of a text selection device according to an embodiment of the present application
  • Figure 6 shows a structural block diagram of an electronic device according to an embodiment of the present application.
  • FIG. 7 is a schematic diagram of the hardware structure of an electronic device that implements an embodiment of the present application.
  • first, second, etc. in the description and claims of this application are used to distinguish similar objects and are not used to describe a specific order or sequence. It is to be understood that the figures so used are interchangeable under appropriate circumstances so that the embodiments of the present application can be practiced in orders other than those illustrated or described herein, and that "first,” “second,” etc. are distinguished Objects are usually of one type, and the number of objects is not limited. For example, the first object can be one or multiple.
  • “and/or” in the description and claims indicates at least one of the connected objects, and the character “/" generally indicates that the related objects are in an "or” relationship.
  • Figure 1 shows a flow chart of the text selection method according to the embodiment of the present application. As shown in Figure 1, the method includes:
  • Step 102 display the cursor and controls on the display interface
  • Step 104 receive the first input to the control
  • Step 106 in response to the first input, update the display position of the cursor
  • Step 108 Select the target text corresponding to the display interface according to the display position of the cursor before and after updating.
  • the user's selection input of the text content can be received.
  • the text content includes web page text, local text, chat box text or input method text, etc.
  • the selection input is used to trigger the cursor and control display on the text content.
  • the specific input method of the selection input can be personalized by the user, such as Long press, double-click, two-finger slide, etc. on the text display interface.
  • the embodiment of the present application does not limit the specific type of selected input.
  • a cursor is displayed on the display interface.
  • the cursor is specifically an identifier used to indicate a position for editing or selecting the text content.
  • the initial display position of the cursor can be related to the input position of the selection input. If the user performs selection input on a certain word, the initial display position of the cursor will be close to the word.
  • the control may be a circular, translucent virtual joystick.
  • Figure 2 shows one of the interface schematic diagrams of a text selection method according to an embodiment of the present application. As shown in Figure 2, on the display interface 200 of the electronic device, there is displayed In the text content 202, after the user makes a selection input, the cursor 204 and the control 206 are displayed at the corresponding position of the selection input, and the display position of the control 206 is close to the cursor 204.
  • the user can make the first input to the control by dragging the control, etc., so that the cursor starts to move from the initial display position through the first input to the control, and the movement direction is consistent with the first input corresponding to the direction.
  • the first input includes direction information and speed information.
  • the moving direction of the cursor is determined based on the direction information, and the moving speed of the cursor is determined based on the speed information, thereby controlling the cursor to start moving.
  • the display position of the cursor is updated based on the current position of the cursor at the time point when the stop command is received.
  • the stop command of the first input can be a sub-input of the first input, for example, if the first input is a sliding input, the stop command is an input in which the user stops sliding the finger and raises the hand.
  • the movement path of the cursor will pass through the text.
  • the target text can be selected.
  • the movement path of the cursor passes through a line in the text. If the movement path of the cursor spans a certain line in the text, all the text in the line passed by the cursor will be selected, thereby effectively improving the text quality. Choose efficiency.
  • the selection method of the target text can be adjusted according to the actual needs of the user.
  • the user can freely set the entire line that the cursor path passes through, or the single word that the cursor path passes through. This embodiment of the present application does not limit this.
  • control 206 may be a translucent circular control, with a dot 2062 displayed in the center of the circular control, and the user can control it by touching and "drag" the dot 2062.
  • the cursor moves in the same way that dot 2062 is dragged.
  • the cursor moves left on the current line at a certain moving speed, and the user "drags” straight up. "dot, and the dragging distance exceeds a certain threshold, the cursor will move upward on the current column at a certain moving speed, and if the dot is "dragped” to the lower right, and the dragging distance exceeds a certain threshold, , the cursor moves columns to the right and rows down at a certain moving speed.
  • the movement speed of the cursor is related to the distance of the user dragging the dot.
  • the text on the path passed by the cursor will be selected simultaneously. For example, if the cursor's moving path passes through a character, or the cursor's moving path passes by the side of a character, the entire line of text on the line where the character is located will be selected. All lines are selected as target text, that is, all lines passed by the cursor path are selected, thereby effectively improving text selection efficiency.
  • a text will be selected to the left. If you move one row down, a row of text will be selected. The selected text will be displayed differently from other texts.
  • the cursor and control display are triggered according to user input.
  • the user moves the display position of the cursor by operating the control.
  • the corresponding Text thereby providing precise control over text editing and text selection within a time limit.
  • the user does not need to swipe across the screen significantly, and can operate the controls with one hand to select text, which improves the efficiency and experience of text editing and text selection.
  • the cursor includes a first cursor and a second cursor, wherein the display colors of the first cursor and the second cursor are different; according to the display positions of the cursor before and after updating, the target corresponding to the display interface is selected.
  • the text includes: determining the coordinates of the first input; determining the corresponding moving direction and moving speed based on the coordinates; updating the first display position of the first cursor and the second display position of the second cursor based on the moving direction and moving speed. At least one of; select and determine the target text according to the updated first display position and/or second display position.
  • the cursor specifically includes a first cursor and a second cursor.
  • the first cursor is used to locate the starting point of the selected text
  • the second cursor is used to locate the end point of the selected text.
  • the target text is located in the text content and selected based on the first display position of the first cursor and the second display position of the second cursor. Specifically, the first cursor indicates the starting point of the target text, and the second cursor is used to indicate the end point of the target text.
  • Figure 3 shows the second schematic interface diagram of the text selection method according to the embodiment of the present application.
  • text content 302 is displayed on the display interface 300 of the electronic device, and controls 304 and 304 are displayed on the text content 302.
  • the display color of the first cursor is different from that of the second cursor, thereby helping the user quickly identify the corresponding cursor. It can be understood that when moving the cursor, the user moves one of the first cursor and the second cursor in response to the first input of the control, and the display color of the moved cursor should be more prominent than that of the unmoved cursor. Take the user moving the second cursor through the control as an example. At this time, the first cursor can be displayed in white, and the second cursor can be displayed in yellow or red.
  • the first input is input to the control.
  • the user first touches the control.
  • the control Taking the circular control shown in Figure 2 as an example, after the user touches the circular control, he moves his finger in the direction where he wants to move the cursor. After the user moves his finger , the dot in the center of the circular control moves with the position of the user's finger, where the position of the dot is the coordinate of the position where the user's finger stays, which is the coordinate of the first input.
  • the electronic device can determine the direction and distance of the user's finger sliding, thereby determining the moving direction and moving speed of the cursor, then updating the display position of the cursor, and selecting the corresponding target based on the moved display position. text.
  • the coordinate system corresponding to the first input coordinate is an xy rectangular coordinate system established with the center point of the control as the origin.
  • the extension direction of the x-axis of this coordinate system is the extension direction of the straight line where the line of text content is located.
  • the extension direction of the y-axis of the coordinate system that is, the extension direction of the straight line where the column of text content is located.
  • determining the corresponding moving direction and moving speed based on the coordinates includes: determining the moving direction based on the coordinate values of the coordinates; and determining the moving speed based on the absolute values of the coordinate values.
  • an xy rectangular coordinate system is established with the center point of the control 206 as the origin. Then the coordinates of the center point of the control, that is, the initial position of the dot 2062 is (0, 0).
  • the current position coordinates of the dot 2062 leaving the initial position that is, the coordinates of the first input are (a, b), then the following relationship exists:
  • the cursor moves to the lower right.
  • the moving speed of the cursor is determined based on the absolute value of the coordinate value. Specifically, in the first input coordinates (a, b), the larger the absolute value Abs(a) of the coordinate value a is, the greater the distance the user's finger drags the dot along the x-axis, and the cursor is in the x-axis direction. The faster you move. The larger the absolute value Abs(b) of the coordinate value b is, the greater the distance the user drags the dot along the y-axis. If the value is larger, the cursor moves faster in the y-axis direction.
  • the moving direction and moving speed are determined based on the coordinate values, which requires a small amount of calculation and is conducive to achieving precise positioning.
  • the moving direction includes a first direction and a second direction
  • the moving direction of the cursor includes at least one of the first direction and the second direction.
  • the movement direction includes the first direction and the second direction.
  • the movement direction includes the first direction and the second direction.
  • the first direction For text that is normally arranged in a "horizontal, horizontal and vertical" manner, taking the xy rectangular coordinate system established based on the center point of the control as the origin as an example, x
  • the extending direction of the axis is the first direction
  • the extending direction of the y-axis is the second direction.
  • the first direction is the direction of the "row” of the text
  • the second direction is the direction of the "column” of the text.
  • the cursor may move in both directions at the same time. direction movement.
  • this application divides the target area where the control is located into a first sub-area, a second sub-area and a third sub-area, where each sub-area corresponds to a coordinate value range.
  • the first sub-area The area range of the area corresponds to the situation that the coordinate value of the cursor is within the first range value
  • the area range of the second sub-area corresponds to the situation that the coordinate value of the cursor is within the second range value
  • the area range of the third sub-area corresponds to The coordinate value of the cursor is within the third range of values.
  • the target area is the area centered on the display position of the control.
  • Figure 4 shows the third interface schematic diagram of the text selection method according to the embodiment of the present application. As shown in Figure 4, The area centered on the control 402 is the target area 404 .
  • the target area 404 includes a first sub-area 4042, a second sub-area 4044, and a third sub-area 4046, where the first sub-area 4042 is an area that shields y-axis movement, and the second sub-area 4044 is an area that shields x-axis movement.
  • the first sub-area 4042 is the area close to the x-axis of the coordinate system. If the user drags the dot 4024 in the control 402 into the first sub-area 4042, the cursor will only move in the first direction, that is, Move in the x-axis direction.
  • the second sub-area 4044 is the area close to the y-axis of the coordinate system. If the user drags the dot 4024 into the second sub-area 4044, the cursor will only move in the second direction, that is, the y-axis direction. .
  • the third sub-region 4046 is an area located between the first sub-region 4042 and the second sub-region 4044.
  • the embodiment of the present application helps the user control the cursor movement more accurately and improves the accuracy and controllability of text selection.
  • moving at least one of the first display position of the first cursor and the second display position of the second cursor according to the movement direction and movement speed includes: before receiving a third response to the control.
  • one of the first display position and the second display position is updated according to the moving direction and moving speed; in the case of receiving the second input, the first display position is updated according to the moving direction and moving speed. and the other in the second display position.
  • the cursor includes a first cursor and a second cursor, where the first cursor is the starting point of the target text, and the second cursor is the end point of the target text.
  • first cursor is the starting point of the target text
  • second cursor is the end point of the target text.
  • the second input can be performed by double-clicking or long-pressing the control, thereby switching the cursor that the control moves from the currently moved cursor to another.
  • the second cursor or the first second display position is moved by default.
  • the second input is not received, according to the default setting, according to the first input Enter the coordinates to move the display position of the second cursor. If the second input to the control is received, the second cursor that the control moves by default is switched to the first cursor. At this time, if the first input to the control is received again, the first cursor is moved according to the coordinates of the first input. Show location.
  • the coordinate value of the coordinate includes an x-axis coordinate value and a y-axis coordinate value
  • Determine the moving speed based on the absolute value of the coordinate value including:
  • the first speed is smaller than the second speed, and the second speed is smaller than the third speed.
  • the moving speed of the cursor is set to three levels, namely the first speed, the second speed and the third speed, where the first speed is the slowest and the third speed is the fastest.
  • the moving speed of the cursor in the first direction that is, the x-axis direction is determined based on the absolute value of a, Abs(a)
  • the movement speed of the cursor in the second direction that is, the y-axis is determined based on the absolute value of b, Abs(b). Movement speed in direction.
  • the first threshold and the second threshold are pre-stored in the electronic device, where the first threshold and the second threshold are related to the display size of the control.
  • the control 206 is a translucent circular control, and the radius of the circular control is R, then the first threshold can be set to 1/3R, and the second threshold can be set to 2/3R.
  • the method further includes: receiving a third input to the control; and in response to the third input, selecting any one of the target text, the target line, or the target paragraph on the text content.
  • the user if the user wishes to individually select a text, a line or a period of time, he or she can perform a third input on the control, where the third input can be quickly dragging a dot in the control and releasing it, such as to Quickly drag the dot left and release to select a word to the left of the cursor; quickly drag the dot downward and release to select the line where the cursor is located, etc., thus achieving more precise text selection.
  • a text selection device is provided.
  • Figure 5 shows a structural block diagram of a text selection device according to an embodiment of the present application. As shown in Figure 5, the text selection device 500 includes:
  • Display module 502 used to display cursors and controls on the display interface
  • the receiving module 504 is used to receive the first input to the control
  • Movement module 506, configured to update the display position of the cursor in response to the first input
  • the selection module 508 is used to select the target text corresponding to the display interface according to the display position of the cursor before and after updating.
  • the user's selection input of the text content can be received.
  • the text content includes web page text, local text, chat box text or input method text, etc.
  • the selection input is used to trigger the cursor and control display on the text content.
  • the specific input method of the selection input can be personalized by the user, such as Long press, double-click, two-finger slide, etc. on the text display interface.
  • the embodiment of the present application does not limit the specific type of selected input.
  • the user can make the first input to the control by dragging the control, etc., so that the cursor starts to move from the initial display position through the first input to the control, and the movement direction is consistent with the first input corresponding to the direction.
  • the user only needs to operate the control with a single finger to complete the selection of a large section of content. There is no need for the user's finger to move across the screen significantly, and no need for both hands to operate, which can improve the operating experience of text editing and text selection.
  • the cursor and control display are triggered according to user input.
  • the user moves the display position of the cursor by operating the control.
  • the corresponding Text thereby providing precise control over text editing and text selection within a time limit.
  • the user does not need to swipe across the screen significantly, and can operate the controls with one hand to select text, which improves the efficiency and experience of text editing and text selection.
  • the cursor includes a first cursor and a second cursor, wherein the first cursor and the second cursor have different display colors;
  • Text selection devices also include:
  • the determination module is used to determine the coordinates of the first input; determine the corresponding moving direction and moving speed according to the coordinates;
  • the movement module is also used to update the first display of the first cursor according to the movement direction and movement speed. at least one of the display position and the second display position of the second cursor;
  • the selection module is also used to select and determine the target text according to the updated first display position and/or second display position.
  • the cursor specifically includes a first cursor and a second cursor.
  • the first cursor is used to locate the starting point of the selected text
  • the second cursor is used to locate the end point of the selected text.
  • the target text is located in the text content and selected based on the first display position of the first cursor and the second display position of the second cursor.
  • the first cursor indicates the starting point of the target text
  • the second cursor is used to indicate the end point of the target text.
  • the first input is an input to the control.
  • the electronic device can determine the direction and distance of the user's finger sliding, thereby determining the moving direction and speed of the cursor, and then moving the display position of the cursor and selecting the corresponding target text.
  • the coordinate system corresponding to the first input coordinate is an xy rectangular coordinate system established with the center point of the control as the origin.
  • the extension direction of the x-axis of this coordinate system is the extension direction of the straight line where the line of text content is located.
  • the extension direction of the y-axis of the coordinate system that is, the extension direction of the straight line where the column of text content is located.
  • the determination module is also used to: determine the moving direction according to the coordinate value of the coordinate; determine the moving speed according to the absolute value of the coordinate value.
  • the moving direction and moving speed are determined based on the coordinate values, which requires a small amount of calculation and is conducive to achieving precise positioning.
  • the determining module, the movement direction includes a first direction and a second direction
  • the moving direction of the cursor includes at least one of the first direction and the second direction.
  • the movement direction includes a first direction and a second direction.
  • the extension direction of the x-axis is the first direction
  • the embodiment of the present application helps the user control the cursor movement more accurately and improves the accuracy and controllability of text selection.
  • the mobile module is also used to:
  • the other one of the first display position and the second display position is updated according to the moving direction and the moving speed.
  • the cursor includes a first cursor and a second cursor, where the first cursor is the starting point of the target text, and the second cursor is the end point of the target text.
  • first cursor is the starting point of the target text
  • second cursor is the end point of the target text.
  • the coordinate value of the coordinate includes an x-axis coordinate value and a y-axis coordinate value
  • the first speed is smaller than the second speed, and the second speed is smaller than the third speed.
  • the moving speed of the cursor is set to three levels, namely the first speed, the second speed and the third speed, where the first speed is the slowest and the third speed is the fastest.
  • the receiving module is further configured to receive a third input to the control; the moving module is further configured to select the target text, target line, or target paragraph in the text content in response to the third input. Either.
  • the user if the user wishes to individually select a text, a line or a period of time, he or she can perform a third input on the control, where the third input can be quickly dragging a dot in the control and releasing it, such as to Quickly drag the dot left and release to select a word to the left of the cursor; quickly drag the dot downward and release to select the line where the cursor is located, etc., thus achieving more precise text selection.
  • the text selection device in the embodiment of the present application may be an electronic device, or may be a component of the electronic device, such as an integrated circuit or chip.
  • the electronic device may be a terminal or other devices other than the terminal.
  • the electronic device may be a mobile phone, a tablet computer, a notebook computer, a handheld computer, a vehicle-mounted electronic device, a mobile Internet device (MID), or augmented reality (AR)/virtual reality (VR).
  • MID mobile Internet device
  • AR augmented reality
  • VR virtual reality
  • UMPC ultra-mobile personal computers
  • PDA personal digital assistants
  • NAS Network Attached Storage
  • PC personal computer
  • TV television
  • teller machine or self-service machine etc.
  • the text selection device in the embodiment of the present application may be a device with an operating system.
  • the operating system can be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiments of this application.
  • the text selection device provided by the embodiments of the present application can implement each process implemented by the above method embodiments. To avoid repetition, the details will not be described here.
  • FIG. 6 shows a structural block diagram of the electronic device according to the embodiment of the present application. As shown in Figure 6, it includes a processor 602 and a memory 604, which are stored in the memory. 604 and can be run on the processor 602. When the program or instruction is executed by the processor 602, it implements each process of the above method embodiment and can achieve the same technical effect. To avoid duplication, it is not included here. Again.
  • the electronic devices in the embodiments of the present application include the above-mentioned mobile electronic devices and non-mobile electronic devices.
  • FIG. 7 is a schematic diagram of the hardware structure of an electronic device that implements an embodiment of the present application.
  • the electronic device 700 includes but is not limited to: radio frequency unit 701, network module 702, audio output unit 703, input unit 704, sensor 705, display unit 706, user input unit 707, interface unit 708, memory 709, processor 710, etc. part.
  • the electronic device 700 may also include a power supply (such as a battery) that supplies power to various components.
  • the power supply may be logically connected to the processor 710 through a power management system, thereby managing charging, discharging, and function through the power management system. Consumption management and other functions.
  • the structure of the electronic device shown in Figure 7 does not constitute a limitation on the electronic device.
  • the electronic device may include more or less components than shown in the figure, or combine certain components, or arrange different components, which will not be described again here. .
  • the display unit 706 is used to display the cursor and controls on the display interface
  • the user input unit 707 is also used to receive a first input to the control
  • the processor 710 is also configured to update the display position of the cursor in response to the first input; and select the target text corresponding to the display interface according to the display position of the cursor before and after updating.
  • the cursor when the electronic device displays text, the cursor is triggered based on user input. and control display. The user moves the display position of the cursor by operating the control. During the movement of the cursor position, the corresponding text will be selected, thus providing precise control over text editing and text selection. During this process, the user There is no need to swipe across the screen significantly, and the controls can be operated with one hand to select text, which improves the efficiency and experience of text editing and text selection.
  • the cursor includes a first cursor and a second cursor, wherein the display colors of the first cursor and the second cursor are different; the processor 710 is also used to determine the coordinates of the first input; and determine the corresponding movement direction and Moving speed; updating at least one of the first display position of the first cursor and the second display position of the second cursor according to the moving direction and the moving speed; according to the updated first display position and/or the second display position, Select and identify the target text.
  • the cursor specifically includes a first cursor and a second cursor.
  • the first cursor is used to locate the starting point of the selected text
  • the second cursor is used to locate the end point of the selected text.
  • the target text is located in the text content and selected based on the first display position of the first cursor and the second display position of the second cursor.
  • the first cursor indicates the starting point of the target text
  • the second cursor is used to indicate the end point of the target text.
  • the processor 710 is also configured to determine the coordinates of the first input; determine the corresponding moving direction and moving speed based on the coordinates; and move the display position of the cursor based on the moving direction and moving speed.
  • the first input is an input to the control.
  • the electronic device can determine the direction and distance of the user's finger sliding, thereby determining the moving direction and moving speed of the cursor, and then moving the cursor. display position and select the corresponding target text.
  • the coordinate system corresponding to the first input coordinate is an xy rectangular coordinate system established with the center point of the control as the origin.
  • the extension direction of the x-axis of this coordinate system is the extension direction of the straight line where the line of text content is located.
  • the extension direction of the y-axis of the coordinate system that is, the extension direction of the straight line where the column of text content is located.
  • the processor 710 determines the moving direction according to the coordinate value; determines the moving speed according to the absolute value of the coordinate value.
  • the moving direction and moving speed are determined based on the coordinate values, which requires a small amount of calculation and is conducive to achieving precise positioning.
  • the moving direction includes a first direction and a second direction; the processor 710 is further configured to:
  • the moving direction of the cursor includes at least one of the first direction and the second direction.
  • the movement direction includes a first direction and a second direction.
  • the extension direction of the x-axis is the first direction
  • the embodiment of the present application helps the user control the cursor movement more accurately and improves the accuracy and controllability of text selection.
  • the processor 710 is also configured to update one of the first display position and the second display position according to the moving direction and the moving speed without receiving the second input to the control; after receiving the third In the case of two inputs, the other one of the first display position and the second display position is updated based on the moving direction and the moving speed.
  • the cursor includes a first cursor and a second cursor, where the first cursor is the starting point of the target text, and the second cursor is the end point of the target text.
  • first cursor is the starting point of the target text
  • second cursor is the end point of the target text.
  • the coordinate value of the coordinate includes an x-axis coordinate value and a y-axis coordinate value; the processor 710 is also configured to determine the movement of the cursor along the first direction when the absolute value of the x-axis coordinate value is less than or equal to the first threshold.
  • the speed is the first speed; when the absolute value of the x-axis coordinate value is greater than the first threshold and less than or equal to the second threshold, it is determined that the moving speed of the cursor along the first direction is the second speed; when the absolute value of the x-axis coordinate value is If the value is greater than the second threshold, determine the movement of the cursor in the first direction.
  • the moving speed is the third speed; when the absolute value of the y-axis coordinate value is less than or equal to the first threshold, the moving speed of the cursor in the second direction is determined to be the first speed; when the absolute value of the y-axis coordinate value is greater than the first threshold , and is less than or equal to the second threshold, determine the moving speed of the cursor along the second direction as the second speed; when the absolute value of the y-axis coordinate value is greater than the second threshold, determine the moving speed of the cursor along the second direction. is the third speed; wherein, the first speed is smaller than the second speed, and the second speed is smaller than the third speed.
  • the moving speed of the cursor is set to three levels, namely the first speed, the second speed and the third speed, where the first speed is the slowest and the third speed is the fastest.
  • the user input unit 707 is also used to receive a third input to the control
  • the processor 710 is further configured to select any one of target words, target lines, or target paragraphs on the text content in response to the third input.
  • the user if the user wishes to individually select a text, a line or a period of time, he or she can perform a third input on the control, where the third input can be quickly dragging a dot in the control and releasing it, such as to Quickly drag the dot left and release to select a word to the left of the cursor; quickly drag the dot downward and release to select the line where the cursor is located, etc., thus achieving more precise text selection.
  • the input unit 704 may include a graphics processing unit (GPU) 7041 and a microphone 7042.
  • the graphics processor 7041 is responsible for the image capture device (GPU) in the video capture mode or the image capture mode. Process the image data of still pictures or videos obtained by cameras (such as cameras).
  • the display unit 706 may include a display panel 7061, which may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like.
  • the user input unit 707 includes a touch panel 7071 and at least one of other input devices 7072 . Touch panel 7071, also called touch screen.
  • the touch panel 7071 may include two parts: a touch detection device and a touch controller.
  • Other input devices 7072 may include but are not limited to physical keyboards, function keys (such as volume control keys, switch keys, etc.), trackballs, mice, and joysticks, which are not included here. Again.
  • Memory 709 may be used to store software programs as well as various data.
  • the memory 709 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, Image playback function, etc.) etc.
  • memory 709 may include volatile memory or non-volatile memory, or memory 709 may include both volatile and non-volatile memory.
  • non-volatile memory can be read-only memory (Read-Only Memory, ROM), programmable read-only memory (Programmable ROM, PROM), erasable programmable read-only memory (Erasable PROM, EPROM), electrically removable memory.
  • Volatile memory can be random access memory (Random Access Memory, RAM), static random access memory (Static RAM, SRAM), dynamic random access memory (Dynamic RAM, DRAM), synchronous dynamic random access memory (Synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (Double Data Rate SDRAM, DDRSDRAM), enhanced synchronous dynamic random access memory (Enhanced SDRAM, ESDRAM), synchronous link dynamic random access memory (Synch link DRAM) , SLDRAM) and direct memory bus random access memory (Direct Rambus RAM, DRRAM).
  • RAM Random Access Memory
  • SRAM static random access memory
  • DRAM dynamic random access memory
  • synchronous dynamic random access memory Synchronous DRAM, SDRAM
  • Double data rate synchronous dynamic random access memory Double Data Rate SDRAM, DDRSDRAM
  • Enhanced SDRAM, ESDRAM synchronous link dynamic random access memory
  • Synch link DRAM synchronous link dynamic random access memory
  • SLDRAM direct memory bus random access memory
  • the processor 710 may include one or more processing units; optionally, the processor 710 integrates an application processor and a modem processor, where the application processor mainly handles operations related to the operating system, user interface, application programs, etc., Modem processors mainly process wireless communication signals, such as baseband processors. It can be understood that the above-mentioned modem processor may not be integrated into the processor 710.
  • Embodiments of the present application also provide a readable storage medium.
  • Programs or instructions are stored on the readable storage medium.
  • the program or instructions are executed by a processor, each process of the above method embodiments is implemented and the same technology can be achieved. The effect will not be described here to avoid repetition.
  • the processor is the processor in the electronic device described in the above embodiment.
  • described Readable storage media includes computer-readable storage media, such as computer read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disks or optical disks.
  • An embodiment of the present application further provides a chip.
  • the chip includes a processor and a communication interface.
  • the communication interface is coupled to the processor.
  • the processor is used to run programs or instructions to implement various processes of the above method embodiments. , and can achieve the same technical effect, so to avoid repetition, they will not be described again here.
  • chips mentioned in the embodiments of this application may also be called system-on-chip, system-on-a-chip, system-on-a-chip or system-on-chip, etc.
  • Embodiments of the present application provide a computer program product.
  • the program product is stored in a storage medium.
  • the program product is executed by at least one processor to implement the processes of the above method embodiments and can achieve the same technical effect. To avoid repetition, we will not go into details here.
  • the embodiment of the present application also provides an electronic device.
  • the electronic device is configured to implement each process of the above method embodiment and can achieve the same technical effect. To avoid duplication, the details will not be described here.
  • the above-described embodiment method can be implemented by means of software plus the necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases the former is a better implementation method.
  • the technical solution of the present application can be embodied in the form of a computer software product that is essentially or contributes to the existing technology.
  • the computer software product is stored in a storage medium (such as ROM/RAM, disk , optical disk), including several instructions to cause a terminal (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in various embodiments of this application.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

Disclosed in the present application are a text selection method, a text selection apparatus, an electronic device and a readable storage medium. The text selection method comprises: displaying a cursor and a control on a display interface; receiving a first input for the control; in response to the first input, updating the display position of the cursor; and according to the display positions of the cursor before and after updating, selecting corresponding target text from the display interface.

Description

文本选取方法、文本选取装置、电子设备和可读存储介质Text selection method, text selection device, electronic device and readable storage medium
相关申请的交叉引用Cross-references to related applications
本申请要求于2022年03月17日提交的申请号为202210263694.2,发明名称为“文本选取方法、文本选取装置、电子设备和可读存储介质”的中国专利申请的优先权,其通过引用方式全部并入本申请。This application claims the priority of the Chinese patent application with application number 202210263694.2 submitted on March 17, 2022, and the invention title is "text selection method, text selection device, electronic device and readable storage medium", which is all by reference incorporated into this application.
技术领域Technical field
本申请属于文本处理技术领域,具体涉及一种文本选取方法、文本选取装置、电子设备和可读存储介质。This application belongs to the field of text processing technology, and specifically relates to a text selection method, text selection device, electronic equipment and readable storage medium.
背景技术Background technique
在相关技术中,对于触屏类手机等电子设备,用户在编辑、选择文本时,需要拖动光标来选中文本。In related technologies, for electronic devices such as touch-screen mobile phones, when users edit and select text, they need to drag the cursor to select the text.
当需要选中的文本量较大时,用户手指需要划过的距离也很长,容易造成误操作,且需要双手操作,使用体验不好。When the amount of text to be selected is large, the distance that the user's finger needs to cross is also very long, which is easy to cause misoperation, and requires both hands to operate, resulting in a poor user experience.
发明内容Contents of the invention
本申请实施例的目的是提供一种文本选取方法、文本选取装置、电子设备和可读存储介质,能够解决选择文本操作体验不好的问题。The purpose of the embodiments of the present application is to provide a text selection method, text selection device, electronic device and readable storage medium, which can solve the problem of poor text selection operation experience.
第一方面,本申请实施例提供了一种文本选取方法,包括:In the first aspect, embodiments of the present application provide a text selection method, including:
在显示界面显示光标和控件;Display cursors and controls on the display interface;
接收对控件的第一输入;Receive the first input to the control;
响应于第一输入,更新光标的显示位置;In response to the first input, updating the display position of the cursor;
根据光标更新前和更新后的显示位置,选取显示界面对应的目标文本。According to the display position of the cursor before and after updating, select the target text corresponding to the display interface.
第二方面,本申请实施例提供了一种文本选取装置,包括: In a second aspect, embodiments of the present application provide a text selection device, including:
显示模块,用于在显示界面显示光标和控件;Display module, used to display cursors and controls on the display interface;
接收模块,用于接收对控件的第一输入;The receiving module is used to receive the first input to the control;
移动模块,用于响应于第一输入,更新光标的显示位置;a movement module configured to update the display position of the cursor in response to the first input;
选取模块,用于根据光标更新前和更新后的显示位置,选取显示界面对应的目标文本。The selection module is used to select the target text corresponding to the display interface based on the display position of the cursor before and after updating.
第三方面,本申请实施例提供了一种电子设备,包括处理器和存储器,存储器存储可在处理器上运行的程序或指令,程序或指令被处理器执行时实现如第一方面的方法的步骤。In a third aspect, embodiments of the present application provide an electronic device, including a processor and a memory. The memory stores programs or instructions that can be run on the processor. When the program or instructions are executed by the processor, the method of the first aspect is implemented. step.
第四方面,本申请实施例提供了一种可读存储介质,该可读存储介质上存储程序或指令,该程序或指令被处理器执行时实现如第一方面的方法的步骤。In a fourth aspect, embodiments of the present application provide a readable storage medium that stores a program or instructions, and when the program or instructions are executed by a processor, the steps of the method in the first aspect are implemented.
第五方面,本申请实施例提供了一种芯片,该芯片包括处理器和通信接口,该通信接口和该处理器耦合,该处理器用于运行程序或指令,实现如第一方面的方法的步骤。In a fifth aspect, embodiments of the present application provide a chip. The chip includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement the steps of the method in the first aspect. .
第六方面,本申请实施例提供一种计算机程序产品,该程序产品被存储在存储介质中,该程序产品被至少一个处理器执行以实现如第一方面所述的方法。In a sixth aspect, embodiments of the present application provide a computer program product, the program product is stored in a storage medium, and the program product is executed by at least one processor to implement the method as described in the first aspect.
第七方面,本申请实施例提供了一种电子设备,该电子设备被配置成用于实现如第一方面的方法。In a seventh aspect, embodiments of the present application provide an electronic device configured to implement the method of the first aspect.
在本申请实施例中,在电子设备显示文本时,如果用户需要对文本进行选择或编辑,则可以通过如双击等方式,触发光标和控件显示,其中光标即用于指示文本编辑或操作位置的表示,控件则用于精确调整光标的位置,从而对文本编辑和文本选择的过程进行控制。In the embodiment of the present application, when the electronic device displays text, if the user needs to select or edit the text, the cursor and control display can be triggered by double-clicking, where the cursor is used to indicate the text editing or operation position. means that the control is used to precisely adjust the position of the cursor to control the process of text editing and text selection.
用户通过对控件进行操作的方式,来更新光标的显示位置,在光标的位置移动过程中,会选中对应的文字,从而时限对文本编辑、文本选择的精确控制,该过程中用户不需要大幅度划过屏幕,且可以单手操作控件来选中文字,提高了文字编辑和文字选择的效率和体验。 The user updates the display position of the cursor by operating the control. During the movement of the cursor position, the corresponding text will be selected, thereby providing precise control over text editing and text selection within a time limit. The user does not need to make large changes in the process. Swipe across the screen and operate the controls with one hand to select text, which improves the efficiency and experience of text editing and text selection.
附图说明Description of the drawings
图1示出了根据本申请实施例的文本选取方法的流程图;Figure 1 shows a flow chart of a text selection method according to an embodiment of the present application;
图2示出了根据本申请实施例的文本选取方法的界面示意图之一;Figure 2 shows one of the interface schematic diagrams of a text selection method according to an embodiment of the present application;
图3示出了根据本申请实施例的文本选取方法的界面示意图之二;Figure 3 shows the second schematic interface diagram of the text selection method according to the embodiment of the present application;
图4示出了根据本申请实施例的文本选取方法的界面示意图之三;Figure 4 shows the third schematic interface diagram of the text selection method according to the embodiment of the present application;
图5示出了根据本申请实施例的文本选取装置的结构框图;Figure 5 shows a structural block diagram of a text selection device according to an embodiment of the present application;
图6示出了根据本申请实施例的电子设备的结构框图;Figure 6 shows a structural block diagram of an electronic device according to an embodiment of the present application;
图7为实现本申请实施例的一种电子设备的硬件结构示意图。FIG. 7 is a schematic diagram of the hardware structure of an electronic device that implements an embodiment of the present application.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be clearly described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, but not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art fall within the scope of protection of this application.
本申请的说明书和权利要求书中的术语“第一”、“第二”等是用于区别类似的对象,而不用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施,且“第一”、“第二”等所区分的对象通常为一类,并不限定对象的个数,例如第一对象可以是一个,也可以是多个。此外,说明书以及权利要求中“和/或”表示所连接对象的至少其中之一,字符“/”,一般表示前后关联对象是一种“或”的关系。The terms "first", "second", etc. in the description and claims of this application are used to distinguish similar objects and are not used to describe a specific order or sequence. It is to be understood that the figures so used are interchangeable under appropriate circumstances so that the embodiments of the present application can be practiced in orders other than those illustrated or described herein, and that "first," "second," etc. are distinguished Objects are usually of one type, and the number of objects is not limited. For example, the first object can be one or multiple. In addition, "and/or" in the description and claims indicates at least one of the connected objects, and the character "/" generally indicates that the related objects are in an "or" relationship.
下面结合附图,通过具体的实施例及其应用场景对本申请实施例提供的文本选取方法、文本选取装置、电子设备和可读存储介质进行详细地说明。The text selection method, text selection device, electronic device and readable storage medium provided by the embodiments of the present application will be described in detail below with reference to the accompanying drawings through specific embodiments and application scenarios.
在本申请的一些实施例中,提供了一种文本选取方法,图1示出了根据本申请实施例的文本选取方法的流程图,如图1所示,方法包括: In some embodiments of the present application, a text selection method is provided. Figure 1 shows a flow chart of the text selection method according to the embodiment of the present application. As shown in Figure 1, the method includes:
步骤102,在显示界面显示光标和控件;Step 102, display the cursor and controls on the display interface;
步骤104,接收对控件的第一输入;Step 104, receive the first input to the control;
步骤106,响应于第一输入,更新光标的显示位置;Step 106, in response to the first input, update the display position of the cursor;
步骤108,根据光标更新前和更新后的显示位置,选取显示界面对应的目标文本。Step 108: Select the target text corresponding to the display interface according to the display position of the cursor before and after updating.
在本申请实施例中,在电子设备,如手机、平板电脑等显示文本内容时,可以接收用户对文本内容的选取输入。其中,文本内容包括如网页文本、本地文本、聊天框文本或输入法文本等,选取输入用于在文本内容上触发光标和控件显示,该选取输入的具体输入方式可以由用户个性化设置,如在文本显示界面上长按、双击、双指滑动等,本申请实施例对选取输入的具体类型不做限制。In this embodiment of the present application, when electronic devices, such as mobile phones, tablets, etc., display text content, the user's selection input of the text content can be received. Among them, the text content includes web page text, local text, chat box text or input method text, etc. The selection input is used to trigger the cursor and control display on the text content. The specific input method of the selection input can be personalized by the user, such as Long press, double-click, two-finger slide, etc. on the text display interface. The embodiment of the present application does not limit the specific type of selected input.
在接收到选取输入后,在显示界面上显示光标,光标具体为用于指示对文本内容进行编辑或选中等操作的位置的标识符。在接收到选取输入后,光标的初始显示位置可以与选取输入的输入位置相关,如用户在某个单词上进行了选取输入,则光标的初始显示位置靠近这个单词。After receiving the selection input, a cursor is displayed on the display interface. The cursor is specifically an identifier used to indicate a position for editing or selecting the text content. After receiving the selection input, the initial display position of the cursor can be related to the input position of the selection input. If the user performs selection input on a certain word, the initial display position of the cursor will be close to the word.
控件可以是一个圆形、半透明的虚拟摇杆,图2示出了根据本申请实施例的文本选取方法的界面示意图之一,如图2所示,电子设备的显示界面200上,显示有文本内容202,在用户进行了选取输入后,在选取输入的对应位置显示光标204和控件206,控件206的显示位置靠近光标204。The control may be a circular, translucent virtual joystick. Figure 2 shows one of the interface schematic diagrams of a text selection method according to an embodiment of the present application. As shown in Figure 2, on the display interface 200 of the electronic device, there is displayed In the text content 202, after the user makes a selection input, the cursor 204 and the control 206 are displayed at the corresponding position of the selection input, and the display position of the control 206 is close to the cursor 204.
在显示光标和控件后,用户可以通过拖动控件等方式,来对控件进行第一输入,从而通过对控件的第一输入,来使光标从初始显示位置开始移动,且移动方向与第一输入的方向对应。After the cursor and the control are displayed, the user can make the first input to the control by dragging the control, etc., so that the cursor starts to move from the initial display position through the first input to the control, and the movement direction is consistent with the first input corresponding to the direction.
其中,在一些实施方式中,第一输入包含有方向信息和速度信息,根据方向信息确定光标的移动方向,并根据速度信息确定光标的移动速度,从而控制光标开始移动,在光标开始移动后,当接收到第一输入的停止指令时,则根据接收到停止指令的时间点,光标所处的当前位置,更新光标的显示位置。其中,第一输入的停止指令可以是第一输入的子输入,举例 来说,第一输入为滑动输入,则停止指令是用户的手指停止滑动并抬手的输入。In some implementations, the first input includes direction information and speed information. The moving direction of the cursor is determined based on the direction information, and the moving speed of the cursor is determined based on the speed information, thereby controlling the cursor to start moving. After the cursor starts moving, When the first input stop command is received, the display position of the cursor is updated based on the current position of the cursor at the time point when the stop command is received. Among them, the stop command of the first input can be a sub-input of the first input, for example For example, if the first input is a sliding input, the stop command is an input in which the user stops sliding the finger and raises the hand.
在光标移动过程中,光标的移动路径会经过文本,根据光标的移动路径,可以对目标文本进行选取。具体地,在一些实施方式中,光标的移动路径经过文本中的一行,如光标的移动路径跨域了文本中的某一行,则将光标经过的行的全部文字都选中,从而有效地提高文本选取效率。During the movement of the cursor, the movement path of the cursor will pass through the text. According to the movement path of the cursor, the target text can be selected. Specifically, in some embodiments, the movement path of the cursor passes through a line in the text. If the movement path of the cursor spans a certain line in the text, all the text in the line passed by the cursor will be selected, thereby effectively improving the text quality. Choose efficiency.
能够理解的是,目标文本的选取方式可根据用户实际需要进行调整,用户可以自由设置选取光标路径经过的整行,也可以设置选取光标路径经过的单字,本申请实施例对此不做限制。It can be understood that the selection method of the target text can be adjusted according to the actual needs of the user. The user can freely set the entire line that the cursor path passes through, or the single word that the cursor path passes through. This embodiment of the present application does not limit this.
在该过程中,用户仅需通过单个手指操作控件即可完成对大段内容的选中,无需用户手指大幅度划过屏幕,也无需双手操作,能够改善文本编辑、文本选择的操作体验。In this process, the user only needs to operate the control with a single finger to complete the selection of a large section of content. There is no need for the user's finger to move across the screen significantly, and no need for both hands to operate, which can improve the operating experience of text editing and text selection.
具体地,如图2所示,控件206可以是一个半透明的圆形控件,在圆形控件的中心显示有圆点2062,用户可以通过触摸并“拖动”圆点2062的方式,来控制光标按照圆点2062被拖动的方式运动。Specifically, as shown in Figure 2, the control 206 may be a translucent circular control, with a dot 2062 displayed in the center of the circular control, and the user can control it by touching and "drag" the dot 2062. The cursor moves in the same way that dot 2062 is dragged.
举例来说,用户向正左“拖动”圆点,且拖动距离超过一定阈值时,则光标以一定的移动速度,在当前所处的行上向左移动,用户向正上“拖动”圆点,且拖动距离超过一定阈值时,则光标以一定的移动速度,在当前所处的列上向上移动,而如果向右下“拖动”圆点,且拖动距离超过一定阈值时,则光标以一定的移动速度,向右移动列,并向下移动行。For example, when the user "drags" the dot straight left, and the drag distance exceeds a certain threshold, the cursor moves left on the current line at a certain moving speed, and the user "drags" straight up. "dot, and the dragging distance exceeds a certain threshold, the cursor will move upward on the current column at a certain moving speed, and if the dot is "dragped" to the lower right, and the dragging distance exceeds a certain threshold, , the cursor moves columns to the right and rows down at a certain moving speed.
其中,光标的移动速度与用户拖动圆点的距离相关。Among them, the movement speed of the cursor is related to the distance of the user dragging the dot.
在光标移动的过程中,会同步选中光标经过的路径上的文本,比如光标的移动路径经过一个字符,或光标的移动路径经过字符的侧边,则将该字符所处的行的整行文字均选取为目标文本,也即选中光标路径经过的全部行,从而有效地提高文本选取效率。During the movement of the cursor, the text on the path passed by the cursor will be selected simultaneously. For example, if the cursor's moving path passes through a character, or the cursor's moving path passes by the side of a character, the entire line of text on the line where the character is located will be selected. All lines are selected as target text, that is, all lines passed by the cursor path are selected, thereby effectively improving text selection efficiency.
如在某行上向左移动一列,则向左选中一个文字,如向下移动一行,则选中一行文字,被选中的文本将与其他文本区别显示。 If you move one column to the left on a row, a text will be selected to the left. If you move one row down, a row of text will be selected. The selected text will be displayed differently from other texts.
在本申请实施例通过在电子设备显示文本时,根据用户输入触发光标和控件显示,用户通过对控件进行操作的方式,来移动光标的显示位置,在光标的位置移动过程中,会选中对应的文字,从而时限对文本编辑、文本选择的精确控制,该过程中用户不需要大幅度划过屏幕,且可以单手操作控件来选中文字,提高了文字编辑和文字选择的效率和体验。In the embodiment of the present application, when the electronic device displays text, the cursor and control display are triggered according to user input. The user moves the display position of the cursor by operating the control. During the movement of the cursor position, the corresponding Text, thereby providing precise control over text editing and text selection within a time limit. In the process, the user does not need to swipe across the screen significantly, and can operate the controls with one hand to select text, which improves the efficiency and experience of text editing and text selection.
在本申请的一些实施例中,光标包括第一光标和第二光标,其中,第一光标和第二光标的显示颜色不同;根据光标更新前和更新后的显示位置,选取显示界面对应的目标文本,包括:确定第一输入的坐标;根据坐标,确定对应的移动方向和移动速度;根据移动方向和移动速度,更新第一光标的第一显示位置,和第二光标的第二显示位置中的至少一个;根据更新后的第一显示位置和/或第二显示位置,选择并确定目标文本。In some embodiments of the present application, the cursor includes a first cursor and a second cursor, wherein the display colors of the first cursor and the second cursor are different; according to the display positions of the cursor before and after updating, the target corresponding to the display interface is selected. The text includes: determining the coordinates of the first input; determining the corresponding moving direction and moving speed based on the coordinates; updating the first display position of the first cursor and the second display position of the second cursor based on the moving direction and moving speed. At least one of; select and determine the target text according to the updated first display position and/or second display position.
在本申请实施例中,光标具体包括第一光标和第二光标,其中,在一种实施方式中,第一光标用于定位选择文本的起点,第二光标用于定位选择文本的终点。In this embodiment of the present application, the cursor specifically includes a first cursor and a second cursor. In one implementation, the first cursor is used to locate the starting point of the selected text, and the second cursor is used to locate the end point of the selected text.
在用户通过控件移动光标位置后,基于第一光标的第一显示位置,和第二光标的第二显示位置,来对文本内容中定位目标文本,并进行选择。具体地,第一光标指示目标文本的起点,第二光标用于指示目标文本的终点。After the user moves the cursor position through the control, the target text is located in the text content and selected based on the first display position of the first cursor and the second display position of the second cursor. Specifically, the first cursor indicates the starting point of the target text, and the second cursor is used to indicate the end point of the target text.
图3示出了根据本申请实施例的文本选取方法的界面示意图之二,如图3所示,电子设备的显示界面300上,显示有文本内容302,文本内容302上显示有控件304、第一光标306和第二光标308,其中,第一光标306和第二光标308之间即目标文本310。Figure 3 shows the second schematic interface diagram of the text selection method according to the embodiment of the present application. As shown in Figure 3, text content 302 is displayed on the display interface 300 of the electronic device, and controls 304 and 304 are displayed on the text content 302. A cursor 306 and a second cursor 308, wherein the target text 310 is between the first cursor 306 and the second cursor 308.
其中,第一光标的显示颜色与第二光标不同,从而帮助用户快速分别对应的光标。能够理解的是,在移动光标时,用户针对控件的第一输入移动的是第一光标和第二光标中的一者,被移动的光标的显示颜色要突出于不被移动的光标。以用户通过控件移动第二光标为例,此时第一光标可以显示为白色,第二光标可以显示为黄色或者红色。 The display color of the first cursor is different from that of the second cursor, thereby helping the user quickly identify the corresponding cursor. It can be understood that when moving the cursor, the user moves one of the first cursor and the second cursor in response to the first input of the control, and the display color of the moved cursor should be more prominent than that of the unmoved cursor. Take the user moving the second cursor through the control as an example. At this time, the first cursor can be displayed in white, and the second cursor can be displayed in yellow or red.
第一输入是对控件的输入,具体地,用户首先触摸控件,以图2示出的圆形控件为例,用户触摸圆形控件后,向希望移动光标的方向移动手指,在用户手指移动后,圆形控件中心的圆点随用户手指的位置移动,其中,圆点所处的位置,也即用户手指停留的位置的坐标,也即第一输入的坐标。The first input is input to the control. Specifically, the user first touches the control. Taking the circular control shown in Figure 2 as an example, after the user touches the circular control, he moves his finger in the direction where he wants to move the cursor. After the user moves his finger , the dot in the center of the circular control moves with the position of the user's finger, where the position of the dot is the coordinate of the position where the user's finger stays, which is the coordinate of the first input.
根据第一输入的坐标,电子设备能够确定出用户手指滑动的方向和距离,从而确定出光标的移动方向和移动速度,进而更新光标的显示位置,并根据移动后的显示位置,选取对应的目标文本。According to the first input coordinates, the electronic device can determine the direction and distance of the user's finger sliding, thereby determining the moving direction and moving speed of the cursor, then updating the display position of the cursor, and selecting the corresponding target based on the moved display position. text.
能够理解的是,第一输入的坐标对应的坐标系,是以控件的中心点为原点建立的xy直角坐标系,该坐标系的x轴的延伸方向,即文本内容的行所在直线的延伸方向,该坐标系的y轴的延伸方向,即文本内容的列所在直线的延伸方向。It can be understood that the coordinate system corresponding to the first input coordinate is an xy rectangular coordinate system established with the center point of the control as the origin. The extension direction of the x-axis of this coordinate system is the extension direction of the straight line where the line of text content is located. , the extension direction of the y-axis of the coordinate system, that is, the extension direction of the straight line where the column of text content is located.
在本申请的一些实施例中,根据坐标,确定对应的移动方向和移动速度,包括:根据坐标的坐标值,确定移动方向;根据坐标值的绝对值,确定移动速度。In some embodiments of the present application, determining the corresponding moving direction and moving speed based on the coordinates includes: determining the moving direction based on the coordinate values of the coordinates; and determining the moving speed based on the absolute values of the coordinate values.
在本申请实施例中,以图2为例,以控件206的中心点为原点建立xy直角坐标系,则控件的中心点,也即圆点2062的初始位置的坐标为(0,0)。当用户通过第一输入拖动圆点2062后,离开初始位置的圆点2062的当前位置坐标,也即第一输入的坐标为(a,b),则存在以下关系:In this embodiment of the present application, taking Figure 2 as an example, an xy rectangular coordinate system is established with the center point of the control 206 as the origin. Then the coordinates of the center point of the control, that is, the initial position of the dot 2062 is (0, 0). When the user drags the dot 2062 through the first input, the current position coordinates of the dot 2062 leaving the initial position, that is, the coordinates of the first input are (a, b), then the following relationship exists:
当a>0,则光标向右移动;When a>0, the cursor moves to the right;
当a<0,则光标向左移动;When a<0, the cursor moves to the left;
当b>0,则光标向上移动;When b>0, the cursor moves upward;
当b<0,则光标向下移动。When b<0, the cursor moves downward.
举例来说,如果满足a>0,且b<0,则光标向右下方移动。For example, if a>0 and b<0 are satisfied, the cursor moves to the lower right.
进一步地,根据坐标值的绝对值,来确定光标的移动速度。具体地,第一输入的坐标(a,b)中,坐标值a的绝对值Abs(a)越大,则说明用户手指沿x轴拖动圆点的距离越大,则光标在x轴方向上的移动速度越快。坐标值b的绝对值Abs(b)越大,则说明用户指沿y轴拖动圆点的距离越 大,则光标在y轴方向上的移动速度越大。Further, the moving speed of the cursor is determined based on the absolute value of the coordinate value. Specifically, in the first input coordinates (a, b), the larger the absolute value Abs(a) of the coordinate value a is, the greater the distance the user's finger drags the dot along the x-axis, and the cursor is in the x-axis direction. The faster you move. The larger the absolute value Abs(b) of the coordinate value b is, the greater the distance the user drags the dot along the y-axis. If the value is larger, the cursor moves faster in the y-axis direction.
根据坐标值确定移动方向和移动速度,运算量小,有利于实现精准定位。The moving direction and moving speed are determined based on the coordinate values, which requires a small amount of calculation and is conducive to achieving precise positioning.
在本申请的一些实施例中,移动方向包括第一方向和第二方向;In some embodiments of the present application, the moving direction includes a first direction and a second direction;
根据坐标,确定移动方向,包括:Determine the direction of movement based on the coordinates, including:
在坐标的坐标值处于第一坐标值范围内的情况下,确定光标的移动方向是第一方向;When the coordinate value of the coordinate is within the first coordinate value range, it is determined that the moving direction of the cursor is the first direction;
在坐标的坐标值处于第二坐标值范围内的情况下,确定光标的移动方向是第二方向;When the coordinate value of the coordinate is within the second coordinate value range, determine that the moving direction of the cursor is the second direction;
在坐标的坐标值处于第三坐标值范围内的情况下,确定光标的移动方向包括第一方向和第二方向中的至少一种。When the coordinate value of the coordinate is within the third coordinate value range, it is determined that the moving direction of the cursor includes at least one of the first direction and the second direction.
在本申请实施例中,移动方向包括第一方向和第二方向,对于正常按照“横平竖直”的方式排列的文本,以根据控件的中心点为原点建立的xy直角坐标系为例,x轴的延伸方向即第一方向,y轴的延伸方向即第二方向。In the embodiment of this application, the movement direction includes the first direction and the second direction. For text that is normally arranged in a "horizontal, horizontal and vertical" manner, taking the xy rectangular coordinate system established based on the center point of the control as the origin as an example, x The extending direction of the axis is the first direction, and the extending direction of the y-axis is the second direction.
对于非正常排列的文本,第一方向是文本“行”的方向,第二方向是文本“列”的方向。For text that is not arranged normally, the first direction is the direction of the "row" of the text, and the second direction is the direction of the "column" of the text.
其中,用于用户可能难以精准控制控件,当用户希望光标仅沿第一方向(x轴方向)或第二方向(y轴方向)运动时,由于操作变差,可能会导致光标同时向两个方向移动。Among them, it may be difficult for the user to accurately control the control. When the user wants the cursor to move only in the first direction (x-axis direction) or the second direction (y-axis direction), due to poor operation, the cursor may move in both directions at the same time. direction movement.
为了防止出现上述情况,本申请将控件所处的目标区域划分为第一子区域、第二子区域和第三子区域,其中,每个子区域对应于一个坐标值范围,具体地,第一子区域的区域范围对应于光标的坐标值处于第一范围值内的情况,第二子区域的区域范围对应于光标的坐标值处于第二范围值内的情况,第三子区域的区域范围对应于光标的坐标值处于第三范围值内的情况。In order to prevent the above situation from occurring, this application divides the target area where the control is located into a first sub-area, a second sub-area and a third sub-area, where each sub-area corresponds to a coordinate value range. Specifically, the first sub-area The area range of the area corresponds to the situation that the coordinate value of the cursor is within the first range value, the area range of the second sub-area corresponds to the situation that the coordinate value of the cursor is within the second range value, and the area range of the third sub-area corresponds to The coordinate value of the cursor is within the third range of values.
具象化来说,目标区域即以控件的显示位置为中心的区域,图4示出了根据本申请实施例的文本选取方法的界面示意图之三,如图4所示,以 控件402为中心的区域为目标区域404。To put it concretely, the target area is the area centered on the display position of the control. Figure 4 shows the third interface schematic diagram of the text selection method according to the embodiment of the present application. As shown in Figure 4, The area centered on the control 402 is the target area 404 .
目标区域404包括第一子区域4042、第二子区域4044和第三子区域4046,其中,第一子区域4042是屏蔽y轴移动的区域,第二子区域4044是屏蔽x轴移动的区域,如图4所示,第一子区域4042即贴近坐标系x轴的区域,如果用户将控件402中的圆点4024拖动至第一子区域4042内,则光标仅沿第一方向,也即x轴方向移动。The target area 404 includes a first sub-area 4042, a second sub-area 4044, and a third sub-area 4046, where the first sub-area 4042 is an area that shields y-axis movement, and the second sub-area 4044 is an area that shields x-axis movement. As shown in Figure 4, the first sub-area 4042 is the area close to the x-axis of the coordinate system. If the user drags the dot 4024 in the control 402 into the first sub-area 4042, the cursor will only move in the first direction, that is, Move in the x-axis direction.
如图4所示,第二子区域4044即贴近坐标系y轴的区域,如果用户将圆点4024拖动至第二子区域4044内,则光标仅沿第二方向,也即y轴方向移动。As shown in Figure 4, the second sub-area 4044 is the area close to the y-axis of the coordinate system. If the user drags the dot 4024 into the second sub-area 4044, the cursor will only move in the second direction, that is, the y-axis direction. .
第三子区域4046是位于第一子区域4042和第二子区域4044之间的区域,当坐标落入第三子区域4046,也即用户将圆点4024拖动至第三子区域4046时,光标根据第一坐标的坐标值自由移动。The third sub-region 4046 is an area located between the first sub-region 4042 and the second sub-region 4044. When the coordinates fall into the third sub-region 4046, that is, when the user drags the dot 4024 to the third sub-region 4046, The cursor moves freely according to the coordinate value of the first coordinate.
本申请实施例通过对控件附近的区域进行划分,有利于用户更加准确地控制光标移动,提高文字选择的准确性和可控性。By dividing the area near the control, the embodiment of the present application helps the user control the cursor movement more accurately and improves the accuracy and controllability of text selection.
在本申请的一些实施例中,根据移动方向和移动速度,移动第一光标的第一显示位置,和第二光标的第二显示位置中的至少一个,包括:在未接收到对控件的第二输入的情况下,根据移动方向和移动速度,更新第一显示位置和第二显示位置中的一者;在接收到第二输入的情况下,根据移动方向和移动速度,更新第一显示位置和第二显示位置中的另一者。In some embodiments of the present application, moving at least one of the first display position of the first cursor and the second display position of the second cursor according to the movement direction and movement speed includes: before receiving a third response to the control. In the case of two inputs, one of the first display position and the second display position is updated according to the moving direction and moving speed; in the case of receiving the second input, the first display position is updated according to the moving direction and moving speed. and the other in the second display position.
在本申请实施例中,光标包括第一光标和第二光标,其中,第一光标是目标文本的起点,第二光标是目标文本的终点,在移动光标的显示位置时,实际上移动的是第一光标和第二光标中的一个。In this embodiment of the present application, the cursor includes a first cursor and a second cursor, where the first cursor is the starting point of the target text, and the second cursor is the end point of the target text. When moving the display position of the cursor, what is actually moved is One of the first cursor and the second cursor.
为了满足不同用户的不同需求,可以通过如双击或长按控件的方式进行第二输入,从而将控件移动的光标,由当前被移动的光标切换为另一个。In order to meet the different needs of different users, the second input can be performed by double-clicking or long-pressing the control, thereby switching the cursor that the control moves from the currently moved cursor to another.
举例来说,按照一般的用户使用习惯,当用户对控件进行第一输入时,默认移动的是第二光标或第一的第二显示位置。For example, according to general user usage habits, when the user performs a first input on a control, the second cursor or the first second display position is moved by default.
具体地,如果没有接收到第二输入,此时按照默认设置,根据第一输 入的坐标,移动第二光标的显示位置。如果接收到针对控件的第二输入,则将控件默认移动的第二光标切换为第一光标,此时如果再次接收到对控件的第一输入,则根据第一输入的坐标移动第一光标的显示位置。Specifically, if the second input is not received, according to the default setting, according to the first input Enter the coordinates to move the display position of the second cursor. If the second input to the control is received, the second cursor that the control moves by default is switched to the first cursor. At this time, if the first input to the control is received again, the first cursor is moved according to the coordinates of the first input. Show location.
通过切换控件移动的光标,能够使用户自由切换选择文本的方式,提高用户体验。By switching the cursor moved by the control, the user can freely switch the way to select text, improving the user experience.
在本申请的一些实施例中,坐标的坐标值包括x轴坐标值和y轴坐标值;In some embodiments of the present application, the coordinate value of the coordinate includes an x-axis coordinate value and a y-axis coordinate value;
根据坐标值的绝对值,确定移动速度,包括:Determine the moving speed based on the absolute value of the coordinate value, including:
在x轴坐标值的绝对值小于等于第一阈值的情况下,确定光标沿第一方向的移动速度为第一速度;When the absolute value of the x-axis coordinate value is less than or equal to the first threshold, determine the moving speed of the cursor along the first direction as the first speed;
在x轴坐标值的绝对值大于第一阈值,且小于等于第二阈值的情况下,确定光标沿第一方向的移动速度为第二速度;When the absolute value of the x-axis coordinate value is greater than the first threshold and less than or equal to the second threshold, determine the moving speed of the cursor along the first direction as the second speed;
在x轴坐标值的绝对值大于第二阈值的情况下,确定光标沿第一方向的移动速度为第三速度;When the absolute value of the x-axis coordinate value is greater than the second threshold, determine the moving speed of the cursor along the first direction as the third speed;
在y轴坐标值的绝对值小于等于第一阈值的情况下,确定光标沿第二方向的移动速度为第一速度;When the absolute value of the y-axis coordinate value is less than or equal to the first threshold, determine the moving speed of the cursor along the second direction as the first speed;
在y轴坐标值的绝对值大于第一阈值,且小于等于第二阈值的情况下,确定光标沿第二方向的移动速度为第二速度;When the absolute value of the y-axis coordinate value is greater than the first threshold and less than or equal to the second threshold, determine the moving speed of the cursor along the second direction as the second speed;
在y轴坐标值的绝对值大于第二阈值的情况下,确定光标沿第二方向的移动速度为第三速度;When the absolute value of the y-axis coordinate value is greater than the second threshold, determine the moving speed of the cursor along the second direction as the third speed;
其中,第一速度小于第二速度,第二速度小于第三速度。Wherein, the first speed is smaller than the second speed, and the second speed is smaller than the third speed.
在本申请实施例中,将光标的移动速度,设置为三个等级,分别为第一速度、第二速度和第三速度,其中,第一速度最慢,第三速度最快。In this embodiment of the present application, the moving speed of the cursor is set to three levels, namely the first speed, the second speed and the third speed, where the first speed is the slowest and the third speed is the fastest.
在得到第一输入的坐标(a,b)后,其中,a为坐标(a,b)的x轴坐标值,b为坐标(a,b)的y轴坐标值。根据a的绝对值Abs(a)来确定光标在第一方向上,也即x轴方向上的移动速度,根据b的绝对值Abs(b)来确定光标在第二方向上,也即y轴方向上的移动速度。 After obtaining the first input coordinate (a, b), where a is the x-axis coordinate value of the coordinate (a, b), and b is the y-axis coordinate value of the coordinate (a, b). The moving speed of the cursor in the first direction, that is, the x-axis direction is determined based on the absolute value of a, Abs(a), and the movement speed of the cursor in the second direction, that is, the y-axis is determined based on the absolute value of b, Abs(b). Movement speed in direction.
具体地,电子设备中预存储有第一阈值和第二阈值,其中,第一阈值和第二阈值与控件的显示大小相关。以图2为例,控件206是一个半透明的圆形控件,圆形控件的半径为R,则第一阈值可以设置为1/3R,第二阈值可以设置为2/3R。Specifically, the first threshold and the second threshold are pre-stored in the electronic device, where the first threshold and the second threshold are related to the display size of the control. Taking Figure 2 as an example, the control 206 is a translucent circular control, and the radius of the circular control is R, then the first threshold can be set to 1/3R, and the second threshold can be set to 2/3R.
当Abs(a)<1/3R时,则光标沿第一方向的移动速度为第一速度;When Abs(a)<1/3R, the moving speed of the cursor along the first direction is the first speed;
当1/3R<Abs(a)<2/3R时,则光标沿第一方向的移动速度为第二速度;When 1/3R<Abs(a)<2/3R, the cursor’s moving speed along the first direction is the second speed;
当2/3R<Abs(a)时,则光标沿第一方向的移动速度为第三速度;When 2/3R<Abs(a), the moving speed of the cursor along the first direction is the third speed;
当Abs(b)<1/3R时,则光标沿第二方向的移动速度为第一速度;When Abs(b)<1/3R, the moving speed of the cursor in the second direction is the first speed;
当1/3R<Abs(b)<2/3R时,则光标沿第二方向的移动速度为第二速度;When 1/3R<Abs(b)<2/3R, the moving speed of the cursor in the second direction is the second speed;
当2/3R<Abs(b)时,则光标沿第二方向的移动速度为第三速度。When 2/3R<Abs(b), the moving speed of the cursor in the second direction is the third speed.
通过根据用户拖动圆点的距离来调节光标移动的速度,有利于时限对光标位置的精确控制和定位。By adjusting the speed of the cursor movement according to the distance the user drags the dot, it is conducive to precise control and positioning of the cursor position within the time limit.
在本申请的一些实施例中,在显示控件之后,方法还包括:接收对控件的第三输入;响应于第三输入,在文本内容上选择目标文字、目标行或目标段落中的任一个。In some embodiments of the present application, after displaying the control, the method further includes: receiving a third input to the control; and in response to the third input, selecting any one of the target text, the target line, or the target paragraph on the text content.
在本申请实施例中,针对用户希望单独选定一个文字、一行或者一段时,可通过对控件进行第三输入,其中,第三输入可以是快速拖动控件内的圆点并释放,如向左快速拖动圆点并释放,则选定光标左侧的一个字,向下快速拖动圆点并释放,则选定光标所在的一行等,从而实现更加精确的文本选择。In this embodiment of the present application, if the user wishes to individually select a text, a line or a period of time, he or she can perform a third input on the control, where the third input can be quickly dragging a dot in the control and releasing it, such as to Quickly drag the dot left and release to select a word to the left of the cursor; quickly drag the dot downward and release to select the line where the cursor is located, etc., thus achieving more precise text selection.
其中,如果用户拖动并释放圆点的时长在300ms或500ms以内,则视为进行了第三输入。Among them, if the user drags and releases the dot for less than 300ms or 500ms, it is regarded as a third input.
在本申请的一些实施例中,提供了一种文本选取装置,图5示出了根据本申请实施例的文本选取装置的结构框图,如图5所示,文本选取装置500包括: In some embodiments of the present application, a text selection device is provided. Figure 5 shows a structural block diagram of a text selection device according to an embodiment of the present application. As shown in Figure 5, the text selection device 500 includes:
显示模块502,用于在显示界面显示光标和控件;Display module 502, used to display cursors and controls on the display interface;
接收模块504,用于接收对控件的第一输入;The receiving module 504 is used to receive the first input to the control;
移动模块506,用于响应于第一输入,更新光标的显示位置;Movement module 506, configured to update the display position of the cursor in response to the first input;
选取模块508,用于根据光标更新前和更新后的显示位置,选取显示界面对应的目标文本。The selection module 508 is used to select the target text corresponding to the display interface according to the display position of the cursor before and after updating.
在本申请实施例中,在电子设备,如手机、平板电脑等显示文本内容时,可以接收用户对文本内容的选取输入。其中,文本内容包括如网页文本、本地文本、聊天框文本或输入法文本等,选取输入用于在文本内容上触发光标和控件显示,该选取输入的具体输入方式可以由用户个性化设置,如在文本显示界面上长按、双击、双指滑动等,本申请实施例对选取输入的具体类型不做限制。In this embodiment of the present application, when electronic devices, such as mobile phones, tablets, etc., display text content, the user's selection input of the text content can be received. Among them, the text content includes web page text, local text, chat box text or input method text, etc. The selection input is used to trigger the cursor and control display on the text content. The specific input method of the selection input can be personalized by the user, such as Long press, double-click, two-finger slide, etc. on the text display interface. The embodiment of the present application does not limit the specific type of selected input.
在显示光标和控件后,用户可以通过拖动控件等方式,来对控件进行第一输入,从而通过对控件的第一输入,来使光标从初始显示位置开始移动,且移动方向与第一输入的方向对应。在该过程中,用户仅需通过单个手指操作控件即可完成对大段内容的选中,无需用户手指大幅度划过屏幕,也无需双手操作,能够改善文本编辑、文本选择的操作体验。After the cursor and the control are displayed, the user can make the first input to the control by dragging the control, etc., so that the cursor starts to move from the initial display position through the first input to the control, and the movement direction is consistent with the first input corresponding to the direction. In this process, the user only needs to operate the control with a single finger to complete the selection of a large section of content. There is no need for the user's finger to move across the screen significantly, and no need for both hands to operate, which can improve the operating experience of text editing and text selection.
在本申请实施例通过在电子设备显示文本时,根据用户输入触发光标和控件显示,用户通过对控件进行操作的方式,来移动光标的显示位置,在光标的位置移动过程中,会选中对应的文字,从而时限对文本编辑、文本选择的精确控制,该过程中用户不需要大幅度划过屏幕,且可以单手操作控件来选中文字,提高了文字编辑和文字选择的效率和体验。In the embodiment of the present application, when the electronic device displays text, the cursor and control display are triggered according to user input. The user moves the display position of the cursor by operating the control. During the movement of the cursor position, the corresponding Text, thereby providing precise control over text editing and text selection within a time limit. In the process, the user does not need to swipe across the screen significantly, and can operate the controls with one hand to select text, which improves the efficiency and experience of text editing and text selection.
在本申请的一些实施例中,光标包括第一光标和第二光标,其中,第一光标和第二光标的显示颜色不同;In some embodiments of the present application, the cursor includes a first cursor and a second cursor, wherein the first cursor and the second cursor have different display colors;
文本选取装置还包括:Text selection devices also include:
确定模块,用于确定第一输入的坐标;根据坐标,确定对应的移动方向和移动速度;The determination module is used to determine the coordinates of the first input; determine the corresponding moving direction and moving speed according to the coordinates;
移动模块,还用于根据移动方向和移动速度,更新第一光标的第一显 示位置,和第二光标的第二显示位置中的至少一个;The movement module is also used to update the first display of the first cursor according to the movement direction and movement speed. at least one of the display position and the second display position of the second cursor;
选取模块,还用于根据更新后的第一显示位置和/或第二显示位置,选择并确定目标文本。The selection module is also used to select and determine the target text according to the updated first display position and/or second display position.
在本申请实施例中,光标具体包括第一光标和第二光标,其中,在一种实施方式中,第一光标用于定位选择文本的起点,第二光标用于定位选择文本的终点。在用户通过控件移动光标位置后,基于第一光标的第一显示位置,和第二光标的第二显示位置,来对文本内容中定位目标文本,并进行选择。具体地,第一光标指示目标文本的起点,第二光标用于指示目标文本的终点。In this embodiment of the present application, the cursor specifically includes a first cursor and a second cursor. In one implementation, the first cursor is used to locate the starting point of the selected text, and the second cursor is used to locate the end point of the selected text. After the user moves the cursor position through the control, the target text is located in the text content and selected based on the first display position of the first cursor and the second display position of the second cursor. Specifically, the first cursor indicates the starting point of the target text, and the second cursor is used to indicate the end point of the target text.
第一输入是对控件的输入,根据第一输入的坐标,电子设备能够确定出用户手指滑动的方向和距离,从而确定出光标的移动方向和移动速度,进而移动光标的显示位置,并选取对应的目标文本。The first input is an input to the control. According to the coordinates of the first input, the electronic device can determine the direction and distance of the user's finger sliding, thereby determining the moving direction and speed of the cursor, and then moving the display position of the cursor and selecting the corresponding target text.
能够理解的是,第一输入的坐标对应的坐标系,是以控件的中心点为原点建立的xy直角坐标系,该坐标系的x轴的延伸方向,即文本内容的行所在直线的延伸方向,该坐标系的y轴的延伸方向,即文本内容的列所在直线的延伸方向。It can be understood that the coordinate system corresponding to the first input coordinate is an xy rectangular coordinate system established with the center point of the control as the origin. The extension direction of the x-axis of this coordinate system is the extension direction of the straight line where the line of text content is located. , the extension direction of the y-axis of the coordinate system, that is, the extension direction of the straight line where the column of text content is located.
在本申请的一些实施例中,确定模块,还用于:根据坐标的坐标值,确定移动方向;根据坐标值的绝对值,确定移动速度。In some embodiments of the present application, the determination module is also used to: determine the moving direction according to the coordinate value of the coordinate; determine the moving speed according to the absolute value of the coordinate value.
在本申请实施例中,根据坐标值确定移动方向和移动速度,运算量小,有利于实现精准定位。In the embodiment of the present application, the moving direction and moving speed are determined based on the coordinate values, which requires a small amount of calculation and is conducive to achieving precise positioning.
在本申请的一些实施例中,确定模块,移动方向包括第一方向和第二方向;In some embodiments of the present application, the determining module, the movement direction includes a first direction and a second direction;
确定模块,还用于:Determine the module, also used for:
在坐标的坐标值处于第一坐标值范围内的情况下,确定光标的移动方向是第一方向;When the coordinate value of the coordinate is within the first coordinate value range, it is determined that the moving direction of the cursor is the first direction;
在坐标的坐标值处于第二坐标值范围内的情况下,确定光标的移动方向是第二方向; When the coordinate value of the coordinate is within the second coordinate value range, determine that the moving direction of the cursor is the second direction;
在坐标的坐标值处于第三坐标值范围内的情况下,确定光标的移动方向包括第一方向和第二方向中的至少一种。When the coordinate value of the coordinate is within the third coordinate value range, it is determined that the moving direction of the cursor includes at least one of the first direction and the second direction.
在本申请实施例中,移动方向包括第一方向和第二方向,以根据控件的中心点为原点建立的xy直角坐标系为例,x轴的延伸方向即第一方向,y轴的延伸方向即第二方向。In the embodiment of the present application, the movement direction includes a first direction and a second direction. Taking the xy rectangular coordinate system established based on the center point of the control as the origin as an example, the extension direction of the x-axis is the first direction, and the extension direction of the y-axis That is the second direction.
本申请实施例通过对控件附近的区域进行划分,有利于用户更加准确地控制光标移动,提高文字选择的准确性和可控性。By dividing the area near the control, the embodiment of the present application helps the user control the cursor movement more accurately and improves the accuracy and controllability of text selection.
在本申请的一些实施例中,移动模块,还用于:In some embodiments of this application, the mobile module is also used to:
在未接收到对控件的第二输入的情况下,根据移动方向和移动速度,更新第一显示位置和第二显示位置中的一者;without receiving the second input to the control, updating one of the first display position and the second display position according to the movement direction and the movement speed;
在接收到第二输入的情况下,根据移动方向和移动速度,更新第一显示位置和第二显示位置中的另一者。Upon receiving the second input, the other one of the first display position and the second display position is updated according to the moving direction and the moving speed.
在本申请实施例中,光标包括第一光标和第二光标,其中,第一光标是目标文本的起点,第二光标是目标文本的终点,在移动光标的显示位置时,实际上移动的是第一光标和第二光标中的一个。通过切换控件移动的光标,能够使用户自由切换选择文本的方式,提高用户体验。In this embodiment of the present application, the cursor includes a first cursor and a second cursor, where the first cursor is the starting point of the target text, and the second cursor is the end point of the target text. When moving the display position of the cursor, what is actually moved is One of the first cursor and the second cursor. By switching the cursor moved by the control, the user can freely switch the way to select text, improving the user experience.
在本申请的一些实施例中,坐标的坐标值包括x轴坐标值和y轴坐标值;In some embodiments of the present application, the coordinate value of the coordinate includes an x-axis coordinate value and a y-axis coordinate value;
确定模块,还用于:Determine the module, also used for:
在x轴坐标值的绝对值小于等于第一阈值的情况下,确定光标沿第一方向的移动速度为第一速度;When the absolute value of the x-axis coordinate value is less than or equal to the first threshold, determine the moving speed of the cursor along the first direction as the first speed;
在x轴坐标值的绝对值大于第一阈值,且小于等于第二阈值的情况下,确定光标沿第一方向的移动速度为第二速度;When the absolute value of the x-axis coordinate value is greater than the first threshold and less than or equal to the second threshold, determine the moving speed of the cursor along the first direction as the second speed;
在x轴坐标值的绝对值大于第二阈值的情况下,确定光标沿第一方向的移动速度为第三速度;When the absolute value of the x-axis coordinate value is greater than the second threshold, determine the moving speed of the cursor along the first direction as the third speed;
在y轴坐标值的绝对值小于等于第一阈值的情况下,确定光标沿第二方向的移动速度为第一速度; When the absolute value of the y-axis coordinate value is less than or equal to the first threshold, determine the moving speed of the cursor along the second direction as the first speed;
在y轴坐标值的绝对值大于第一阈值,且小于等于第二阈值的情况下,确定光标沿第二方向的移动速度为第二速度;When the absolute value of the y-axis coordinate value is greater than the first threshold and less than or equal to the second threshold, determine the moving speed of the cursor along the second direction as the second speed;
在y轴坐标值的绝对值大于第二阈值的情况下,确定光标沿第二方向的移动速度为第三速度;When the absolute value of the y-axis coordinate value is greater than the second threshold, determine the moving speed of the cursor along the second direction as the third speed;
其中,第一速度小于第二速度,第二速度小于第三速度。Wherein, the first speed is smaller than the second speed, and the second speed is smaller than the third speed.
在本申请实施例中,将光标的移动速度,设置为三个等级,分别为第一速度、第二速度和第三速度,其中,第一速度最慢,第三速度最快。通过根据用户拖动圆点的距离来调节光标移动的速度,有利于时限对光标位置的精确控制和定位。In this embodiment of the present application, the moving speed of the cursor is set to three levels, namely the first speed, the second speed and the third speed, where the first speed is the slowest and the third speed is the fastest. By adjusting the speed of the cursor movement according to the distance the user drags the dot, it is conducive to precise control and positioning of the cursor position within the time limit.
在本申请的一些实施例中,接收模块,还用于接收对控件的第三输入;移动模块,还用于响应于第三输入,在文本内容上选择目标文字、目标行或目标段落中的任一个。In some embodiments of the present application, the receiving module is further configured to receive a third input to the control; the moving module is further configured to select the target text, target line, or target paragraph in the text content in response to the third input. Either.
在本申请实施例中,针对用户希望单独选定一个文字、一行或者一段时,可通过对控件进行第三输入,其中,第三输入可以是快速拖动控件内的圆点并释放,如向左快速拖动圆点并释放,则选定光标左侧的一个字,向下快速拖动圆点并释放,则选定光标所在的一行等,从而实现更加精确的文本选择。In this embodiment of the present application, if the user wishes to individually select a text, a line or a period of time, he or she can perform a third input on the control, where the third input can be quickly dragging a dot in the control and releasing it, such as to Quickly drag the dot left and release to select a word to the left of the cursor; quickly drag the dot downward and release to select the line where the cursor is located, etc., thus achieving more precise text selection.
本申请实施例中的文本选取装置可以是电子设备,也可以是电子设备中的部件,例如集成电路或芯片。该电子设备可以是终端,也可以为除终端之外的其他设备。示例性的,电子设备可以为手机、平板电脑、笔记本电脑、掌上电脑、车载电子设备、移动上网装置(Mobile Internet Device,MID)、增强现实(augmented reality,AR)/虚拟现实(virtual reality,VR)设备、机器人、可穿戴设备、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本或者个人数字助理(personal digital assistant,PDA)等,还可以为服务器、网络附属存储器(Network Attached Storage,NAS)、个人计算机(personal computer,PC)、电视机(television,TV)、柜员机或者自助机等,本申请实施例不作具体限定。 The text selection device in the embodiment of the present application may be an electronic device, or may be a component of the electronic device, such as an integrated circuit or chip. The electronic device may be a terminal or other devices other than the terminal. For example, the electronic device may be a mobile phone, a tablet computer, a notebook computer, a handheld computer, a vehicle-mounted electronic device, a mobile Internet device (MID), or augmented reality (AR)/virtual reality (VR). ) equipment, robots, wearable devices, ultra-mobile personal computers (UMPC), netbooks or personal digital assistants (PDA), etc., and can also be servers, network attached storage (Network Attached Storage, NAS), personal computer (PC), television (TV), teller machine or self-service machine, etc., the embodiments of this application are not specifically limited.
本申请实施例中的文本选取装置可以为具有操作系统的装置。该操作系统可以为安卓(Android)操作系统,可以为iOS操作系统,还可以为其他可能的操作系统,本申请实施例不作具体限定。The text selection device in the embodiment of the present application may be a device with an operating system. The operating system can be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiments of this application.
本申请实施例提供的文本选取装置能够实现上述方法实施例实现的各个过程,为避免重复,这里不再赘述。The text selection device provided by the embodiments of the present application can implement each process implemented by the above method embodiments. To avoid repetition, the details will not be described here.
可选地,本申请实施例还提供一种电子设备600,图6示出了根据本申请实施例的电子设备的结构框图,如图6所示,包括处理器602,存储器604,存储在存储器604上并可在所述处理器602上运行的程序或指令,该程序或指令被处理器602执行时实现上述方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。Optionally, this embodiment of the present application also provides an electronic device 600. Figure 6 shows a structural block diagram of the electronic device according to the embodiment of the present application. As shown in Figure 6, it includes a processor 602 and a memory 604, which are stored in the memory. 604 and can be run on the processor 602. When the program or instruction is executed by the processor 602, it implements each process of the above method embodiment and can achieve the same technical effect. To avoid duplication, it is not included here. Again.
需要说明的是,本申请实施例中的电子设备包括上述所述的移动电子设备和非移动电子设备。It should be noted that the electronic devices in the embodiments of the present application include the above-mentioned mobile electronic devices and non-mobile electronic devices.
图7为实现本申请实施例的一种电子设备的硬件结构示意图。FIG. 7 is a schematic diagram of the hardware structure of an electronic device that implements an embodiment of the present application.
该电子设备700包括但不限于:射频单元701、网络模块702、音频输出单元703、输入单元704、传感器705、显示单元706、用户输入单元707、接口单元708、存储器709、以及处理器710等部件。The electronic device 700 includes but is not limited to: radio frequency unit 701, network module 702, audio output unit 703, input unit 704, sensor 705, display unit 706, user input unit 707, interface unit 708, memory 709, processor 710, etc. part.
本领域技术人员可以理解,电子设备700还可以包括给各个部件供电的电源(比如电池),电源可以通过电源管理系统与处理器710逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。图7中示出的电子设备结构并不构成对电子设备的限定,电子设备可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置,在此不再赘述。Those skilled in the art can understand that the electronic device 700 may also include a power supply (such as a battery) that supplies power to various components. The power supply may be logically connected to the processor 710 through a power management system, thereby managing charging, discharging, and function through the power management system. Consumption management and other functions. The structure of the electronic device shown in Figure 7 does not constitute a limitation on the electronic device. The electronic device may include more or less components than shown in the figure, or combine certain components, or arrange different components, which will not be described again here. .
其中,显示单元706用于在显示界面显示光标和控件;Among them, the display unit 706 is used to display the cursor and controls on the display interface;
用户输入单元707还用于接收对控件的第一输入;The user input unit 707 is also used to receive a first input to the control;
处理器710还用于响应于第一输入,更新光标的显示位置;根据光标更新前和更新后的显示位置,选取显示界面对应的目标文本。The processor 710 is also configured to update the display position of the cursor in response to the first input; and select the target text corresponding to the display interface according to the display position of the cursor before and after updating.
在本申请实施例通过在电子设备显示文本时,根据用户输入触发光标 和控件显示,用户通过对控件进行操作的方式,来移动光标的显示位置,在光标的位置移动过程中,会选中对应的文字,从而时限对文本编辑、文本选择的精确控制,该过程中用户不需要大幅度划过屏幕,且可以单手操作控件来选中文字,提高了文字编辑和文字选择的效率和体验。In the embodiment of this application, when the electronic device displays text, the cursor is triggered based on user input. and control display. The user moves the display position of the cursor by operating the control. During the movement of the cursor position, the corresponding text will be selected, thus providing precise control over text editing and text selection. During this process, the user There is no need to swipe across the screen significantly, and the controls can be operated with one hand to select text, which improves the efficiency and experience of text editing and text selection.
可选地,光标包括第一光标和第二光标,其中,第一光标和第二光标的显示颜色不同;处理器710还用于确定第一输入的坐标;根据坐标,确定对应的移动方向和移动速度;根据移动方向和移动速度,更新第一光标的第一显示位置,和第二光标的第二显示位置中的至少一个;根据更新后的第一显示位置和/或第二显示位置,选取并确定目标文本。Optionally, the cursor includes a first cursor and a second cursor, wherein the display colors of the first cursor and the second cursor are different; the processor 710 is also used to determine the coordinates of the first input; and determine the corresponding movement direction and Moving speed; updating at least one of the first display position of the first cursor and the second display position of the second cursor according to the moving direction and the moving speed; according to the updated first display position and/or the second display position, Select and identify the target text.
在本申请实施例中,光标具体包括第一光标和第二光标,其中,在一种实施方式中,第一光标用于定位选择文本的起点,第二光标用于定位选择文本的终点。在用户通过控件移动光标位置后,基于第一光标的第一显示位置,和第二光标的第二显示位置,来对文本内容中定位目标文本,并进行选择。具体地,第一光标指示目标文本的起点,第二光标用于指示目标文本的终点。In this embodiment of the present application, the cursor specifically includes a first cursor and a second cursor. In one implementation, the first cursor is used to locate the starting point of the selected text, and the second cursor is used to locate the end point of the selected text. After the user moves the cursor position through the control, the target text is located in the text content and selected based on the first display position of the first cursor and the second display position of the second cursor. Specifically, the first cursor indicates the starting point of the target text, and the second cursor is used to indicate the end point of the target text.
可选地,处理器710还用于确定第一输入的坐标;根据坐标,确定对应的移动方向和移动速度;根据移动方向和移动速度,移动光标的显示位置。Optionally, the processor 710 is also configured to determine the coordinates of the first input; determine the corresponding moving direction and moving speed based on the coordinates; and move the display position of the cursor based on the moving direction and moving speed.
在本申请实施例中,第一输入是对控件的输入,根据第一输入的坐标,电子设备能够确定出用户手指滑动的方向和距离,从而确定出光标的移动方向和移动速度,进而移动光标的显示位置,并选取对应的目标文本。In the embodiment of the present application, the first input is an input to the control. According to the coordinates of the first input, the electronic device can determine the direction and distance of the user's finger sliding, thereby determining the moving direction and moving speed of the cursor, and then moving the cursor. display position and select the corresponding target text.
能够理解的是,第一输入的坐标对应的坐标系,是以控件的中心点为原点建立的xy直角坐标系,该坐标系的x轴的延伸方向,即文本内容的行所在直线的延伸方向,该坐标系的y轴的延伸方向,即文本内容的列所在直线的延伸方向。It can be understood that the coordinate system corresponding to the first input coordinate is an xy rectangular coordinate system established with the center point of the control as the origin. The extension direction of the x-axis of this coordinate system is the extension direction of the straight line where the line of text content is located. , the extension direction of the y-axis of the coordinate system, that is, the extension direction of the straight line where the column of text content is located.
可选地,处理器710根据坐标的坐标值,确定移动方向;根据坐标值的绝对值,确定移动速度。 Optionally, the processor 710 determines the moving direction according to the coordinate value; determines the moving speed according to the absolute value of the coordinate value.
在本申请实施例中,根据坐标值确定移动方向和移动速度,运算量小,有利于实现精准定位。In the embodiment of the present application, the moving direction and moving speed are determined based on the coordinate values, which requires a small amount of calculation and is conducive to achieving precise positioning.
可选地,移动方向包括第一方向和第二方向;处理器710还用于:Optionally, the moving direction includes a first direction and a second direction; the processor 710 is further configured to:
在坐标的坐标值处于第一坐标值范围内的情况下,确定光标的移动方向是第一方向;When the coordinate value of the coordinate is within the first coordinate value range, it is determined that the moving direction of the cursor is the first direction;
在坐标的坐标值处于第二坐标值范围内的情况下,确定光标的移动方向是第二方向;When the coordinate value of the coordinate is within the second coordinate value range, determine that the moving direction of the cursor is the second direction;
在坐标的坐标值处于第三坐标值范围内的情况下,确定光标的移动方向包括第一方向和第二方向中的至少一种。When the coordinate value of the coordinate is within the third coordinate value range, it is determined that the moving direction of the cursor includes at least one of the first direction and the second direction.
在本申请实施例中,移动方向包括第一方向和第二方向,以根据控件的中心点为原点建立的xy直角坐标系为例,x轴的延伸方向即第一方向,y轴的延伸方向即第二方向。In the embodiment of the present application, the movement direction includes a first direction and a second direction. Taking the xy rectangular coordinate system established based on the center point of the control as the origin as an example, the extension direction of the x-axis is the first direction, and the extension direction of the y-axis That is the second direction.
本申请实施例通过对控件附近的区域进行划分,有利于用户更加准确地控制光标移动,提高文字选择的准确性和可控性。By dividing the area near the control, the embodiment of the present application helps the user control the cursor movement more accurately and improves the accuracy and controllability of text selection.
可选地,处理器710还用于在未接收到对控件的第二输入的情况下,根据移动方向和移动速度,更新第一显示位置和第二显示位置中的一者;在接收到第二输入的情况下,根据移动方向和移动速度,更新第一显示位置和第二显示位置中的另一者。Optionally, the processor 710 is also configured to update one of the first display position and the second display position according to the moving direction and the moving speed without receiving the second input to the control; after receiving the third In the case of two inputs, the other one of the first display position and the second display position is updated based on the moving direction and the moving speed.
在本申请实施例中,光标包括第一光标和第二光标,其中,第一光标是目标文本的起点,第二光标是目标文本的终点,在移动光标的显示位置时,实际上移动的是第一光标和第二光标中的一个。通过切换控件移动的光标,能够使用户自由切换选择文本的方式,提高用户体验。In this embodiment of the present application, the cursor includes a first cursor and a second cursor, where the first cursor is the starting point of the target text, and the second cursor is the end point of the target text. When moving the display position of the cursor, what is actually moved is One of the first cursor and the second cursor. By switching the cursor moved by the control, the user can freely switch the way to select text, improving the user experience.
可选地,坐标的坐标值包括x轴坐标值和y轴坐标值;处理器710还用于在x轴坐标值的绝对值小于等于第一阈值的情况下,确定光标沿第一方向的移动速度为第一速度;在x轴坐标值的绝对值大于第一阈值,且小于等于第二阈值的情况下,确定光标沿第一方向的移动速度为第二速度;在x轴坐标值的绝对值大于第二阈值的情况下,确定光标沿第一方向的移 动速度为第三速度;在y轴坐标值的绝对值小于等于第一阈值的情况下,确定光标沿第二方向的移动速度为第一速度;在y轴坐标值的绝对值大于第一阈值,且小于等于第二阈值的情况下,确定光标沿第二方向的移动速度为第二速度;在y轴坐标值的绝对值大于第二阈值的情况下,确定光标沿第二方向的移动速度为第三速度;其中,第一速度小于第二速度,第二速度小于第三速度。Optionally, the coordinate value of the coordinate includes an x-axis coordinate value and a y-axis coordinate value; the processor 710 is also configured to determine the movement of the cursor along the first direction when the absolute value of the x-axis coordinate value is less than or equal to the first threshold. The speed is the first speed; when the absolute value of the x-axis coordinate value is greater than the first threshold and less than or equal to the second threshold, it is determined that the moving speed of the cursor along the first direction is the second speed; when the absolute value of the x-axis coordinate value is If the value is greater than the second threshold, determine the movement of the cursor in the first direction. The moving speed is the third speed; when the absolute value of the y-axis coordinate value is less than or equal to the first threshold, the moving speed of the cursor in the second direction is determined to be the first speed; when the absolute value of the y-axis coordinate value is greater than the first threshold , and is less than or equal to the second threshold, determine the moving speed of the cursor along the second direction as the second speed; when the absolute value of the y-axis coordinate value is greater than the second threshold, determine the moving speed of the cursor along the second direction. is the third speed; wherein, the first speed is smaller than the second speed, and the second speed is smaller than the third speed.
在本申请实施例中,将光标的移动速度,设置为三个等级,分别为第一速度、第二速度和第三速度,其中,第一速度最慢,第三速度最快。通过根据用户拖动圆点的距离来调节光标移动的速度,有利于时限对光标位置的精确控制和定位。In this embodiment of the present application, the moving speed of the cursor is set to three levels, namely the first speed, the second speed and the third speed, where the first speed is the slowest and the third speed is the fastest. By adjusting the speed of the cursor movement according to the distance the user drags the dot, it is conducive to precise control and positioning of the cursor position within the time limit.
可选地,用户输入单元707还用于接收对控件的第三输入;Optionally, the user input unit 707 is also used to receive a third input to the control;
处理器710还用于响应于第三输入,在文本内容上选择目标文字、目标行或目标段落中的任一个。The processor 710 is further configured to select any one of target words, target lines, or target paragraphs on the text content in response to the third input.
在本申请实施例中,针对用户希望单独选定一个文字、一行或者一段时,可通过对控件进行第三输入,其中,第三输入可以是快速拖动控件内的圆点并释放,如向左快速拖动圆点并释放,则选定光标左侧的一个字,向下快速拖动圆点并释放,则选定光标所在的一行等,从而实现更加精确的文本选择。In this embodiment of the present application, if the user wishes to individually select a text, a line or a period of time, he or she can perform a third input on the control, where the third input can be quickly dragging a dot in the control and releasing it, such as to Quickly drag the dot left and release to select a word to the left of the cursor; quickly drag the dot downward and release to select the line where the cursor is located, etc., thus achieving more precise text selection.
应理解的是,本申请实施例中,输入单元704可以包括图形处理器(Graphics Processing Unit,GPU)7041和麦克风7042,图形处理器7041对在视频捕获模式或图像捕获模式中由图像捕获装置(如摄像头)获得的静态图片或视频的图像数据进行处理。显示单元706可包括显示面板7061,可以采用液晶显示器、有机发光二极管等形式来配置显示面板7061。用户输入单元707包括触控面板7071以及其他输入设备7072中的至少一种。触控面板7071,也称为触摸屏。触控面板7071可包括触摸检测装置和触摸控制器两个部分。其他输入设备7072可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆,在此不 再赘述。It should be understood that in the embodiment of the present application, the input unit 704 may include a graphics processing unit (GPU) 7041 and a microphone 7042. The graphics processor 7041 is responsible for the image capture device (GPU) in the video capture mode or the image capture mode. Process the image data of still pictures or videos obtained by cameras (such as cameras). The display unit 706 may include a display panel 7061, which may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like. The user input unit 707 includes a touch panel 7071 and at least one of other input devices 7072 . Touch panel 7071, also called touch screen. The touch panel 7071 may include two parts: a touch detection device and a touch controller. Other input devices 7072 may include but are not limited to physical keyboards, function keys (such as volume control keys, switch keys, etc.), trackballs, mice, and joysticks, which are not included here. Again.
存储器709可用于存储软件程序以及各种数据。存储器709可主要包括存储程序或指令的第一存储区和存储数据的第二存储区,其中,第一存储区可存储操作系统、至少一个功能所需的应用程序或指令(比如声音播放功能、图像播放功能等)等。此外,存储器709可以包括易失性存储器或非易失性存储器,或者,存储器709可以包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(Read-Only Memory,ROM)、可编程只读存储器(Programmable ROM,PROM)、可擦除可编程只读存储器(Erasable PROM,EPROM)、电可擦除可编程只读存储器(Electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(Random Access Memory,RAM),静态随机存取存储器(Static RAM,SRAM)、动态随机存取存储器(Dynamic RAM,DRAM)、同步动态随机存取存储器(Synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(Double Data Rate SDRAM,DDRSDRAM)、增强型同步动态随机存取存储器(Enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(Synch link DRAM,SLDRAM)和直接内存总线随机存取存储器(Direct Rambus RAM,DRRAM)。本申请实施例中的存储器709包括但不限于这些和任意其它适合类型的存储器。Memory 709 may be used to store software programs as well as various data. The memory 709 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, Image playback function, etc.) etc. Additionally, memory 709 may include volatile memory or non-volatile memory, or memory 709 may include both volatile and non-volatile memory. Among them, non-volatile memory can be read-only memory (Read-Only Memory, ROM), programmable read-only memory (Programmable ROM, PROM), erasable programmable read-only memory (Erasable PROM, EPROM), electrically removable memory. Erase programmable read-only memory (Electrically EPROM, EEPROM) or flash memory. Volatile memory can be random access memory (Random Access Memory, RAM), static random access memory (Static RAM, SRAM), dynamic random access memory (Dynamic RAM, DRAM), synchronous dynamic random access memory (Synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (Double Data Rate SDRAM, DDRSDRAM), enhanced synchronous dynamic random access memory (Enhanced SDRAM, ESDRAM), synchronous link dynamic random access memory (Synch link DRAM) , SLDRAM) and direct memory bus random access memory (Direct Rambus RAM, DRRAM). Memory 709 in embodiments of the present application includes, but is not limited to, these and any other suitable types of memory.
处理器710可包括一个或多个处理单元;可选的,处理器710集成应用处理器和调制解调处理器,其中,应用处理器主要处理涉及操作系统、用户界面和应用程序等的操作,调制解调处理器主要处理无线通信信号,如基带处理器。可以理解的是,上述调制解调处理器也可以不集成到处理器710中。The processor 710 may include one or more processing units; optionally, the processor 710 integrates an application processor and a modem processor, where the application processor mainly handles operations related to the operating system, user interface, application programs, etc., Modem processors mainly process wireless communication signals, such as baseband processors. It can be understood that the above-mentioned modem processor may not be integrated into the processor 710.
本申请实施例还提供一种可读存储介质,所述可读存储介质上存储有程序或指令,该程序或指令被处理器执行时实现上述方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。Embodiments of the present application also provide a readable storage medium. Programs or instructions are stored on the readable storage medium. When the program or instructions are executed by a processor, each process of the above method embodiments is implemented and the same technology can be achieved. The effect will not be described here to avoid repetition.
其中,所述处理器为上述实施例中所述的电子设备中的处理器。所述 可读存储介质,包括计算机可读存储介质,如计算机只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等。Wherein, the processor is the processor in the electronic device described in the above embodiment. described Readable storage media includes computer-readable storage media, such as computer read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disks or optical disks.
本申请实施例另提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现上述方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。An embodiment of the present application further provides a chip. The chip includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement various processes of the above method embodiments. , and can achieve the same technical effect, so to avoid repetition, they will not be described again here.
应理解,本申请实施例提到的芯片还可以称为系统级芯片、系统芯片、芯片系统或片上系统芯片等。It should be understood that the chips mentioned in the embodiments of this application may also be called system-on-chip, system-on-a-chip, system-on-a-chip or system-on-chip, etc.
本申请实施例提供一种计算机程序产品,该程序产品被存储在存储介质中,该程序产品被至少一个处理器执行以实现如上述方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。Embodiments of the present application provide a computer program product. The program product is stored in a storage medium. The program product is executed by at least one processor to implement the processes of the above method embodiments and can achieve the same technical effect. To avoid repetition, we will not go into details here.
本申请实施例还提供了一种电子设备,该电子设备被配置成用于实现上述方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。The embodiment of the present application also provides an electronic device. The electronic device is configured to implement each process of the above method embodiment and can achieve the same technical effect. To avoid duplication, the details will not be described here.
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。此外,需要指出的是,本申请实施方式中的方法和装置的范围不限按示出或讨论的顺序来执行功能,还可包括根据所涉及的功能按基本同时的方式或按相反的顺序来执行功能,例如,可以按不同于所描述的次序来执行所描述的方法,并且还可以添加、省去、或组合各种步骤。另外,参照某些示例所描述的特征可在其他示例中被组合。It should be noted that, in this document, the terms "comprising", "comprises" or any other variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, article or device that includes a series of elements not only includes those elements, It also includes other elements not expressly listed or inherent in the process, method, article or apparatus. Without further limitation, an element defined by the statement "comprises a..." does not exclude the presence of additional identical elements in a process, method, article or apparatus that includes that element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, but may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved. Functions may be performed, for example, the methods described may be performed in an order different from that described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上 述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以计算机软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端(可以是手机,计算机,服务器,或者网络设备等)执行本申请各个实施例所述的方法。Through the above description of the embodiments, those skilled in the art can clearly understand that the above The above-described embodiment method can be implemented by means of software plus the necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application can be embodied in the form of a computer software product that is essentially or contributes to the existing technology. The computer software product is stored in a storage medium (such as ROM/RAM, disk , optical disk), including several instructions to cause a terminal (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in various embodiments of this application.
上面结合附图对本申请的实施例进行了描述,但是本申请并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本申请的启示下,在不脱离本申请宗旨和权利要求所保护的范围情况下,还可做出很多形式,均属于本申请的保护之内。 The embodiments of the present application have been described above in conjunction with the accompanying drawings. However, the present application is not limited to the above-mentioned specific implementations. The above-mentioned specific implementations are only illustrative and not restrictive. Those of ordinary skill in the art will Inspired by this application, many forms can be made without departing from the purpose of this application and the scope protected by the claims, all of which fall within the protection of this application.

Claims (17)

  1. 一种文本选取方法,包括:A text selection method, including:
    在显示界面显示光标和控件;Display cursors and controls on the display interface;
    接收对所述控件的第一输入;receiving a first input to the control;
    响应于所述第一输入,更新所述光标的显示位置;In response to the first input, update the display position of the cursor;
    根据所述光标更新前和更新后的显示位置,选取所述显示界面对应的目标文本。Select the target text corresponding to the display interface according to the display position of the cursor before and after the update.
  2. 根据权利要求1所述的文本选取方法,其中,所述光标包括第一光标和第二光标,其中,所述第一光标和所述第二光标的显示颜色不同;The text selection method according to claim 1, wherein the cursor includes a first cursor and a second cursor, wherein the display colors of the first cursor and the second cursor are different;
    根据所述光标更新前和更新后的显示位置,选取所述显示界面对应的目标文本,包括:Select the target text corresponding to the display interface according to the display position of the cursor before and after the update, including:
    确定所述第一输入的坐标;Determine the coordinates of the first input;
    根据所述坐标,确定对应的移动方向和移动速度;According to the coordinates, determine the corresponding moving direction and moving speed;
    根据所述移动方向和所述移动速度,更新所述第一光标的第一显示位置,和所述第二光标的第二显示位置中的至少一个;Update at least one of the first display position of the first cursor and the second display position of the second cursor according to the moving direction and the moving speed;
    根据更新后的所述第一显示位置和/或所述第二显示位置,选取并确定所述目标文本。Select and determine the target text according to the updated first display position and/or the second display position.
  3. 根据权利要求2所述的文本选取方法,其中,所述根据所述坐标,确定对应的移动方向和移动速度,包括:The text selection method according to claim 2, wherein determining the corresponding moving direction and moving speed according to the coordinates includes:
    根据所述坐标的坐标值,确定所述移动方向;Determine the movement direction according to the coordinate value of the coordinate;
    根据所述坐标值的绝对值,确定所述移动速度。The moving speed is determined based on the absolute value of the coordinate value.
  4. 根据权利要求2所述的文本选取方法,其中,所述移动方向包括第一方向和第二方向;The text selection method according to claim 2, wherein the moving direction includes a first direction and a second direction;
    所述根据所述坐标,确定对应的移动方向,包括:Determining the corresponding movement direction according to the coordinates includes:
    在所述坐标的坐标值处于第一坐标值范围内的情况下,确定所述光标的移动方向是所述第一方向; When the coordinate value of the coordinate is within the first coordinate value range, it is determined that the moving direction of the cursor is the first direction;
    在所述坐标的坐标值处于第二坐标值范围内的情况下,确定所述光标的移动方向是所述第二方向;When the coordinate value of the coordinate is within the second coordinate value range, determine that the moving direction of the cursor is the second direction;
    在所述坐标的坐标值处于第三坐标值范围内的情况下,确定所述光标的移动方向包括所述第一方向和所述第二方向中的至少一种。When the coordinate value of the coordinate is within the third coordinate value range, it is determined that the moving direction of the cursor includes at least one of the first direction and the second direction.
  5. 根据权利要求2所述的文本选取方法,其中,所述根据所述移动方向和所述移动速度,更新所述第一光标的第一显示位置,和所述第二光标的第二显示位置中的至少一个,包括:The text selection method according to claim 2, wherein the first display position of the first cursor and the second display position of the second cursor are updated according to the moving direction and the moving speed. At least one of, including:
    在未接收到对所述控件的第二输入的情况下,根据所述移动方向和所述移动速度,更新所述第一显示位置和所述第二显示位置中的一者;without receiving a second input to the control, updating one of the first display position and the second display position based on the movement direction and the movement speed;
    在接收到所述第二输入的情况下,根据所述移动方向和所述移动速度,更新所述第一显示位置和所述第二显示位置中的另一者。Upon receiving the second input, the other one of the first display position and the second display position is updated based on the moving direction and the moving speed.
  6. 根据权利要求4所述的文本选取方法,其中,所述坐标的坐标值包括x轴坐标值和y轴坐标值;The text selection method according to claim 4, wherein the coordinate value of the coordinate includes an x-axis coordinate value and a y-axis coordinate value;
    所述根据所述坐标值的绝对值,确定所述移动速度,包括:Determining the moving speed according to the absolute value of the coordinate value includes:
    在所述x轴坐标值的绝对值小于等于第一阈值的情况下,确定所述光标沿所述第一方向的移动速度为第一速度;When the absolute value of the x-axis coordinate value is less than or equal to the first threshold, determine the moving speed of the cursor along the first direction as the first speed;
    在所述x轴坐标值的绝对值大于所述第一阈值,且小于等于第二阈值的情况下,确定所述光标沿所述第一方向的移动速度为第二速度;When the absolute value of the x-axis coordinate value is greater than the first threshold and less than or equal to the second threshold, determine the moving speed of the cursor along the first direction as the second speed;
    在所述x轴坐标值的绝对值大于所述第二阈值的情况下,确定所述光标沿所述第一方向的移动速度为第三速度;When the absolute value of the x-axis coordinate value is greater than the second threshold, determine the moving speed of the cursor along the first direction as a third speed;
    在所述y轴坐标值的绝对值小于等于第一阈值的情况下,确定所述光标沿所述第二方向的移动速度为第一速度;When the absolute value of the y-axis coordinate value is less than or equal to the first threshold, determine the moving speed of the cursor along the second direction as the first speed;
    在所述y轴坐标值的绝对值大于所述第一阈值,且小于等于第二阈值的情况下,确定所述光标沿所述第二方向的移动速度为第二速度;When the absolute value of the y-axis coordinate value is greater than the first threshold and less than or equal to the second threshold, determine the moving speed of the cursor along the second direction as the second speed;
    在所述y轴坐标值的绝对值大于所述第二阈值的情况下,确定所述光标沿所述第二方向的移动速度为第三速度;When the absolute value of the y-axis coordinate value is greater than the second threshold, determine the moving speed of the cursor along the second direction as a third speed;
    其中,所述第一速度小于所述第二速度,所述第二速度小于所述第三 速度。Wherein, the first speed is smaller than the second speed, and the second speed is smaller than the third speed. speed.
  7. 一种文本选取装置,包括:A text selection device including:
    显示模块,用于在显示界面显示光标和控件;Display module, used to display cursors and controls on the display interface;
    接收模块,用于接收对所述控件的第一输入;A receiving module, configured to receive the first input to the control;
    移动模块,用于响应于所述第一输入,更新所述光标的显示位置;A movement module configured to update the display position of the cursor in response to the first input;
    选取模块,用于根据所述光标更新前和更新后的显示位置,选取所述显示界面对应的目标文本。A selection module is used to select the target text corresponding to the display interface according to the display position of the cursor before and after the update.
  8. 根据权利要求7所述的文本选取装置,其中,所述光标包括第一光标和第二光标,其中,所述第一光标和所述第二光标的显示颜色不同;The text selection device according to claim 7, wherein the cursor includes a first cursor and a second cursor, wherein the display colors of the first cursor and the second cursor are different;
    所述文本选取装置还包括:The text selection device also includes:
    确定模块,用于确定所述第一输入的坐标;根据所述坐标,确定对应的移动方向和移动速度;Determining module, used to determine the coordinates of the first input; determine the corresponding moving direction and moving speed according to the coordinates;
    所述移动模块,还用于根据所述移动方向和所述移动速度,更新所述第一光标的第一显示位置,和所述第二光标的第二显示位置中的至少一个;The movement module is further configured to update at least one of the first display position of the first cursor and the second display position of the second cursor according to the movement direction and the movement speed;
    所述选取模块,还用于根据更新后的所述第一显示位置和/或所述第二显示位置,选取并确定所述目标文本。The selection module is also configured to select and determine the target text according to the updated first display position and/or the second display position.
  9. 根据权利要求8所述的文本选取装置,其中,所述确定模块,还用于:The text selection device according to claim 8, wherein the determining module is also used to:
    根据所述坐标的坐标值,确定所述移动方向;Determine the movement direction according to the coordinate value of the coordinate;
    根据所述坐标值的绝对值,确定所述移动速度。The moving speed is determined based on the absolute value of the coordinate value.
  10. 根据权利要求8所述的文本选取装置,其中,所述移动方向包括第一方向和第二方向;The text selection device according to claim 8, wherein the moving direction includes a first direction and a second direction;
    所述确定模块,还用于:The determination module is also used to:
    在所述坐标的坐标值处于第一坐标值范围内的情况下,确定所述光标的移动方向是所述第一方向;When the coordinate value of the coordinate is within the first coordinate value range, it is determined that the moving direction of the cursor is the first direction;
    在所述坐标的坐标值处于第二坐标值范围内的情况下,确定所述光标的移动方向是所述第二方向; When the coordinate value of the coordinate is within the second coordinate value range, determine that the moving direction of the cursor is the second direction;
    在所述坐标的坐标值处于第三坐标值范围内的情况下,确定所述光标的移动方向包括所述第一方向和所述第二方向中的至少一种。When the coordinate value of the coordinate is within the third coordinate value range, it is determined that the moving direction of the cursor includes at least one of the first direction and the second direction.
  11. 根据权利要求8所述的文本选取装置,其中,所述移动模块,还用于:The text selection device according to claim 8, wherein the moving module is also used for:
    在未接收到对所述控件的第二输入的情况下,根据所述移动方向和所述移动速度,更新所述第一显示位置和所述第二显示位置中的一者;without receiving a second input to the control, updating one of the first display position and the second display position based on the movement direction and the movement speed;
    在接收到所述第二输入的情况下,根据所述移动方向和所述移动速度,更新所述第一显示位置和所述第二显示位置中的另一者。Upon receiving the second input, the other one of the first display position and the second display position is updated based on the moving direction and the moving speed.
  12. 根据权利要求10所述的文本选取装置,其中,所述坐标的坐标值包括x轴坐标值和y轴坐标值;The text selection device according to claim 10, wherein the coordinate value of the coordinate includes an x-axis coordinate value and a y-axis coordinate value;
    所述确定模块,还用于:The determination module is also used to:
    在所述x轴坐标值的绝对值小于等于第一阈值的情况下,确定所述光标沿所述第一方向的移动速度为第一速度;When the absolute value of the x-axis coordinate value is less than or equal to the first threshold, determine the moving speed of the cursor along the first direction as the first speed;
    在所述x轴坐标值的绝对值大于所述第一阈值,且小于等于第二阈值的情况下,确定所述光标沿所述第一方向的移动速度为第二速度;When the absolute value of the x-axis coordinate value is greater than the first threshold and less than or equal to the second threshold, determine the moving speed of the cursor along the first direction as the second speed;
    在所述x轴坐标值的绝对值大于所述第二阈值的情况下,确定所述光标沿所述第一方向的移动速度为第三速度;When the absolute value of the x-axis coordinate value is greater than the second threshold, determine the moving speed of the cursor along the first direction as a third speed;
    在所述y轴坐标值的绝对值小于等于第一阈值的情况下,确定所述光标沿所述第二方向的移动速度为第一速度;When the absolute value of the y-axis coordinate value is less than or equal to the first threshold, determine the moving speed of the cursor along the second direction as the first speed;
    在所述y轴坐标值的绝对值大于所述第一阈值,且小于等于第二阈值的情况下,确定所述光标沿所述第二方向的移动速度为第二速度;When the absolute value of the y-axis coordinate value is greater than the first threshold and less than or equal to the second threshold, determine the moving speed of the cursor along the second direction as the second speed;
    在所述y轴坐标值的绝对值大于所述第二阈值的情况下,确定所述光标沿所述第二方向的移动速度为第三速度;When the absolute value of the y-axis coordinate value is greater than the second threshold, determine the moving speed of the cursor along the second direction as a third speed;
    其中,所述第一速度小于所述第二速度,所述第二速度小于所述第三速度。Wherein, the first speed is smaller than the second speed, and the second speed is smaller than the third speed.
  13. 一种电子设备,包括处理器和存储器,所述存储器存储可在所述处理器上运行的程序或指令,所述程序或指令被所述处理器执行时实现如 权利要求1至6中任一项所述方法的步骤。An electronic device includes a processor and a memory. The memory stores programs or instructions that can be run on the processor. When the program or instructions are executed by the processor, the following is implemented: The steps of the method of any one of claims 1 to 6.
  14. 一种可读存储介质,所述可读存储介质上存储程序或指令,所述程序或指令被处理器执行时实现如权利要求1至6中任一项所述方法的步骤。A readable storage medium on which a program or instructions are stored. When the program or instructions are executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
  15. 一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现如权利要求1至6中任一项所述方法的步骤。A chip. The chip includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement the method according to any one of claims 1 to 6. step.
  16. 一种计算机程序产品,所述计算机程序产品被至少一个处理器执行以实现如权利要求1至6中任一项所述方法的步骤。A computer program product executed by at least one processor to implement the steps of the method according to any one of claims 1 to 6.
  17. 一种电子设备,所述电子设备被配置成用于执行如权利要求1至6中任一项所述方法的步骤。 An electronic device configured to perform the steps of the method according to any one of claims 1 to 6.
PCT/CN2023/081875 2022-03-17 2023-03-16 Text selection method, text selection apparatus, electronic device and readable storage medium WO2023174369A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210263694.2 2022-03-17
CN202210263694.2A CN114610192A (en) 2022-03-17 2022-03-17 Text selection method, text selection device, electronic equipment and readable storage medium

Publications (1)

Publication Number Publication Date
WO2023174369A1 true WO2023174369A1 (en) 2023-09-21

Family

ID=81865763

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/081875 WO2023174369A1 (en) 2022-03-17 2023-03-16 Text selection method, text selection apparatus, electronic device and readable storage medium

Country Status (2)

Country Link
CN (1) CN114610192A (en)
WO (1) WO2023174369A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114610192A (en) * 2022-03-17 2022-06-10 维沃移动通信有限公司 Text selection method, text selection device, electronic equipment and readable storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030103082A1 (en) * 1998-12-31 2003-06-05 Michael Carroll System and method for selecting and deselecting information in an electronic document
CN104932807A (en) * 2014-03-19 2015-09-23 腾讯科技(深圳)有限公司 Cursor positioning method and touch screen device
CN110516222A (en) * 2019-08-30 2019-11-29 北京字节跳动网络技术有限公司 Method for editing text, device, equipment, storage medium
CN112860146A (en) * 2021-01-28 2021-05-28 维沃移动通信有限公司 Text selection method and device and electronic equipment
CN113961115A (en) * 2020-07-16 2022-01-21 荣耀终端有限公司 Object editing method, electronic device, medium, and program product
CN114610192A (en) * 2022-03-17 2022-06-10 维沃移动通信有限公司 Text selection method, text selection device, electronic equipment and readable storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108132752B (en) * 2017-12-21 2020-02-18 维沃移动通信有限公司 Text editing method and mobile terminal

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030103082A1 (en) * 1998-12-31 2003-06-05 Michael Carroll System and method for selecting and deselecting information in an electronic document
CN104932807A (en) * 2014-03-19 2015-09-23 腾讯科技(深圳)有限公司 Cursor positioning method and touch screen device
CN110516222A (en) * 2019-08-30 2019-11-29 北京字节跳动网络技术有限公司 Method for editing text, device, equipment, storage medium
CN113961115A (en) * 2020-07-16 2022-01-21 荣耀终端有限公司 Object editing method, electronic device, medium, and program product
CN112860146A (en) * 2021-01-28 2021-05-28 维沃移动通信有限公司 Text selection method and device and electronic equipment
CN114610192A (en) * 2022-03-17 2022-06-10 维沃移动通信有限公司 Text selection method, text selection device, electronic equipment and readable storage medium

Also Published As

Publication number Publication date
CN114610192A (en) 2022-06-10

Similar Documents

Publication Publication Date Title
US11487426B2 (en) Apparatus and method for cursor control and text selection and editing based on gesture-based touch inputs received in a virtual keyboard display area
US10359932B2 (en) Method and apparatus for providing character input interface
WO2022068773A1 (en) Desktop element adjustment method and apparatus, and electronic device
US10254927B2 (en) Device, method, and graphical user interface for manipulating workspace views
KR101673509B1 (en) Devices, methods, and graphical user interfaces for document manipulation
KR101836564B1 (en) Device, method, and graphical user interface for manipulating soft keyboards
CN112148170B (en) Desktop element adjusting method and device and electronic equipment
US20140109016A1 (en) Gesture-based cursor control
WO2023125425A1 (en) Display method and apparatus, and electronic device
WO2023274067A1 (en) Icon generation method and apparatus, electronic device, and readable storage medium
JP2023530395A (en) APP ICON CONTROL METHOD, APPARATUS AND ELECTRONIC DEVICE
WO2024046204A1 (en) Message processing method and apparatus, electronic device, and storage medium
WO2023151659A1 (en) Application icon display method and device
WO2023174369A1 (en) Text selection method, text selection apparatus, electronic device and readable storage medium
WO2023045923A1 (en) Text editing method and apparatus, and electronic device
WO2024037438A1 (en) Split screen control method and apparatus, electronic device, and readable storage medium
WO2023155877A1 (en) Application icon management method and apparatus and electronic device
WO2023174316A1 (en) Bullet screen display method and apparatus thereof
US20240288988A1 (en) File editing processing method and apparatus and electronic device
WO2024217468A1 (en) Icon display control method and apparatus, electronic device, and medium
CN104317485B (en) electronic blackboard display control method and device
WO2024037419A1 (en) Display control method and apparatus, electronic device, and readable storage medium
WO2023216976A1 (en) Display method and apparatus, electronic device, and storage medium
WO2023231871A1 (en) Display control method and apparatus, and electronic device and readable storage medium
WO2023030307A1 (en) Screenshot method and apparatus, and electronic device

Legal Events

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

Ref document number: 23769871

Country of ref document: EP

Kind code of ref document: A1