[go: up one dir, main page]

CN111273827A - Text processing method and electronic equipment - Google Patents

Text processing method and electronic equipment Download PDF

Info

Publication number
CN111273827A
CN111273827A CN202010052092.3A CN202010052092A CN111273827A CN 111273827 A CN111273827 A CN 111273827A CN 202010052092 A CN202010052092 A CN 202010052092A CN 111273827 A CN111273827 A CN 111273827A
Authority
CN
China
Prior art keywords
cursor
characters
user
target text
text content
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010052092.3A
Other languages
Chinese (zh)
Other versions
CN111273827B (en
Inventor
詹应强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN202010052092.3A priority Critical patent/CN111273827B/en
Publication of CN111273827A publication Critical patent/CN111273827A/en
Application granted granted Critical
Publication of CN111273827B publication Critical patent/CN111273827B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/543User-generated data transfer, e.g. clipboards, dynamic data exchange [DDE], object linking and embedding [OLE]

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

本发明实施例提供了一种文本处理方法及电子设备,该方法包括:接收用户在当前显示界面上的第一输入;响应于第一输入,将当前显示界面上的目标文本内容划分为多组字符;接收控制光标在目标文本内容上移动的移动输入;响应于移动输入,控制光标以多组字符中的各组字符的长度为单位沿预设方向进行移动,确定光标移动时所经过的文本为待处理文本。采用本发明实施例可以提高光标移动的准确性和效率,简化了操作步骤,便于用户方便的选择待处理文本,提高用户的使用体验。

Figure 202010052092

Embodiments of the present invention provide a text processing method and an electronic device. The method includes: receiving a first input from a user on a current display interface; in response to the first input, dividing target text content on the current display interface into multiple groups character; receive a movement input that controls the movement of the cursor on the target text content; in response to the movement input, control the cursor to move along a preset direction in units of the length of each group of characters in the multiple groups of characters, and determine the text that the cursor passes through when moving is the text to be processed. By adopting the embodiments of the present invention, the accuracy and efficiency of cursor movement can be improved, the operation steps are simplified, the user can conveniently select the text to be processed, and the user experience can be improved.

Figure 202010052092

Description

一种文本处理方法及电子设备A text processing method and electronic device

技术领域technical field

本发明涉及通信技术领域,尤其涉及一种文本处理方法及电子设备。The present invention relates to the field of communication technologies, and in particular, to a text processing method and an electronic device.

背景技术Background technique

随着电子设备技术的发展以及生活娱乐的需要,各种自媒体以及阅读平台蓬勃发展,客户端也成为了用户阅读的主要入口。当用户想对一段文字进行复制分享到社交或者收藏时,现有的文本复制粘贴操作通常为:通过用户在页面内容区域长按点击需要复制的起点文字,然后,再逐字逐行地选择要复制的内容,并通过剪贴板来保存或编辑所复制的内容。当用户确定好需要粘贴的位置时,就可以通过选择粘贴来将剪贴板上的内容进行粘贴。With the development of electronic equipment technology and the needs of life entertainment, various self-media and reading platforms have flourished, and the client has also become the main entrance for users to read. When a user wants to copy and share a piece of text to social media or favorites, the existing text copy and paste operation is usually: by the user long-pressing in the page content area and clicking the starting text to be copied, and then selecting the desired text line by line. Copy the content, and save or edit the copied content through the clipboard. When the user determines the position to be pasted, the content on the clipboard can be pasted by selecting paste.

现有的文本复制粘贴操作方式,在进行复制时由于手指滑动等原因,很难快速的选中文本,经常需要多次的移动光标,其次,由于当前电子设备的尺寸增大,用户在单手的情况下很难对整个显示屏幕上的文字进行选择、复制,光标的移动也变得比较困难。In the existing text copy and paste operation methods, it is difficult to quickly select the text due to finger sliding and other reasons when copying, and the cursor often needs to be moved many times. Under the circumstance, it is difficult to select and copy the text on the entire display screen, and the movement of the cursor also becomes more difficult.

由此可见,现有技术在处理文本内容(如复制和剪切文本内容)时,存在操作步骤繁琐、效率低的问题。It can be seen that, when processing text content (such as copying and cutting text content) in the prior art, there are problems of complicated operation steps and low efficiency.

发明内容SUMMARY OF THE INVENTION

本发明实施例提供一种文本处理方法及电子设备,以解决现有技术中在处理文本内容时,存在的操作步骤繁琐和操作效率低的问题。Embodiments of the present invention provide a text processing method and an electronic device, so as to solve the problems of complicated operation steps and low operation efficiency in the prior art when processing text content.

为了解决上述问题,本发明实施例是这样实现的:In order to solve the above problems, the embodiments of the present invention are implemented as follows:

第一方面,本发明实施例提供一种文本处理方法,应用于电子设备,该方法包括:In a first aspect, an embodiment of the present invention provides a text processing method, which is applied to an electronic device, and the method includes:

接收用户在当前显示界面上的第一输入;receiving the user's first input on the current display interface;

响应于第一输入,将当前显示界面上的目标文本内容划分为多组字符;In response to the first input, dividing the target text content on the current display interface into multiple groups of characters;

接收控制光标在目标文本内容上移动的移动输入;Receive movement input that controls the movement of the cursor on the target text content;

响应于移动输入,控制光标以多组字符中的各组字符的长度为单位沿预设方向进行移动,确定光标移动时所经过的文本为待处理文本。In response to the movement input, the cursor is controlled to move along a preset direction in units of the length of each group of characters in the plurality of groups of characters, and the text passed through when the cursor moves is determined as the text to be processed.

第二方面,本发明实施例提供一种电子设备,包括:In a second aspect, an embodiment of the present invention provides an electronic device, including:

第一接收模块,用于接收用户在当前显示界面上的第一输入;a first receiving module, configured to receive the first input of the user on the current display interface;

划分模块,用于响应于第一输入,将当前显示界面上的目标文本内容划分为多组字符;a dividing module, for dividing the target text content on the current display interface into multiple groups of characters in response to the first input;

第二接收模块,用于接收控制光标在目标文本内容上移动的移动输入;The second receiving module is used for receiving the movement input that controls the cursor to move on the target text content;

第一处理模块,用于响应于移动输入,控制光标以多组字符中的各组字符的长度为单位沿预设方向进行移动,确定光标移动时所经过的文本为待处理文本。The first processing module is configured to control the cursor to move along a preset direction in units of the length of each group of characters in the plurality of groups of characters in response to the moving input, and determine that the text passed by the cursor is the text to be processed.

第三方面,本发明实施例还提供一种电子设备,包括处理器、存储器及存储在存储器上并可在处理器上运行的计算机程序,计算机程序被处理器执行时实现上述的文本处理方法的步骤。In a third aspect, an embodiment of the present invention also provides an electronic device, including a processor, a memory, and a computer program stored in the memory and running on the processor, the computer program being executed by the processor to realize the above-mentioned text processing method. step.

第四方面,本发明实施例还提供一种计算机可读存储介质,计算机可读存储介质上存储计算机程序,计算机程序被处理器执行时实现上述的文本处理方法的步骤。In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the above text processing method are implemented.

本发明实施例中,根据用户在显示界面上的第一输入,将显示界面上的目标文本内容划分为多组字符,并根据用户控制光标在目标文本内容上移动的移动输入,控制光标以多组字符中的各组字符的长度为单位沿预设方向进行移动,确定光标移动时所经过的文本为待处理文本,可以提高光标移动的准确性和效率,简化操作步骤,便于用户方便的选择待处理文本,提高用户的使用体验。In this embodiment of the present invention, according to the user's first input on the display interface, the target text content on the display interface is divided into multiple groups of characters, and according to the movement input of the user controlling the cursor to move on the target text content, the cursor is controlled to have multiple groups of characters. The length of each group of characters in the group of characters is the unit of movement along the preset direction, and the text that the cursor moves through is determined as the text to be processed, which can improve the accuracy and efficiency of the cursor movement, simplify the operation steps, and facilitate the user's convenient selection. Text to be processed to improve user experience.

附图说明Description of drawings

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

图1表示本发明实施例文本处理方法的示意图;1 shows a schematic diagram of a text processing method according to an embodiment of the present invention;

图2表示本发明实施例起始光标移动示意图;FIG. 2 shows a schematic diagram of initial cursor movement according to an embodiment of the present invention;

图3表示本发明实施例在预设单手操作区域显示悬浮控件示意图;3 shows a schematic diagram of displaying a suspension control in a preset one-handed operation area according to an embodiment of the present invention;

图4表示本发明实施例文本处理方法的一实施流程图;FIG. 4 shows an implementation flowchart of the text processing method according to the embodiment of the present invention;

图5表示本发明实施例电子设备示意图;5 is a schematic diagram of an electronic device according to an embodiment of the present invention;

图6表示本发明实施例电子设备硬件结构示意图。FIG. 6 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present invention.

具体实施方式Detailed ways

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

本发明实施例提供一种文本处理方法,应用于电子设备,如图1所示,该方法包括:An embodiment of the present invention provides a text processing method, which is applied to an electronic device. As shown in FIG. 1 , the method includes:

步骤101、接收用户在当前显示界面上的第一输入。Step 101: Receive a first input from the user on the current display interface.

在当前显示界面上显示有目标文本内容且用户需要在目标文本内容中选择至少部分内容时,可以接收用户在当前显示界面上所执行的第一输入,这里的第一输入包括但不限于点击输入、长按输入和滑动输入。When the target text content is displayed on the current display interface and the user needs to select at least part of the target text content, the first input performed by the user on the current display interface can be received, and the first input here includes but is not limited to click input. , long press to enter, and swipe to enter.

步骤102、响应于第一输入,将当前显示界面上的目标文本内容划分为多组字符。Step 102: In response to the first input, divide the target text content on the current display interface into multiple groups of characters.

在接收到用户在当前显示界面上所执行的第一输入之后,可以响应于第一输入,对当前显示界面上的目标文本内容进行划分,实现将目标文本内容划分为多组字符,其中每一组字符中所对应的字符数量可以相同或者不同。其中,在接收到第一输入的情况下,位于目标文本内容中的光标可以切换至闪烁状态,处于闪烁状态的光标表示当前光标可移动。After receiving the first input performed by the user on the current display interface, the target text content on the current display interface can be divided in response to the first input, so that the target text content can be divided into multiple groups of characters, each of which The number of characters corresponding to the group characters may be the same or different. Wherein, in the case of receiving the first input, the cursor located in the target text content can be switched to the blinking state, and the cursor in the blinking state indicates that the current cursor can be moved.

如,在接收用户在当前显示界面的目标文本内容上的长按输入之后,进入处理模式,此时光标切换至闪烁状态,并在当前模式下将目标文本内容划分为字符数量相同或者不同的多组字符。For example, after receiving the user's long-press input on the target text content of the current display interface, enter the processing mode, at this time the cursor switches to the blinking state, and in the current mode, the target text content is divided into the same or different number of characters. group of characters.

步骤103、接收控制光标在目标文本内容上移动的移动输入。Step 103: Receive a movement input for controlling the movement of the cursor on the target text content.

在将当前显示界面上的目标文本内容进行划分得到多组字符之后,可以接收用户执行的控制光标在目标文本内容上进行移动的移动输入。After dividing the target text content on the current display interface to obtain multiple sets of characters, a movement input executed by the user to control the cursor to move on the target text content can be received.

步骤104、响应于移动输入,控制光标以多组字符中的各组字符的长度为单位沿预设方向进行移动,确定光标移动时所经过的文本为待处理文本。Step 104: In response to the moving input, control the cursor to move along a preset direction in units of the lengths of each group of characters in the multiple groups of characters, and determine that the text passed by the cursor when moving is the text to be processed.

响应于用户的移动输入,根据多组字符中的各组字符的长度确定与每一组字符所对应的移动单位,控制光标按照移动单位沿预设方向进行移动,并根据光标的移动确定光标移动时所经过的文本为待处理文本。In response to the user's movement input, determine the movement unit corresponding to each group of characters according to the length of each group of characters in the multiple groups of characters, control the cursor to move along the preset direction according to the movement unit, and determine the movement of the cursor according to the movement of the cursor The text passed through is the text to be processed.

上述实施过程,通过用户在显示界面上的第一输入,将显示界面上的目标文本内容划分为多组字符,并根据用户控制光标在目标文本内容上移动的移动输入,控制光标以多组字符中的各组字符的长度为单位沿预设方向进行移动,确定光标移动时所经过的文本为待处理文本,可以提高光标移动的准确性和效率,简化了操作步骤,便于用户方便的选择待复制文本,提高了用户的使用体验。The above-mentioned implementation process, through the user's first input on the display interface, divides the target text content on the display interface into multiple groups of characters, and controls the cursor to move on the target text content according to the movement input of the user controls the cursor with multiple groups of characters. The length of each group of characters in the unit is moved along the preset direction, and the text passed by the cursor is determined as the text to be processed, which can improve the accuracy and efficiency of the cursor movement, simplify the operation steps, and facilitate the user to select the text to be Copy text to improve user experience.

可选的,在本发明一实施例中,该方法还包括:Optionally, in an embodiment of the present invention, the method further includes:

接收用户在当前显示界面上的第二输入;receiving a second input from the user on the currently displayed interface;

响应于第二输入,复制或者剪切待处理文本。In response to the second input, the text to be processed is copied or cut.

在确定待处理文本之后,还可以接收用户在当前显示界面上所执行的第二输入,根据用户所执行的第二输入,对所确定的待处理文本进行复制或者剪切。After the text to be processed is determined, the second input performed by the user on the current display interface may also be received, and the determined text to be processed may be copied or cut according to the second input performed by the user.

通过控制光标以多组字符中的各组字符的长度为单位沿预设方向进行移动,确定光标移动时所经过的文本为待处理文本,并根据第二输入复制或者剪切待处理文本,可以提高文本复制或者剪切的效率,进而提高用户的操作体验。By controlling the cursor to move along a preset direction with the length of each group of characters in the multiple groups of characters as the unit, determining that the text passed by the cursor is the text to be processed, and copying or cutting the text to be processed according to the second input, it is possible to Improve the efficiency of text copying or cutting, thereby improving the user's operating experience.

可选的,在本发明一实施例中,将当前显示界面上的目标文本内容划分为多组字符,包括以下方案至少之一:Optionally, in an embodiment of the present invention, the target text content on the current display interface is divided into multiple groups of characters, including at least one of the following solutions:

对目标文本内容进行语义识别,根据语义识别结果将目标文本内容划分为多组字符;Perform semantic recognition on the target text content, and divide the target text content into multiple groups of characters according to the semantic recognition results;

对目标文本内容进行格式识别,根据格式识别结果将目标文本内容划分为多组字符;Perform format recognition on the target text content, and divide the target text content into multiple groups of characters according to the format recognition result;

按照预设数量的字符为一组的原则,将目标文本内容划分为多组字符;According to the principle of a preset number of characters as a group, the target text content is divided into multiple groups of characters;

按照相同字符类型为一组的原则,将目标文本内容划分为多组字符。According to the principle that the same character type is a group, the target text content is divided into multiple groups of characters.

在对目标文本内容进行划分以得到多组字符时,可以根据语义识别、格式识别或者预设原则,将目标文本内容划分为多组字符,并将划分结果进行存储,待光标移动时调用所存储的划分结果。下面对划分方式进行详细阐述。When dividing the target text content to obtain multiple sets of characters, the target text content can be divided into multiple sets of characters according to semantic recognition, format recognition or preset principles, and the division results are stored, and the stored data can be called when the cursor moves. division result. The division method is described in detail below.

对目标文本内容进行语义识别后进行划分:通过词法语法分析模块对目标文本内容进行词法和语法分析,分析出每个字所形成的意思,将目标文本内容进行断词断句,以得到多组字符;或者对目标文本内容进行内容提取,传到服务器端进行语义理解,并将语义理解的结果进行存储,根据语义理解的结果对目标文本内容进行划分以得到多组字符。The content of the target text is divided after semantic recognition: the content of the target text is lexically and grammatically analyzed through the lexical and syntactic analysis module, the meaning formed by each character is analyzed, and the content of the target text is segmented to obtain multiple groups of characters. ; Or extract the content of the target text, send it to the server for semantic understanding, store the result of the semantic understanding, and divide the content of the target text according to the result of the semantic understanding to obtain multiple sets of characters.

对目标文本内容进行格式识别后进行划分:对目标文本内容进行格式识别,这里的格式识别包括但不限于识别加粗文本、标注下划线的文本、倾斜文本等,根据格式识别结果对目标文本内容进行划分以得到多组字符。Divide the target text content after format recognition: perform format recognition on the target text content. The format recognition here includes but is not limited to identifying bold text, underlined text, oblique text, etc., according to the format recognition result. Divide to get groups of characters.

按照预设数量的字符为一组的原则对目标文本内容进行划分:从目标文本内容的起点至终点,按照预设数量的字符对应为一组字符的原则,对目标文本内容进行划分。其中各组字符所对应的预设数量可以相同,也可以为各组字符所对应的预设数量不完全相同。针对各组字符所对应的预设数量不完全相同的情况,可以为多组字符中存在至少两组对应的预设数量相同,或者多组字符所对应的预设数量形成预设规则,如多组字符所对应的预设数量依次递增后又逐渐递减。其中各组字符所对应的预设数量不完全相同时可对应于多种情况,这里不再一一列举阐述。The target text content is divided according to the principle of a preset number of characters as a group: from the starting point to the end point of the target text content, the target text content is divided according to the principle that a preset number of characters correspond to a group of characters. The preset numbers corresponding to each group of characters may be the same, or the preset numbers corresponding to each group of characters may not be exactly the same. In the case where the preset numbers corresponding to each group of characters are not exactly the same, a preset rule may be formed for the preset numbers corresponding to at least two groups of characters in multiple groups of characters, or the preset numbers corresponding to multiple groups of characters, such as multiple groups of characters. The preset numbers corresponding to the group characters are sequentially increased and then gradually decreased. When the preset numbers corresponding to each group of characters are not exactly the same, they may correspond to various situations, which will not be listed and described here.

按照相同字符类型为一组的原则对目标文本内容进行划分:对目标文本内容进行字符类型识别,这里的字符类型识别包括但不限于识别中文文字类型、数字类型、中文拼音类型、外文文字类型、标点符号类型等,根据字符类型识别结果对目标文本内容进行划分以得到多组字符。The target text content is divided according to the principle of the same character type as a group: character type recognition is performed on the target text content. The character type recognition here includes but is not limited to identifying Chinese character types, numeric types, Chinese pinyin types, foreign language character types, Punctuation type, etc., according to the character type recognition result, the target text content is divided to obtain multiple sets of characters.

下面以根据语义识别、格式识别以及相同字符类型为一组为划分原则,进行举例阐述,如,原始文本为:以事件分发机制为例,其整个流程涉及到了系统启动流程、输入管理(Input Manager)、系统服务和UI的通信、事件分发等一系列的环节。则划分之后的文本可以为:以|事件|分发|机制|为例,其|整个|流程|涉及|到|了|系统启动流程|、|输入管理|(|Input Manager|)|、|系统服务和UI的通信|、|事件分发|等|一系列|的|环节。The following is based on the principle of semantic recognition, format recognition and the same character type as a group, and an example is explained. For example, the original text is: Take the event distribution mechanism as an example, the whole process involves the system startup process, input management (Input Manager) ), communication between system services and UI, event distribution and a series of links. Then the divided text can be: take |event|distribution|mechanism| as an example, the |entire|process|involves |to ||system startup process|, |input management|(|Input Manager|)|, |system Service and UI communication|, |event distribution|, etc.|series|links.

上述实施过程,通过按照语义识别、格式识别、预设数量的字符为一组、相同字符类型为一组中的至少一项进行目标文本内容的划分,可以丰富划分结果,控制光标按照用户需求进行移动,可以满足用户的使用体验。In the above implementation process, by dividing the target text content according to at least one of semantic recognition, format recognition, a preset number of characters in a group, and the same character type in a group, the division results can be enriched, and the cursor can be controlled according to user needs. Mobile, can meet the user's experience.

可选的,在本发明一实施例中,光标包括起始光标和结束光标;响应于移动输入,控制光标以多组字符中的各组字符的长度为单位沿预设方向进行移动,包括:Optionally, in an embodiment of the present invention, the cursor includes a start cursor and an end cursor; in response to the moving input, controlling the cursor to move along a preset direction in units of the length of each group of characters in the multiple groups of characters, including:

响应于用户对起始光标的移动输入,控制起始光标以沿第一预设方向依次排列的至少一组字符的长度为单位在第一预设方向上进行移动;In response to the user's movement input to the starting cursor, the starting cursor is controlled to move in the first preset direction in units of lengths of at least one group of characters sequentially arranged along the first preset direction;

响应于用户对结束光标的移动输入,控制结束光标以沿第二预设方向依次排列的至少一组字符的长度为单位在第二预设方向上进行移动;In response to the user's input of moving the ending cursor, the ending cursor is controlled to move in the second preset direction in units of lengths of at least one group of characters sequentially arranged along the second preset direction;

其中,第一预设方向和第二预设方向为相同方向或相反方向。Wherein, the first preset direction and the second preset direction are the same direction or opposite directions.

光标包括起始光标和结束光标,且起始光标和结束光标均位于目标文本内容中,在控制光标进行移动时,需要控制起始光标和结束光标中的至少一者进行移动。若仅控制起始光标移动则可以根据起始光标移动后的位置重新确定待处理文本的起点,若仅控制结束光标移动则可以根据结束光标移动后的位置重新确定待处理文本的终点。The cursor includes a start cursor and an end cursor, and both the start cursor and the end cursor are located in the target text content. When controlling the cursor to move, at least one of the start cursor and the end cursor needs to be controlled to move. If only the start cursor movement is controlled, the starting point of the text to be processed can be re-determined according to the position after the start cursor movement; if only the end cursor movement is controlled, the end point of the to-be-processed text can be re-determined according to the position after the end cursor movement.

下面对控制起始光标和结束光标进行移动的实施过程进行阐述:The following describes the implementation process of controlling the movement of the start cursor and the end cursor:

在用户拖动起始光标移动时,可以以起始光标的初始位置作为起点,沿移动方向(第一预设方向)移动,具体为:根据沿第一预设方向依次排列的至少一组字符的长度确定与每一组字符所对应的移动单位,控制起始光标在第一预设方向上按照所确定的至少一个移动单位进行移动。在用户拖动结束光标移动时,可以以结束光标的初始位置作为起点,沿移动方向(第二预设方向)移动,具体为:根据沿第二预设方向依次排列的至少一组字符的长度确定与每一组字符所对应的移动单位,控制结束光标在第二预设方向上按照所确定的至少一个移动单位进行移动。When the user drags the starting cursor to move, the initial position of the starting cursor can be used as the starting point to move along the moving direction (the first preset direction), specifically: according to at least one group of characters sequentially arranged along the first preset direction The length of , determines the movement unit corresponding to each group of characters, and controls the starting cursor to move in the first preset direction according to the determined at least one movement unit. When the user drags to end the cursor movement, the initial position of the end cursor may be used as the starting point to move along the moving direction (the second preset direction), specifically: according to the length of at least one group of characters sequentially arranged along the second preset direction The movement unit corresponding to each group of characters is determined, and the ending cursor is controlled to move in the second preset direction according to the determined at least one movement unit.

其中,第一预设方向和第二预设方向为相同方向或相反方向,即起始光标和结束光标的移动方向可以相同,也可以相反。在两者的移动方向相同时(如均向左移动),可以以起始光标的初始位置作为起点,沿向左移动的方向,根据至少一组字符的长度确定与每一组字符所对应的移动单位,控制起始光标按照所确定的至少一个移动单位向左移动。在用户拖动结束光标移动时,可以以结束光标的初始位置作为起点,沿向左移动的方向,根据至少一组字符的长度确定与每一组字符所对应的移动单位,控制结束光标按照所确定的至少一个移动单位向左移动。The first preset direction and the second preset direction are the same direction or opposite directions, that is, the moving directions of the start cursor and the end cursor may be the same or opposite. When the moving directions of the two are the same (for example, moving to the left), the initial position of the starting cursor can be used as the starting point, along the direction of moving to the left, according to the length of at least one group of characters. Move unit, control the starting cursor to move to the left according to the determined at least one moving unit. When the user drags to end the cursor movement, the initial position of the end cursor can be used as the starting point, along the direction of moving to the left, according to the length of at least one group of characters, to determine the movement unit corresponding to each group of characters, and control the end cursor to follow the specified The determined at least one movement unit moves to the left.

在两者的移动方向相反时(如起始光标向左移动、结束光标向右移动),可以以起始光标的初始位置作为起点,沿向左移动的方向,根据至少一组字符的长度确定与每一组字符所对应的移动单位,控制起始光标按照所确定的至少一个移动单位向左移动。在用户拖动结束光标移动时,可以以结束光标的初始位置作为起点,沿向右移动的方向,根据至少一组字符的长度确定与每一组字符所对应的移动单位,控制结束光标按照所确定的至少一个移动单位向右移动。When the moving directions of the two are opposite (for example, the starting cursor moves to the left, and the ending cursor moves to the right), the initial position of the starting cursor can be used as the starting point, and the direction of moving to the left can be determined according to the length of at least one group of characters. With the movement unit corresponding to each group of characters, the starting cursor is controlled to move to the left according to the determined at least one movement unit. When the user drags to end the cursor movement, the initial position of the end cursor can be used as the starting point, and the moving unit corresponding to each group of characters can be determined according to the length of at least one group of characters in the direction of moving to the right. The determined at least one movement unit moves to the right.

即当起始光标和结束光标移动时,此时每次移动的距离不是单个字符,而是根据一组字符的长度进行移动。以起始光标为例,如图2所示,位于中间的光标表示初始状态的起始光标,若起始光标向左侧移动则跳转至左侧光标处,若起始光标向右侧移动则跳转至右侧光标处。That is, when the start cursor and the end cursor move, the distance each time moves is not a single character, but moves according to the length of a group of characters. Taking the starting cursor as an example, as shown in Figure 2, the cursor in the middle represents the starting cursor in the initial state. If the starting cursor moves to the left, it will jump to the left cursor, and if the starting cursor moves to the right jumps to the cursor on the right.

上述实施过程,通过控制起始光标和结束光标分别根据一组字符的长度进行移动,可以提高光标移动的准确性和效率,便于用户方便的选择待处理文本,提高了用户的操作体验。In the above implementation process, by controlling the start cursor and the end cursor to move according to the length of a group of characters, the accuracy and efficiency of cursor movement can be improved, the user can conveniently select the text to be processed, and the user's operating experience can be improved.

可选的,在本发明一实施例中,在光标的移动区域超出预设单手操作区域的情况下,在预设单手操作区域的预设位置显示与光标对应的悬浮控件;Optionally, in an embodiment of the present invention, when the moving area of the cursor exceeds the preset one-handed operation area, a floating control corresponding to the cursor is displayed at a preset position of the preset one-handed operation area;

响应于移动输入,控制光标以多组字符中的各组字符的长度为单位沿预设方向进行移动,包括:In response to the moving input, the control cursor moves along the preset direction in units of the length of each group of characters in the plurality of groups of characters, including:

响应于用户对悬浮控件内的滑动组件的移动输入,控制光标以多组字符中的各组字符的长度为单位在目标文本内容上沿预设方向移动;In response to the user's movement input to the sliding component in the floating control, the control cursor moves along the preset direction on the target text content with the length of each group of characters in the multiple groups of characters as a unit;

其中,用户在进行移动输入时,悬浮控件的位置保持不变,控制悬浮控件内的滑动组件进行移动。Wherein, when the user performs mobile input, the position of the suspension control remains unchanged, and the sliding component in the suspension control is controlled to move.

在检测到光标移动至预设单手操作区域之外时,可以在预设单手操作区域的预设位置显示与光标对应的悬浮控件,其中用户在悬浮控件上的操作可映射到光标的移动行为上,悬浮控件的数量至少为一个。如图3所示,虚线以下的区域为预设单手操作区域,悬浮控件显示在屏幕的底端用户单手可以触控到的预设位置。When it is detected that the cursor moves outside the preset one-handed operation area, a floating control corresponding to the cursor can be displayed at a preset position of the preset one-handed operation area, wherein the user's operation on the floating control can be mapped to the movement of the cursor Behaviorally, the number of floating controls is at least one. As shown in FIG. 3 , the area below the dotted line is the preset one-hand operation area, and the floating control is displayed at the bottom of the screen at a preset position that the user can touch with one hand.

接收用户对悬浮控件内的滑动组件的移动输入,响应于用户的移动输入,根据多组字符中的各组字符的长度确定与各组字符对应的移动单位,根据移动单位控制光标在目标文本内容上沿预设方向进行移动。Receive the user's movement input to the sliding component in the floating control, in response to the user's movement input, determine the movement unit corresponding to each group of characters according to the length of each group of characters in the multiple groups of characters, and control the cursor according to the movement unit in the target text content. move in the preset direction.

其中在用户执行移动输入的过程中,悬浮控件的位置保持不变,悬浮控件内的滑动组件接收用户的移动输入进行移动,且滑动组件的移动方向为对应光标的移动方向。由于滑动组件在悬浮控件中向某一方向的移动距离有限,当滑动组件移动到边缘且需要继续沿该方向移动时,可以返回至悬浮控件的中心位置,此时光标的位置保持不动。在滑动组件返回至中心位置继续沿之前的移动方向移动时,光标同步移动。需要说明的是,悬浮控件所在的位置可以根据用户的使用习惯进行调整,以保证用户操作的最佳体验。During the process of the user performing the movement input, the position of the suspension control remains unchanged, the sliding component in the suspension control receives the user's movement input to move, and the movement direction of the sliding component corresponds to the movement direction of the cursor. Since the sliding component can move in a certain direction in a limited distance in the floating control, when the sliding component moves to the edge and needs to continue to move in this direction, it can return to the center of the floating control, and the cursor position remains unchanged at this time. When the slide assembly returns to the center position and continues to move in the previous direction of movement, the cursor moves synchronously. It should be noted that the position of the floating control can be adjusted according to the user's usage habits, so as to ensure the best experience of the user's operation.

上述过程,在单手操作场景下且光标移动至预设单手操作区域之外时,在预设位置显示悬浮控件,通过悬浮控件对光标移动的映射操作,极大的方便了单手在大屏幕上不易操控光标的场景,便于用户选择文本内容进行处理。In the above process, in the one-handed operation scenario and the cursor moves outside the preset one-handed operation area, the floating control is displayed at the preset position, and the mapping operation of the cursor movement through the floating control greatly facilitates the one-handed operation in large scales. The scene where it is difficult to manipulate the cursor on the screen is convenient for the user to select the text content for processing.

可选的,在本发明一实施例中,光标包括起始光标和结束光标,预设位置显示与起始光标对应的第一悬浮控件和/或与结束光标对应的第二悬浮控件;Optionally, in an embodiment of the present invention, the cursor includes a start cursor and an end cursor, and the preset position displays a first suspension control corresponding to the start cursor and/or a second suspension control corresponding to the end cursor;

响应于用户对悬浮控件内的滑动组件的移动输入,控制光标以多组字符中的各组字符的长度为单位在目标文本内容上沿预设方向移动,包括:In response to the user's movement input to the sliding component in the floating control, the control cursor is controlled to move along the preset direction on the target text content in units of the length of each group of characters in the multiple groups of characters, including:

在预设位置仅显示第一悬浮控件的情况下,响应于用户对第一悬浮控件内的滑动组件的移动输入,控制起始光标在目标文本内容上沿第一预设方向移动;In the case where only the first floating control is displayed in the preset position, in response to the user's input of movement of the sliding component in the first floating control, the starting cursor is controlled to move along the first preset direction on the target text content;

在预设位置仅显示第二悬浮控件的情况下,响应于用户对第二悬浮控件内的滑动组件的移动输入,控制结束光标在目标文本内容上沿第二预设方向移动;In the case where only the second suspension control is displayed at the preset position, in response to the user's movement input to the sliding component in the second suspension control, the end cursor is controlled to move along the second preset direction on the target text content;

在预设位置显示第一悬浮控件和第二悬浮控件的情况下,响应于用户对第一悬浮控件内的滑动组件的移动输入,控制起始光标在目标文本内容上沿第一预设方向移动,响应于用户对第二悬浮控件内的滑动组件的移动输入,控制结束光标在目标文本内容上沿第二预设方向移动;In the case where the first suspension control and the second suspension control are displayed at the preset position, in response to the user's movement input to the sliding component in the first suspension control, the starting cursor is controlled to move along the first preset direction on the target text content , in response to the user's movement input to the sliding component in the second suspension control, controlling the end cursor to move along the second preset direction on the target text content;

其中,第一预设方向和第二预设方向为相同方向或相反方向。Wherein, the first preset direction and the second preset direction are the same direction or opposite directions.

在预设位置显示的悬浮控件为与起始光标对应的第一悬浮控件和与结束光标对应的第二悬浮控件中的至少一个,在预设位置仅显示第一悬浮控件的情况下,可以根据用户对第一悬浮控件内的滑动组件的移动输入,控制起始光标在目标文本内容上沿第一预设方向移动,实现将用户在第一悬浮控件上的操作映射到起始光标的移动行为上。由于此时结束光标位于预设单手操作区域内,可以由用户直接操作结束光标。The floating control displayed at the preset position is at least one of the first floating control corresponding to the start cursor and the second floating control corresponding to the ending cursor. The user's movement input to the sliding component in the first floating control controls the starting cursor to move along the first preset direction on the target text content, so as to map the user's operation on the first floating control to the moving behavior of the starting cursor superior. Since the end cursor is located in the preset one-hand operation area at this time, the end cursor can be directly operated by the user.

在预设位置仅显示第二悬浮控件的情况下,可以根据用户对第二悬浮控件内的滑动组件的移动输入,控制结束光标在目标文本内容上沿第二预设方向移动,实现将用户在第二悬浮控件上的操作映射到结束光标的移动行为上。由于此时起始光标位于预设单手操作区域内,可以由用户直接操作起始光标。In the case where only the second floating control is displayed in the preset position, the end cursor can be controlled to move along the second preset direction on the target text content according to the user's movement input to the sliding component in the second floating control, so as to realize the movement of the user in the second preset direction. The operation on the second floating control is mapped to the movement behavior of the end cursor. Since the starting cursor is located in the preset one-hand operation area at this time, the starting cursor can be directly operated by the user.

在预设位置显示第一悬浮控件和第二悬浮控件的情况下,可以根据用户对第一悬浮控件内的滑动组件的移动输入,控制起始光标在目标文本内容上沿第一预设方向移动,根据用户对第二悬浮控件内的滑动组件的移动输入,控制结束光标在目标文本内容上沿第二预设方向移动,实现将用户在第一悬浮控件和第二悬浮控件上的操作分别映射到起始光标和结束光标的移动行为上。其中,在第一预设方向和第二预设方向为相同方向时,可以使得起始光标和结束光标沿同一方向移动,在第一预设方向和第二预设方向为相反方向时,可以使得起始光标和结束光标沿相反方向移动。In the case where the first suspension control and the second suspension control are displayed at the preset position, the starting cursor can be controlled to move along the first preset direction on the target text content according to the user's movement input to the sliding component in the first suspension control , according to the user's movement input to the sliding component in the second suspension control, control the end cursor to move along the second preset direction on the target text content, so as to map the user's operations on the first suspension control and the second suspension control respectively to the movement behavior of the start and end cursors. Wherein, when the first preset direction and the second preset direction are the same direction, the start cursor and the end cursor can be moved in the same direction, and when the first preset direction and the second preset direction are opposite directions, the Causes the start and end cursors to move in opposite directions.

上述实施过程,可以实现将在悬浮控件上的操作映射至光标上,进而控制光标的移动,便于用户在单手场景下对显示界面内任意位置的光标进行移动,提升了用户的单手操作体验。The above implementation process can map the operation on the floating control to the cursor, and then control the movement of the cursor, which is convenient for the user to move the cursor at any position in the display interface in a one-handed scenario, and improves the user's one-handed operation experience. .

其中,本发明实施例的控制光标按照移动单位进行移动的方案也可应用于其他场景,如在键盘区域执行输入操作的场景。Wherein, the solution of controlling the cursor to move according to the movement unit according to the embodiment of the present invention can also be applied to other scenarios, such as a scenario of performing an input operation in a keyboard area.

下面对本发明实施例的整体实施过程进行阐述,如图4所示,包括:The overall implementation process of the embodiment of the present invention is described below, as shown in Figure 4, including:

步骤401、根据用户的第一输入进入处理模式。Step 401 , enter the processing mode according to the first input of the user.

步骤402、根据语义识别、格式识别、预设数量的字符为一组、相同字符类型为一组中的至少一项划分目标文本内容,得到多组字符。Step 402: Divide the target text content according to at least one of semantic recognition, format recognition, a preset number of characters as a group, and the same character type as a group to obtain multiple groups of characters.

步骤403、根据用户的移动输入,控制光标以多组字符中的各组字符的长度为单位沿预设方向进行移动。Step 403: Control the cursor to move along a preset direction in units of the length of each group of characters in the multiple groups of characters according to the user's movement input.

步骤404、检测光标是否超出预设单手操作区域,若超出则执行步骤405,否则执行步骤406。Step 404: Detect whether the cursor exceeds the preset one-hand operation area, if it exceeds, execute step 405; otherwise, execute step 406.

步骤405、在预设单手操作区域的预设位置显示与光标对应的悬浮控件。然后执行步骤407。Step 405: Display a floating control corresponding to the cursor at a preset position of the preset one-hand operation area. Then step 407 is performed.

步骤406、继续隐藏与光标对应的悬浮控件。然后执行步骤407。Step 406: Continue to hide the floating control corresponding to the cursor. Then step 407 is performed.

步骤407、检测是否确定待处理文本,若已确定则执行步骤408,否则继续执行步骤403。Step 407: Detect whether the text to be processed is determined, and if it is determined, perform step 408; otherwise, continue to perform step 403.

步骤408、复制或者剪切待处理文本。Step 408: Copy or cut the text to be processed.

上述过程,根据用户的第一输入进入处理模式,对目标文本内容划分得到多组字符,并控制光标以各组字符的长度为单位进行移动,在光标超出预设单手操作区域时显示悬浮控件,可以提高光标移动的准确性和效率,同时便于用户单手进行文本处理。In the above process, enter the processing mode according to the user's first input, divide the target text content to obtain multiple groups of characters, and control the cursor to move in units of the length of each group of characters, and display the floating control when the cursor exceeds the preset one-handed operation area. , which can improve the accuracy and efficiency of cursor movement and facilitate the user to perform text processing with one hand.

本发明实施例的文本处理方法,根据用户在显示界面上的第一输入,将显示界面上的目标文本内容划分为多组字符,并根据用户控制光标在目标文本内容上移动的移动输入,控制光标以多组字符中的各组字符的长度为单位沿预设方向进行移动,确定光标移动时所经过的文本为待处理文本,可以提高光标移动的准确性和效率,简化了操作步骤,便于用户方便的选择待处理文本,提高了用户的使用体验。In the text processing method of the embodiment of the present invention, according to the first input by the user on the display interface, the target text content on the display interface is divided into multiple groups of characters, and according to the movement input of the user controlling the cursor to move on the target text content, control The cursor moves along the preset direction in units of the length of each group of characters in multiple groups of characters, and the text that the cursor moves through is determined as the text to be processed, which can improve the accuracy and efficiency of cursor movement, simplify the operation steps, and facilitate the The user can conveniently select the text to be processed, which improves the user experience.

通过在预设单手操作区域的预设位置显示悬浮控件,可以便于用户在单手场景下对显示界面内任意位置的光标进行移动,提升了用户的单手操作体验。By displaying the floating control at the preset position of the preset one-handed operation area, it is convenient for the user to move the cursor at any position in the display interface in the one-handed scenario, which improves the user's one-handed operation experience.

本发明实施例提供一种电子设备,如图5所示,包括:An embodiment of the present invention provides an electronic device, as shown in FIG. 5 , including:

第一接收模块10,用于接收用户在当前显示界面上的第一输入;The first receiving module 10 is used for receiving the first input of the user on the current display interface;

划分模块20,用于响应于第一输入,将当前显示界面上的目标文本内容划分为多组字符;The dividing module 20 is used for dividing the target text content on the current display interface into multiple groups of characters in response to the first input;

第二接收模块30,用于接收控制光标在目标文本内容上移动的移动输入;The second receiving module 30 is configured to receive a movement input for controlling the movement of the cursor on the target text content;

第一处理模块40,用于响应于移动输入,控制光标以多组字符中的各组字符的长度为单位沿预设方向进行移动,确定光标移动时所经过的文本为待处理文本。The first processing module 40 is configured to control the cursor to move along a preset direction in units of the length of each group of characters in the plurality of groups of characters in response to the movement input, and determine that the text passed by the cursor is the text to be processed.

可选的,电子设备还包括:Optionally, the electronic equipment also includes:

第三接收模块,用于接收用户在当前显示界面上的第二输入;The third receiving module is used for receiving the second input of the user on the current display interface;

第二处理模块,用于响应于第二输入,复制或者剪切所述待处理文本。The second processing module is configured to copy or cut the text to be processed in response to the second input.

可选的,划分模块包括以下子模块至少之一:Optionally, the division module includes at least one of the following sub-modules:

第一划分子模块,用于对目标文本内容进行语义识别,根据语义识别结果将目标文本内容划分为多组字符;The first division submodule is used to perform semantic recognition on the target text content, and divide the target text content into multiple groups of characters according to the semantic recognition result;

第二划分子模块,用于对目标文本内容进行格式识别,根据格式识别结果将目标文本内容划分为多组字符;The second division submodule is used to perform format recognition on the target text content, and divide the target text content into multiple groups of characters according to the format recognition result;

第三划分子模块,用于按照预设数量的字符为一组的原则,将目标文本内容划分为多组字符;The third division sub-module is used to divide the target text content into multiple groups of characters according to the principle that a preset number of characters are grouped into one group;

第四划分子模块,用于按照相同字符类型为一组的原则,将目标文本内容划分为多组字符。The fourth division submodule is used to divide the target text content into multiple groups of characters according to the principle that the same character type is a group.

可选的,光标包括起始光标和结束光标;Optionally, the cursor includes a start cursor and an end cursor;

第一处理模块包括:The first processing module includes:

第一控制子模块,用于响应于用户对起始光标的移动输入,控制起始光标以沿第一预设方向依次排列的至少一组字符的长度为单位在第一预设方向上进行移动;The first control sub-module is used to control the start cursor to move in the first preset direction in units of lengths of at least one group of characters sequentially arranged along the first preset direction in response to the user's input of movement of the starting cursor ;

第二控制子模块,用于响应于用户对结束光标的移动输入,控制结束光标以沿第二预设方向依次排列的至少一组字符的长度为单位在第二预设方向上进行移动;a second control submodule, configured to control the end cursor to move in the second preset direction in units of lengths of at least one group of characters sequentially arranged along the second preset direction in response to the user's input of moving the ending cursor;

其中,第一预设方向和第二预设方向为相同方向或相反方向。Wherein, the first preset direction and the second preset direction are the same direction or opposite directions.

可选的,在光标的移动区域超出预设单手操作区域的情况下,在预设单手操作区域的预设位置显示与光标对应的悬浮控件;Optionally, when the moving area of the cursor exceeds the preset one-handed operation area, a floating control corresponding to the cursor is displayed at a preset position of the preset one-handed operation area;

第一处理模块包括:The first processing module includes:

处理子模块,用于响应于用户对悬浮控件内的滑动组件的移动输入,控制光标以多组字符中的各组字符的长度为单位在目标文本内容上沿预设方向移动;The processing submodule is used to control the cursor to move along the preset direction on the target text content in units of the length of each group of characters in the multiple groups of characters in response to the user's moving input to the sliding component in the suspension control;

其中,用户在进行移动输入时,悬浮控件的位置保持不变,控制悬浮控件内的滑动组件进行移动。Wherein, when the user performs mobile input, the position of the suspension control remains unchanged, and the sliding component in the suspension control is controlled to move.

可选的,光标包括起始光标和结束光标,预设位置显示与起始光标对应的第一悬浮控件和/或与结束光标对应的第二悬浮控件;Optionally, the cursor includes a start cursor and an end cursor, and the preset position displays a first suspension control corresponding to the start cursor and/or a second suspension control corresponding to the end cursor;

处理子模块包括:Processing submodules include:

第一处理单元,用于在预设位置仅显示第一悬浮控件的情况下,响应于用户对第一悬浮控件内的滑动组件的移动输入,控制起始光标在目标文本内容上沿第一预设方向移动;The first processing unit is configured to control the starting cursor to move along the first preset on the target text content in response to the user's movement input to the sliding component in the first floating control when only the first floating control is displayed at the preset position. set the direction to move;

第二处理单元,用于在预设位置仅显示第二悬浮控件的情况下,响应于用户对第二悬浮控件内的滑动组件的移动输入,控制结束光标在目标文本内容上沿第二预设方向移动;The second processing unit is configured to control the end cursor to move along the second preset on the target text content in response to the user's movement input to the sliding component in the second floating control when only the second floating control is displayed at the preset position direction move;

第三处理单元,用于在预设位置显示第一悬浮控件和第二悬浮控件的情况下,响应于用户对第一悬浮控件内的滑动组件的移动输入,控制起始光标在目标文本内容上沿第一预设方向移动,响应于用户对第二悬浮控件内的滑动组件的移动输入,控制结束光标在目标文本内容上沿第二预设方向移动;The third processing unit is configured to control the start cursor on the target text content in response to the user's movement input to the sliding component in the first suspension control when the first suspension control and the second suspension control are displayed at the preset position moving along the first preset direction, and in response to the user's input of moving the sliding component in the second floating control, controlling the end cursor to move along the second preset direction on the target text content;

其中,第一预设方向和第二预设方向为相同方向或相反方向。Wherein, the first preset direction and the second preset direction are the same direction or opposite directions.

本发明实施例的电子设备,根据用户在显示界面上的第一输入,将显示界面上的目标文本内容划分为多组字符,并根据用户控制光标在目标文本内容上移动的移动输入,控制光标以多组字符中的各组字符的长度为单位沿预设方向进行移动,确定光标移动时所经过的文本为待处理文本,可以提高光标移动的准确性和效率,简化了操作步骤,便于用户方便的选择待处理文本,提高了用户的使用体验。The electronic device in the embodiment of the present invention divides the target text content on the display interface into multiple groups of characters according to the user's first input on the display interface, and controls the cursor according to the movement input of the user controlling the cursor to move on the target text content. Taking the length of each group of characters in multiple groups of characters as the unit to move along the preset direction, and determining the text that the cursor moves through is the text to be processed, which can improve the accuracy and efficiency of cursor movement, simplifies the operation steps, and is convenient for users It is convenient to select the text to be processed, which improves the user experience.

通过在预设单手操作区域的预设位置显示悬浮控件,可以便于用户在单手场景下对显示界面内任意位置的光标进行移动,提升了用户的单手操作体验。By displaying the floating control at the preset position of the preset one-handed operation area, it is convenient for the user to move the cursor at any position in the display interface in the one-handed scenario, which improves the user's one-handed operation experience.

图6为实现本发明各个实施例的一种电子设备的硬件结构示意图,该电子设备600包括但不限于:射频单元601、网络模块602、音频输出单元603、输入单元604、传感器605、显示单元606、用户输入单元607、接口单元608、存储器609、处理器610、以及电源611等部件。6 is a schematic diagram of the hardware structure of an electronic device implementing various embodiments of the present invention. The electronic device 600 includes but is not limited to: a radio frequency unit 601, a network module 602, an audio output unit 603, an input unit 604, a sensor 605, and a display unit 606 , a user input unit 607 , an interface unit 608 , a memory 609 , a processor 610 , and a power supply 611 and other components.

本领域技术人员可以理解,图6中示出的电子设备结构并不构成对电子设备的限定,电子设备可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。在本发明实施例中,电子设备包括但不限于手机、平板电脑、笔记本电脑、掌上电脑、车载终端、可穿戴设备、以及计步器等。Those skilled in the art can understand that the structure of the electronic device shown in FIG. 6 does not constitute a limitation on the electronic device, and the electronic device may include more or less components than the one shown, or combine some components, or different components layout. In this embodiment of the present invention, the electronic device includes but is not limited to a mobile phone, a tablet computer, a notebook computer, a palmtop computer, a vehicle-mounted terminal, a wearable device, a pedometer, and the like.

其中,用户输入单元607用于:接收用户在当前显示界面上的第一输入;处理器610用于:响应于第一输入,将当前显示界面上的目标文本内容划分为多组字符;用户输入单元607还用于:接收控制光标在目标文本内容上移动的移动输入;处理器610还用于:响应于移动输入,控制光标以多组字符中的各组字符的长度为单位沿预设方向进行移动,确定光标移动时所经过的文本为待处理文本。The user input unit 607 is used for: receiving the first input of the user on the current display interface; the processor 610 is used for: in response to the first input, divide the target text content on the current display interface into multiple groups of characters; the user input The unit 607 is further configured to: receive a movement input that controls the cursor to move on the target text content; the processor 610 is further configured to: in response to the movement input, control the cursor to move along a preset direction in units of the length of each group of characters in the plurality of groups of characters Move to determine the text to be processed when the cursor moves.

可选的,用户输入单元607还用于:接收用户在当前显示界面上的第二输入;处理器610还用于:响应于第二输入,复制或者剪切待处理文本。Optionally, the user input unit 607 is further configured to: receive a second input from the user on the current display interface; the processor 610 is further configured to: in response to the second input, copy or cut the text to be processed.

可选的,将当前显示界面上的目标文本内容划分为多组字符时,处理器610用于执行以下方案至少之一:Optionally, when the target text content on the current display interface is divided into multiple groups of characters, the processor 610 is configured to execute at least one of the following solutions:

对目标文本内容进行语义识别,根据语义识别结果将目标文本内容划分为多组字符;Perform semantic recognition on the target text content, and divide the target text content into multiple groups of characters according to the semantic recognition results;

对目标文本内容进行格式识别,根据格式识别结果将目标文本内容划分为多组字符;Perform format recognition on the target text content, and divide the target text content into multiple groups of characters according to the format recognition result;

按照预设数量的字符为一组的原则,将目标文本内容划分为多组字符;According to the principle of a preset number of characters as a group, the target text content is divided into multiple groups of characters;

按照相同字符类型为一组的原则,将目标文本内容划分为多组字符。According to the principle that the same character type is a group, the target text content is divided into multiple groups of characters.

可选的,光标包括起始光标和结束光标;响应于移动输入,控制光标以所述多组字符中的各组字符的长度为单位沿预设方向进行移动时,处理器610还用于:Optionally, the cursor includes a start cursor and an end cursor; in response to the moving input, when controlling the cursor to move along a preset direction in units of the length of each group of characters in the multiple groups of characters, the processor 610 is further configured to:

响应于用户对起始光标的移动输入,控制起始光标以沿第一预设方向依次排列的至少一组字符的长度为单位在第一预设方向上进行移动;In response to the user's movement input to the starting cursor, the starting cursor is controlled to move in the first preset direction in units of lengths of at least one group of characters sequentially arranged along the first preset direction;

响应于用户对结束光标的移动输入,控制结束光标以沿第二预设方向依次排列的至少一组字符的长度为单位在第二预设方向上进行移动;In response to the user's input of moving the ending cursor, the ending cursor is controlled to move in the second preset direction in units of lengths of at least one group of characters sequentially arranged along the second preset direction;

其中,第一预设方向和第二预设方向为相同方向或相反方向。Wherein, the first preset direction and the second preset direction are the same direction or opposite directions.

可选的,在光标的移动区域超出预设单手操作区域的情况下,在预设单手操作区域的预设位置显示与光标对应的悬浮控件;Optionally, when the moving area of the cursor exceeds the preset one-handed operation area, a floating control corresponding to the cursor is displayed at a preset position of the preset one-handed operation area;

响应于移动输入,控制光标以多组字符中的各组字符的长度为单位沿预设方向进行移动时,处理器610还用于:In response to the moving input, when the control cursor moves along the preset direction in units of the length of each group of characters in the multiple groups of characters, the processor 610 is further configured to:

响应于用户对悬浮控件内的滑动组件的移动输入,控制光标以多组字符中的各组字符的长度为单位在目标文本内容上沿预设方向移动;In response to the user's movement input to the sliding component in the floating control, the control cursor moves along the preset direction on the target text content with the length of each group of characters in the multiple groups of characters as a unit;

其中,用户在进行移动输入时,悬浮控件的位置保持不变,控制悬浮控件内的滑动组件进行移动。Wherein, when the user performs mobile input, the position of the suspension control remains unchanged, and the sliding component in the suspension control is controlled to move.

可选的,光标包括起始光标和结束光标,预设位置显示与起始光标对应的第一悬浮控件和/或与结束光标对应的第二悬浮控件;Optionally, the cursor includes a start cursor and an end cursor, and the preset position displays a first suspension control corresponding to the start cursor and/or a second suspension control corresponding to the end cursor;

响应于用户对悬浮控件内的滑动组件的移动输入,控制光标以多组字符中的各组字符的长度为单位在目标文本内容上沿预设方向移动时,处理器610还用于:In response to the user's movement input to the sliding component in the floating control, when the control cursor moves along the preset direction on the target text content with the length of each group of characters in the multiple groups of characters as the unit, the processor 610 is further configured to:

在预设位置仅显示第一悬浮控件的情况下,响应于用户对第一悬浮控件内的滑动组件的移动输入,控制起始光标在目标文本内容上沿第一预设方向移动;In the case where only the first floating control is displayed in the preset position, in response to the user's input of movement of the sliding component in the first floating control, the starting cursor is controlled to move along the first preset direction on the target text content;

在预设位置仅显示第二悬浮控件的情况下,响应于用户对第二悬浮控件内的滑动组件的移动输入,控制结束光标在目标文本内容上沿第二预设方向移动;In the case where only the second suspension control is displayed at the preset position, in response to the user's movement input to the sliding component in the second suspension control, the end cursor is controlled to move along the second preset direction on the target text content;

在预设位置显示第一悬浮控件和第二悬浮控件的情况下,响应于用户对第一悬浮控件内的滑动组件的移动输入,控制起始光标在目标文本内容上沿第一预设方向移动,响应于用户对第二悬浮控件内的滑动组件的移动输入,控制结束光标在目标文本内容上沿第二预设方向移动;In the case where the first suspension control and the second suspension control are displayed at the preset position, in response to the user's movement input to the sliding component in the first suspension control, the starting cursor is controlled to move along the first preset direction on the target text content , in response to the user's movement input to the sliding component in the second suspension control, controlling the end cursor to move along the second preset direction on the target text content;

其中,第一预设方向和第二预设方向为相同方向或相反方向。Wherein, the first preset direction and the second preset direction are the same direction or opposite directions.

这样,根据用户在显示界面上的第一输入,将显示界面上的目标文本内容划分为多组字符,并根据用户控制光标在目标文本内容上移动的移动输入,控制光标以多组字符中的各组字符的长度为单位沿预设方向进行移动,确定光标移动时所经过的文本为待处理文本,可以提高光标移动的准确性和效率,简化了操作步骤,便于用户方便的选择待处理文本,提高了用户的使用体验。In this way, according to the user's first input on the display interface, the target text content on the display interface is divided into multiple groups of characters, and according to the movement input of the user controlling the cursor to move on the target text content, the cursor is controlled to display characters in the multiple groups of characters. The length of each group of characters is the unit of movement along the preset direction, and the text passed by the cursor is determined as the text to be processed, which can improve the accuracy and efficiency of the cursor movement, simplify the operation steps, and facilitate the user to conveniently select the text to be processed. , which improves the user experience.

通过在预设单手操作区域的预设位置显示悬浮控件,可以便于用户在单手场景下对显示界面内任意位置的光标进行移动,提升了用户的单手操作体验。By displaying the floating control at the preset position of the preset one-handed operation area, it is convenient for the user to move the cursor at any position in the display interface in the one-handed scenario, which improves the user's one-handed operation experience.

应理解的是,本发明实施例中,射频单元601可用于收发信息或通话过程中,信号的接收和发送,具体的,将来自基站的下行数据接收后,给处理器610处理;另外,将上行的数据发送给基站。通常,射频单元601包括但不限于天线、至少一个放大器、收发信机、耦合器、低噪声放大器、双工器等。此外,射频单元601还可以通过无线通信系统与网络和其他设备通信。It should be understood that, in this embodiment of the present invention, the radio frequency unit 601 may be used for receiving and sending signals during sending and receiving of information or during a call. Specifically, after receiving the downlink data from the base station, it is processed by the processor 610; The uplink data is sent to the base station. Generally, the radio frequency unit 601 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency unit 601 can also communicate with the network and other devices through a wireless communication system.

电子设备通过网络模块602为用户提供了无线的宽带互联网访问,如帮助用户收发电子邮件、浏览网页和访问流式媒体等。The electronic device provides the user with wireless broadband Internet access through the network module 602, such as helping the user to send and receive emails, browse web pages, access streaming media, and the like.

音频输出单元603可以将射频单元601或网络模块602接收的或者在存储器609中存储的音频数据转换成音频信号并且输出为声音。而且,音频输出单元603还可以提供与电子设备600执行的特定功能相关的音频输出(例如,呼叫信号接收声音、消息接收声音等等)。音频输出单元603包括扬声器、蜂鸣器以及受话器等。The audio output unit 603 may convert audio data received by the radio frequency unit 601 or the network module 602 or stored in the memory 609 into audio signals and output as sound. Also, the audio output unit 603 may also provide audio output related to a specific function performed by the electronic device 600 (eg, call signal reception sound, message reception sound, etc.). The audio output unit 603 includes a speaker, a buzzer, a receiver, and the like.

输入单元604用于接收音频或视频信号。输入单元604可以包括图形处理器(Graphics Processing Unit,GPU)6041和麦克风6042,图形处理器6041对在视频捕获模式或图像捕获模式中由图像捕获装置(如摄像头)获得的静态图片或视频的图像数据进行处理。处理后的图像帧可以显示在显示单元606上。经图形处理器6041处理后的图像帧可以存储在存储器609(或其它存储介质)中或者经由射频单元601或网络模块602进行发送。麦克风6042可以接收声音,并且能够将这样的声音处理为音频数据。处理后的音频数据可以在电话通话模式的情况下转换为可经由射频单元601发送到移动通信基站的格式输出。The input unit 604 is used to receive audio or video signals. The input unit 604 may include a graphics processor (Graphics Processing Unit, GPU) 6041 and a microphone 6042, and the graphics processor 6041 captures images of still pictures or videos obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode data is processed. The processed image frames may be displayed on the display unit 606 . The image frames processed by the graphics processor 6041 may be stored in the memory 609 (or other storage medium) or transmitted via the radio frequency unit 601 or the network module 602 . The microphone 6042 can receive sound and can process such sound into audio data. The processed audio data can be converted into a format that can be transmitted to a mobile communication base station via the radio frequency unit 601 for output in the case of a telephone call mode.

电子设备600还包括至少一种传感器605,比如光传感器、运动传感器以及其他传感器。具体地,光传感器包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示面板6061的亮度,接近传感器可在电子设备600移动到耳边时,关闭显示面板6061和/或背光。作为运动传感器的一种,加速计传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别电子设备姿态(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;传感器605还可以包括指纹传感器、压力传感器、虹膜传感器、分子传感器、陀螺仪、气压计、湿度计、温度计、红外线传感器等,在此不再赘述。The electronic device 600 also includes at least one sensor 605, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor and a proximity sensor, wherein the ambient light sensor can adjust the brightness of the display panel 6061 according to the brightness of the ambient light, and the proximity sensor can turn off the display panel 6061 and the display panel 6061 when the electronic device 600 is moved to the ear. / or backlight. As a kind of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in all directions (usually three axes), and can detect the magnitude and direction of gravity when stationary, and can be used to identify the posture of electronic devices (such as horizontal and vertical screen switching, related games , magnetometer attitude calibration), vibration recognition related functions (such as pedometer, tapping), etc.; the sensor 605 may also include a fingerprint sensor, a pressure sensor, an iris sensor, a molecular sensor, a gyroscope, a barometer, a hygrometer, a thermometer, Infrared sensors, etc., are not repeated here.

显示单元606用于显示由用户输入的信息或提供给用户的信息。显示单元606可包括显示面板6061,可以采用液晶显示器(Liquid Crystal Display,LCD)、有机发光二极管(Organic Light-Emitting Diode,OLED)等形式来配置显示面板6061。The display unit 606 is used to display information input by the user or information provided to the user. The display unit 606 may include a display panel 6061, and the display panel 6061 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.

用户输入单元607可用于接收输入的数字或字符信息,以及产生与电子设备的用户设置以及功能控制有关的键信号输入。具体地,用户输入单元607包括触控面板6071以及其他输入设备6072。触控面板6071,也称为触摸屏,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触控面板6071上或在触控面板6071附近的操作)。触控面板6071可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器610,接收处理器610发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触控面板6071。除了触控面板6071,用户输入单元607还可以包括其他输入设备6072。具体地,其他输入设备6072可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆,在此不再赘述。The user input unit 607 may be used to receive input numerical or character information, and generate key signal input related to user setting and function control of the electronic device. Specifically, the user input unit 607 includes a touch panel 6071 and other input devices 6072 . The touch panel 6071, also referred to as a touch screen, can collect the user's touch operations on or near it (such as the user's finger, stylus, etc., any suitable object or accessory on or near the touch panel 6071). operate). The touch panel 6071 may include two parts, a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and then sends it to the touch controller. To the processor 610, the command sent by the processor 610 is received and executed. In addition, the touch panel 6071 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves. In addition to the touch panel 6071 , the user input unit 607 may also include other input devices 6072 . Specifically, other input devices 6072 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 described herein again.

进一步的,触控面板6071可覆盖在显示面板6061上,当触控面板6071检测到在其上或附近的触摸操作后,传送给处理器610以确定触摸事件的类型,随后处理器610根据触摸事件的类型在显示面板6061上提供相应的视觉输出。虽然在图6中,触控面板6071与显示面板6061是作为两个独立的部件来实现电子设备的输入和输出功能,但是在某些实施例中,可以将触控面板6071与显示面板6061集成而实现电子设备的输入和输出功能,具体此处不做限定。Further, the touch panel 6071 can be covered on the display panel 6061. When the touch panel 6071 detects a touch operation on or near it, it transmits it to the processor 610 to determine the type of the touch event, and then the processor 610 determines the type of the touch event according to the touch The type of event provides a corresponding visual output on the display panel 6061. Although in FIG. 6 , the touch panel 6071 and the display panel 6061 are used as two independent components to realize the input and output functions of the electronic device, but in some embodiments, the touch panel 6071 and the display panel 6061 may be integrated The implementation of the input and output functions of the electronic device is not specifically limited here.

接口单元608为外部装置与电子设备600连接的接口。例如,外部装置可以包括有线或无线头戴式耳机端口、外部电源(或电池充电器)端口、有线或无线数据端口、存储卡端口、用于连接具有识别模块的装置的端口、音频输入/输出(I/O)端口、视频I/O端口、耳机端口等等。接口单元608可以用于接收来自外部装置的输入(例如,数据信息、电力等等)并且将接收到的输入传输到电子设备600内的一个或多个元件或者可以用于在电子设备600和外部装置之间传输数据。The interface unit 608 is an interface for connecting an external device to the electronic device 600 . For example, external devices may include wired or wireless headset ports, external power (or battery charger) ports, wired or wireless data ports, memory card ports, ports for connecting devices with identification modules, audio input/output (I/O) ports, video I/O ports, headphone ports, and more. The interface unit 608 may be used to receive input (eg, data information, power, etc.) from external devices and transmit the received input to one or more elements within the electronic device 600 or may be used between the electronic device 600 and external Transfer data between devices.

存储器609可用于存储软件程序以及各种数据。存储器609可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据手机的使用所创建的数据(比如音频数据、电话本等)等。此外,存储器609可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。The memory 609 may be used to store software programs as well as various data. The memory 609 may mainly include a stored program area and a stored data area, wherein the stored program area may store an operating system, an application program required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; Data created by the use of the mobile phone (such as audio data, phone book, etc.), etc. Additionally, memory 609 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.

处理器610是电子设备的控制中心,利用各种接口和线路连接整个电子设备的各个部分,通过运行或执行存储在存储器609内的软件程序和/或模块,以及调用存储在存储器609内的数据,执行电子设备的各种功能和处理数据,从而对电子设备进行整体监控。处理器610可包括一个或多个处理单元;优选的,处理器610可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器610中。The processor 610 is the control center of the electronic device, using various interfaces and lines to connect various parts of the entire electronic device, by running or executing the software programs and/or modules stored in the memory 609, and calling the data stored in the memory 609. , perform various functions of electronic equipment and process data, so as to monitor electronic equipment as a whole. The processor 610 may include one or more processing units; preferably, the processor 610 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, etc., and the modem The processor mainly handles wireless communication. It can be understood that, the above-mentioned modulation and demodulation processor may not be integrated into the processor 610.

电子设备600还可以包括给各个部件供电的电源611(比如电池),优选的,电源611可以通过电源管理系统与处理器610逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。The electronic device 600 may also include a power supply 611 (such as a battery) for supplying power to various components. Preferably, the power supply 611 may be logically connected to the processor 610 through a power management system, so as to manage charging, discharging, and power consumption management through the power management system and other functions.

另外,电子设备600包括一些未示出的功能模块,在此不再赘述。In addition, the electronic device 600 includes some functional modules not shown, which will not be repeated here.

优选的,本发明实施例还提供一种电子设备,包括处理器610,存储器609,存储在存储器609上并可在处理器610上运行的计算机程序,该计算机程序被处理器610执行时实现上述文本处理方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。Preferably, an embodiment of the present invention further provides an electronic device, including a processor 610, a memory 609, a computer program stored in the memory 609 and running on the processor 610, the computer program being executed by the processor 610 to implement the above-mentioned The various processes of the embodiments of the text processing method can achieve the same technical effect, and are not repeated here in order to avoid repetition.

本发明实施例还提供一种计算机可读存储介质,计算机可读存储介质上存储有计算机程序,该计算机程序被处理器执行时实现上述文本处理方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。其中,所述的计算机可读存储介质,如只读存储器(Read-Only Memory,简称ROM)、随机存取存储器(Random Access Memory,简称RAM)、磁碟或者光盘等。Embodiments of the present invention further provide a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium. When the computer program is executed by a processor, each process of the above text processing method embodiments can be implemented, and the same technology can be achieved. The effect, in order to avoid repetition, is not repeated here. The computer-readable storage medium is, for example, a read-only memory (Read-Only Memory, ROM for short), a random access memory (Random Access Memory, RAM for short), a magnetic disk, or an optical disk.

需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。It should be noted that, herein, the terms "comprising", "comprising" or any other variation thereof are intended to encompass non-exclusive inclusion, such that a process, method, article or device comprising a series of elements includes not only those elements, It also includes other elements not expressly listed or inherent to such a process, method, article or apparatus. Without further limitation, an element qualified by the phrase "comprising a..." does not preclude the presence of additional identical elements in a process, method, article or apparatus that includes the element.

通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本发明各个实施例所述的方法。From the description of the above embodiments, those skilled in the art can clearly understand that the method of the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is better implementation. Based on this understanding, the technical solutions of the present invention can be embodied in the form of software products in essence or the parts that make contributions to the prior art, and the computer software products are stored in a storage medium (such as ROM/RAM, magnetic disk, CD), including several instructions to make a terminal (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) execute the methods described in the various embodiments of the present invention.

上面结合附图对本发明的实施例进行了描述,但是本发明并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本发明的启示下,在不脱离本发明宗旨和权利要求所保护的范围情况下,还可做出很多形式,均属于本发明的保护之内。The embodiments of the present invention have been described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific embodiments, which are merely illustrative rather than restrictive. Under the inspiration of the present invention, without departing from the spirit of the present invention and the scope protected by the claims, many forms can be made, which all belong to the protection of the present invention.

Claims (12)

1.一种文本处理方法,应用于电子设备,其特征在于,所述方法包括:1. A text processing method, applied to electronic equipment, is characterized in that, described method comprises: 接收用户在当前显示界面上的第一输入;receiving the user's first input on the current display interface; 响应于所述第一输入,将当前显示界面上的目标文本内容划分为多组字符;In response to the first input, dividing the target text content on the current display interface into multiple groups of characters; 接收控制光标在所述目标文本内容上移动的移动输入;receiving a movement input that controls the movement of the cursor on the target text content; 响应于所述移动输入,控制光标以所述多组字符中的各组字符的长度为单位沿预设方向进行移动,确定所述光标移动时所经过的文本为待处理文本。In response to the moving input, the cursor is controlled to move along a preset direction in units of the length of each group of characters in the plurality of groups of characters, and the text that the cursor moves through is determined as the text to be processed. 2.根据权利要求1所述的方法,其特征在于,所述方法还包括:2. The method according to claim 1, wherein the method further comprises: 接收所述用户在当前显示界面上的第二输入;receiving the user's second input on the current display interface; 响应于所述第二输入,复制或者剪切所述待处理文本。In response to the second input, the text to be processed is copied or cut. 3.根据权利要求1所述的方法,其特征在于,所述将当前显示界面上的目标文本内容划分为多组字符,包括以下方案至少之一:3. The method according to claim 1, wherein the dividing the target text content on the current display interface into multiple groups of characters comprises at least one of the following schemes: 对所述目标文本内容进行语义识别,根据语义识别结果将所述目标文本内容划分为多组字符;Semantic recognition is performed on the target text content, and the target text content is divided into multiple groups of characters according to the semantic recognition result; 对所述目标文本内容进行格式识别,根据格式识别结果将所述目标文本内容划分为多组字符;Perform format recognition on the target text content, and divide the target text content into multiple groups of characters according to the format recognition result; 按照预设数量的字符为一组的原则,将所述目标文本内容划分为多组字符;According to the principle that a preset number of characters are a group, the target text content is divided into multiple groups of characters; 按照相同字符类型为一组的原则,将所述目标文本内容划分为多组字符。According to the principle that the same character type is a group, the target text content is divided into multiple groups of characters. 4.根据权利要求1所述的方法,其特征在于,所述光标包括起始光标和结束光标;4. The method according to claim 1, wherein the cursor comprises a start cursor and an end cursor; 所述响应于所述移动输入,控制光标以所述多组字符中的各组字符的长度为单位沿预设方向进行移动,包括:The controlling the cursor to move along the preset direction in units of the length of each group of characters in the plurality of groups of characters in response to the moving input, including: 响应于用户对所述起始光标的移动输入,控制所述起始光标以沿第一预设方向依次排列的至少一组字符的长度为单位在所述第一预设方向上进行移动;In response to the user's movement input for the starting cursor, controlling the starting cursor to move in the first preset direction in units of lengths of at least one group of characters sequentially arranged along the first preset direction; 响应于用户对所述结束光标的移动输入,控制所述结束光标以沿第二预设方向依次排列的至少一组字符的长度为单位在所述第二预设方向上进行移动;In response to the user's movement input to the end cursor, controlling the end cursor to move in the second preset direction in units of lengths of at least one group of characters sequentially arranged along the second preset direction; 其中,所述第一预设方向和所述第二预设方向为相同方向或相反方向。Wherein, the first preset direction and the second preset direction are the same direction or opposite directions. 5.根据权利要求1所述的方法,其特征在于,在所述光标的移动区域超出预设单手操作区域的情况下,在所述预设单手操作区域的预设位置显示与所述光标对应的悬浮控件;5 . The method according to claim 1 , wherein when the moving area of the cursor exceeds a preset one-handed operation area, displaying the same The floating control corresponding to the cursor; 所述响应于所述移动输入,控制光标以所述多组字符中的各组字符的长度为单位沿预设方向进行移动,包括:The controlling the cursor to move along the preset direction in units of the length of each group of characters in the plurality of groups of characters in response to the moving input, including: 响应于所述用户对所述悬浮控件内的滑动组件的移动输入,控制所述光标以所述多组字符中的各组字符的长度为单位在所述目标文本内容上沿所述预设方向移动;In response to the user's movement input to the sliding component in the floating control, controlling the cursor to move along the preset direction on the target text content in units of the length of each group of characters in the plurality of groups of characters move; 其中,所述用户在进行移动输入时,所述悬浮控件的位置保持不变,控制所述悬浮控件内的滑动组件进行移动。Wherein, when the user performs movement input, the position of the suspension control remains unchanged, and the sliding component in the suspension control is controlled to move. 6.根据权利要求5所述的方法,其特征在于,所述光标包括起始光标和结束光标,所述预设位置显示与所述起始光标对应的第一悬浮控件和/或与所述结束光标对应的第二悬浮控件;6. The method according to claim 5, wherein the cursor includes a start cursor and an end cursor, and the preset position displays a first floating control corresponding to the start cursor and/or a first floating control corresponding to the start cursor and/or the End the second floating control corresponding to the cursor; 所述响应于所述用户对所述悬浮控件内的滑动组件的移动输入,控制所述光标以所述多组字符中的各组字符的长度为单位在所述目标文本内容上沿所述预设方向移动,包括:In response to the user's movement input to the sliding component in the floating control, the cursor is controlled to move along the preset on the target text content in units of the length of each group of characters in the plurality of groups of characters. Set the direction to move, including: 在所述预设位置仅显示所述第一悬浮控件的情况下,响应于用户对所述第一悬浮控件内的滑动组件的移动输入,控制所述起始光标在所述目标文本内容上沿第一预设方向移动;In the case where only the first floating control is displayed in the preset position, in response to the user's movement input to the sliding component in the first floating control, the starting cursor is controlled to move along the upper edge of the target text content moving in the first preset direction; 在所述预设位置仅显示所述第二悬浮控件的情况下,响应于用户对所述第二悬浮控件内的滑动组件的移动输入,控制所述结束光标在所述目标文本内容上沿第二预设方向移动;In the case where only the second floating control is displayed in the preset position, in response to the user's movement input to the sliding component in the second floating control, the end cursor is controlled to move along the first page on the target text content. Two preset directions to move; 在所述预设位置显示所述第一悬浮控件和所述第二悬浮控件的情况下,响应于用户对所述第一悬浮控件内的滑动组件的移动输入,控制所述起始光标在所述目标文本内容上沿第一预设方向移动,响应于用户对所述第二悬浮控件内的滑动组件的移动输入,控制所述结束光标在所述目标文本内容上沿第二预设方向移动;In the case where the first suspension control and the second suspension control are displayed at the preset position, in response to a user's movement input to the sliding component in the first suspension control, the starting cursor is controlled to The target text content is moved along the first preset direction, and the end cursor is controlled to move along the second preset direction on the target text content in response to the user's movement input to the sliding component in the second floating control. ; 其中,所述第一预设方向和所述第二预设方向为相同方向或相反方向。Wherein, the first preset direction and the second preset direction are the same direction or opposite directions. 7.一种电子设备,其特征在于,所述电子设备包括:7. An electronic device, characterized in that the electronic device comprises: 第一接收模块,用于接收用户在当前显示界面上的第一输入;a first receiving module, configured to receive the first input of the user on the current display interface; 划分模块,用于响应于所述第一输入,将当前显示界面上的目标文本内容划分为多组字符;a dividing module, configured to divide the target text content on the current display interface into multiple groups of characters in response to the first input; 第二接收模块,用于接收控制光标在所述目标文本内容上移动的移动输入;a second receiving module, configured to receive a movement input that controls the movement of the cursor on the target text content; 第一处理模块,用于响应于所述移动输入,控制光标以所述多组字符中的各组字符的长度为单位沿预设方向进行移动,确定所述光标移动时所经过的文本为待处理文本。The first processing module is configured to, in response to the moving input, control the cursor to move along a preset direction in units of the length of each group of characters in the plurality of groups of characters, and determine that the text passed by the cursor when moving is to be Process text. 8.根据权利要求7所述的电子设备,其特征在于,还包括:8. The electronic device according to claim 7, further comprising: 第三接收模块,用于接收所述用户在当前显示界面上的第二输入;a third receiving module, configured to receive the second input of the user on the current display interface; 第二处理模块,用于响应于所述第二输入,复制或者剪切所述待处理文本。A second processing module, configured to copy or cut the text to be processed in response to the second input. 9.根据权利要求7所述的电子设备,其特征在于,所述划分模块包括以下子模块至少之一:9. The electronic device according to claim 7, wherein the dividing module comprises at least one of the following sub-modules: 第一划分子模块,用于对所述目标文本内容进行语义识别,根据语义识别结果将所述目标文本内容划分为多组字符;a first division submodule, configured to perform semantic recognition on the target text content, and divide the target text content into multiple groups of characters according to the semantic recognition result; 第二划分子模块,用于对所述目标文本内容进行格式识别,根据格式识别结果将所述目标文本内容划分为多组字符;The second division submodule is used to perform format recognition on the target text content, and divide the target text content into multiple groups of characters according to the format recognition result; 第三划分子模块,用于按照预设数量的字符为一组的原则,将所述目标文本内容划分为多组字符;The third division submodule is used to divide the target text content into multiple groups of characters according to the principle that a preset number of characters are grouped into one group; 第四划分子模块,用于按照相同字符类型为一组的原则,将所述目标文本内容划分为多组字符。The fourth division sub-module is configured to divide the target text content into multiple groups of characters according to the principle that the same character type is a group. 10.根据权利要求7所述的电子设备,其特征在于,所述光标包括起始光标和结束光标;10. The electronic device according to claim 7, wherein the cursor comprises a start cursor and an end cursor; 所述第一处理模块包括:The first processing module includes: 第一控制子模块,用于响应于用户对所述起始光标的移动输入,控制所述起始光标以沿第一预设方向依次排列的至少一组字符的长度为单位在所述第一预设方向上进行移动;The first control sub-module is configured to, in response to the user's movement input to the starting cursor, control the starting cursor to be placed in the first cursor in units of the length of at least one group of characters sequentially arranged along the first preset direction. Move in a preset direction; 第二控制子模块,用于响应于用户对所述结束光标的移动输入,控制所述结束光标以沿第二预设方向依次排列的至少一组字符的长度为单位在所述第二预设方向上进行移动;The second control sub-module is configured to, in response to the user's movement input to the end cursor, control the end cursor to take the length of at least one group of characters sequentially arranged along the second preset direction as the unit in the second preset move in the direction; 其中,所述第一预设方向和所述第二预设方向为相同方向或相反方向。Wherein, the first preset direction and the second preset direction are the same direction or opposite directions. 11.根据权利要求7所述的电子设备,其特征在于,在所述光标的移动区域超出预设单手操作区域的情况下,在所述预设单手操作区域的预设位置显示与所述光标对应的悬浮控件;11 . The electronic device according to claim 7 , wherein, when the moving area of the cursor exceeds a preset one-handed operation area, a preset position of the preset one-handed operation area is displayed with the the floating control corresponding to the cursor; 所述第一处理模块包括:The first processing module includes: 处理子模块,用于响应于所述用户对所述悬浮控件内的滑动组件的移动输入,控制所述光标以所述多组字符中的各组字符的长度为单位在所述目标文本内容上沿所述预设方向移动;A processing submodule, configured to control the cursor on the target text content in units of the length of each group of characters in the plurality of groups of characters in response to the user's movement input to the sliding component in the floating control move along the preset direction; 其中,所述用户在进行移动输入时,所述悬浮控件的位置保持不变,控制所述悬浮控件内的滑动组件进行移动。Wherein, when the user performs movement input, the position of the suspension control remains unchanged, and the sliding component in the suspension control is controlled to move. 12.根据权利要求11所述的电子设备,其特征在于,所述光标包括起始光标和结束光标,所述预设位置显示与所述起始光标对应的第一悬浮控件和/或与所述结束光标对应的第二悬浮控件;12. The electronic device according to claim 11, wherein the cursor comprises a start cursor and an end cursor, and the preset position displays a first floating control corresponding to the start cursor and/or a first floating control corresponding to the the second floating control corresponding to the end cursor; 所述处理子模块包括:The processing submodule includes: 第一处理单元,用于在所述预设位置仅显示所述第一悬浮控件的情况下,响应于用户对所述第一悬浮控件内的滑动组件的移动输入,控制所述起始光标在所述目标文本内容上沿第一预设方向移动;A first processing unit, configured to control the start cursor in the first floating control in response to the user's movement input to the sliding component in the first floating control when only the first floating control is displayed at the preset position. The target text content is moved up along the first preset direction; 第二处理单元,用于在所述预设位置仅显示所述第二悬浮控件的情况下,响应于用户对所述第二悬浮控件内的滑动组件的移动输入,控制所述结束光标在所述目标文本内容上沿第二预设方向移动;The second processing unit is configured to control the end cursor to move in the position where the second suspension control is displayed in the preset position, in response to the user's movement input to the sliding component in the second suspension control. moving along the second preset direction on the target text content; 第三处理单元,用于在所述预设位置显示所述第一悬浮控件和所述第二悬浮控件的情况下,响应于用户对所述第一悬浮控件内的滑动组件的移动输入,控制所述起始光标在所述目标文本内容上沿第一预设方向移动,响应于用户对所述第二悬浮控件内的滑动组件的移动输入,控制所述结束光标在所述目标文本内容上沿第二预设方向移动;a third processing unit, configured to, in the case where the first suspension control and the second suspension control are displayed in the preset position, in response to the user's movement input to the sliding component in the first suspension control, control The start cursor moves along the first preset direction on the target text content, and in response to the user's movement input to the sliding component in the second floating control, the end cursor is controlled to be on the target text content move along the second preset direction; 其中,所述第一预设方向和所述第二预设方向为相同方向或相反方向。Wherein, the first preset direction and the second preset direction are the same direction or opposite directions.
CN202010052092.3A 2020-01-17 2020-01-17 Text processing method and electronic equipment Active CN111273827B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010052092.3A CN111273827B (en) 2020-01-17 2020-01-17 Text processing method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010052092.3A CN111273827B (en) 2020-01-17 2020-01-17 Text processing method and electronic equipment

Publications (2)

Publication Number Publication Date
CN111273827A true CN111273827A (en) 2020-06-12
CN111273827B CN111273827B (en) 2021-10-22

Family

ID=70997360

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010052092.3A Active CN111273827B (en) 2020-01-17 2020-01-17 Text processing method and electronic equipment

Country Status (1)

Country Link
CN (1) CN111273827B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112445403A (en) * 2020-11-30 2021-03-05 北京搜狗科技发展有限公司 Text processing method and device and text processing device
CN112486377A (en) * 2020-12-07 2021-03-12 网易(杭州)网络有限公司 Text editing method and device and electronic equipment
CN113821288A (en) * 2021-09-16 2021-12-21 维沃移动通信有限公司 Information display method, device and electronic device and storage medium

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102541421A (en) * 2010-12-31 2012-07-04 上海量明科技发展有限公司 Cursor moving method and system in input method
CN102880417A (en) * 2011-09-12 2013-01-16 微软公司 Dominant touch selection and the cursor is placed
WO2013044450A1 (en) * 2011-09-27 2013-04-04 Motorola Mobility, Inc. Gesture text selection
CN103530049A (en) * 2013-04-15 2014-01-22 Tcl集团股份有限公司 Method and system for one-handed operation processing of mobile terminal with touch screen
CN104238745A (en) * 2014-07-31 2014-12-24 天津三星通信技术研究有限公司 Method for operating mobile terminal by one hand and mobile terminal
CN104932807A (en) * 2014-03-19 2015-09-23 腾讯科技(深圳)有限公司 Cursor positioning method and touch screen device
US20150339044A1 (en) * 2012-12-21 2015-11-26 Kyocera Corporation Mobile terminal, and user interface control program and method
CN105404444A (en) * 2015-11-26 2016-03-16 广州华多网络科技有限公司 Cursor moving method and apparatus
CN107015738A (en) * 2016-09-20 2017-08-04 阿里巴巴集团控股有限公司 A kind of text selection method and equipment
CN108664201A (en) * 2017-03-29 2018-10-16 北京搜狗科技发展有限公司 A kind of method for editing text, device and electronic equipment
CN110262747A (en) * 2019-06-21 2019-09-20 Oppo广东移动通信有限公司 Method, device, terminal and storage medium for controlling terminal
CN110287465A (en) * 2019-06-22 2019-09-27 广州视源电子科技股份有限公司 Text processing method, device, equipment and storage medium

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102541421A (en) * 2010-12-31 2012-07-04 上海量明科技发展有限公司 Cursor moving method and system in input method
CN102880417A (en) * 2011-09-12 2013-01-16 微软公司 Dominant touch selection and the cursor is placed
WO2013044450A1 (en) * 2011-09-27 2013-04-04 Motorola Mobility, Inc. Gesture text selection
US20150339044A1 (en) * 2012-12-21 2015-11-26 Kyocera Corporation Mobile terminal, and user interface control program and method
CN103530049A (en) * 2013-04-15 2014-01-22 Tcl集团股份有限公司 Method and system for one-handed operation processing of mobile terminal with touch screen
CN104932807A (en) * 2014-03-19 2015-09-23 腾讯科技(深圳)有限公司 Cursor positioning method and touch screen device
CN104238745A (en) * 2014-07-31 2014-12-24 天津三星通信技术研究有限公司 Method for operating mobile terminal by one hand and mobile terminal
CN105404444A (en) * 2015-11-26 2016-03-16 广州华多网络科技有限公司 Cursor moving method and apparatus
CN107015738A (en) * 2016-09-20 2017-08-04 阿里巴巴集团控股有限公司 A kind of text selection method and equipment
CN108664201A (en) * 2017-03-29 2018-10-16 北京搜狗科技发展有限公司 A kind of method for editing text, device and electronic equipment
CN110262747A (en) * 2019-06-21 2019-09-20 Oppo广东移动通信有限公司 Method, device, terminal and storage medium for controlling terminal
CN110287465A (en) * 2019-06-22 2019-09-27 广州视源电子科技股份有限公司 Text processing method, device, equipment and storage medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112445403A (en) * 2020-11-30 2021-03-05 北京搜狗科技发展有限公司 Text processing method and device and text processing device
CN112486377A (en) * 2020-12-07 2021-03-12 网易(杭州)网络有限公司 Text editing method and device and electronic equipment
CN113821288A (en) * 2021-09-16 2021-12-21 维沃移动通信有限公司 Information display method, device and electronic device and storage medium

Also Published As

Publication number Publication date
CN111273827B (en) 2021-10-22

Similar Documents

Publication Publication Date Title
CN108132752B (en) A text editing method and mobile terminal
CN108287739A (en) An operation guidance method and mobile terminal
CN109491738B (en) A terminal device control method and terminal device
CN110798397A (en) File transmission method, device and electronic device
CN110874147A (en) A display method and electronic device
CN109782998B (en) Display control method and mobile terminal
WO2020057257A1 (en) Application interface switching method and mobile terminal
CN111338530A (en) Application icon control method and electronic device
CN110618969A (en) Icon display method and electronic equipment
WO2020181955A1 (en) Interface control method and terminal device
CN110764675A (en) A control method and electronic device
CN110007835A (en) A kind of method for managing object and mobile terminal
WO2021004426A1 (en) Content selection method, and terminal
CN110109604A (en) A kind of application interface display methods and mobile terminal
WO2020001358A1 (en) Icon sorting method and terminal device
CN111273993A (en) Icon arrangement method and electronic device
CN111610904B (en) Icon arrangement method, electronic device and storage medium
CN110196668A (en) Information processing method and terminal device
CN110175063A (en) Operation assistance method, device, mobile terminal and storage medium
CN111459603A (en) Icon display method and electronic equipment
CN110703972A (en) A file control method and electronic device
CN111273827B (en) Text processing method and electronic equipment
CN110795402A (en) Method and device for displaying file list and electronic equipment
CN108563392B (en) Icon display control method and mobile terminal
CN111090529B (en) Method and electronic device for sharing information

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant