CN110069774B - Text processing method, device and terminal - Google Patents

Text processing method, device and terminal Download PDF

Info

Publication number
CN110069774B
CN110069774B CN201910199242.0A CN201910199242A CN110069774B CN 110069774 B CN110069774 B CN 110069774B CN 201910199242 A CN201910199242 A CN 201910199242A CN 110069774 B CN110069774 B CN 110069774B
Authority
CN
China
Prior art keywords
text
input
contact point
splitting
merging
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.)
Active
Application number
CN201910199242.0A
Other languages
Chinese (zh)
Other versions
CN110069774A (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 CN201910199242.0A priority Critical patent/CN110069774B/en
Publication of CN110069774A publication Critical patent/CN110069774A/en
Application granted granted Critical
Publication of CN110069774B publication Critical patent/CN110069774B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/0483Interaction with page-structured environments, e.g. book metaphor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • 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/0485Scrolling or panning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/205Parsing
    • G06F40/211Syntactic parsing, e.g. based on context-free grammar [CFG] or unification grammars
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/289Phrasal analysis, e.g. finite state techniques or chunking

Landscapes

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

Abstract

The invention discloses a text processing method, a text processing device and a terminal, wherein the method comprises the following steps: detecting a first input in the case of displaying a first text on a terminal screen; acquiring a selected state of the first text; if the selected state is unselected, responding to the first input, and carrying out splitting processing or merging processing on the second text; wherein the second text is the whole text of the first text or part of the text of the first text. According to the embodiment of the invention, even if the text is not selected, the text can be split or combined, so that the operation steps of selecting the text by a user are saved, and the user operation is more convenient.

Description

Text processing method, device and terminal
Technical Field
The invention belongs to the field of terminals, and particularly relates to a text processing method, a text processing device and a terminal.
Background
With the rapid development of image recognition technology, optical character recognition (Optical Character Recognition, OCR) technology and the like, the terminal is used in a manner that characters are not input on a screen conventionally, but a camera can be utilized to take a picture, and then the content of the picture is analyzed, so that keywords are selected for searching, inquiring, translating and other functions. Therefore, the input modes of the terminal are more and more, and the terminal is more convenient and practical.
After parsing the text content of the picture, if the text is desired to be split, the user must first select the text and then press the terminal screen for a long time to display a "split" button, and split the selected text by triggering the "split" button. If the text is to be combined, similar steps are required, so that the steps of splitting and combining the text are complicated.
Disclosure of Invention
The embodiment of the invention provides a text processing method, a text processing device and a terminal, which can solve the technical problem of complicated user operation when a text is required to be split or combined.
In a first aspect, an embodiment of the present invention provides a text processing method, including:
detecting a first input in the case of displaying a first text on a terminal screen;
acquiring a selected state of the first text;
if the selected state is unselected, responding to the first input, and carrying out splitting processing or merging processing on the second text;
wherein the second text is the whole text of the first text or part of the text of the first text.
In another aspect, an embodiment of the present invention provides a text processing apparatus, including:
the input detection module is used for detecting a first input under the condition that a first text is displayed on a terminal screen;
the state acquisition module is used for acquiring the selected state of the first text;
the first response module is used for responding to the first input to split or combine the second text under the condition that the selected state is unselected;
wherein the second text is the whole text of the first text or part of the text of the first text.
In still another aspect, an embodiment of the present invention provides a terminal, including: a processor and a memory storing computer program instructions;
the processor implements the text processing method when executing the computer program instructions.
In yet another aspect, embodiments of the present invention provide a computer storage medium having stored thereon computer program instructions which, when executed by a processor, implement a text processing method as described above.
In the embodiment of the invention, the first input is detected under the condition that the first text is displayed on the terminal screen; and under the condition that the selected state is unselected, responding to the first input, and carrying out splitting processing or merging processing on the second text; therefore, even if the text is not selected, the text can be split or combined, so that the operation steps of selecting the text by a user are saved, and the user operation is more convenient.
Drawings
The invention will be better understood from the following description of specific embodiments thereof taken in conjunction with the accompanying drawings in which like or similar reference characters designate like or similar features.
FIG. 1 shows a flow diagram of a text processing method of one embodiment of the invention;
FIG. 2 shows a flow diagram of a text processing method according to another embodiment of the invention;
FIGS. 3 (a) and 3 (b) are schematic diagrams of terminal interfaces before and after text splitting according to one embodiment of the present invention;
FIGS. 4 (a) and 4 (b) are schematic diagrams showing terminal interfaces before and after text splitting according to another embodiment of the present invention;
FIG. 5 shows a flow diagram of a text processing method according to yet another embodiment of the present invention;
FIGS. 6 (a) and 6 (b) are schematic diagrams showing terminal interfaces before and after text splitting according to yet another embodiment of the present invention;
FIG. 7 shows a schematic diagram of the structure of a text processing device of an embodiment of the present invention;
fig. 8 is a schematic diagram of a hardware structure of a terminal implementing an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Fig. 1 shows a flow diagram of a text processing method according to an embodiment of the invention. As shown in fig. 1, the text processing method includes:
s101, detecting a first input in the case of displaying a first text on a terminal screen.
As one example, the first input may be an input generated by a touch operation. The position of the point of contact generated on the terminal screen by the touch operation may vary. The touch operation may be a preset operation. And the touch operation may be a gesture action made by an operator on the terminal screen, and the touch operation may also be an operation made by a stylus on the terminal screen.
S102, acquiring a selected state of the first text.
The selected state includes both the unselected state and the selected state. The text that is not selected as any portion of the first text is not selected. The selected text is selected as part of the first text or all of the first text.
S103, responding to the first input to split or combine the second text under the condition that the selected state is unselected; wherein the second text is the whole text of the first text or part of the text of the first text.
As one example, the splitting process includes splitting words in the second text into individual words, and not splitting the sequence of numbers and/or english words in the second text. After the splitting process, the split words are arranged in the order of the split words in the original text.
The merging process includes merging individual words in the text into words, for example, merging at least two adjacent words in the text into one word to merge into a plurality of words. After the merging process, the text processing method further includes: and carrying out semantic analysis on the multiple words obtained by merging, and determining the sequence of the multiple words so as to arrange the multiple words into sentences or phrases. For example, the combined words are "friday", "today" and "yes", and the words after semantic parsing are "today", "yes" and "friday".
In the embodiment of the invention, under the condition that the text is not selected, splitting processing or merging processing is carried out on part or all of the text displayed on the terminal screen. Therefore, even if the text is not selected, the text can be split or combined, so that the operation steps of selecting the text by a user are saved, and the operation of the user is more convenient.
If the first input is an input generated by touch operation, the user can split or combine the text by operating only one step (performing touch operation on the terminal screen). Compared with the prior art that a user operates three steps (selecting a text, pressing a terminal screen for a long time and triggering a split and merge button), the embodiment of the invention simplifies the operation steps of splitting or merging the text by the user, and enables the user to operate more conveniently. And because the split or merge buttons are not required to be displayed, the buttons can be prevented from occupying the display area, particularly, the display content of the shielding part of the buttons is avoided, and the use experience of a user is improved.
Moreover, under the condition of splitting, the aim of splitting the text is to facilitate the user to edit, so that the probability of editing the number sequence and English words by the user is relatively low, and the number sequence and single English letter after splitting occupy relatively more display areas. Therefore, the digital sequence and the English word are not split. For example, when the text "Tina" is responsible for statistical "splitting" of 2018 sales data, "Tina" and "2018" are not split, i.e., the split text is "Tina", "negative", "responsibility", "2018", "year", "pin", "sell", "data", "statistics". Therefore, the splitting processing mode of the embodiment of the invention is more reasonable.
In addition, if the combined words are automatically sequenced during the combination processing, the user can edit the combined words conveniently, the operation times of manually sequencing the combined words by the user are reduced, and the text processing is more intelligent.
Fig. 2 shows a flow diagram of a text processing method according to another embodiment of the invention. As shown in fig. 2, the text processing method includes:
s201, in the case of displaying a first text on the terminal screen, detecting a first input, a contact point of the first input on the terminal screen including a first contact point and a second contact point.
S202, acquiring a selected state of the first text, executing S203 when the selected state is unselected, and executing S204 when the selected state is selected.
S203, responding to the first input, and splitting or merging the second text; wherein the second text is the whole text of the first text or part of the text of the first text.
In the case where the second text is a partial text of the first text, the second text may be a text within a predetermined range of the first text. For example, the second text is the text of the first line in the first text, or the second text is the text of the first 10 words in the first text.
As one example, in S203, in the case where the distance between the first contact point and the second contact point increases, the second text is subjected to the splitting process; in the case where the distance between the first contact point and the second contact point is reduced, the second text is subjected to the merging process.
As another example, in S203, in the case where the distance between the first contact point and the second contact point is reduced, the second text is subjected to the splitting process; in the case where the distance between the first contact point and the second contact point increases, the second text is subjected to the merging process.
S204, responding to the first input, and splitting or merging the third text; the third text is the selected text in the first text.
As one example, in S204, in a case where the distance between the first contact point and the second contact point increases, the splitting process is performed on the third text; in the case where the distance between the first contact point and the second contact point is reduced, the third text is subjected to the merging process.
As another example, in S204, in a case where the distance between the first contact point and the second contact point is reduced, the splitting process is performed on the third text; in the case where the distance between the first contact point and the second contact point increases, the third text is subjected to the merging process.
In the case where the distance between the first contact point and the second contact point increases to correspond to the splitting process and the distance between the first contact point and the second contact point decreases to correspond to the merging process, since the plurality of words obtained after splitting are displayed at a larger distance on the terminal screen than those words before splitting are displayed on the terminal screen, it is easy for the user to remember that the distance between the two contact points increases to correspond to the splitting process. Since the plurality of words of the word obtained after the merging are displayed at a smaller distance on the terminal screen than those before the splitting, the user can easily remember that the distance between the two contact points is reduced corresponding to the merging process. It can be seen that the user can easily remember the correspondence, and the learning cost is low for the user, and the operation is simple.
Note that, the merging process and the splitting process in the present embodiment are the same as those in the embodiment shown in fig. 1, and a detailed description thereof is omitted.
The solution of fig. 2 is described below by means of a specific embodiment.
In the case where the distance between the first contact point and the second contact point becomes large, there are two ways of splitting processing according to the selected state of the first text.
Splitting treatment mode one
And under the condition that the first text is not selected, performing word-by-word splitting operation on the second text, wherein the second text is a part of the first text or the second text is all the first text.
As shown in fig. 3 (a), a first text is displayed in a first area of the terminal screen: a national preempt in 2018 was underway … to preempt the main venue. And displaying the second text in a second area of the terminal screen. In fig. 3 (a), since the content of the first text in the first region is large and the region area of the second region is limited, the second text displayed in the second region is a partial text of the first text.
If the terminal screen detects that the distance between the first contact point and the second contact point is increased in the second area, all texts displayed in the second area are split as the first text is not selected. As shown in fig. 3 (b), the splitting result is that the "nationwide" is split into the "nationwide" and the "national", the "ongoing" is split into the "ongoing" and the "line", the "incoming" and the "outgoing" are split into the "incoming" and the "outgoing".
Splitting treatment mode II
And under the condition that the first text is selected, performing word-by-word splitting operation on the selected text in the first text.
As shown in fig. 4 (a), a first text is displayed in a first area of the terminal screen; and displaying a second text in a second area of the terminal screen, wherein the second text comprises words, digital sequences. When the terminal screen detects that the distance between the first contact point and the second contact point is increased in the second area, since a part of the text in the first text is selected, the selected text is a gray background text in the second area, that is, the selected text is "total", "deal", "amount", "(" "G", "M", "V", ")" "first", "21", "second", "super", and split. As a result of this splitting, as shown in fig. 4 (b), the "success" is split into "success" and "success".
In the case where it is detected that the distance between the first contact point and the second contact point becomes smaller, there are two ways of merging processing for the selected state of the first text.
Merging processing mode one
And under the condition that the first text is not selected, combining the second text, wherein the second text is the whole text of the first text or a part of the text of the first text.
Merging processing mode II
And combining the third text under the condition that the first text is selected, wherein the third text is selected from the first text.
It should be noted that, for the merging in the first processing mode and the merging in the second processing mode, the merging includes merging individual words into words, and the merging may further include performing the semantic analysis according to the current content and then performing the recombination, for example, the text before the merging is "present", "day", "yes", "star", "period", "five", and the text after the merging is "today", "yes", "friday".
Fig. 5 shows a flow diagram of a text processing method according to yet another embodiment of the invention. As shown in fig. 5, the text processing method includes:
s301, in the case of displaying the first text on the terminal screen, detecting a first input, the first input being a slide input.
S302, acquiring a selected state of the first text, executing S303 when the selected state is unselected, and executing S304 when the selected state is selected.
S303, responding to the first input, and splitting or merging the second text; wherein the second text is the whole text of the first text or part of the text of the first text.
In S303, as an example, in a case where the first input is a slide input in the first direction, the second text is subjected to a splitting process; combining the second text when the first input is a sliding input in a second direction; wherein the first direction is different from the second direction. The first direction and the second direction may be opposite directions.
For example, in the case where the first input is a downward slide input, splitting processing is performed on the second text; in the case where the first input is an upward slide input, the second text is subjected to a merging process.
For another example, in the case where the first input is an upward slide input, splitting processing is performed on the second text; in the case where the first input is a downward slide input, the second text is subjected to a merging process.
S304, responding to the first input, and splitting or merging the third text; the third text is the selected text in the first text.
In S304, as an example, in a case where the first input is a slide input in the first direction, splitting processing is performed on the third text; combining the third text when the first input is a sliding input in the second direction; wherein the first direction is different from the second direction. The first direction and the second direction may be opposite directions.
The sliding direction of the first input may include other sliding directions besides a sliding direction from top to bottom and a sliding direction from bottom to top, for example, the first input may be a sliding input from a lower left corner to an upper right corner, or the first input may be a sliding input from an upper right corner to a lower left corner, or the first input may be a sliding input from a lower right corner to an upper left corner, or the first input may be a sliding input from an upper left corner to a lower right corner.
In addition, the merging process and the splitting process in the present embodiment are the same as those in the embodiment shown in fig. 1, and a detailed description thereof will not be repeated.
The scheme of fig. 5 is further illustrated by an embodiment.
As shown in fig. 6 (a), the terminal screen includes a first area in which a first text is displayed and a second area in which a second text is displayed. The second region is divided into three regions of the same area from left to right, a left region, a middle region, and a right region, respectively. And splitting the second text under the condition that the downward sliding input is detected in the middle area and the first text is not selected. As a result of the splitting process, as shown in fig. 6 (b), the "nationwide" is split into "whole" and "nationwide", the "on-the-fly" is split into "on-the-fly" and "on-the-line", and the "on-the-fly" is split into "on-the-fly" and "on-the-fly".
And in the case that the upward sliding input is detected in the middle area of the second area and the first text is not selected, combining the second text.
In addition, in the case where the up-down slide input is detected in the left region of the second region, text is selected in units of lines among the second text. In the case where an upward slide input is detected in the right-hand side area of the second area, the content displayed in the second area is turned to the previous page. In the case where a downward slide input is detected in the right-hand side area of the second area, the content displayed in the second area is turned to the next page.
A text processing method in the case where the first text has been selected is described below.
And in the case that the downward sliding input is detected in the middle area of the second area and the first text is selected, splitting the third text, wherein the third text is the selected text in the first text.
And in the case that the upward sliding input is detected in the middle area of the second area and the first text is selected, combining the third text, wherein the third text is the selected text in the first text.
In correspondence to the above, the embodiment of the present invention further provides a text processing apparatus 400, as shown in fig. 7, where the text processing apparatus 400 includes an input detection module 401, a state acquisition module 402, and a first response module 403.
The input detection module 401 is configured to detect a first input in a case where a first text is displayed on a terminal screen.
The state acquisition module 402 is configured to acquire a selected state of the first text.
The first response module 403 is configured to respond to the first input, and perform splitting or merging processing on the second text if the selected state is unselected; wherein the second text is the whole text of the first text or part of the text of the first text.
In one embodiment of the invention, the text processing device 400 further includes a second response module.
The second response module is used for responding to the first input to split or combine the third text under the condition that the selected state is selected; the third text is the selected text in the first text.
In one embodiment of the invention, the contact points generated by the first input on the terminal screen include a first contact point and a second contact point; the first response module 403 includes a first split module and a first merge module.
The first splitting module is used for splitting the second text under the condition that the distance between the first contact point and the second contact point is detected to be increased;
the first merging module is used for merging the second text under the condition that the distance between the first contact point and the second contact point is detected to be reduced.
In one embodiment of the invention, the contact points generated by the first input on the terminal screen include a first contact point and a second contact point; the first response module 403 includes a second splitting module and a second merging module.
The second splitting module is used for splitting the second text under the condition that the distance between the first contact point and the second contact point is detected to be reduced;
the second merging module is used for merging the second text under the condition that the distance between the first contact point and the second contact point is detected to be increased.
In one embodiment of the invention, the first input is a sliding input; the first response module 403 includes a third split module and a third merge module.
And the third splitting module is used for splitting the second text under the condition that the first input is the sliding input in the first direction.
And the third merging module is used for merging the second text when the first input is the sliding input in the second direction.
Wherein the first direction is different from the second direction.
In one embodiment of the present invention, the terminal screen includes a first area in which the first text is displayed and a second area in which the second text is displayed, and the input detection module 401 includes an area detection module.
The region detection module is used for detecting the first input in the second region.
The terminal provided by the embodiment of the present invention can implement each process in the above method embodiment, and in order to avoid repetition, details are not repeated here.
Fig. 8 is a schematic diagram of a hardware structure of a terminal implementing an embodiment of the present invention.
The terminal 500 may be a mobile terminal, the terminal 500 including, but not limited to: radio frequency unit 501, network module 502, audio output unit 503, input unit 504, sensor 505, display unit 506, user input unit 507, interface unit 508, memory 509, processor 510, and power source 511. Those skilled in the art will appreciate that the terminal structure shown in fig. 4 is not limiting of the terminal and that the terminal may include more or fewer components than shown, or may combine certain components, or a different arrangement of components. In the embodiment of the invention, the terminal comprises, but is not limited to, a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted terminal, a wearable device, a pedometer and the like.
Wherein the processor 510 is configured to detect a first input in a case where a first text is displayed on the terminal screen; acquiring a selected state of the first text; if the selected state is unselected, responding to the first input, and carrying out splitting processing or merging processing on the second text; wherein the second text is the whole text of the first text or part of the text of the first text.
In the embodiment of the invention, under the condition that a first text is displayed on a terminal screen, detecting a first input; and under the condition that the selected state is unselected, responding to the first input, and carrying out splitting processing or merging processing on the second text; therefore, even if the text is not selected, the text can be split or combined, so that the operation steps of selecting the text by a user are saved, and the user operation is more convenient.
It should be understood that, in the embodiment of the present invention, the radio frequency unit 501 may be used to receive and send information or signals during a call, specifically, receive downlink data from a base station, and then process the downlink data with the processor 510; and, the uplink data is transmitted to the base station. Typically, the radio frequency unit 501 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 501 may also communicate with networks and other devices through a wireless communication system.
The terminal provides wireless broadband internet access to the user through the network module 502, such as helping the user to send and receive e-mail, browse web pages, access streaming media, etc.
The audio output unit 503 may convert audio data received by the radio frequency unit 501 or the network module 502 or stored in the memory 509 into an audio signal and output as sound. Also, the audio output unit 503 may also provide audio output (e.g., a call signal reception sound, a message reception sound, etc.) related to a specific function performed by the terminal 500. The audio output unit 503 includes a speaker, a buzzer, a receiver, and the like.
The input unit 504 is used for receiving an audio or video signal. The input unit 504 may include a graphics processor (Graphics Processing Unit, GPU) 5041 and a microphone 5042, the graphics processor 5041 processing image data of still pictures or video obtained by an image capturing device (e.g., a camera) in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 506. The image frames processed by the graphics processor 5041 may be stored in the memory 509 (or other storage medium) or transmitted via the radio frequency unit 501 or the network module 502. Microphone 5042 may receive sound and may be capable of processing such sound into audio data. The processed audio data may be converted into a format output that can be transmitted to the mobile communication base station via the radio frequency unit 501 in case of a phone call mode.
The terminal 500 further comprises at least one sensor 505, 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 5061 according to the brightness of ambient light, and the proximity sensor can turn off the display panel 5061 and/or backlight when the terminal 500 moves to the ear. As one of the motion sensors, the accelerometer sensor can detect the acceleration in all directions (generally three axes), and can detect the gravity and direction when the accelerometer sensor is stationary, and can be used for recognizing the terminal gesture (such as horizontal and vertical screen switching, related games, magnetometer gesture calibration), vibration recognition related functions (such as pedometer and knocking), and the like; the sensor 505 may further include a fingerprint sensor, a pressure sensor, an iris sensor, a molecular sensor, a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, etc., which are not described herein.
The display unit 506 is used to display information input by a user or information provided to the user. The display unit 506 may include a display panel 5061, and the display panel 5061 may be configured in the form of a liquid crystal display (Liquid Crystal Display, LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 507 may be used to receive input numeric or character information and to generate key signal inputs related to user settings and function control of the terminal. Specifically, the user input unit 507 includes a touch panel 5071 and other input devices 5072. Touch panel 5071, also referred to as a touch screen, may collect touch operations thereon or thereabout by a user (e.g., operations of the user on touch panel 5071 or thereabout using any suitable object or accessory such as a finger, stylus, etc.). Touch panel 5071 may include two parts, a touch detection device and a touch controller. The touch detection device detects the touch azimuth of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device, converts the touch information into coordinates of touch points, sends the coordinates to the processor 510, and receives and executes commands sent by the processor 510. In addition, the touch panel 5071 may be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch panel 5071, the user input unit 507 may include other input devices 5072. In particular, other input devices 5072 may include, but are not limited to, physical keyboards, function keys (e.g., volume control keys, switch keys, etc.), trackballs, mice, joysticks, and so forth, which are not described in detail herein.
Further, the touch panel 5071 may be overlaid on the display panel 5061, and when the touch panel 5071 detects a touch operation thereon or thereabout, the touch operation is transmitted to the processor 510 to determine a type of touch event, and then the processor 510 provides a corresponding visual output on the display panel 5061 according to the type of touch event. Although in fig. 4, the touch panel 5071 and the display panel 5061 are provided as two separate components to implement the input and output functions of the terminal, in some embodiments, the touch panel 5071 may be integrated with the display panel 5061 to implement the input and output functions of the terminal, which is not limited herein.
The interface unit 508 is an interface through which an external device is connected to the terminal 500. For example, the external devices may include a wired or wireless headset port, an external power (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 508 may be used to receive input (e.g., data information, power, etc.) from an external device and transmit the received input to one or more elements within the terminal 500 or may be used to transmit data between the terminal 500 and an external device.
The memory 509 may be used to store software programs as well as various data. The memory 509 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, phonebook, etc.) created according to the use of the handset, etc. In addition, the memory 509 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.
The processor 510 is a control center of the terminal, connects various parts of the entire terminal using various interfaces and lines, and performs various functions of the terminal and processes data by running or executing software programs and/or modules stored in the memory 509 and calling data stored in the memory 509, thereby performing overall monitoring of the terminal. Processor 510 may include one or more processing units; preferably, the processor 510 may integrate an application processor that primarily handles operating systems, user interfaces, applications, etc., with a modem processor that primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 510.
The terminal 500 may further include a power source 511 (e.g., a battery) for powering the various components, and preferably the power source 511 may be logically connected to the processor 510 via a power management system that performs functions such as managing charging, discharging, and power consumption.
In addition, the terminal 500 includes some functional modules, which are not shown, and will not be described herein.
Preferably, the embodiment of the present invention further provides a terminal, which includes a processor 510, a memory 509, and a computer program stored in the memory 509 and capable of running on the processor 510, where the computer program when executed by the processor 510 implements each process of the above text processing method embodiment, and the same technical effects can be achieved, and for avoiding repetition, a description is omitted herein.
The embodiment of the invention also provides a computer readable storage medium, on which a computer program is stored, which when executed by a processor, implements the processes of the above text processing method embodiment, and can achieve the same technical effects, and in order to avoid repetition, the description is omitted here. Wherein the computer readable storage medium is selected from Read-Only Memory (ROM), random access Memory (Random Access Memory, RAM), magnetic disk or optical disk.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the method according to the embodiments of the present invention.
The embodiments of the present invention have been described above with reference to the accompanying drawings, but the present invention is not limited to the above-described embodiments, which are merely illustrative and not restrictive, and many forms may be made by those having ordinary skill in the art without departing from the spirit of the present invention and the scope of the claims, which are to be protected by the present invention.

Claims (11)

1. A text processing method, comprising:
detecting a first input under the condition that a first text is displayed on a terminal screen, wherein a contact point of the first input on the terminal screen comprises a first contact point and a second contact point, or the first input is a sliding input;
acquiring a selected state of the first text;
if the selected state is unselected, responding to the first input, and carrying out splitting processing or merging processing on the second text;
wherein the second text is the whole text of the first text or part of the text of the first text.
2. The method according to claim 1, wherein the method further comprises:
if the selected state is selected, responding to the first input, and carrying out splitting processing or merging processing on a third text;
the third text is a selected text in the first text.
3. The method according to claim 1 or 2, wherein in case the contact point generated by the first input on the terminal screen includes a first contact point and a second contact point, the splitting or merging the second text includes:
splitting the second text under the condition that the increase of the distance between the first contact point and the second contact point is detected; merging the second text in case that the decrease of the distance between the first contact point and the second contact point is detected;
or alternatively, the process may be performed,
splitting the second text under the condition that the decrease of the distance between the first contact point and the second contact point is detected; and combining the second text under the condition that the distance between the first contact point and the second contact point is detected to be increased.
4. The method according to claim 1 or 2, wherein, in the case where the first input is a slide input, the splitting or merging the second text includes:
splitting the second text under the condition that the first input is a sliding input in a first direction;
combining the second text when the first input is a sliding input in a second direction;
wherein the first direction is different from the second direction.
5. The method of claim 1 or 2, wherein the terminal screen includes a first area and a second area, the first text being displayed in the first area and the second text being displayed in the second area, the detecting the first input comprising:
the first input is detected in the second region.
6. A text processing apparatus, comprising:
the input detection module is used for detecting a first input under the condition that a first text is displayed on a terminal screen, wherein a contact point of the first input on the terminal screen comprises a first contact point and a second contact point, or the first input is a sliding input;
the state acquisition module is used for acquiring the selected state of the first text;
the first response module is used for responding to the first input to split or combine the second text under the condition that the selected state is unselected;
wherein the second text is the whole text of the first text or part of the text of the first text.
7. The apparatus of claim 6, wherein the apparatus further comprises:
the second response module is used for responding to the first input to split or combine the third text under the condition that the selected state is selected;
the third text is a selected text in the first text.
8. The apparatus of claim 6 or 7, wherein in case the contact point generated by the first input on the terminal screen includes a first contact point and a second contact point, the first response module includes:
the first splitting module is used for splitting the second text under the condition that the distance between the first contact point and the second contact point is detected to be increased;
a first merging module, configured to, when detecting that a distance between the first contact point and the second contact point decreases, merge the second text;
or alternatively, the process may be performed,
the first response module includes:
the second splitting module is used for splitting the second text under the condition that the distance between the first contact point and the second contact point is detected to be reduced;
and the second merging module is used for merging the second text under the condition that the distance between the first contact point and the second contact point is detected to be increased.
9. The apparatus of claim 6 or 7, wherein, in the case where the first input is a sliding input, the first response module comprises:
the third splitting module is used for splitting the second text under the condition that the first input is sliding input in a first direction;
the third merging module is used for merging the second text when the first input is a sliding input in a second direction;
wherein the first direction is different from the second direction.
10. The apparatus of claim 6 or 7, wherein the terminal screen includes a first area and a second area, the first text being displayed in the first area and the second text being displayed in the second area, the input detection module comprising:
and the region detection module is used for detecting the first input in the second region.
11. A terminal, the terminal comprising: a processor and a memory storing computer program instructions;
the processor, when executing the computer program instructions, implements a text processing method as claimed in any one of claims 1-5.
CN201910199242.0A 2019-03-15 2019-03-15 Text processing method, device and terminal Active CN110069774B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910199242.0A CN110069774B (en) 2019-03-15 2019-03-15 Text processing method, device and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910199242.0A CN110069774B (en) 2019-03-15 2019-03-15 Text processing method, device and terminal

Publications (2)

Publication Number Publication Date
CN110069774A CN110069774A (en) 2019-07-30
CN110069774B true CN110069774B (en) 2023-05-19

Family

ID=67365243

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910199242.0A Active CN110069774B (en) 2019-03-15 2019-03-15 Text processing method, device and terminal

Country Status (1)

Country Link
CN (1) CN110069774B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111475093A (en) * 2019-08-02 2020-07-31 广州三星通信技术研究有限公司 Word selection method and electronic equipment
CN113986083A (en) * 2021-10-29 2022-01-28 维沃移动通信有限公司 File processing method and electronic equipment

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106201294A (en) * 2015-04-29 2016-12-07 中兴通讯股份有限公司 Text selection method and apparatus, text handling method and device
CN108646960B (en) * 2018-04-25 2020-09-15 维沃移动通信有限公司 File processing method and flexible screen terminal

Also Published As

Publication number Publication date
CN110069774A (en) 2019-07-30

Similar Documents

Publication Publication Date Title
CN110674662B (en) Scanning method and terminal equipment
CN109240577B (en) Screen capturing method and terminal
CN108616448B (en) Information sharing path recommendation method and mobile terminal
CN109388456B (en) Head portrait selection method and mobile terminal
CN110909524B (en) Editing method and electronic equipment
CN108391008B (en) Message reminding method and mobile terminal
CN110913067A (en) Information sending method and electronic equipment
CN109634438B (en) Input method control method and terminal equipment
US11340712B2 (en) Text input method and terminal
CN108920040B (en) Application icon sorting method and mobile terminal
CN110780751B (en) Information processing method and electronic equipment
CN107450744B (en) Personal information input method and mobile terminal
CN109982273B (en) Information reply method and mobile terminal
CN109992753B (en) Translation processing method and terminal equipment
CN110928407B (en) Information display method and device
CN110069774B (en) Text processing method, device and terminal
CN109949809B (en) Voice control method and terminal equipment
CN108520760B (en) Voice signal processing method and terminal
CN110516495B (en) Code scanning method and mobile terminal
CN108595107B (en) Interface content processing method and mobile terminal
CN108270928B (en) Voice recognition method and mobile terminal
CN111273827B (en) Text processing method and electronic equipment
CN107957789B (en) Text input method and mobile terminal
CN109947323B (en) Terminal display method and terminal
CN108804615B (en) Sharing method and server

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