[go: up one dir, main page]

CN107391017A - Word processing method, device, mobile terminal and storage medium - Google Patents

Word processing method, device, mobile terminal and storage medium Download PDF

Info

Publication number
CN107391017A
CN107391017A CN201710596079.2A CN201710596079A CN107391017A CN 107391017 A CN107391017 A CN 107391017A CN 201710596079 A CN201710596079 A CN 201710596079A CN 107391017 A CN107391017 A CN 107391017A
Authority
CN
China
Prior art keywords
preset
text
preset graphic
graphic
display
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
CN201710596079.2A
Other languages
Chinese (zh)
Other versions
CN107391017B (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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201710596079.2A priority Critical patent/CN107391017B/en
Publication of CN107391017A publication Critical patent/CN107391017A/en
Application granted granted Critical
Publication of CN107391017B publication Critical patent/CN107391017B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04842Selection of displayed objects or displayed text elements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0488Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
    • G06F3/04883Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures for inputting data by handwriting, e.g. gesture or text

Landscapes

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

Abstract

The embodiment of the invention discloses a word processing method, a word processing device, a mobile terminal and a storage medium, wherein the method comprises the steps of calling a view control to display a preset graph in a movable window interface displayed by a touch screen after monitoring that a target application program is started, wherein the target application program comprises an application program which is used for displaying words and exists in the interface; after the preset graph is selected, controlling the preset graph to move according to the detected sliding operation, and acquiring characters in the area where the preset graph is located when the preset graph is moved; and inquiring the acquired characters. The scheme improves the word processing efficiency and reduces the power consumption of the mobile terminal.

Description

文字处理方法、装置、移动终端及存储介质Word processing method, device, mobile terminal and storage medium

技术领域technical field

本发明实施例涉及计算机技术,尤其涉及一种文字处理方法、装置、移动终端及存储介质。The embodiments of the present invention relate to computer technology, and in particular to a word processing method, device, mobile terminal and storage medium.

背景技术Background technique

随着移动终端普及程度的提高,越来越多的用户使用移动终端执行各种各样的功能以满足自身需求,如使用移动终端阅读文字、观看视频、听音乐、玩游戏等。现有技术中,当用户在阅读文字时,缺乏有效的文字处理手段,文字处理方式存在缺陷。As the popularity of mobile terminals increases, more and more users use mobile terminals to perform various functions to meet their own needs, such as using mobile terminals to read text, watch videos, listen to music, and play games. In the prior art, when a user is reading text, there is a lack of effective word processing means, and the word processing method has defects.

发明内容Contents of the invention

本发明提供了一种文字处理方法、装置、移动终端及存储介质,提高了文字处理效率,降低了移动终端的功耗。The invention provides a word processing method, device, mobile terminal and storage medium, which improves the word processing efficiency and reduces the power consumption of the mobile terminal.

第一方面,本发明实施例提供了一种文字处理方法,包括:In a first aspect, an embodiment of the present invention provides a word processing method, including:

监测到目标应用程序开启后,调用视图控件在触摸屏显示的活动窗口界面中显示一预设图形,所述目标应用程序包括界面中存在显示文字的应用程序;After monitoring that the target application program is started, call the view control to display a preset graphic in the active window interface displayed on the touch screen, and the target application program includes an application program with display text in the interface;

当所述预设图形被选中后,依据检测到的滑动操作控制所述预设图形移动,在所述预设图形移动结束时,获取所述预设图形所在区域的文字;When the preset graphic is selected, control the movement of the preset graphic according to the detected sliding operation, and obtain the text in the area where the preset graphic is located when the movement of the preset graphic ends;

对获取到的文字进行查询。Query the obtained text.

第二方面,本发明实施例还提供了一种文字处理装置,包括:In the second aspect, the embodiment of the present invention also provides a word processing device, including:

图形显示模块,用于监测到目标应用程序开启后,调用视图控件在触摸屏显示的活动窗口界面中显示一预设图形,所述目标应用程序包括界面中存在显示文字的应用程序;The graphic display module is used to call the view control to display a preset graphic in the active window interface displayed on the touch screen after detecting that the target application program is opened, and the target application program includes an application program with display text in the interface;

处理模块,用于当所述预设图形被选中后,依据检测到的滑动操作控制所述预设图形移动,在所述预设图形移动结束时,获取所述预设图形所在区域的文字;A processing module, configured to control the movement of the preset graphic according to the detected sliding operation after the preset graphic is selected, and obtain the text in the area where the preset graphic is located when the movement of the preset graphic ends;

查询模块,用于对获取到的文字进行查询。The query module is used to query the obtained text.

第三方面,本发明实施例还提供了一种移动终端,包括:处理器、存储器以及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现如本发明实施例所述的文字处理方法。In the third aspect, the embodiment of the present invention also provides a mobile terminal, including: a processor, a memory, and a computer program stored on the memory and operable on the processor, when the processor executes the computer program, the following is implemented: The word processing method described in the embodiment of the present invention.

第四方面,本发明实施例还提供了一种包含移动终端可执行指令的存储介质,所述移动终端可执行指令在由移动终端处理器执行时用于执行本发明实施例所述的文字处理方法。In the fourth aspect, the embodiment of the present invention also provides a storage medium containing executable instructions of the mobile terminal, and the executable instruction of the mobile terminal is used to execute the word processing described in the embodiment of the present invention when executed by the processor of the mobile terminal method.

本发明实施例提供的技术方案,监测到目标应用程序开启后,调用视图控件在触摸屏显示的活动窗口界面中显示一预设图形,当所述预设图形被选中后,依据检测到的滑动操作控制所述预设图形移动,在所述预设图形移动结束时,获取所述预设图形所在区域的文字,对获取到的文字进行查询,提高了文字处理效率,降低了移动终端的功耗。According to the technical solution provided by the embodiment of the present invention, after detecting that the target application program is started, the view control is called to display a preset graphic in the active window interface displayed on the touch screen. When the preset graphic is selected, according to the detected sliding operation Controlling the movement of the preset graphics, obtaining the text in the area where the preset graphics are located when the movement of the preset graphics ends, and querying the acquired text, improving the word processing efficiency and reducing the power consumption of the mobile terminal .

附图说明Description of drawings

通过阅读参照以下附图所作的对非限制性实施例所作的详细描述,本发明的其它特征、目的和优点将会变得更明显:Other characteristics, objects and advantages of the present invention will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings:

图1A是本发明实施例提供的一种文字处理方法的流程图;FIG. 1A is a flowchart of a word processing method provided by an embodiment of the present invention;

图1B是本发明实施例提供的监测到目标应用程序开启后显示预设图形的示意图;FIG. 1B is a schematic diagram of displaying preset graphics after detecting that the target application program is started according to an embodiment of the present invention;

图1C是本发明实施例提供的一种确定预设图形所在区域的示意图;Fig. 1C is a schematic diagram of determining the area where a preset graphic is located according to an embodiment of the present invention;

图2是本发明实施例提供的另一种文字处理方法的流程图;FIG. 2 is a flow chart of another word processing method provided by an embodiment of the present invention;

图3是本发明实施例提供的另一种文字处理方法的流程图;FIG. 3 is a flowchart of another word processing method provided by an embodiment of the present invention;

图4是本发明实施例提供的一种文字处理装置的结构框图;Fig. 4 is a structural block diagram of a word processing device provided by an embodiment of the present invention;

图5A是本发明实施例提供的一种移动终端的结构示意图;FIG. 5A is a schematic structural diagram of a mobile terminal provided by an embodiment of the present invention;

图5B是本发明实施例提供的另一种移动终端的结构示意图。FIG. 5B is a schematic structural diagram of another mobile terminal provided by an embodiment of the present invention.

具体实施方式detailed description

下面结合附图和实施例对本发明作进一步的详细说明。可以理解的是,此处所描述的具体实施例用于解释本发明,而非对本发明的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与本发明相关的部分而非全部结构。The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are used to explain the present invention rather than limit the present invention. In addition, it should be noted that, for the convenience of description, only some structures related to the present invention are shown in the drawings but not all structures.

图1A是本发明实施例提供的一种文字处理方法的流程图,本实施例可适用于对移动终端显示文字进行处理的情况,该方法可以由本发明实施例提供的移动终端来执行,该移动终端的文字处理装置可采用软件和/或硬件的方式实现,如图1A所示,本实施例提供的具体方案如下:Fig. 1A is a flow chart of a text processing method provided by an embodiment of the present invention. This embodiment is applicable to the case of processing text displayed on a mobile terminal. The method can be executed by the mobile terminal provided by the embodiment of the present invention. The mobile The word processing device of the terminal can be realized by means of software and/or hardware, as shown in FIG. 1A, the specific solution provided by this embodiment is as follows:

S101、监测到目标应用程序开启后,调用视图控件在触摸屏显示的活动窗口界面中显示一预设图形。S101. After detecting that the target application program is started, call the view control to display a preset graphic in the active window interface displayed on the touch screen.

在一个实施例中,该目标应用程序包括:界面中存在显示文字的应用程序、添加到设置名单中的应用程序或类别为电子书或新闻类的应用程序。示例性的,界面中存在显示文字的应用程序可以是微博客户端程序、外文贴吧客户端程序,当此类应用程序启动后,本方案可相应自动启动以提供对需要进行文字处理的内容进行处理。添加到设置名单的应用程序可以是用户手动添加录入的在启动后需要进行文字处理的应用程序,如用户将记录有英文的记事本应用程序添加到设置名单中,该设置名单中的应用程序在启动后均会自动开启本方案提供的文字处理功能。类别为电子书或新闻类的应用程序可以是网易新闻客户端程序、BBC广播客户端程序和英文杂志客户端程序。该实施例中,该文字处理功能和目标应用程序进行绑定,随着目标应用程序的开启而自动打开,无需用户额外进行功能的开启操作。In one embodiment, the target application program includes: an application program with text displayed on the interface, an application program added to the setting list, or an application program whose category is e-book or news. Exemplarily, the application programs that display text in the interface can be microblog client programs and foreign language post bar client programs. When such application programs are started, this solution can automatically start correspondingly to provide content that requires word processing. deal with. The application program added to the setting list can be an application program manually added and entered by the user that needs word processing after startup. For example, the user adds a notepad application with English records to the setting list, and the application program in the setting list is in the After starting, the word processing function provided by this solution will be automatically turned on. The application programs classified as e-books or news can be NetEase news client programs, BBC broadcast client programs and English magazine client programs. In this embodiment, the word processing function is bound to the target application program, and is automatically opened when the target application program is opened, without requiring the user to perform an additional function opening operation.

在一个实施例中,监测到目标应用程序开启后,调用视图控件在触摸屏显示的活动窗口界面中显示一预设图形。需要说明的是,本方案还可以是在具备投射功能的显示屏幕的活动窗口界面显示预设图形。如图1B所示,图1B是本发明实施例提供的监测到目标应用程序开启后显示预设图形的示意图,其中1011为显示的预设图形,该预设图形为自定义的箭头控件,还可以是方框矩阵控件、小手控件等。具体的,该预设图形的生成过程可以是:调用android系统中的Layout控件,新建一控件类实现自定义的预设图形,在活动窗口的LinearLayout控件中动态增加所述预设图形并对LinearLayout列表进行初始化以在所述活动窗口中悬浮显示所述预设图形。在另一实施例中,该预设图形处于隐藏状态,当检测到屏幕被点击后在点击位置显示该预设图形。In one embodiment, after detecting that the target application program is started, the view control is called to display a preset graphic in the active window interface displayed on the touch screen. It should be noted that, in this solution, preset graphics can also be displayed on an active window interface of a display screen with a projection function. As shown in FIG. 1B, FIG. 1B is a schematic diagram of displaying a preset graphic after monitoring that the target application program is started according to an embodiment of the present invention, wherein 1011 is a displayed preset graphic, and the preset graphic is a user-defined arrow control. It can be a box matrix control, a small hand control, etc. Specifically, the generation process of the preset graphics can be: call the Layout control in the android system, create a new control class to realize the custom preset graphics, dynamically increase the preset graphics in the LinearLayout control of the active window and modify the LinearLayout The list is initialized to display the preset graphics in suspension in the active window. In another embodiment, the preset graphic is in a hidden state, and the preset graphic is displayed at the clicked position after it is detected that the screen is clicked.

在一个实施例中,所述预设图形的初始大小根据所述活动窗口界面中显示的文字的大小自动调整。当活动窗口界面中显示的文字较大时,相应的预设图形的初始大小也较大,当活动窗口界面中显示的文字较小时,为了更加精确的选择要进行处理的文字,避免选择对不需要进行处理的文字进行处理,相应的预设图形的初始大小减小。In one embodiment, the initial size of the preset graphic is automatically adjusted according to the size of the text displayed in the active window interface. When the text displayed in the active window interface is large, the initial size of the corresponding preset graphic is also large. When the text displayed in the active window interface is small, in order to select the text to be processed more accurately, avoid selecting the wrong The text that needs to be processed is processed, and the initial size of the corresponding preset graphics is reduced.

在一个实施例中,所述预设图形的形状依据接收到的双指控制指令进行拉伸或收缩。示例性的,当需要处理的文字为整行或整段文字时,可对用户的双指操作进行检测,当检测到拉伸指令或收缩指令时相应的改变预设图形的形状以使其覆盖整行或整段文字,进而对覆盖的文字进行处理。In one embodiment, the shape of the preset graphic is stretched or shrunk according to the received two-finger control instruction. Exemplarily, when the text to be processed is a whole line or a whole paragraph of text, the user's two-finger operation can be detected, and when a stretch command or a shrink command is detected, the shape of the preset graphic is changed accordingly so that it covers The entire line or paragraph of text, and then process the covered text.

在一个实施例中,所述调用视图控件在触摸屏显示的活动窗口界面中显示一预设图形包括:调用视图控件在触摸屏显示的活动窗口界面中的角落位置显示一预设图形;相应的,在对获取到的文字进行查询之后,还包括:控制所述预设图形返回至所述角落位置。示例性的,该角落位置可以是触摸屏显示屏幕中显示界面的四个角落(左上角、左下角、右上角和右下角)中的任意一个,即预设图形的初始位置显示在角落处,以避免覆盖到文字部分,当文字处理完毕后,相应的,该预设图形在反馈初始的角落位置。In one embodiment, the calling the view control to display a preset graphic in the active window interface displayed on the touch screen includes: calling the view control to display a preset graphic at a corner position in the active window interface displayed on the touch screen; After querying the acquired text, the method further includes: controlling the preset graphic to return to the corner position. Exemplarily, the corner position can be any one of the four corners (upper left corner, lower left corner, upper right corner and lower right corner) of the display interface in the touch screen display screen, that is, the initial position of the preset graphic is displayed at the corner, so as to Avoid covering the text part, when the text processing is completed, correspondingly, the default graphic is at the initial corner position of the feedback.

S102、当所述预设图形被选中后,依据检测到的滑动操作控制所述预设图形移动,在所述预设图形移动结束时,获取所述预设图形所在区域的文字。S102. After the preset graphic is selected, control the movement of the preset graphic according to the detected sliding operation, and acquire the text in the area where the preset graphic is located when the movement of the preset graphic ends.

在一个实施例中,对屏幕的触控进行监听,当检测到预设图形所在区域被点击后设置该预设图形为选中状态,并可随检测到的屏幕上的滑动操作而相应移动。示例性的,在Android系统中通过setOnTouchListener监听器进行事件监听,通过判断KeyDown和KeyUp的位置来确定滑动方向进而控制预设图形进行相应位移;还可以是构建手势探测器,如GestureDetector mygesture=new GestureDetector(this),通过调用onFling方法根据MotionEvent中的按下以及滑动参数确定位置和距离来判断滑动方向、速度等进而相应控制预设图形进行对应位移。In one embodiment, the touch screen is monitored, and when it is detected that the area where the preset graphic is located is clicked, the preset graphic is set to the selected state, and can move correspondingly with the detected sliding operation on the screen. Exemplarily, in the Android system, event monitoring is performed through the setOnTouchListener listener, and the sliding direction is determined by judging the positions of KeyDown and KeyUp, thereby controlling the corresponding displacement of the preset graphics; it is also possible to construct a gesture detector, such as GestureDetector mygesture=new GestureDetector (this), by calling the onFling method to determine the position and distance according to the pressing and sliding parameters in the MotionEvent to determine the sliding direction, speed, etc., and then correspondingly control the preset graphics for corresponding displacement.

在一个实施例中,在预设图形移动结束时,获取所述预设图形所在区域的文字,其中,预设图形移动结束的判断条件为:预设图形脱离选中状态,或预设图形停留时间满足预设时长时。该预设时长可以是1秒钟。具体的,判断预设图形是否脱离选中状态可通过activity组件中的ontouchEvent进行预设图形的点选状态的监听。In one embodiment, when the movement of the preset graphic ends, the text in the area where the preset graphic is located is acquired, wherein the judgment condition for the end of the movement of the preset graphic is: the preset graphic leaves the selected state, or the dwell time of the preset graphic When the preset duration is met. The preset duration may be 1 second. Specifically, to determine whether the preset graphic is out of the selected state, the ontouchEvent in the activity component can be used to monitor the clicked state of the preset graphic.

在一个实施例中,在检测到所述预设图形脱离选中状态时,对所述预设图形所在区域进行光学字符识别,获取识别出的文字,其中,光学字符识别为对区域所在部分进行亮、暗检测以确定字符形状,再根据字符识别方法将确定出的字符形状转换为计算机文字。在另一个实施例中,在检测到所述预设图形停留时间满足预设时长时,对所述预设图形所在区域进行图像识别,获取识别出的文字。其中,预设图形所在区域的确定可以是检测预设图形是否覆盖有字符(通过光学字符或图像识别),若覆盖有字符,则将完整字符所占区域确定为预设图形所在区域,如图1C所示,图1C是本发明实施例提供的一种确定预设图形所在区域的示意图,图中1021所指示的矩形区域即为需要进行识别的区域。在另一实施例中,还可以是对预设图形所在位置的整行或多行确定为需要识别的区域以进行整句或整段文字的识别。In one embodiment, when it is detected that the preset graphic is out of the selected state, optical character recognition is performed on the area where the preset graphic is located to obtain the recognized text, wherein the optical character recognition is to brighten the part where the area is located. , dark detection to determine the character shape, and then convert the determined character shape into computer text according to the character recognition method. In another embodiment, when it is detected that the dwell time of the preset graphic satisfies the preset duration, image recognition is performed on the area where the preset graphic is located to obtain the recognized text. Wherein, the determination of the area where the preset graphic is located may be to detect whether the preset graphic is covered with characters (by optical character or image recognition), and if characters are covered, then the area occupied by the complete character is determined as the area where the preset graphic is located, as shown in the figure As shown in 1C, FIG. 1C is a schematic diagram of determining the area where the preset graphic is located according to an embodiment of the present invention. The rectangular area indicated by 1021 in the figure is the area to be identified. In another embodiment, the entire line or multiple lines where the preset graphic is located may also be determined as the area to be recognized for the recognition of the entire sentence or the entire text.

S103、对获取到的文字进行查询。S103. Query the acquired text.

其中,对获取到的文字进行查询包括通过预设接口调用软件对获取到的文字进行翻译或解释。Wherein, querying the acquired text includes invoking software through a preset interface to translate or interpret the acquired text.

在一个实施例中,当对获取到的文字进行翻译时,相应的调用的软件可以为翻译软件,该翻译软件可以是安装在移动终端中的翻译软件客户端,如有道词典、百度翻译等,还可以是存在于网络中提供的翻译软件服务,如谷歌网络翻译。其中,翻译结果可通过在移动终端当前界面新弹出的文本框中进行显示。其中,该翻译结果可根据S102提供的不同识别区域进行不同长度文字内容的翻译,即可以针对单个文字(汉字)、字符串(英文)进行翻译还可以是整句整段进行翻译。In one embodiment, when the acquired text is translated, the corresponding software called may be translation software, and the translation software may be a translation software client installed in a mobile terminal, such as Youdao Dictionary, Baidu Translate, etc. , it can also be a translation software service provided on the Internet, such as Google Web Translator. Wherein, the translation result can be displayed in a newly popped-up text box on the current interface of the mobile terminal. Among them, the translation result can be used to translate the text content of different lengths according to the different recognition areas provided by S102, that is, it can be translated for a single text (Chinese character), a character string (English) or a whole sentence or paragraph.

由上述内容可知,本方案提供的文字处理方法,在目标应用程序开启后可自启动一预设图形,通过对预设图形的拖动可相应的对该区域的文字进行翻译或解释,提高了对文字的处理效率,节省了用户大量时间相应的节约了终端设备的功耗。It can be seen from the above that the text processing method provided by this solution can automatically start a preset graphic after the target application is opened, and the text in the area can be translated or interpreted by dragging the preset graphic, which improves the The efficiency of text processing saves users a lot of time and correspondingly saves the power consumption of terminal equipment.

在另一个实施例中,还可以不通过显示预设图形的方式根据用户的拖动以选择文字处理区域,而是根据预设的操作方式对选择的区域进行文字处理,该预设的操作方式可以是双击操作、横向滑动选择操作等。In another embodiment, instead of displaying preset graphics to select the word processing area according to the user's dragging, word processing can be performed on the selected area according to the preset operation mode. It can be a double-click operation, a horizontal sliding selection operation, etc.

图2是本发明实施例提供的另一种文字处理方法的流程图,在上述实施例的基础上,可选的,当文字处理的方式为翻译处理时,在通过预设接口调用翻译软件对获取的文字进行翻译之前,还包括:Fig. 2 is a flow chart of another word processing method provided by the embodiment of the present invention. On the basis of the above embodiment, optionally, when the word processing method is translation processing, the translation software is called through the preset interface to Before getting the text translated, also include:

通过系统接口获取当前系统中使用的语言类型;Obtain the language type used in the current system through the system interface;

相应的,所述通过预设接口调用翻译软件对获取的文字进行翻译包括:Correspondingly, the translation of the acquired text by calling the translation software through the preset interface includes:

通过预设接口调用翻译软件将获取的文字翻译为当前系统使用的语言类型所对应的文字。Call the translation software through the preset interface to translate the acquired text into the text corresponding to the language type currently used by the system.

基于上述优化,如图2所示,本实施例提供的技术方案具体如下:Based on the above optimization, as shown in Figure 2, the technical solution provided by this embodiment is specifically as follows:

S201、监测到目标应用程序开启后,调用视图控件在触摸屏显示的活动窗口界面中显示一预设图形。S201. After detecting that the target application program is started, call the view control to display a preset graphic in the active window interface displayed on the touch screen.

S202、当所述预设图形被选中后,依据检测到的滑动操作控制所述预设图形移动,在所述预设图形移动结束时,获取所述预设图形所在区域的文字。S202. After the preset graphic is selected, control the movement of the preset graphic according to the detected sliding operation, and obtain the text in the area where the preset graphic is located when the movement of the preset graphic is completed.

S203、通过系统接口获取当前系统中使用的语言类型,通过预设接口调用翻译软件将获取的文字翻译为当前系统使用的语言类型所对应的文字,并显示翻译结果。S203. Obtain the language type used in the current system through the system interface, invoke the translation software through the preset interface to translate the acquired text into the text corresponding to the language type used in the current system, and display the translation result.

在一个实施例中,移动终端当前系统使用的语言类型为用户的母语,即翻译过程为将外文翻译为用户的母语以满足用户的翻译需求。本实施例中,可自动将用户不理解的需要翻译的文字转换为系统当前使用的语言类型,如移动终端当前的语言类型为中文(简体),则在对预设图形所在区域进行识别得到文字字符后通过翻译软件自动将该文字字符翻译为中文(简体),由此减少了用户操作步骤,进一步提高了文字处理效率。具体的,确定移动终端当前语言类型的过程为:通过android系统locale类中的getLanguage方法获取当前系统中使用的语言类型,所述语言类型包括简体中文、繁体中文、英文、日文、韩文或俄文中至少一种。In one embodiment, the language type currently used by the mobile terminal system is the user's native language, that is, the translation process is to translate foreign languages into the user's native language to meet the translation needs of the user. In this embodiment, the text that needs to be translated that the user does not understand can be automatically converted into the language type currently used by the system. If the current language type of the mobile terminal is Chinese (simplified), then the text will be obtained by identifying the area where the preset graphic is located. After the characters are translated, the text characters are automatically translated into Chinese (simplified) by the translation software, thereby reducing user operation steps and further improving the word processing efficiency. Specifically, the process of determining the current language type of the mobile terminal is: obtain the language type used in the current system through the getLanguage method in the locale class of the android system, and the language type includes Simplified Chinese, Traditional Chinese, English, Japanese, Korean or Russian at least one of.

本实施例提供了一种文字处理方法,在执行文字翻译过程中可自动识别出显示界面的文字内容,并获取该识别出的文字内容后,将其翻译为移动终端使用的语言类型,无需用户手动点选预翻译成的语言类型,进一步提高了翻译效率。This embodiment provides a text processing method, which can automatically recognize the text content of the display interface during the text translation process, and after obtaining the recognized text content, translate it into the language type used by the mobile terminal without the need for the user to Manually select the language type to be pre-translated into, which further improves the translation efficiency.

图3是本发明实施例提供的另一种文字处理方法的流程图,在上述实施例的基础上,可选的,通过预设接口调用翻译软件将获取的文字翻译为当前系统使用的语言类型所对应的文字包括:Fig. 3 is a flow chart of another word processing method provided by the embodiment of the present invention. On the basis of the above embodiment, it is optional to call the translation software through the preset interface to translate the acquired text into the language type used by the current system The corresponding text includes:

创建HttpGet对象,所述HttpGet对象的参数包括翻译软件对应的网页地址,使用execute方法发送http get请求调用翻译软件;Create the HttpGet object, the parameters of the HttpGet object include the corresponding webpage address of the translation software, use the execute method to send the http get request to call the translation software;

将获取到的文字以及翻译文本类型发送至翻译软件,通过翻译接口接收所述翻译软件发送的翻译文本。Send the acquired text and the type of the translated text to the translation software, and receive the translated text sent by the translation software through the translation interface.

基于上述优化,如图3所示,本实施例提供的技术方案具体如下:Based on the above optimization, as shown in Figure 3, the technical solution provided by this embodiment is specifically as follows:

S301、监测到目标应用程序开启后,调用视图控件在触摸屏显示的活动窗口界面中显示一预设图形。S301. After detecting that the target application program is started, call the view control to display a preset graphic in the active window interface displayed on the touch screen.

S302、当所述预设图形被选中后,依据检测到的滑动操作控制所述预设图形移动,在所述预设图形移动结束时,获取所述预设图形所在区域的文字。S302. After the preset graphic is selected, control the movement of the preset graphic according to the detected sliding operation, and acquire the text in the area where the preset graphic is located when the movement of the preset graphic ends.

S303、创建HttpGet对象,所述HttpGet对象的参数包括翻译软件对应的网页地址,使用execute方法发送http get请求调用翻译软件,将获取到的文字以及翻译文本类型发送至翻译软件,通过翻译接口接收所述翻译软件发送的翻译文本,并显示翻译结果。S303. Create an HttpGet object. The parameters of the HttpGet object include the webpage address corresponding to the translation software. Use the execute method to send an http get request to call the translation software, and send the obtained text and the type of the translated text to the translation software, and receive the translation information through the translation interface. The translation text sent by the translation software mentioned above, and display the translation results.

在一个实施例中,通过网络获取翻译服务。具体的,获取的翻译结果的数据接口为:In one embodiment, the translation service is obtained through the network. Specifically, the data interface of the obtained translation result is:

本实施例提供了一种文字处理方法,无需设备安装任何翻译软件也无需打开浏览器录入翻译内容进行翻译,监测到目标应用程序开启后,调用视图控件在触摸屏显示的活动窗口界面中显示一预设图形,根据预设图形位置识别所在区域的文字字符后对其进行自动翻译,简化了翻译步骤,无需安装翻译软件。This embodiment provides a word processing method without installing any translation software on the device and without opening a browser to input translation content for translation. After detecting that the target application program is started, call the view control to display a preview in the active window interface displayed on the touch screen. Set graphics, recognize the text characters in the area according to the preset graphic positions, and then automatically translate them, which simplifies the translation steps and does not need to install translation software.

图4是本发明实施例提供的一种文字处理装置的结构框图,该装置用于执行上述实施例提供的文字处理方法,具备执行方法相应的功能模块和有益效果。如图4所示,该装置具体包括:图形显示模块401、处理模块402、查询模块403。Fig. 4 is a structural block diagram of a word processing device provided by an embodiment of the present invention, the device is used to execute the word processing method provided by the above embodiment, and has corresponding functional modules and beneficial effects for executing the method. As shown in FIG. 4 , the device specifically includes: a graphic display module 401 , a processing module 402 , and a query module 403 .

其中,图形显示模块401,用于监测到目标应用程序开启后,调用视图控件在触摸屏显示的活动窗口界面中显示一预设图形,所述目标应用程序包括界面中存在显示文字的应用程序;Among them, the graphic display module 401 is used to call the view control to display a preset graphic in the active window interface displayed on the touch screen after detecting that the target application program is started, and the target application program includes an application program with display text in the interface;

处理模块402,用于当所述预设图形被选中后,依据检测到的滑动操作控制所述预设图形移动,在所述预设图形移动结束时,获取所述预设图形所在区域的文字;The processing module 402 is configured to control the movement of the preset graphic according to the detected sliding operation after the preset graphic is selected, and obtain the text in the area where the preset graphic is located when the movement of the preset graphic ends ;

查询模块403,用于对获取到的文字进行查询。The query module 403 is configured to query the acquired text.

本实施例提供的技术方案,监测到目标应用程序开启后,调用视图控件在触摸屏显示的活动窗口界面中显示一预设图形,当所述预设图形被选中后,依据检测到的滑动操作控制所述预设图形移动,在所述预设图形移动结束时,获取所述预设图形所在区域的文字,对获取到的文字进行查询,提高了文字处理效率,降低了移动终端的功耗。In the technical solution provided by this embodiment, after detecting that the target application program is started, the view control is invoked to display a preset graphic in the active window interface displayed on the touch screen. When the movement of the preset graphics ends, the text in the area where the preset graphics is located is acquired, and the acquired text is queried, which improves the word processing efficiency and reduces the power consumption of the mobile terminal.

可选的,所述处理模块402具体用于:Optionally, the processing module 402 is specifically configured to:

在检测到所述预设图形脱离选中状态时,对所述预设图形所在区域进行光学字符识别,获取识别出的文字;或When it is detected that the preset graphic is out of the selected state, performing optical character recognition on the area where the preset graphic is located to obtain the recognized text; or

在检测到所述预设图形停留时间满足预设时长时,对所述预设图形所在区域进行图像识别,获取识别出的文字。When it is detected that the stay time of the preset graphic satisfies the preset duration, image recognition is performed on the area where the preset graphic is located, and the recognized text is acquired.

可选的,所述查询模块403具体用于:通过预设接口调用软件对获取到的文字进行翻译或解释。Optionally, the query module 403 is specifically configured to: call software through a preset interface to translate or interpret the acquired text.

可选的,所述预设图形的初始大小可根据所述活动窗口界面中显示的文字的大小自动调整。可选的,所述预设图形的形状可依据接收到的双指控制指令进行拉伸或收缩。Optionally, the initial size of the preset graphic can be automatically adjusted according to the size of the text displayed in the active window interface. Optionally, the shape of the preset graphic can be stretched or contracted according to the received two-finger control instruction.

可选的,所述图形显示模块401具体用于:调用视图控件在触摸屏显示的活动窗口界面中的角落位置显示一预设图形;在对获取到的文字进行查询之后,还包括:控制所述预设图形返回至所述角落位置。Optionally, the graphic display module 401 is specifically configured to: call the view control to display a preset graphic at a corner position in the active window interface displayed on the touch screen; after querying the acquired text, it also includes: controlling the The preset shape returns to the corner position.

可选的,所述图形显示模块401具体用于:调用android系统中的Layout控件,新建一控件类实现自定义的预设图形;在活动窗口的LinearLayout控件中动态增加所述预设图形并对LinearLayout列表进行初始化以在触摸屏显示的活动窗口界面中悬浮显示所述预设图形。Optionally, the graphic display module 401 is specifically used to: call the Layout control in the android system, create a new control class to realize a custom preset graphic; dynamically increase the preset graphic in the LinearLayout control of the active window and The LinearLayout list is initialized to float and display the preset graphics in the active window interface displayed on the touch screen.

本实施例在上述各实施例的基础上提供了一种移动终端,图5A是本发明实施例提供的一种移动终端的结构示意图,如图5A所示,该移动终端500包括存储器501和处理器502,其中存储器501上存储有可在处理器上运行的计算机程序,所述处理器502执行所述计算机程序时实现如下步骤:This embodiment provides a mobile terminal on the basis of the above-mentioned embodiments. FIG. 5A is a schematic structural diagram of a mobile terminal provided by an embodiment of the present invention. As shown in FIG. 5A, the mobile terminal 500 includes a memory 501 and a processing A device 502, wherein the memory 501 stores a computer program that can run on the processor, and the processor 502 implements the following steps when executing the computer program:

监测到目标应用程序开启后,调用视图控件在触摸屏显示的活动窗口界面中显示一预设图形,所述目标应用程序包括界面中存在显示文字的应用程序;After monitoring that the target application program is started, call the view control to display a preset graphic in the active window interface displayed on the touch screen, and the target application program includes an application program with display text in the interface;

当所述预设图形被选中后,依据检测到的滑动操作控制所述预设图形移动,在所述预设图形移动结束时,获取所述预设图形所在区域的文字;When the preset graphic is selected, control the movement of the preset graphic according to the detected sliding operation, and obtain the text in the area where the preset graphic is located when the movement of the preset graphic ends;

对获取到的文字进行查询。Query the obtained text.

本实施例在上述各实施例的基础上提供了一种移动终端,该移动终端可以包括本发明提供的文字处理装置。图5B是本发明实施例提供的另一种移动终端的结构示意图,如图5B所示,该移动终端可以包括:存储器501、处理器(Central Processing Unit,CPU)502、外设接口503、RF(Radio Frequency,射频)电路505、音频电路506、扬声器511、电源管理芯片508、输入/输出(I/O)子系统509、触摸屏512、其他输入/控制设备510以及外部端口504,这些部件通过一个或多个通信总线或信号线507来通信。This embodiment provides a mobile terminal on the basis of the foregoing embodiments, and the mobile terminal may include the word processing device provided by the present invention. FIG. 5B is a schematic structural diagram of another mobile terminal provided by an embodiment of the present invention. As shown in FIG. 5B, the mobile terminal may include: a memory 501, a processor (Central Processing Unit, CPU) 502, a peripheral interface 503, an RF (Radio Frequency, radio frequency) circuit 505, audio frequency circuit 506, loudspeaker 511, power management chip 508, input/output (I/O) subsystem 509, touch screen 512, other input/control equipment 510 and external port 504, these components pass One or more communication buses or signal lines 507 for communication.

应该理解的是,图示移动终端500仅仅是移动终端的一个范例,并且移动终端500可以具有比图中所示出的更多的或者更少的部件,可以组合两个或更多的部件,或者可以具有不同的部件配置。图中所示出的各种部件可以在包括一个或多个信号处理和/或专用集成电路在内的硬件、软件、或硬件和软件的组合中实现。It should be understood that the illustrated mobile terminal 500 is only an example of a mobile terminal, and the mobile terminal 500 may have more or fewer components than those shown in the figure, and two or more components may be combined, Or can have a different component configuration. The various components shown in the figures may be implemented in hardware, software, or a combination of hardware and software including one or more signal processing and/or application specific integrated circuits.

下面就本实施例提供的用于多开应用的权限管理的移动终端进行详细的描述,该移动终端以智能手机为例。The following describes in detail the mobile terminal used for the permission management of multiple applications provided by this embodiment, and the mobile terminal takes a smart phone as an example.

存储器501,所述存储器501可以被CPU502、外设接口503等访问,所述存储器501可以包括高速随机存取存储器,还可以包括非易失性存储器,例如一个或多个磁盘存储器件、闪存器件、或其他易失性固态存储器件。Memory 501, the memory 501 can be accessed by the CPU 502, the peripheral interface 503, etc., the memory 501 can include a high-speed random access memory, and can also include a non-volatile memory, such as one or more disk storage devices, flash memory devices , or other volatile solid-state storage devices.

外设接口503,所述外设接口503可以将设备的输入和输出外设连接到CPU502和存储器501。Peripheral interface 503 , which can connect the input and output peripherals of the device to CPU 502 and memory 501 .

I/O子系统509,所述I/O子系统509可以将设备上的输入输出外设,例如触摸屏512和其他输入/控制设备510,连接到外设接口503。I/O子系统509可以包括显示控制器5091和用于控制其他输入/控制设备510的一个或多个输入控制器5092。其中,一个或多个输入控制器5092从其他输入/控制设备510接收电信号或者向其他输入/控制设备510发送电信号,其他输入/控制设备510可以包括物理按钮(按压按钮、摇臂按钮等)、拨号盘、滑动开关、操纵杆、点击滚轮。值得说明的是,输入控制器5092可以与以下任一个连接:键盘、红外端口、USB接口以及诸如鼠标的指示设备。The I/O subsystem 509 , the I/O subsystem 509 can connect input and output peripherals on the device, such as a touch screen 512 and other input/control devices 510 , to the peripheral interface 503 . I/O subsystem 509 may include a display controller 5091 and one or more input controllers 5092 for controlling other input/control devices 510 . Among them, one or more input controllers 5092 receive electrical signals from or send electrical signals to other input/control devices 510, which may include physical buttons (push buttons, rocker buttons, etc.) ), dials, slide switches, joysticks, click wheels. It should be noted that the input controller 5092 can be connected to any of the following: a keyboard, an infrared port, a USB interface, and a pointing device such as a mouse.

触摸屏512,所述触摸屏512是用户终端与用户之间的输入接口和输出接口,将可视输出显示给用户,可视输出可以包括图形、文本、图标、视频等。A touch screen 512, the touch screen 512 is an input interface and an output interface between the user terminal and the user, and displays visual output to the user. The visual output may include graphics, text, icons, videos, and the like.

I/O子系统509中的显示控制器5091从触摸屏512接收电信号或者向触摸屏512发送电信号。触摸屏512检测触摸屏上的接触,显示控制器5091将检测到的接触转换为与显示在触摸屏512上的用户界面对象的交互,即实现人机交互,显示在触摸屏512上的用户界面对象可以是运行游戏的图标、联网到相应网络的图标等。值得说明的是,设备还可以包括光鼠,光鼠是不显示可视输出的触摸敏感表面,或者是由触摸屏形成的触摸敏感表面的延伸。The display controller 5091 in the I/O subsystem 509 receives electrical signals from the touch screen 512 or sends electrical signals to the touch screen 512 . The touch screen 512 detects the contact on the touch screen, and the display controller 5091 converts the detected contact into an interaction with the user interface object displayed on the touch screen 512, that is, realizes human-computer interaction, and the user interface object displayed on the touch screen 512 can be a running Icons for games, icons for networking to appropriate networks, etc. It is worth noting that the device may also include an optical mouse, which is a touch-sensitive surface that does not display visual output, or that is an extension of a touch-sensitive surface formed by a touchscreen.

RF电路505,主要用于建立手机与无线网络(即网络侧)的通信,实现手机与无线网络的数据接收和发送。例如收发短信息、电子邮件等。具体地,RF电路505接收并发送RF信号,RF信号也称为电磁信号,RF电路505将电信号转换为电磁信号或将电磁信号转换为电信号,并且通过该电磁信号与通信网络以及其他设备进行通信。RF电路505可以包括用于执行这些功能的已知电路,其包括但不限于天线系统、RF收发机、一个或多个放大器、调谐器、一个或多个振荡器、数字信号处理器、CODEC(COder-DECoder,编译码器)芯片组、用户标识模块(Subscriber Identity Module,SIM)等等。The RF circuit 505 is mainly used to establish communication between the mobile phone and the wireless network (that is, the network side), and realize data reception and transmission between the mobile phone and the wireless network. Such as sending and receiving short messages, e-mails, etc. Specifically, the RF circuit 505 receives and sends RF signals, which are also called electromagnetic signals, and the RF circuit 505 converts electrical signals into electromagnetic signals or converts electromagnetic signals into electrical signals, and communicates with communication networks and other devices through the electromagnetic signals to communicate. RF circuitry 505 may include known circuitry for performing these functions including, but not limited to, an antenna system, an RF transceiver, one or more amplifiers, a tuner, one or more oscillators, a digital signal processor, a CODEC ( COder-DECoder, Codec) Chipset, Subscriber Identity Module (Subscriber Identity Module, SIM) and so on.

音频电路506,主要用于从外设接口503接收音频数据,将该音频数据转换为电信号,并且将该电信号发送给扬声器511。The audio circuit 506 is mainly used to receive audio data from the peripheral interface 503 , convert the audio data into electrical signals, and send the electrical signals to the speaker 511 .

扬声器511,用于将手机通过RF电路505从无线网络接收的语音信号,还原为声音并向用户播放该声音。The speaker 511 is used to restore the voice signal received by the mobile phone from the wireless network through the RF circuit 505 into sound and play the sound to the user.

电源管理芯片508,用于为CPU502、I/O子系统及外设接口所连接的硬件进行供电及电源管理。The power management chip 508 is used for power supply and power management for the hardware connected to the CPU 502 , the I/O subsystem and the peripheral interface.

上述实施例中提供的移动终端的文字处理装置及移动终端可执行本发明任意实施例所提供的移动终端的文字处理方法,具备执行该方法相应的功能模块和有益效果。未在上述实施例中详尽描述的技术细节,可参见本发明任意实施例所提供的移动终端的文字处理方法。The word processing device for the mobile terminal provided in the above embodiments and the mobile terminal can execute the word processing method for the mobile terminal provided in any embodiment of the present invention, and have corresponding functional modules and beneficial effects for executing the method. For technical details not exhaustively described in the foregoing embodiments, reference may be made to the word processing method for a mobile terminal provided in any embodiment of the present invention.

本发明实施例还提供一种包含移动终端可执行指令的存储介质,所述移动终端可执行指令在由移动终端处理器执行时用于执行一种文字处理方法,该方法包括:An embodiment of the present invention also provides a storage medium containing executable instructions of a mobile terminal, the executable instructions of the mobile terminal are used to execute a word processing method when executed by a processor of the mobile terminal, the method includes:

监测到目标应用程序开启后,调用视图控件在触摸屏显示的活动窗口界面中显示一预设图形,所述目标应用程序包括界面中存在显示文字的应用程序;After monitoring that the target application program is started, call the view control to display a preset graphic in the active window interface displayed on the touch screen, and the target application program includes an application program with display text in the interface;

当所述预设图形被选中后,依据检测到的滑动操作控制所述预设图形移动,在所述预设图形移动结束时,获取所述预设图形所在区域的文字;When the preset graphic is selected, control the movement of the preset graphic according to the detected sliding operation, and obtain the text in the area where the preset graphic is located when the movement of the preset graphic ends;

对获取到的文字进行查询。Query the obtained text.

可选的,在所述预设图形移动结束时,获取所述预设图形所在区域的文字包括:Optionally, at the end of the movement of the preset graphic, obtaining the text in the area where the preset graphic is located includes:

在检测到所述预设图形脱离选中状态时,对所述预设图形所在区域进行光学字符识别,获取识别出的文字;或When it is detected that the preset graphic is out of the selected state, performing optical character recognition on the area where the preset graphic is located to obtain the recognized text; or

在检测到所述预设图形停留时间满足预设时长时,对所述预设图形所在区域进行图像识别,获取识别出的文字。When it is detected that the stay time of the preset graphic satisfies the preset duration, image recognition is performed on the area where the preset graphic is located, and the recognized text is acquired.

可选的,所述对获取到的文字进行查询包括:Optionally, said querying the obtained text includes:

通过预设接口调用软件对获取到的文字进行翻译或解释。Call the software through the preset interface to translate or interpret the acquired text.

可选的,所述预设图形的初始大小根据所述活动窗口界面中显示的文字的大小自动调整。Optionally, the initial size of the preset graphic is automatically adjusted according to the size of the text displayed in the active window interface.

可选的,所述预设图形的形状依据接收到的双指控制指令进行拉伸或收缩。Optionally, the shape of the preset graphic is stretched or shrunk according to the received two-finger control instruction.

可选的,所述调用视图控件在触摸屏显示的活动窗口界面中显示一预设图形包括:Optionally, the calling the view control to display a preset graphic in the active window interface displayed on the touch screen includes:

调用视图控件在触摸屏显示的活动窗口界面中的角落位置显示一预设图形;Call the view control to display a preset graphic at the corner of the active window interface displayed on the touch screen;

相应的,在对获取到的文字进行查询之后,还包括:Correspondingly, after querying the obtained text, it also includes:

控制所述预设图形返回至所述角落位置。Controlling the preset figure to return to the corner position.

可选的,所述调用视图控件在触摸屏显示的活动窗口界面中显示一预设图形包括:Optionally, the calling the view control to display a preset graphic in the active window interface displayed on the touch screen includes:

调用android系统中的Layout控件,新建一控件类实现自定义的预设图形;Call the Layout control in the android system to create a new control class to realize the custom preset graphics;

在活动窗口的LinearLayout控件中动态增加所述预设图形并对LinearLayout列表进行初始化以在触摸屏显示的活动窗口界面中悬浮显示所述预设图形。The preset graphics are dynamically added in the LinearLayout control of the active window and the LinearLayout list is initialized to display the preset graphics in a floating display on the active window interface displayed on the touch screen.

存储介质——任何的各种类型的存储器设备或存储设备。术语“存储介质”旨在包括:安装介质,例如CD-ROM、软盘或磁带装置;计算机系统存储器或随机存取存储器,诸如DRAM、DDR RAM、SRAM、EDO RAM,兰巴斯(Rambus)RAM等;非易失性存储器,诸如闪存、磁介质(例如硬盘或光存储);寄存器或其它相似类型的存储器元件等。存储介质可以还包括其它类型的存储器或其组合。另外,存储介质可以位于程序在其中被执行的第一计算机系统中,或者可以位于不同的第二计算机系统中,第二计算机系统通过网络(诸如因特网)连接到第一计算机系统。第二计算机系统可以提供程序指令给第一计算机用于执行。术语“存储介质”可以包括可以驻留在不同位置中(例如在通过网络连接的不同计算机系统中)的两个或更多存储介质。存储介质可以存储可由一个或多个处理器执行的程序指令(例如具体实现为计算机程序)。storage medium - any of various types of memory devices or storage devices. The term "storage medium" is intended to include: installation media such as CD-ROMs, floppy disks or tape drives; computer system memory or random access memory such as DRAM, DDR RAM, SRAM, EDO RAM, Rambus RAM, etc. ; non-volatile memory, such as flash memory, magnetic media (eg hard disk or optical storage); registers or other similar types of memory elements, etc. The storage medium may also include other types of memory or combinations thereof. Also, the storage medium may be located in a first computer system in which the program is executed, or may be located in a different second computer system connected to the first computer system through a network such as the Internet. The second computer system may provide program instructions to the first computer for execution. The term "storage medium" may include two or more storage media that may reside in different locations, such as in different computer systems connected by a network. The storage medium may store program instructions (eg embodied as computer programs) executable by one or more processors.

当然,本发明实施例所提供的一种包含计算机可执行指令的存储介质,其计算机可执行指令不限于如上所述的文字处理方法操作,还可以执行本发明任意实施例所提供的文字处理方法中的相关操作。Certainly, a storage medium containing computer-executable instructions provided by an embodiment of the present invention, the computer-executable instructions are not limited to the operation of the word processing method as described above, and may also execute the word processing method provided by any embodiment of the present invention Related operations in .

注意,上述仅为本发明的较佳实施例及所运用技术原理。本领域技术人员会理解,本发明不限于这里所述的特定实施例,对本领域技术人员来说能够进行各种明显的变化、重新调整和替代而不会脱离本发明的保护范围。因此,虽然通过以上实施例对本发明进行了较为详细的说明,但是本发明不仅仅限于以上实施例,在不脱离本发明构思的情况下,还可以包括更多其他等效实施例,而本发明的范围由所附的权利要求范围决定。Note that the above are only preferred embodiments of the present invention and applied technical principles. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the protection scope of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments, and can also include more other equivalent embodiments without departing from the concept of the present invention, and the present invention The scope is determined by the scope of the appended claims.

Claims (10)

1.一种文字处理方法,其特征在于,包括:1. A word processing method, characterized in that, comprising: 监测到目标应用程序开启后,调用视图控件在触摸屏显示的活动窗口界面中显示一预设图形,所述目标应用程序包括界面中存在显示文字的应用程序;After monitoring that the target application program is started, call the view control to display a preset graphic in the active window interface displayed on the touch screen, and the target application program includes an application program with display text in the interface; 当所述预设图形被选中后,依据检测到的滑动操作控制所述预设图形移动,在所述预设图形移动结束时,获取所述预设图形所在区域的文字;When the preset graphic is selected, control the movement of the preset graphic according to the detected sliding operation, and obtain the text in the area where the preset graphic is located when the movement of the preset graphic ends; 对获取到的文字进行查询。Query the obtained text. 2.根据权利要求1所述的方法,其特征在于,在所述预设图形移动结束时,获取所述预设图形所在区域的文字包括:2. The method according to claim 1, wherein at the end of the movement of the preset graphic, obtaining the text in the area where the preset graphic is located comprises: 在检测到所述预设图形脱离选中状态时,对所述预设图形所在区域进行光学字符识别,获取识别出的文字;或When it is detected that the preset graphic is out of the selected state, performing optical character recognition on the area where the preset graphic is located to obtain the recognized text; or 在检测到所述预设图形停留时间满足预设时长时,对所述预设图形所在区域进行图像识别,获取识别出的文字。When it is detected that the stay time of the preset graphic satisfies the preset duration, image recognition is performed on the area where the preset graphic is located, and the recognized text is obtained. 3.根据权利要求2所述的方法,其特征在于,所述对获取到的文字进行查询包括:3. The method according to claim 2, wherein said querying the acquired text comprises: 通过预设接口调用软件对获取到的文字进行翻译或解释。Call the software through the preset interface to translate or interpret the acquired text. 4.根据权利要求1所述的方法,其特征在于,所述预设图形的初始大小根据所述活动窗口界面中显示的文字的大小自动调整。4. The method according to claim 1, wherein the initial size of the preset graphic is automatically adjusted according to the size of the text displayed in the active window interface. 5.根据权利要求4所述的方法,其特征在于,所述预设图形的形状依据接收到的双指控制指令进行拉伸或收缩。5. The method according to claim 4, wherein the shape of the preset graphic is stretched or contracted according to the received two-finger control instruction. 6.根据权利要求5所述的方法,其特征在于,所述调用视图控件在触摸屏显示的活动窗口界面中显示一预设图形包括:6. The method according to claim 5, wherein the calling the view control to display a preset graphic in the active window interface displayed on the touch screen comprises: 调用视图控件在触摸屏显示的活动窗口界面中的角落位置显示一预设图形;Call the view control to display a preset graphic at the corner of the active window interface displayed on the touch screen; 相应的,在对获取到的文字进行查询之后,还包括:Correspondingly, after querying the obtained text, it also includes: 控制所述预设图形返回至所述角落位置。Controlling the preset figure to return to the corner position. 7.根据权利要求1-6中任一项所述的方法,其特征在于,所述调用视图控件在触摸屏显示的活动窗口界面中显示一预设图形包括:7. The method according to any one of claims 1-6, wherein calling the view control to display a preset graphic in the active window interface displayed on the touch screen comprises: 调用android系统中的Layout控件,新建一控件类实现自定义的预设图形;Call the Layout control in the android system to create a new control class to realize the custom preset graphics; 在活动窗口的LinearLayout控件中动态增加所述预设图形并对LinearLayout列表进行初始化以在触摸屏显示的活动窗口界面中悬浮显示所述预设图形。The preset graphics are dynamically added in the LinearLayout control of the active window and the LinearLayout list is initialized to display the preset graphics in a suspended manner in the active window interface displayed on the touch screen. 8.一种文字处理装置,其特征在于,包括:8. A word processing device, characterized in that, comprising: 图形显示模块,用于监测到目标应用程序开启后,调用视图控件在触摸屏显示的活动窗口界面中显示一预设图形,所述目标应用程序包括界面中存在显示文字的应用程序;The graphic display module is used to call the view control to display a preset graphic in the active window interface displayed on the touch screen after detecting that the target application program is opened, and the target application program includes an application program with display text in the interface; 处理模块,用于当所述预设图形被选中后,依据检测到的滑动操作控制所述预设图形移动,在所述预设图形移动结束时,获取所述预设图形所在区域的文字;A processing module, configured to control the movement of the preset graphic according to the detected sliding operation after the preset graphic is selected, and obtain the text in the area where the preset graphic is located when the movement of the preset graphic ends; 查询模块,用于对获取到的文字进行查询。The query module is used to query the obtained text. 9.一种移动终端,包括:处理器、存储器以及存储在存储器上并可在处理器上运行的计算机程序,其特征在于,所述处理器执行所述计算机程序时实现如权利要求1-7中任一项所述的文字处理方法。9. A mobile terminal, comprising: a processor, a memory, and a computer program stored on the memory and operable on the processor, characterized in that, when the processor executes the computer program, the computer program according to claims 1-7 is realized The word processing method described in any one. 10.一种包含移动终端可执行指令的存储介质,其特征在于,所述移动终端可执行指令在由移动终端处理器执行时用于执行如权利要求1-7中任一项所述的文字处理方法。10. A storage medium containing executable instructions of a mobile terminal, wherein the executable instructions of the mobile terminal are used to execute the text according to any one of claims 1-7 when executed by a processor of the mobile terminal Approach.
CN201710596079.2A 2017-07-20 2017-07-20 Word processing method, device, mobile terminal and storage medium Active CN107391017B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710596079.2A CN107391017B (en) 2017-07-20 2017-07-20 Word processing method, device, mobile terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710596079.2A CN107391017B (en) 2017-07-20 2017-07-20 Word processing method, device, mobile terminal and storage medium

Publications (2)

Publication Number Publication Date
CN107391017A true CN107391017A (en) 2017-11-24
CN107391017B CN107391017B (en) 2022-05-17

Family

ID=60337441

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710596079.2A Active CN107391017B (en) 2017-07-20 2017-07-20 Word processing method, device, mobile terminal and storage medium

Country Status (1)

Country Link
CN (1) CN107391017B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109002759A (en) * 2018-06-07 2018-12-14 Oppo广东移动通信有限公司 Text recognition method and device, mobile terminal and storage medium
CN111401323A (en) * 2020-04-20 2020-07-10 Oppo广东移动通信有限公司 Character translation method, device, storage medium and electronic equipment
CN111708959A (en) * 2020-06-16 2020-09-25 Oppo广东移动通信有限公司 Page display method and device, storage medium and electronic equipment
CN112764634A (en) * 2021-01-22 2021-05-07 维沃移动通信有限公司 Content processing method and device
CN114553528A (en) * 2022-02-22 2022-05-27 成都睿智兴华信息技术有限公司 Internal and external network data safety transmission system and transmission method thereof

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040036699A1 (en) * 2002-06-25 2004-02-26 Nokia Corporation Method of identifying symbols, and portable electronic device
CN102662525A (en) * 2012-04-27 2012-09-12 上海量明科技发展有限公司 Method and terminal for carrying out screenshot operation through touch screen
CN103455590A (en) * 2013-08-29 2013-12-18 百度在线网络技术(北京)有限公司 Method and device for retrieving in touch-screen device
WO2015037851A1 (en) * 2013-09-12 2015-03-19 삼성전자 주식회사 Screenshot processing device and method for same
CN105786930A (en) * 2014-12-26 2016-07-20 北京奇虎科技有限公司 Touch interaction based search method and apparatus
CN105930147A (en) * 2016-04-13 2016-09-07 北京小米移动软件有限公司 Application function starting method and device
CN106951893A (en) * 2017-05-08 2017-07-14 奇酷互联网络科技(深圳)有限公司 Text information acquisition methods, device and mobile terminal

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040036699A1 (en) * 2002-06-25 2004-02-26 Nokia Corporation Method of identifying symbols, and portable electronic device
CN102662525A (en) * 2012-04-27 2012-09-12 上海量明科技发展有限公司 Method and terminal for carrying out screenshot operation through touch screen
CN103455590A (en) * 2013-08-29 2013-12-18 百度在线网络技术(北京)有限公司 Method and device for retrieving in touch-screen device
WO2015037851A1 (en) * 2013-09-12 2015-03-19 삼성전자 주식회사 Screenshot processing device and method for same
CN105786930A (en) * 2014-12-26 2016-07-20 北京奇虎科技有限公司 Touch interaction based search method and apparatus
CN105930147A (en) * 2016-04-13 2016-09-07 北京小米移动软件有限公司 Application function starting method and device
CN106951893A (en) * 2017-05-08 2017-07-14 奇酷互联网络科技(深圳)有限公司 Text information acquisition methods, device and mobile terminal

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109002759A (en) * 2018-06-07 2018-12-14 Oppo广东移动通信有限公司 Text recognition method and device, mobile terminal and storage medium
WO2019233212A1 (en) * 2018-06-07 2019-12-12 Oppo广东移动通信有限公司 Text identification method and device, mobile terminal, and storage medium
CN111401323A (en) * 2020-04-20 2020-07-10 Oppo广东移动通信有限公司 Character translation method, device, storage medium and electronic equipment
CN111708959A (en) * 2020-06-16 2020-09-25 Oppo广东移动通信有限公司 Page display method and device, storage medium and electronic equipment
US12204602B2 (en) 2020-06-16 2025-01-21 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Page display method and electronic device
CN112764634A (en) * 2021-01-22 2021-05-07 维沃移动通信有限公司 Content processing method and device
CN114553528A (en) * 2022-02-22 2022-05-27 成都睿智兴华信息技术有限公司 Internal and external network data safety transmission system and transmission method thereof
CN114553528B (en) * 2022-02-22 2024-04-19 成都睿智兴华信息技术有限公司 Internal and external network data safety transmission system and transmission method thereof

Also Published As

Publication number Publication date
CN107391017B (en) 2022-05-17

Similar Documents

Publication Publication Date Title
CN108647052B (en) Application preloading method, device, storage medium and terminal
US11086663B2 (en) Preloading application using active window stack
CN107391017B (en) Word processing method, device, mobile terminal and storage medium
CN108363593B (en) Application program preloading method and device, storage medium and terminal
WO2019233241A1 (en) Method and apparatus for starting application program, and storage medium and terminal
WO2019157880A1 (en) Method and device for generating link for application page, storage medium, and electronic apparatus
CN108287918B (en) Music playing method and device based on application page, storage medium and electronic equipment
CN108710513A (en) Application program launching method, device, storage medium and terminal
US9632693B2 (en) Translation of touch input into local input based on a translation profile for an application
CN108108142A (en) Voice information processing method and device, terminal equipment and storage medium
CN107678780B (en) Memory management method and device, storage medium and terminal equipment
US20190354408A1 (en) Method for Preloading Application, Storage Medium, and Terminal
CN108829456A (en) Application program preloading method and device, storage medium and terminal
CN108710512B (en) Application program preloading method and device, storage medium and intelligent terminal
US9921735B2 (en) Apparatuses and methods for inputting a uniform resource locator
CN107402712B (en) Touch operation response method and device, storage medium and terminal
WO2015000429A1 (en) Intelligent word selection method and device
US20170031897A1 (en) Modification of input based on language content background
CN107861759A (en) Window control method and device, terminal equipment and storage medium
CN108416009A (en) Text retrieval method, device, storage medium and mobile terminal for mobile terminal
CN107027150A (en) WiFi control method, device and terminal equipment
CN107402625A (en) Touch screen scanning method, device, terminal and computer-readable storage medium
TW201716987A (en) Audio input technology for field entries
WO2020000276A1 (en) Method and terminal for controlling shortcut button
CN108845838B (en) Application preloading method, device, storage medium and terminal

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
CB02 Change of applicant information

Address after: 523860 No. 18, Wu Sha Beach Road, Changan Town, Dongguan, Guangdong

Applicant after: OPPO Guangdong Mobile Communications Co., Ltd.

Address before: 523860 No. 18, Wu Sha Beach Road, Changan Town, Dongguan, Guangdong

Applicant before: Guangdong OPPO Mobile Communications Co., Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant