CN107861932B - Text editing method, device and system and terminal equipment - Google Patents

Text editing method, device and system and terminal equipment Download PDF

Info

Publication number
CN107861932B
CN107861932B CN201711086257.3A CN201711086257A CN107861932B CN 107861932 B CN107861932 B CN 107861932B CN 201711086257 A CN201711086257 A CN 201711086257A CN 107861932 B CN107861932 B CN 107861932B
Authority
CN
China
Prior art keywords
editing
text
word segmentation
target text
voice data
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
CN201711086257.3A
Other languages
Chinese (zh)
Other versions
CN107861932A (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.)
Beijing ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network Technology 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 Beijing ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN201711086257.3A priority Critical patent/CN107861932B/en
Publication of CN107861932A publication Critical patent/CN107861932A/en
Application granted granted Critical
Publication of CN107861932B publication Critical patent/CN107861932B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/103Formatting, i.e. changing of presentation of documents
    • G06F40/117Tagging; Marking up; Designating a block; Setting of attributes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/284Lexical analysis, e.g. tokenisation or collocates

Landscapes

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

Abstract

The embodiment of the invention discloses a text editing method, a device and a system and a terminal device; the method comprises the following steps: acquiring and displaying a word segmentation result of a target text to be edited; receiving an editing triggering instruction of a target text; determining an editing object in the target text according to the editing triggering instruction; receiving voice data input by a user; and executing corresponding editing operation on the editing object according to the received voice data. When a user edits a text, the user can directly and quickly select an edited object in the text without complex text selection operation, and the user can directly edit the edited object through voice input, so that the text editing process is simplified.

Description

Text editing method, device and system and terminal equipment
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method, an apparatus, and a system for text editing and a terminal device.
Background
With the popularization of mobile phones, people receive a large amount of text information on portable devices such as mobile phones or tablet computers every day. For example, messages pushed by instant messaging software or other software, web page contents, text news and the like. When people want to edit the interested text content in the text information, the cursor needs to be positioned at the interested text content, and then the selected text is subjected to subsequent operations, such as adding a new text at the cursor position, performing replacement operation on the selected text, and the like, so that the editing process is complex and inconvenient.
Disclosure of Invention
In view of this, the present invention provides a method, an apparatus, and a system for text editing and a terminal device, which can solve the problems of complex and inconvenient editing process for content in text information in the prior art.
The text editing method provided by the embodiment of the invention comprises the following steps:
acquiring and displaying a word segmentation result of a target text to be edited;
receiving an editing triggering instruction of the target text; the editing trigger instruction carries an identification of an editing object in the target text; the editing object comprises at least one word segmentation in the word segmentation result, or the editing object is an editing cursor adjacent to the at least one word segmentation in the word segmentation result;
determining an editing object in the target text according to the editing triggering instruction;
receiving voice data input by a user;
and executing corresponding editing operation on the editing object according to the received voice data.
Optionally, the executing, according to the received voice data, a corresponding editing operation on the editing object specifically includes:
recognizing the voice data, and converting the voice data into a text to be processed;
if the editing object comprises at least one word segmentation in the word segmentation result, replacing the editing object with the text to be processed;
and if the editing object is an editing cursor adjacent to the at least one word segmentation, inserting the text to be processed at the position of the editing cursor.
Optionally, the obtaining and displaying a word segmentation result of the target text to be edited specifically includes:
acquiring and displaying the target text;
generating and displaying a plurality of actionable objects in response to the edit enabling instruction for the target text, each actionable object including at least one character of the target object;
then, the step of obtaining the editing object in the target text in response to the editing triggering instruction of the target text specifically includes:
and determining the editing object in the plurality of operable objects according to the editing triggering instruction.
Optionally, the receiving the voice data input by the user specifically includes:
displaying a voice input key;
and responding to the triggering of the voice input key, monitoring the voice input by the user, and obtaining the voice data.
Optionally, the converting the voice data into a text to be processed further includes:
performing word segmentation processing on the text to be processed to obtain a word segmentation result of the text to be processed;
then, the replacing the editing object with the text to be processed specifically includes:
replacing the editing object with the word segmentation result of the text to be processed;
the inserting the text to be processed at the position of the editing cursor specifically comprises:
and displaying the word segmentation result of the text to be processed in the editing cursor.
The embodiment of the invention also provides a text editing method which is applied to the first terminal equipment, and the method comprises the following steps:
acquiring and displaying a word segmentation result of a target text to be edited;
receiving an editing triggering instruction of the target text; the editing trigger instruction carries an identification of an editing object in the target text; the editing object comprises at least one word segmentation in the word segmentation result, or the editing object is an editing cursor adjacent to the at least one word segmentation in the word segmentation result;
sending the editing trigger instruction to second terminal equipment so that the second terminal equipment determines an editing object of the target text according to the editing trigger instruction; the second terminal device displays the target text;
receiving voice data input by a user;
and sending the received voice data to the second terminal equipment so that the second terminal equipment executes corresponding editing operation on the editing object according to the voice data.
The embodiment of the invention provides a text editing device, which comprises: the system comprises a data acquisition module, an instruction receiving module, an object acquisition module and a data processing module;
the data acquisition module is used for acquiring and displaying word segmentation results of a target text to be edited;
the instruction receiving module is configured to receive an editing instruction for the target text, where the editing trigger instruction carries an identifier of an editing object in the target text, where the editing object includes at least one word segmentation in the word segmentation result, or the editing object is an editing cursor adjacent to at least one word segmentation in the word segmentation result; the voice data input by the user is also received;
the object acquisition module is used for acquiring an editing object in the target text according to the editing trigger instruction;
and the data processing module is used for receiving the voice data received by the instruction receiving module and executing corresponding editing operation on the editing object.
Optionally, the data processing module specifically includes: identifying a submodule; further comprising: a first processing sub-module or a second processing sub-module;
the recognition submodule is used for recognizing the voice data and converting the voice data into a text to be processed;
the first processing sub-module is configured to replace the edited object with the text to be processed if the edited object includes at least one word in the word segmentation result;
the second processing submodule is configured to insert the text to be processed in a position of an editing cursor if the editing object is the editing cursor adjacent to the at least one word segmentation.
Optionally, the data obtaining module is specifically configured to:
acquiring and displaying the target text;
generating and displaying a plurality of actionable objects in response to the edit enabling instruction for the target text, each actionable object including at least one character of the target object;
then, the object obtaining module is specifically configured to:
and determining the editing object in the plurality of operable objects according to the editing triggering instruction.
Optionally, the instruction receiving module is specifically configured to:
displaying a voice input key;
and responding to the triggering of the voice input key, monitoring the voice input by the user, and obtaining the voice data.
Optionally, the apparatus further includes: a word segmentation processing module;
the word segmentation processing module is used for carrying out word segmentation processing on the text to be processed to obtain a word segmentation result of the text to be processed;
then, the first processing sub-module is specifically configured to:
replacing the editing object with the word segmentation result of the text to be processed;
then, the second processing sub-module is specifically configured to:
and displaying the word segmentation result of the text to be processed in the editing cursor.
The embodiment of the invention also provides a text editing device, which is applied to the first terminal equipment, and the device comprises: the system comprises a data acquisition module, an instruction receiving module and an instruction sending module;
the data acquisition module is used for acquiring and displaying word segmentation results of a target text to be edited;
the instruction receiving module is used for receiving an editing triggering instruction of the target text; the editing trigger instruction carries an identification of an editing object in the target text; the editing object comprises at least one word segmentation in the word segmentation result, or the editing object is an editing cursor adjacent to the at least one word segmentation in the word segmentation result; the voice data input by the user is also received;
the instruction sending module is configured to send the editing trigger instruction to a second terminal device, so that the second terminal device determines an editing object of the target text according to the editing trigger instruction; the second terminal device displays the target text; and the second terminal equipment is further used for sending the received voice data to the second terminal equipment so that the second terminal equipment can execute corresponding editing operation on the editing object according to the voice data.
An embodiment of the present invention further provides a text editing system, including: a first terminal device and a second terminal device;
the first terminal device is used for acquiring and displaying a word segmentation result of a target text to be edited; the system is also used for receiving an editing triggering instruction of the target text; the editing trigger instruction carries an identification of an editing object in the target text; the editing object comprises at least one word segmentation in the word segmentation result, or the editing object is an editing cursor adjacent to the at least one word segmentation in the word segmentation result; the terminal is also used for sending the editing triggering instruction to a second terminal device; the voice data input by the user is also received; and the second terminal equipment is also used for sending the received voice data to the second terminal equipment.
The second terminal device is used for acquiring and displaying a target text to be edited; the first terminal device is further used for determining an editing object of the target text according to an editing triggering instruction sent by the first terminal device; and the terminal equipment is also used for executing corresponding editing operation on the editing object according to the voice data sent by the first terminal equipment.
An embodiment of the present invention further provides a terminal device, including: a memory and a processor;
the memory to store computer program instructions;
the processor to obtain computer program instructions stored by the memory; and is further configured to execute the text editing method according to any of the above embodiments according to the computer program instructions
Compared with the prior art, the embodiment of the application has at least the following advantages:
in the embodiment of the invention, the terminal equipment firstly displays the target text to be edited in a word segmentation mode for a user to execute editing operation, receives an editing trigger instruction of the user to the target text, obtains an editing object of the target text based on the editing trigger instruction, then receives voice data input by the user, and executes corresponding editing operation to the editing object according to the voice data. Therefore, when the user edits the text, the user can directly and quickly select the edited object in the text without complex text selection operation, and the user can directly edit the edited object through voice input, thereby simplifying the text editing process.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the present application, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a schematic flowchart of a text editing method according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of another text editing method according to an embodiment of the present invention;
FIG. 3 is a diagram illustrating a replacement operation performed on a target text according to an embodiment of the present invention;
FIG. 4 is a diagram illustrating a new addition operation performed on a target text according to an embodiment of the present invention;
fig. 5 is a schematic flowchart of another text editing method according to an embodiment of the present invention;
fig. 6 is a schematic flowchart of a further text editing method according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a text editing apparatus according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of another text editing apparatus according to an embodiment of the present invention;
fig. 9 is a schematic structural diagram of a text editing system according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In order to simplify the text editing process, embodiments of the present invention provide a text editing method and apparatus, and the following describes in detail a specific embodiment of the present invention with reference to the accompanying drawings.
It should be noted that the text editing method and apparatus provided in the embodiments of the present invention may be applied to a terminal device, where the terminal device may be a terminal device (i.e., a touch terminal) with a touch sensing function, such as a mobile terminal with a touch screen, e.g., a touch-sensitive mobile phone, a tablet computer, and the external touch sensed by the terminal device includes but is not limited to single-point or multi-point pressing, single-point or multi-point sliding operation, single-point or multi-point touching, single-point or multi-point pressure touch, touch area sensing, and the like. When the external touch meets the corresponding sensing threshold, the touch terminal can sense the external touch. Of course, the terminal device may also be another terminal device connected with an operation device (such as a mouse, a keyboard, etc.) and having a display function, and the content displayed by the device can be operated through the operation device. In addition, the text editing method and apparatus provided by the embodiment of the present invention can also be applied to any terminal device without a touch sensing function, such as a personal computer, which are not listed here. The text editing method provided by the embodiment of the present invention is described in detail below by taking the application to a terminal device with a touch sensing function as an example, and the implementation manners of other terminal devices without a touch sensing function are similar to this and will not be described again.
It should be further noted that the text editing method and apparatus provided in the embodiments of the present invention can be implemented when the terminal device runs any application program, where the application program includes, but is not limited to, short messages, web browsing, real-time communication, and other programs with a text display function.
The following describes a text editing method and apparatus provided in an embodiment of the present invention with reference to the accompanying drawings.
Referring to fig. 1, the figure is a schematic flowchart of a text editing method according to an embodiment of the present invention.
The text editing method provided by the embodiment comprises the following steps S101-S105.
S101: and acquiring and displaying a word segmentation result of the target text to be edited.
Word segmentation refers to the process of segmenting a word sequence into a single word, term or named entity, etc. The word segmentation result of the target text is a result obtained by dividing a continuous character sequence in the target text into a sequence comprising individual characters, words or named entities according to a certain specification. The named entities refer to names of people, organizations, places and other entities identified by names, and the more extensive entities include numbers, dates, currencies, addresses and the like.
As an example, in this embodiment, a target text to be edited may be obtained first, and a natural language algorithm is used to perform word segmentation processing on the target text, so as to obtain a word segmentation result, and then the word segmentation result is displayed. When the word segmentation result of the target text is displayed, a window can be newly built to display the word segmentation result, and the space between each character, word or named entity in the word segmentation result can exist or can not exist and is only separated by lines. Optionally, in practical application, each participle in the participle result is displayed in the form of a touch component on a touch interface of the terminal device, so that the user determines an editing object that the target text is desired to edit.
It should be noted that, when the word segmentation results are too many and all the word segmentation results are displayed at one time, it cannot be guaranteed that the user can distinguish the display content, all the word segmentation results can be displayed at one time but displayed to the user in a sliding manner, and partial word segmentation results can also be displayed to the user in a time division manner, that is, the user can see the complete word segmentation results through the display updating operation.
It can be understood that the target text is displayed in the form of the word segmentation result, so that the user can directly position the editing word segmentation result selected from the target text, or directly position the area to be edited, and the editing efficiency is improved.
S102: and receiving an editing triggering instruction of the target text.
The editing trigger instruction carries an identifier of an editing object in the target text, the editing object comprises at least one word in the word segmentation result of the target text, or the editing object is an editing cursor adjacent to at least one word in the word segmentation result.
In this embodiment, the editing trigger instruction may be triggered by the user through selection of an editing object in the target text, and the editing object desired by the user in the target text may be determined according to the editing trigger instruction. The identifier of the editing object may specifically be a display coordinate of the editing object on the terminal device, and a person skilled in the art may perform equipment on the editing object identifier carried by the editing trigger instruction according to actual needs.
In some possible implementations, the user may also trigger the editing of the trigger instruction by another terminal device connected to the terminal device by wire or wirelessly. Accordingly, target text is displayed on the other terminal device so that the user can select an editing object from the target text.
In practical application, when a user desires to replace part of the content in the target text, the content (i.e., an editing object) desired to be replaced is selected from the segmentation results, an editing trigger instruction is triggered, and the terminal device can determine at least one segmentation in the segmentation results as the editing object according to the editing trigger instruction. When a user desires to add new content in the target text, an editing trigger instruction can be triggered by positioning an editing cursor between the word segmentation results (that is, the editing cursor is an editing cursor adjacent to at least one word segmentation in the word segmentation results), and the terminal device can determine the editing cursor as an editing object according to the editing trigger instruction.
S103: and determining an editing object in the target text according to the editing triggering instruction.
In the embodiment of the present invention, the determination of the editing object is determined based on the identifier of the editing object carried by the editing trigger instruction.
S104: and receiving voice data input by a user.
In this embodiment, the user may enter the voice data through a recording device connected to the terminal device by wire or wirelessly, or through a recording device provided in the terminal device itself.
In practical application, the voice input key can be displayed on the target text display interface at the same time, and a user inputs voice data to the terminal equipment through touch control of the voice input key, so that the voice data can be input. In one example, receiving voice data entered by a user may specifically include: displaying a voice input key; and responding to the triggering of the voice input key, monitoring the voice input by the user, and obtaining voice data.
Similarly, in some possible implementations, the user may also enter voice data through other terminal devices that are wired or wirelessly connected to the terminal device. Correspondingly, a voice input key for receiving the voice input by the user is also displayed on the other terminal equipment.
It should be noted that, in the embodiment of the present invention, the execution sequence of the steps S102 to S104 is not limited, and in specific implementation, an editing object in a target text may be obtained first, and then voice data entered by a user is received; or receiving voice data input by a user to obtain a convenient object in the target text; etc., which are not listed here.
S105: and executing corresponding editing operation on the editing object according to the received voice data.
In the embodiment of the invention, the terminal equipment firstly displays the target text to be edited in a word segmentation mode for a user to execute editing operation, receives an editing trigger instruction of the user to the target text, obtains an editing object of the target text based on the editing trigger instruction, then receives voice data input by the user, and executes corresponding editing operation to the editing object according to the voice data. Therefore, when the user edits the text, the user can directly and quickly select the edited object in the text without complex text selection operation, and the user can directly edit the edited object through voice input, thereby simplifying the text editing process.
Referring to fig. 2, this figure is a schematic flowchart of another text editing method according to an embodiment of the present invention. This figure provides a more specific text editing method than figure 1.
In the embodiment of the present invention, the step S105 may specifically include the following steps S1051 to S1053.
S1051: and recognizing voice data input by a user, and converting the voice data into a text to be processed.
If the editing object obtained in step S102 includes at least one word segmentation in the word segmentation result, step S1052 is executed; if the editing object is an editing cursor adjacent to at least one word segmentation, step S1053 is performed.
In practical applications, any speech recognition technology can be used to convert the speech data input by the user into the text to be processed, which is not listed here.
S1052: and replacing the edited object with a text to be processed.
S1053: and inserting the text to be processed at the position of an editing cursor.
Namely, the terminal equipment edits the target text according to the voice input by the user, converts the input voice into characters and then replaces at least one selected word segmentation, or adds the words segmentation to the position of an editing cursor. Therefore, the user can edit the text through voice, and can edit and replace the target text without inputting word by word, so that the method is more convenient and faster.
It should be noted that, in order to facilitate subsequent operations on the edited target text by the user, the editing object is replaced with the text to be processed, or when a newly added text to be processed is found in the editing cursor, a plurality of touch components may be generated and displayed in the same manner to show the word segmentation result of the text to be processed, so as to facilitate subsequent operations by the user.
In some possible implementation manners, after step S1051, a step of performing word segmentation processing on the text to be processed to obtain a word segmentation result of the text to be processed is further included. In actual operation, the same word segmentation algorithm may be used to perform word segmentation on the target text and the text to be processed, and the word segmentation mode is not specifically limited in this embodiment.
Correspondingly, step S1052 may specifically include: and replacing the editing object with the word segmentation result of the text to be processed. Step S1053 may specifically include: and inserting the word segmentation result of the text to be processed at the cursor.
For example, assuming that the voice input by the user is "test", fig. 3 shows the terminal device interface during the replacement operation in this embodiment, and fig. 4 is a schematic diagram of the terminal device interface when the new text is shown in the editing cursor. It should be understood that the above is only an illustration of a specific implementation manner of the embodiment, and in practical applications, a person skilled in the art may also set a display condition of the text to be processed in the target text in other forms according to actual needs, for example, in a form of highlighting, bolding, and the like to highlight the text to be processed, which is not listed here.
Based on the text editing method provided by the above embodiment, the embodiment of the present invention further provides another specific text editing method, so as to facilitate the user to select an editing object in the target text.
Referring to fig. 5, this figure is a schematic flowchart of another text editing method according to an embodiment of the present invention.
In this embodiment, step S101 specifically includes the following steps S501 to S502.
S501: and acquiring and displaying the target text.
It is understood that the target text is the text content that the user desires to edit.
S502: and generating and displaying a plurality of operable objects in response to the editing enabling instruction of the target text.
And (4) an editing starting instruction of the target text, namely an operation instruction which is triggered when a user desires to perform editing operation on the target text. When the editing enabling instruction is received, an editing mode is firstly entered so that a user can conveniently and rapidly edit the target text. In the editing mode, the target text is split into a plurality of actionable objects (i.e., touch components) that each include at least one character of the target text. The user may select one or more actionable objects as edit objects for subsequent editing operations.
To facilitate user editing, as an example, the at least one character of the target text is any one of a single character, a special character that appears separately, and a special character that appears in succession, the special character including a number, a symbol, and a letter.
It should be noted that the single character, i.e., the target text, may be a content (e.g., chinese, japanese, korean, etc.) that can represent a meaning by a single character, and each single character in the content is displayed by an operable object. The number, letter, symbol and the like included in the target text need to be continuously presented to express the content (such as telephone, numerical value, English word, email address and the like) with complete meaning, and the content is integrally displayed by an operable object; the symbols in the target text may be displayed by one manipulatable object, respectively.
For example, when the target text is "company phone: 12345678 ", 6 actionable objects each including the following are generated and displayed: "male", "driver", "electric", "telephone", ": "," 12345678 ". It should be noted that when the target text includes continuous letters (such as english words) or continuous numbers (such as telephone numbers) or continuous numbers and letters (such as X1) or continuous numbers, symbols and letters (such as email addresses), the editing operation of the user can be facilitated by an operable object display.
Then, in this embodiment, step S103 specifically includes:
and determining an editing object in the plurality of operable objects according to the editing triggering instruction of the target text.
That is, the user's edit trigger instruction is triggered in accordance with a plurality of manipulatable objects. For example, if the user selects one or more operable objects to perform a replacement operation and triggers an editing trigger instruction, the editing object is the one or more operable objects; and the user positions the editing cursor near one or more operable objects to add new content, and triggers an editing trigger instruction, so that the editing object is the position of the editing cursor.
And then, the terminal equipment receives the voice data input by the user and executes corresponding editing operation on the editing object according to the received voice data.
It can be understood that the process of the terminal device performing corresponding convenient operation on the editing object according to the data entered by the user is the same as the embodiment shown in fig. 1, and for specific description, reference may be made to the above embodiment, which is not described herein again.
In this embodiment, in response to an edit enabling instruction of a user, an editing mode is entered, and a target text to be edited is displayed in the form of a single character or continuous special characters, so that the user can directly and conveniently select a character to be replaced or a position where the character is to be inserted from the target text, and subsequent editing operation of the user is facilitated. In addition, the user inputs the text to be replaced or the text to be inserted through voice without inputting word by word, and the editing operation is simple and convenient.
Based on the text editing method provided by the embodiment, the embodiment of the invention also provides a text editing method which is applied to the first terminal device. Similarly, the first terminal device may also be a terminal device (i.e., a touch terminal) having a touch sensing function, such as a mobile terminal with a touch screen, such as a touch-screen mobile phone and a tablet computer, where the external touch sensed by the first terminal device includes but is not limited to single-point or multi-point pressing, single-point or multi-point sliding operation, single-point or multi-point touching, single-point or multi-point pressure touch, touch area sensing, and the like. When the external touch meets the corresponding sensing threshold, the touch terminal can sense the external touch. Of course, the terminal device may also be another terminal device connected with an operation device (such as a mouse, a keyboard, etc.) and having a display function, and the content displayed by the device can be operated through the operation device. In addition, the text editing method and apparatus provided by the embodiment of the present invention can also be applied to any terminal device without a touch sensing function, such as a personal computer, which are not listed here.
Referring to fig. 6, this figure is a schematic flowchart of another text editing method according to an embodiment of the present invention.
The text editing method provided by the embodiment of the invention comprises the following steps S601-S605:
s601: and acquiring and displaying a word segmentation result of the target text to be edited.
S602: and receiving an editing triggering instruction of the target text.
The editing triggering instruction carries an identification of an editing object in the target text; the editing object comprises at least one word in the word segmentation result, or the editing object is an editing cursor adjacent to the at least one word in the word segmentation result.
It is understood that steps S601 to S602 are similar to steps S101 to S102, and specific reference may be made to the relevant description, which is not described herein again.
S603: and sending an editing trigger instruction to the second terminal device so that the second terminal device determines an editing object of the target text according to the editing trigger instruction.
In the embodiment of the present invention, the first terminal device and the second terminal device may communicate with each other in a wired manner or in a wireless manner, which is not limited in the embodiment of the present invention.
The second terminal device may be a terminal device with a touch sensing function similar to the first terminal device, such as a touch screen mobile phone, a tablet computer, or the like; any terminal device without touch sensing function, such as a personal computer, may also be used, and is not listed here.
It is understood that, in practical applications, the second terminal device may display target text thereon so that the user can confirm the edited object and the edited content. The implementation manner of the edit trigger instruction and the determination manner of the edit object are similar to those of the above embodiments, and are not described herein again.
S604: and receiving voice data input by a user.
S605: and sending the received voice data to the second terminal equipment so that the second terminal equipment executes corresponding editing operation on the editing object according to the voice data.
It can be understood that step S604 is similar to step S104, and a manner of performing, by the second terminal device, a corresponding editing operation on the edited object is similar to that described in the foregoing embodiment, and specific reference may be made to relevant descriptions, which is not described herein again.
In the embodiment of the invention, the first terminal device firstly displays the target text to be edited in a word segmentation mode for a user to execute editing operation, receives an editing trigger instruction of the target text from the user and sends the editing trigger instruction to the second terminal device, so that the second terminal device obtains an editing object of the target text based on the editing trigger instruction, then the first terminal device receives voice data input by the user and sends the voice data to the second terminal device, and the second terminal device executes corresponding editing operation on the editing object according to the voice data. Therefore, when the user edits the text, the user can directly and quickly select the edited object in the text without complex text selection operation, and the user can directly edit the edited object through voice input, thereby simplifying the text editing process.
Based on the text editing method provided by the embodiment, the embodiment of the invention also provides a text editing device.
Referring to fig. 7, this figure is a schematic structural diagram of a text editing apparatus according to an embodiment of the present invention.
The embodiment of the invention provides a text editing device, which comprises: a data acquisition module 100, an instruction receiving module 200, an object acquisition module 300, and a data processing module 400;
the data acquisition module 100 is configured to acquire and display a word segmentation result of a target text to be edited;
an instruction receiving module 200, configured to receive an editing instruction for a target text; the voice data input by the user is also received;
the object obtaining module 300 is configured to obtain an editing object in the target text in response to the editing trigger instruction obtained by the instruction receiving module 200, where the editing object includes at least one word in the word segmentation result, or the editing object is an editing cursor adjacent to at least one word in the word segmentation result;
the data processing module 400 is configured to receive the voice data received by the instruction receiving module 200, and perform a corresponding editing operation on an editing object.
Optionally, the data processing module 400 specifically includes: identifying a submodule; further comprising: a first processing sub-module or a second processing sub-module;
the recognition submodule is used for recognizing the voice data and converting the voice data into a text to be processed;
the first processing submodule is used for replacing the edited object with a text to be processed if the edited object comprises at least one word in the word segmentation result;
and the second processing submodule is used for inserting the text to be processed into the position of the editing cursor if the editing object is the editing cursor adjacent to at least one word segmentation.
Optionally, the data obtaining module 100 is specifically configured to:
acquiring and displaying a target text;
generating and displaying a plurality of actionable objects in response to an edit enabling instruction for the target text, each actionable object including at least one character of the target object;
then, the object obtaining module 300 is specifically configured to:
and determining an editing object in the plurality of operable objects according to the editing triggering instruction.
Optionally, the instruction receiving module 200 is specifically configured to:
displaying a voice input key;
and responding to the triggering of the voice input key, monitoring the voice input by the user, and obtaining voice data.
Optionally, the text editing apparatus further includes: a word segmentation processing module;
the word segmentation processing module is used for carrying out word segmentation processing on the text to be processed to obtain a word segmentation result of the text to be processed;
the first processing submodule is specifically configured to:
replacing the editing object with the word segmentation result of the text to be processed;
the second processing submodule is specifically configured to:
and marking the word segmentation result inserted into the text to be processed in the editing cursor.
In the embodiment of the invention, the terminal equipment firstly displays the target text to be edited in a word segmentation mode for a user to execute editing operation, receives an editing trigger instruction of the user to the target text, obtains an editing object of the target text based on the editing trigger instruction, then receives voice data input by the user, and executes corresponding editing operation to the editing object according to the voice data. Therefore, when the user edits the text, the user can directly and quickly select the edited object in the text without complex text selection operation, and the user can directly edit the edited object through voice input, thereby simplifying the text editing process.
Based on the text editing method provided by the embodiment, the embodiment of the invention also provides a text editing device.
Referring to fig. 8, this figure is a schematic structural diagram of another text editing apparatus according to an embodiment of the present invention.
The text editing device provided by the embodiment of the invention is applied to first terminal equipment, and the device comprises: the system comprises a data acquisition module 10, an instruction receiving module 20 and an instruction sending module 30;
the data acquisition module 10 is used for acquiring and displaying word segmentation results of a target text to be edited;
the instruction receiving module 20 is configured to receive an editing trigger instruction for the target text; the editing trigger instruction carries the identification of an editing object in the target text; the editing object comprises at least one word in the word segmentation result, or the editing object is an editing cursor adjacent to the at least one word in the word segmentation result; the voice data input by the user is also received;
the instruction sending module 30 is configured to send the editing trigger instruction obtained by the instruction receiving module 20 to the second terminal device, so that the second terminal device determines an editing object of the target text according to the editing trigger instruction; the second terminal device displays the target text; and is further configured to send the voice data received by the instruction receiving module 20 to the second terminal device, so that the second terminal device executes a corresponding editing operation on the editing object according to the voice data.
In the embodiment of the invention, the first terminal device firstly displays the target text to be edited in a word segmentation mode for a user to execute editing operation, receives an editing trigger instruction of the target text from the user and sends the editing trigger instruction to the second terminal device, so that the second terminal device obtains an editing object of the target text based on the editing trigger instruction, then the first terminal device receives voice data input by the user and sends the voice data to the second terminal device, and the second terminal device executes corresponding editing operation on the editing object according to the voice data. Therefore, when the user edits the text, the user can directly and quickly select the edited object in the text without complex text selection operation, and the user can directly edit the edited object through voice input, thereby simplifying the text editing process.
Based on the text editing method and device provided by the embodiment, the embodiment of the invention also provides a text editing system.
Referring to fig. 9, this figure is a schematic structural diagram of a text editing system according to an embodiment of the present invention.
The text editing system provided by the embodiment includes: a first terminal device 901 and a second terminal device 902;
the first terminal device 901 is configured to acquire and display a word segmentation result of a target text to be edited; the system is also used for receiving an editing triggering instruction of the target text; the editing trigger instruction carries an identification of an editing object in the target text; the editing object comprises at least one word segmentation in the word segmentation result, or the editing object is an editing cursor adjacent to the at least one word segmentation in the word segmentation result; is further configured to send the edit trigger instruction to the second terminal device 902; the voice data input by the user is also received; and is further configured to send the received voice data to the second terminal device 902.
The second terminal device 902 is configured to acquire and display a target text to be edited; the first terminal device 901 is further configured to determine an editing object of the target text according to an editing trigger instruction sent by the first terminal device 901; and is further configured to perform a corresponding editing operation on the editing object according to the voice data sent by the first terminal device 901.
In the embodiment of the invention, the first terminal device firstly displays the target text to be edited in a word segmentation mode for a user to execute editing operation, receives an editing trigger instruction of the target text from the user and sends the editing trigger instruction to the second terminal device, so that the second terminal device obtains an editing object of the target text based on the editing trigger instruction, then the first terminal device receives voice data input by the user and sends the voice data to the second terminal device, and the second terminal device executes corresponding editing operation on the editing object according to the voice data. Therefore, when the user edits the text, the user can directly and quickly select the edited object in the text without complex text selection operation, and the user can directly edit the edited object through voice input, thereby simplifying the text editing process.
Based on the text editing method and the text editing device provided by the embodiment, the embodiment of the invention also provides terminal equipment. The terminal device includes a memory and a processor. The memory for storing computer program instructions; the processor is configured to obtain the computer program instructions stored in the memory, and further configured to execute the text editing method according to the computer program instructions.
It should be noted that, in the present specification, the embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments may be referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant part can be referred to the method part for description.
It is further noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, 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 an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The foregoing is merely a preferred embodiment of the invention and is not intended to limit the invention in any manner. Although the present invention has been described with reference to the preferred embodiments, it is not intended to be limited thereto. Those skilled in the art can make numerous possible variations and modifications to the present teachings, or modify equivalent embodiments to equivalent variations, without departing from the scope of the present teachings, using the methods and techniques disclosed above. Therefore, any simple modification, equivalent change and modification made to the above embodiments according to the technical essence of the present invention are still within the scope of the protection of the technical solution of the present invention, unless the contents of the technical solution of the present invention are departed.

Claims (13)

1. A method for text editing, the method comprising:
acquiring and displaying word segmentation results of a target text to be edited, wherein each word segmentation in the word segmentation results is displayed in a touch control assembly mode;
receiving an editing triggering instruction of the target text; the editing trigger instruction carries an identification of an editing object in the target text; the editing object comprises at least one word segmentation in the word segmentation result, or the editing object is an editing cursor adjacent to the at least one word segmentation in the word segmentation result;
determining an editing object in the target text according to the editing triggering instruction;
receiving voice data input by a user;
and executing corresponding editing operation on the editing object according to the received voice data.
2. The text editing method according to claim 1, wherein the corresponding editing operation is performed on the editing object according to the received voice data, specifically:
recognizing the voice data, and converting the voice data into a text to be processed;
if the editing object comprises at least one word segmentation in the word segmentation result, replacing the editing object with the text to be processed;
and if the editing object is an editing cursor adjacent to the at least one word segmentation, inserting the text to be processed at the position of the editing cursor.
3. The text editing method according to claim 1, wherein the obtaining and displaying of the word segmentation result of the target text to be edited specifically comprises:
acquiring and displaying the target text;
generating and displaying a plurality of operable objects in response to the editing triggering instruction of the target text, wherein each operable object comprises at least one character of the target text;
the obtaining of the editing object in the target text in response to the editing triggering instruction of the target text specifically includes:
and determining the editing object in a plurality of operable objects according to the editing triggering instruction.
4. The text editing method according to claim 1, wherein the receiving of the voice data entered by the user specifically includes:
displaying a voice input key;
and responding to the triggering of the voice input key, monitoring the voice input by the user, and obtaining the voice data.
5. The text editing method according to claim 2, wherein the converting the voice data into a text to be processed further comprises:
performing word segmentation processing on the text to be processed to obtain a word segmentation result of the text to be processed;
the replacing the editing object with the text to be processed specifically includes:
replacing the editing object with the word segmentation result of the text to be processed;
the inserting the text to be processed at the position of the editing cursor specifically comprises:
and inserting the word segmentation result of the text to be processed at the editing cursor.
6. A text editing method is applied to a first terminal device, and comprises the following steps:
acquiring and displaying word segmentation results of a target text to be edited, wherein each word segmentation in the word segmentation results is displayed in a touch control assembly mode;
receiving an editing triggering instruction of the target text; the editing trigger instruction carries an identification of an editing object in the target text; the editing object comprises at least one word segmentation in the word segmentation result, or the editing object is an editing cursor adjacent to the at least one word segmentation in the word segmentation result;
sending the editing trigger instruction to second terminal equipment so that the second terminal equipment determines an editing object of the target text according to the editing trigger instruction; the second terminal device displays the target text;
receiving voice data input by a user;
and sending the received voice data to the second terminal equipment so that the second terminal equipment executes corresponding editing operation on the editing object according to the voice data.
7. A text editing apparatus, characterized in that the apparatus comprises: the system comprises a data acquisition module, an instruction receiving module, an object acquisition module and a data processing module;
the data acquisition module is used for acquiring and displaying word segmentation results of a target text to be edited, wherein each word segmentation in the word segmentation results is displayed in a touch control assembly mode;
the instruction receiving module is configured to receive an editing trigger instruction for the target text, where the editing trigger instruction carries an identifier of an editing object in the target text, and the editing object includes at least one word segmentation in the word segmentation result, or the editing object is an editing cursor adjacent to at least one word segmentation in the word segmentation result; the voice data input by the user is also received;
the object acquisition module is used for acquiring an editing object in the target text according to the editing trigger instruction;
and the data processing module is used for receiving the voice data received by the instruction receiving module and executing corresponding editing operation on the editing object.
8. The text editing apparatus according to claim 7, wherein the data processing module specifically includes: identifying a submodule; further comprising: a first processing sub-module or a second processing sub-module;
the recognition submodule is used for recognizing the voice data and converting the voice data into a text to be processed;
the first processing sub-module is configured to replace the edited object with the text to be processed if the edited object includes at least one word in the word segmentation result;
the second processing submodule is configured to insert the text to be processed in a position of an editing cursor if the editing object is the editing cursor adjacent to the at least one word segmentation.
9. The text editing apparatus according to claim 7, wherein the data obtaining module is specifically configured to:
acquiring and displaying the target text;
generating and displaying a plurality of operable objects in response to the editing triggering instruction of the target text, wherein each operable object comprises at least one character of the target text;
the object obtaining module is specifically configured to:
and determining the editing object in a plurality of operable objects according to the editing triggering instruction.
10. The text editing apparatus according to claim 7, wherein the instruction receiving module is specifically configured to:
displaying a voice input key;
and responding to the triggering of the voice input key, monitoring the voice input by the user, and obtaining the voice data.
11. The text editing apparatus according to claim 8, characterized in that said apparatus further comprises: a word segmentation processing module;
the word segmentation processing module is used for carrying out word segmentation processing on the text to be processed to obtain a word segmentation result of the text to be processed;
the first processing submodule is specifically configured to:
replacing the editing object with the word segmentation result of the text to be processed;
the second processing submodule is specifically configured to:
and inserting the word segmentation result of the text to be processed at the editing cursor.
12. A text editing apparatus, applied to a first terminal device, the apparatus comprising: the system comprises a data acquisition module, an instruction receiving module and an instruction sending module;
the data acquisition module is used for acquiring and displaying word segmentation results of a target text to be edited, wherein each word segmentation in the word segmentation results is displayed in a touch control assembly mode;
the instruction receiving module is used for receiving an editing triggering instruction of the target text; the editing trigger instruction carries an identification of an editing object in the target text; the editing object comprises at least one word segmentation in the word segmentation result, or the editing object is an editing cursor adjacent to the at least one word segmentation in the word segmentation result; the voice data input by the user is also received;
the instruction sending module is configured to send the editing trigger instruction to a second terminal device, so that the second terminal device determines an editing object of the target text according to the editing trigger instruction; the second terminal device displays the target text; and the second terminal equipment is further used for sending the received voice data to the second terminal equipment so that the second terminal equipment can execute corresponding editing operation on the editing object according to the voice data.
13. A text editing system, comprising: a first terminal device and a second terminal device;
the first terminal device is used for acquiring and displaying word segmentation results of a target text to be edited, wherein each word segmentation in the word segmentation results is displayed in a touch control assembly mode; the system is also used for receiving an editing triggering instruction of the target text; the editing trigger instruction carries an identification of an editing object in the target text; the editing object comprises at least one word segmentation in the word segmentation result, or the editing object is an editing cursor adjacent to the at least one word segmentation in the word segmentation result; the terminal is also used for sending the editing triggering instruction to a second terminal device; the voice data input by the user is also received; the second terminal device is also used for sending the received voice data to the second terminal device;
the second terminal device is used for acquiring and displaying a target text to be edited; the first terminal device is further used for determining an editing object of the target text according to an editing triggering instruction sent by the first terminal device; and the terminal equipment is also used for executing corresponding editing operation on the editing object according to the voice data sent by the first terminal equipment.
CN201711086257.3A 2017-11-07 2017-11-07 Text editing method, device and system and terminal equipment Active CN107861932B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711086257.3A CN107861932B (en) 2017-11-07 2017-11-07 Text editing method, device and system and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711086257.3A CN107861932B (en) 2017-11-07 2017-11-07 Text editing method, device and system and terminal equipment

Publications (2)

Publication Number Publication Date
CN107861932A CN107861932A (en) 2018-03-30
CN107861932B true CN107861932B (en) 2020-03-27

Family

ID=61701179

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711086257.3A Active CN107861932B (en) 2017-11-07 2017-11-07 Text editing method, device and system and terminal equipment

Country Status (1)

Country Link
CN (1) CN107861932B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108632465A (en) * 2018-04-27 2018-10-09 维沃移动通信有限公司 A kind of method and mobile terminal of voice input
CN109119079B (en) * 2018-07-25 2022-04-01 天津字节跳动科技有限公司 Voice input processing method and device
CN109276886B (en) * 2018-08-16 2022-09-23 深圳木狼科技有限公司 Text generation method, system and terminal equipment
CN110795910B (en) * 2019-10-10 2023-10-17 北京字节跳动网络技术有限公司 Text information processing method, device, server and storage medium
CN113378530A (en) * 2021-06-28 2021-09-10 北京七维视觉传媒科技有限公司 Voice editing method and device, equipment and medium
CN113591441A (en) * 2021-07-30 2021-11-02 交互未来(北京)科技有限公司 Voice editing method and device, storage medium and electronic equipment

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105700813A (en) * 2016-02-26 2016-06-22 深圳市金立通信设备有限公司 Information processing method and terminal

Also Published As

Publication number Publication date
CN107861932A (en) 2018-03-30

Similar Documents

Publication Publication Date Title
CN107861932B (en) Text editing method, device and system and terminal equipment
CN106484266B (en) Text processing method and device
CN106325688B (en) Text processing method and device
US9508028B2 (en) Converting text strings into number strings, such as via a touchscreen input
US8213995B2 (en) Input processing method of mobile terminal and device for performing the same
JP2020516994A (en) Text editing method, device and electronic device
CN108762654B (en) Text editing method, text editing device, text editing terminal and computer readable storage medium
CN105138586A (en) File searching method and apparatus
CN104809174A (en) Opening method of terminal application
CN108447509B (en) Method and device for generating multimedia file
CN104571866A (en) Screen capture method
CN105183184A (en) Character processing method and terminal
CN106970899B (en) Text processing method and device
KR20150023151A (en) Electronic device and method for executing application thereof
KR20140039517A (en) Device and method implementing for particular function based on writing
US20150193410A1 (en) System for editing a text of a portable terminal and method thereof
CN104808899A (en) Terminal
CN105094562A (en) Information processing method and terminal
JP2024064941A (en) Display method, apparatus, pen type electronic dictionary, electronic equipment, and recording medium
CN108737634B (en) Voice input method and device, computer device and computer readable storage medium
CN107133204B (en) Terminal shortcut input method
CN113807058A (en) Text display method and text display device
CN105183310A (en) Information editing method and terminal
CN104182479A (en) Method and device for processing information
CN107423273B (en) Text editing method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20190121

Address after: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Applicant after: BEIJING ZIJIE TIAODONG NETWORK TECHNOLOGY CO., LTD.

Address before: 610051 Longtan Industrial Park, Second Section of East Ring Road, Chenghua District, Chengdu City, Sichuan Province

Applicant before: Chengdu - Digital Technology Co. Ltd.

SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant