CN114116113A - Input processing method, electronic device, and computer-readable storage medium - Google Patents

Input processing method, electronic device, and computer-readable storage medium Download PDF

Info

Publication number
CN114116113A
CN114116113A CN202210091736.9A CN202210091736A CN114116113A CN 114116113 A CN114116113 A CN 114116113A CN 202210091736 A CN202210091736 A CN 202210091736A CN 114116113 A CN114116113 A CN 114116113A
Authority
CN
China
Prior art keywords
character
temporary file
cursor
characters
input
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210091736.9A
Other languages
Chinese (zh)
Other versions
CN114116113B (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.)
Honor Device Co Ltd
Original Assignee
Honor Device 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 Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202210091736.9A priority Critical patent/CN114116113B/en
Publication of CN114116113A publication Critical patent/CN114116113A/en
Application granted granted Critical
Publication of CN114116113B publication Critical patent/CN114116113B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING; 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/02Input arrangements using manually operated switches, e.g. using keyboards or dials
    • G06F3/023Arrangements for converting discrete items of information into a coded form, e.g. arrangements for interpreting keyboard generated codes as alphanumeric codes, operand codes or instruction codes
    • G06F3/0233Character input methods
    • G06F3/0236Character input methods using selection techniques to select from displayed items
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/04812Interaction techniques based on cursor appearance or behaviour, e.g. being affected by the presence of displayed objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (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 embodiment of the application relates to the technical field of electronics, and provides an input processing method, electronic equipment and a computer readable storage medium, wherein the method comprises the following steps: receiving a deletion withdrawal instruction input by a user, wherein the deletion withdrawal instruction is used for restoring the display of the deleted characters in the input window; responding to the deletion withdrawal instruction, and acquiring a first temporary file and current display content in the input window, wherein the first temporary file is used for storing all characters input in the input window; determining a target character according to the deletion withdrawing instruction, the current display content and the first temporary file; and if the target character exists, displaying the target character on the input window. The method provided by the embodiment of the application can recover the deleted characters, avoids repeated input of a user, saves the time of the user and improves the user experience.

Description

Input processing method, electronic device, and computer-readable storage medium
Technical Field
The present application relates to the field of electronic technologies, and in particular, to an input processing method, an electronic device, and a computer-readable storage medium.
Background
With the rapid development of electronic technology, the functions of intelligent terminals such as mobile phones and tablet computers are more and more powerful and more comprehensive, and become essential articles in life of people.
In using the smart terminal, people often perform character input through an input method installed in the smart terminal, such as editing a file through the input method, performing a conversation chat, searching for content, and the like. When inputting characters, an operation of deleting characters is often performed. In the process of deleting characters, false deletion may be caused by an operation error. For the content deleted by mistake, the user needs to input again, so that the repeated operation wastes the time of the user and influences the user experience.
Disclosure of Invention
The application provides an input processing method, an electronic device and a computer readable storage medium, which can recover deleted characters without inputting again by a user and improve user experience.
In a first aspect, the present application provides an input processing method, including: receiving a deletion withdrawal instruction input by a user, wherein the deletion withdrawal instruction is used for restoring the display of the deleted characters in the input window; responding to the deletion withdrawal instruction, and acquiring a first temporary file and current display content in the input window, wherein the first temporary file is used for storing all characters input in the input window; determining a target character to be restored to display according to the deletion withdrawing instruction, the current display content and the first temporary file; and if the target character exists, displaying the target character on the input window.
The method can be applied to electronic equipment and is used for recovering the deleted characters input in the input window in scenes such as conversation chat scenes, file editing scenes or search content scenes. The input window refers to a window for inputting characters by an input method. Optionally, the input window may be an input box in an interface such as a conversation chat interface or a memo interface, or an edit page in a document interface such as a notepad, or a search box in various application program interfaces or web pages, and the like.
Optionally, after the user inputs the characters in the input window, the electronic device writes the characters input by the user into the first temporary file. When the user deletes the character in the input window, the character deletion is not performed in the first temporary file. That is, the first file stores both the characters input by the user and the deleted characters. When the user inputs a deletion withdrawal instruction, the electronic equipment determines the target character to be restored to display according to the deletion withdrawal instruction, the first temporary file and the current display content in the input window. The target character to be restored and displayed is the deleted character which needs to be restored and is indicated by the deletion-withdrawing instruction. And if the target character is determined to exist, displaying the target character on the input window to realize withdrawal and deletion.
The first temporary file may comprise the first input method temporary file in particular embodiments.
In the input processing method provided by the first aspect, after a cancel deletion instruction input by a user is received, in response to the cancel deletion instruction, a target character to be restored to display is determined by acquiring the first temporary file and the current display content and according to the cancel deletion instruction, the current display content and the first temporary file. And in the case that the target character exists, displaying the target character on the input window, thereby realizing the recovery of the target character. According to the method, the user does not need to input again under the condition that the user deletes the data by mistake, so that the time of the user is saved, and the user experience is improved.
In one possible implementation, receiving a revocation deletion instruction input by a user includes: receiving a withdrawal deletion instruction input by a user when the user operates a withdrawal deletion selection control in an input method interface, wherein the withdrawal deletion selection control is used for selecting the type of the withdrawal deletion instruction, and the type of the withdrawal deletion instruction comprises the following steps: at least one of a pre-cursor word-press withdrawal instruction, a post-cursor word-press withdrawal instruction, a pre-cursor total withdrawal instruction, a post-cursor total withdrawal instruction, and a deleted character total withdrawal instruction.
In the implementation mode, the deletion withdrawal selection control is displayed on the input method interface and used for the user to select the type of the deletion withdrawal instruction, so that the user can conveniently select different types of deletion withdrawal instructions according to needs, different deleted characters can be recovered, different use requirements of the user are met, and user experience is further improved.
In a possible implementation manner, before receiving a revocation deletion instruction input by a user when the revocation deletion selection control in the input method interface is operated, the method further includes: receiving an option display instruction input by a user through an input method interface, wherein the option display instruction is used for indicating a deletion withdrawal instruction control to be displayed in the input method interface; and responding to the option display instruction, and displaying a deletion withdrawal selection control in the input method interface.
Optionally, the user may input the option display instruction through a preset key in the input method interface. For example, a long press on a delete key in an input method interface inputs an option presentation instruction.
Optionally, the cancel/delete selection control may be displayed in the input method interface in the form of a floating window or the like.
In the implementation mode, the deletion withdrawing selection control is displayed in the input method interface when the option display instruction input by the user through the input method interface is received, so that the deletion withdrawing selection control does not need to occupy keys in the input method interface, the input method interface is kept concise, the arrangement design of the keys in the input method interface does not need to be changed, the use habit of the user is met, and the user experience is further improved.
In one possible implementation, the recall deletion selection control includes a recall range selection switch, a first button, and a second button; the withdrawal range selection switch is used for selecting the range of withdrawal deletion, the first button is used for setting and restoring one character, and the second button is used for setting and restoring all characters.
Alternatively, the first button may be the word-press recall option in embodiments and the second button may be the full recall option in embodiments.
Alternatively, the withdrawal range selection switch may include three positions, a pre-cursor withdrawal position, a post-cursor withdrawal position, and pre-cursor and post-cursor withdrawal positions. The pre-cursor withdrawal position is used for setting the characters deleted before the cursor is withdrawn, the post-cursor withdrawal position is used for setting the characters deleted after the cursor is withdrawn, and the pre-cursor and post-cursor withdrawal positions are used for setting the characters deleted before the cursor and the characters deleted after the cursor.
When the user sets the withdrawal range selection switch at the withdrawal position before the cursor and clicks the first button, a word-pressing withdrawal instruction before the cursor is input. When the user sets the withdrawal range selection switch at the withdrawal position after the cursor is arranged and clicks the first button, the word withdrawal instruction is pressed after the cursor is input. When the user sets the withdrawal range selection switch at the withdrawal position before the cursor and clicks the second button, all withdrawal instructions before the cursor are input. When the user sets the withdrawal range selection switch at the withdrawal position after the cursor is arranged and clicks the second button, all withdrawal instructions are input after the cursor is input. When the user sets the withdrawal range selection switch at the withdrawal positions before and after the cursor and selects the second button, all the withdrawal instructions of the deleted characters are input.
In a possible implementation manner, the type of the withdrawal deletion instruction is one of a word-pressing withdrawal instruction before a cursor, a word-pressing withdrawal instruction after the cursor, a total withdrawal instruction before the cursor, a total withdrawal instruction after the cursor, or a total withdrawal instruction of deleted characters; the word-pressing-before-cursor withdrawal instruction is used for indicating to recover a character deleted before the cursor, the character deleted before the cursor refers to the character deleted before the reference character before the deleted character, and the reference character refers to the character which is positioned before the cursor in the input window and is closest to the cursor in the current display content; the word-pressing withdrawal instruction after the cursor is used for indicating to restore a deleted character after the cursor, wherein the deleted character after the cursor refers to a deleted character which is positioned after the reference character before being deleted; all withdrawal instructions before the cursor are used for indicating that all characters deleted before the cursor are restored; all withdrawal instructions behind the cursor are used for indicating that all characters are deleted after the cursor is restored; the deleted characters all delete instruction is used to instruct all deleted characters to be restored.
In the implementation mode, the withdrawal deletion instructions of multiple types can realize withdrawal deletion of different types in different ranges, so that different use requirements of users are met, and the user experience is further improved.
In one possible implementation manner, determining a target character to be restored to display according to the revocation deletion instruction, the current display content, and the first temporary file includes: comparing the characters in the current display content with the characters in the first temporary file, and determining deleted characters in the first temporary file; and determining a target character in the first temporary file according to the type of the deletion withdrawing instruction and the deleted character.
In a possible implementation manner, the type of the withdrawal deletion instruction is one of a pre-cursor word-pressing withdrawal instruction, a post-cursor word-pressing withdrawal instruction, a pre-cursor all-withdrawal instruction, or a post-cursor all-withdrawal instruction, and the target character is determined in the first temporary file according to the type of the withdrawal deletion instruction and the deleted character, including: acquiring the current position of a cursor; determining a reference character according to the current display content and the current position of the cursor; determining a reference corresponding character corresponding to the reference character in the first temporary file according to the current display content and the first temporary file; and determining a target character in the first temporary file according to the type of the deletion withdrawing instruction, the reference corresponding character and the deleted character.
Alternatively, the current position of the cursor may be represented by the relative positional relationship of the cursor to the characters in the currently displayed content. Alternatively, the position of the character may be represented by the sequence number of the character in the current display content.
Optionally, the electronic device may determine deleted characters in the first temporary file, mark the deleted characters in the first temporary file, compare unmarked characters in the first temporary file with the currently displayed content of the input window, determine characters in the first temporary file corresponding to the reference characters, and obtain reference corresponding characters.
Optionally, the electronic device may compare the characters in the current display content with the unmarked characters in the first temporary file one by one according to a preset sequence, determine the characters which are identical to the reference characters and have the same relative positions in the unmarked characters in the first temporary file, and obtain the reference corresponding characters. The preset sequence may be from front to back, from back to front, from the reference character to back, or from the reference character to both sides. This is not a limitation of the present application.
The electronic device may determine the reference corresponding character in other manners. As an alternative implementation manner, the electronic device may determine, according to a position of the reference character in the currently displayed content, a character that is the same as the position in the unmarked characters in the first temporary file, and determine the character as a reference corresponding character. For example, the electronic device may determine a sorting order number of the reference character in the current display content, sort the unmarked characters in the first temporary file in the same sorting manner as the characters in the current display content, and determine that the unmarked characters in the sorting that are the same as the sorting order number of the reference character are the reference corresponding characters. The embodiment of the application does not limit the specific way of determining the reference character at all, and can be selected according to actual situations.
In the implementation mode, the target character can be determined only according to the current display content, the current position of the cursor and the first temporary file, the deleted character is synchronously sent to the temporary file management without the input method in the character deleting process of the user, the operation burden of the input method is reduced, the algorithm execution process is simplified, the operation efficiency is improved, the response speed of the input method is further improved, and the user experience is improved.
In one possible implementation manner, the type of the withdraw deletion instruction is a pre-cursor word-press withdraw instruction, and the target character is determined in the first temporary file according to the type of the withdraw deletion instruction, the reference corresponding character and the deleted character, including: and determining a deleted character in the first temporary file before the reference corresponding character as a target character.
In the implementation mode, under the condition that the type of the withdrawal deletion instruction is a word-pressing withdrawal instruction before a cursor, a reference character is determined according to current display content and the current position of the cursor, a reference corresponding character corresponding to the reference character is determined in a first temporary file according to the current display content and a first temporary file, and a deleted character in the first temporary file before the reference corresponding character is determined as a target character, so that the deleted character before the cursor can be directly recovered, a user does not need to adjust the position of the cursor, re-input is not needed, operation is simplified, user input efficiency is effectively improved, and user experience is improved. And the input processing method in the implementation mode can withdraw the deleted characters before the cursor word by word, so that a user can conveniently recover partial characters in the deleted characters before the cursor as required, and the user experience is further improved.
In a possible implementation manner, the pre-cursor word-pressing withdrawal instruction is specifically configured to instruct to recover a pre-cursor deleted character farthest from the reference character, and determine, as the target character, a deleted character located before the reference corresponding character in the first temporary file, including: and determining the deleted character which is positioned in the first temporary file before the reference corresponding character and is farthest from the reference corresponding character as the target character.
In this implementation, the pre-cursor word withdraw instruction may be a first pre-cursor word withdraw instruction in the specific embodiment, and the target character may include a first target character in the specific embodiment.
In a possible implementation manner, the pre-cursor word-pressing withdrawal instruction is specifically configured to instruct to recover a pre-cursor deleted character closest to the reference character, and determine, as the target character, a deleted character located before the reference corresponding character in the first temporary file, and includes: and determining the deleted character which is positioned in the first temporary file before the reference corresponding character and is closest to the reference corresponding character as the target character.
The pre-cursor word withdraw instruction in this implementation may be the second pre-cursor word withdraw instruction in a particular embodiment.
In a possible implementation manner, the step of withdrawing the deletion instruction by word after the type of the deletion instruction is a cursor, and the step of determining the target character in the first temporary file according to the type of the deletion instruction, the reference corresponding character and the deleted character includes: and determining a deleted character in the first temporary file after the reference corresponding character as a target character.
In the implementation mode, under the condition that the type of the command for withdrawing the deletion is the command for withdrawing the cursor according to the characters after the cursor is withdrawn, the reference character is determined according to the current display content and the current position of the cursor, the character corresponding to the reference character is determined in the first temporary file according to the current display content and the first temporary file, and the deleted character located behind the character corresponding to the reference in the first temporary file is determined as the target character, so that the deleted character after the cursor can be directly recovered, the user does not need to input again, the operation is simplified, the input efficiency of the user is effectively improved, and the user experience is improved. And the input processing method in the implementation mode can withdraw the deleted characters after the cursor word by word, so that a user can conveniently recover partial characters in the deleted characters after the cursor as required, and the user experience is further improved.
In a possible implementation manner, the post-cursor word-pressing withdrawal instruction is specifically configured to indicate to recover a post-cursor deleted character that is closest to the reference character, and determine, as the target character, a deleted character located after the reference corresponding character in the first temporary file, including: and determining the deleted character which is positioned behind the reference corresponding character and is closest to the reference corresponding character in the first temporary file as a target character.
In this implementation, the post-cursor word-press withdrawal instruction may be a first post-cursor word-press withdrawal instruction in the specific implementation.
The target character may include the second target character in the specific embodiment.
In a possible implementation manner, the post-cursor word-pressing withdrawal instruction is specifically configured to instruct to recover a post-cursor deleted character farthest from the reference character, and determine a deleted character located after the reference corresponding character in the first temporary file as a target character, including: and determining the deleted character which is positioned behind the reference corresponding character and farthest from the reference corresponding character in the first temporary file as a target character.
The post-cursor word withdraw instruction in this implementation may be a second post-cursor word withdraw instruction in a specific embodiment.
In a possible implementation manner, the type of the withdrawal deletion instruction is all withdrawal instructions before the cursor, and the target character is determined in the first temporary file according to the type of the withdrawal deletion instruction, the reference corresponding character and the deleted character, including: all deleted characters in the first temporary file that are located before the reference corresponding character are determined as target characters.
The target character in this implementation may include the first target content in the specific implementation.
In the implementation mode, under the condition that the types of the withdrawing and deleting instructions are all withdrawing instructions before the cursor, the reference characters are determined according to the current display content and the current position of the cursor, the reference corresponding characters corresponding to the reference characters are determined in the first temporary file according to the current display content and the first temporary file, and all the deleted characters in the first temporary file before the reference corresponding characters are determined as the target characters, so that the deleted characters before the cursor can be directly recovered, the user does not need to adjust the position of the cursor, the re-input is not needed, the operation is simplified, the input efficiency of the user is effectively improved, and the user experience is improved. In the input processing method in the implementation mode, the user can restore all the characters deleted before the cursor by executing one operation, the operation is convenient, and especially under the condition that the number of the characters deleted before the cursor is large, the efficiency of restoring the deleted characters can be effectively improved, and the user experience is further improved.
In a possible implementation manner, the type of the withdrawal deletion instruction is all withdrawal instructions after the cursor is withdrawn, and the target character is determined in the first temporary file according to the type of the withdrawal deletion instruction, the reference corresponding character and the deleted character, including: all deleted characters in the first temporary file that are located after the reference corresponding character are determined as target characters.
In this implementation, the target character may include the second target content in the specific implementation.
In the implementation mode, under the condition that the types of the withdrawing and deleting instructions are all withdrawing instructions after the cursor, the reference characters are determined according to the current display content and the current position of the cursor, the reference corresponding characters corresponding to the reference characters are determined in the first temporary file according to the current display content and the first temporary file, and all the deleted characters behind the reference corresponding characters in the first temporary file are determined as the target characters, so that the deleted characters after the cursor can be directly recovered, the user does not need to input again, the operation is simplified, the user input efficiency is effectively improved, and the user experience is improved. In the input processing method in the implementation mode, the user can restore all the deleted characters behind the cursor by executing one operation, the operation is convenient, and particularly under the condition that more characters are deleted behind the cursor, the restoration efficiency can be effectively improved, and the user experience is further improved.
In a possible implementation manner, the type of the revocation deletion instruction is a revocation instruction of all deleted characters, and the determining of the target character in the first temporary file according to the type of the revocation deletion instruction and the deleted characters includes: and determining all deleted characters in the first temporary file as target characters.
In the implementation mode, under the condition that the types of the withdrawal deletion instructions are all the withdrawal instructions of the deleted characters, the characters in the current display content are compared with the characters in the first temporary file, the deleted characters are determined in the first temporary file, and all the deleted characters in the first temporary file after the corresponding characters are referred to are determined as target characters, so that all the deleted characters can be recovered at the same time, the user does not need to input again, the operation is simplified, the user input efficiency is effectively improved, and the user experience is improved. In the input processing method in the implementation mode, all the deleted characters can be completely recovered by a user through one-time operation, the operation is convenient, the recovery efficiency can be effectively improved particularly under the condition that the number of the deleted characters is large, and the user experience is further improved.
In one possible implementation, comparing the characters in the currently displayed content with the characters in the first temporary file, and determining the deleted characters in the first temporary file includes: and comparing the characters in the current display content with the characters in the first temporary file, and determining the characters which exist in the first temporary file and do not exist in the current display content as deleted characters.
In one possible implementation, displaying the target character in an input window includes: generating target display content according to the target characters and the current display content; and overlaying and displaying the target display content in the input window.
In this implementation, the target display content corresponds to the first content in the specific embodiment, and the first content includes all characters required to be displayed after the revocation deletion.
In the implementation mode, the target display content is generated according to the target characters and the current display content, the target display content is displayed in the input window in a covering mode, the target characters are not required to be inserted into the current display content through an input method, and therefore the deletion withdrawing process is simplified, the burden of the input method is reduced, the deletion withdrawing speed is increased, and user experience is improved.
In one possible implementation, displaying the target character in an input window includes: and displaying the target character in the input window according to the relative position relation between the target character and the reference character before the target character is deleted, wherein the reference character refers to the character which is positioned in front of the cursor in the input window and is closest to the cursor in the current display content.
In this implementation, the target display content corresponds to the first content in the specific embodiment, and only the target characters or the target content according to each type of the revocation deletion instruction are included in the first content, that is, only the first target characters, the second target characters, the first target content, or the second target content are included in the first content.
In one possible implementation, before receiving a revocation deletion instruction input by a user, the method further includes: under the condition that the input method interface pulling operation is successfully executed, establishing a first temporary file, wherein the input method interface pulling operation is used for pulling up an interface of an input method in an interface where an input window is located; and writing historical characters and characters input in an input window by a user through an input method into a first temporary file, wherein the historical characters refer to characters displayed in the input window before the interface is pulled up.
It is understood that when the user needs to input the content in the input window, the electronic device is instructed to perform the input method interface pull-up operation. Therefore, in the implementation mode, the first temporary file is established under the condition that the input method interface pull-up operation is successfully executed, and the content is written into the first temporary file, so that the first temporary file corresponds to the input window, the content in the first temporary file is ensured to be the characters in the input window, the accuracy of the content in the first temporary file is ensured, the accuracy of the deleted characters is further improved, and the user experience is improved. In addition, in the implementation mode, both the historical characters and the input method characters are written into the first temporary file, so that the accuracy of the content in the first temporary file is further ensured, and the accuracy of recovering the deleted characters is improved.
In a possible implementation manner, before the creating the first temporary file, the method further includes: determining whether a history temporary file exists, wherein the history temporary file is a file which is established before the current moment and is used for storing characters input in an input window; and if the history temporary file exists, deleting the history temporary file.
In the implementation mode, the historical temporary file is cleared before the first temporary file is established, so that the privacy of a user can be prevented from being revealed, the user experience is improved, the correctness of the temporary file used when the deletion is withdrawn can be ensured, the accuracy of the deleted character recovery is improved, and the user experience is further improved.
In one possible implementation manner, before writing the historical characters and the characters input by the user in the input window through the input method into the first temporary file, the method further includes: and acquiring content storage authority, wherein the content storage authority refers to the authority for acquiring and storing the content in the input box.
Optionally, the electronic device may ask the user whether the user agrees to grant the content saving right through the presentation right inquiry interface. Permission query information can be included in the permission query interface. The authority inquiry information may be, for example, "the input method needs to temporarily acquire the content input by the input box, whether to agree" or the like. The user may choose to agree or disagree at the permission query interface. And when the user agrees, the electronic equipment obtains the content storage authority, and writes the historical characters and the characters input by the user in the input window through the input method into the first temporary file.
Optionally, the electronic device may obtain the content storage right when the user uses the input method for the first time, and the content storage right is not repeatedly obtained after the content storage right is obtained.
Optionally, the electronic device may also acquire the content saving right after each time the input method interface is successfully pulled up. The embodiment of the application does not limit the acquisition time, the acquisition mode and the like of the content storage right, and can be selected according to actual requirements.
In the implementation mode, the user agreement is obtained by acquiring the content storage permission, so that the protection on the privacy of the user is improved, the interaction with the user is enhanced, and the user experience is further improved.
In one possible implementation, the method further includes: the characters in the first temporary file are encrypted.
Optionally, the electronic device may directly encrypt the first temporary file, or may encrypt each character in the first temporary file respectively. In particular, a consistent encryption protocol may be maintained between the input method and a module in the electronic device that manages the first temporary file (e.g., temporary file management in particular embodiments). Before the characters are mutually transmitted between the input method and the temporary file management each time, the characters can be encrypted according to the encryption protocol to obtain the characters of the ciphertext, and then the characters of the ciphertext are transmitted. After the input method or temporary file management receives the characters of the ciphertext, the characters of the ciphertext are decrypted according to the encryption protocol to obtain the characters of the plaintext.
In the implementation mode, the characters in the first temporary file are encrypted, so that the content input by the user is prevented from being read maliciously, the privacy of the user is prevented from being leaked, the confidentiality and the safety of the content input by the user are improved, and the user experience is further improved.
In one possible implementation, the method further includes: deleting the first temporary file under the condition that the input method interface retraction operation is successfully executed and/or the preset operation of the user is received; and the input method interface folding operation is used for folding the interface of the input method, and the preset operation comprises the sending operation of the content in the input window, the searching operation based on the content in the input window and the operation of closing the input window.
Optionally, in a session chat scene, a file editing scene, a content searching scene, and the like, the user inputs an input method interface packing instruction, and the electronic device executes the input method interface to pack the input method interface in response to the input method interface packing instruction. And when the input method interface is successfully retracted, the electronic equipment deletes the first temporary file.
Optionally, in a scene such as a conversation chat, when the user performs the sending operation on the content in the input window by clicking the sending control, the electronic device deletes the first temporary file.
Optionally, in a scene such as a search content, when the user performs a search operation based on the content in the input window by clicking the search control, the electronic device deletes the first temporary file.
In short, when the user stops inputting characters in the input window, the first temporary file is deleted, so that the file can be prevented from being maliciously read due to the fact that the file is reserved, privacy of the user is prevented from being leaked, and user experience is improved. In addition, the first temporary file can be prevented from being mixed with temporary files of other input methods, the content in the first temporary file is prevented from being used when the deletion withdrawing instruction is executed in other input windows, the accuracy of subsequent deletion withdrawing operation is improved, and the user experience is further improved.
In one possible implementation, the method further includes: and if the target character does not exist, displaying prompt information, wherein the prompt information is used for prompting that the user can recover the character which does not accord with the deletion withdrawal instruction currently.
In the implementation mode, under the condition that the target character does not exist, prompt information is displayed to prompt a user that no character which accords with the deletion withdrawal instruction can be recovered currently. Therefore, the prompt can be given to the user in time, the interaction with the user is enhanced, and the user experience is improved.
In a second aspect, the present application provides an apparatus, which is included in an electronic device, and which has a function of implementing the behavior of the electronic device in the first aspect and the possible implementation manners of the first aspect. The functions may be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules or units corresponding to the above-described functions. Such as a receiving module or unit, a processing module or unit, etc.
In a third aspect, the present application provides an electronic device, comprising: a processor, a memory, and an interface; the processor, the memory and the interface cooperate with each other to enable the electronic device to perform any one of the methods of the first aspect.
In a fourth aspect, the present application provides a chip comprising a processor. The processor is adapted to read and execute the computer program stored in the memory to perform the method of the first aspect and any possible implementation thereof.
Optionally, the chip further comprises a memory, and the memory is connected with the processor through a circuit or a wire.
Further optionally, the chip further comprises a communication interface.
In a fifth aspect, the present application provides a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed by a processor, the processor is enabled to execute any one of the methods in the technical solutions of the first aspect.
In a sixth aspect, the present application provides a computer program product comprising: computer program code for causing an electronic device to perform any of the methods of the first aspect when the computer program code runs on the electronic device.
Drawings
FIG. 1-1 is a schematic diagram of an exemplary character position relationship provided in the embodiments of the present application;
fig. 1-2 are schematic diagrams illustrating an example of a scenario for inputting characters by using an intelligent terminal according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of an example of an electronic device according to an embodiment of the present disclosure;
FIG. 3 is a block diagram of an exemplary software architecture of an electronic device according to an embodiment of the present disclosure;
fig. 4 is an interface schematic diagram corresponding to three application scenarios of an example input processing method provided in the embodiment of the present application;
FIG. 5 is a flowchart illustrating an exemplary input processing method according to an embodiment of the present disclosure;
FIG. 6-1 is a schematic diagram of a change of a part of an interface corresponding to an example of an input processing method provided in an embodiment of the present application;
fig. 6-2 is a schematic view of a part of interface changes corresponding to an example input processing method provided in the embodiment of the present application;
fig. 7 is a schematic diagram illustrating an example of interface change corresponding to a word-pressing withdrawal operation before a cursor is executed according to an embodiment of the present application;
FIG. 8 is a schematic flowchart of another input processing method provided in the embodiments of the present application;
fig. 9-1 is a schematic diagram of a change of a part of an interface corresponding to a word-based recall operation after a cursor is executed according to an embodiment of the present application;
fig. 9-2 is a schematic diagram of a change of a part of an interface corresponding to a word-based recall operation after a cursor is executed according to an embodiment of the present application;
FIG. 10 is a schematic flowchart of another input processing method provided in the embodiments of the present application;
fig. 11 is a schematic diagram illustrating an interface change corresponding to an example of a total withdrawal operation before a cursor is executed according to an embodiment of the present application;
FIG. 12 is a schematic flowchart of another input processing method provided in the embodiments of the present application;
fig. 13 is a schematic diagram of an example of interface changes corresponding to all withdrawal operations after a cursor is executed according to the embodiment of the present application;
FIG. 14 is a schematic flowchart of another input processing method provided in the embodiments of the present application;
FIG. 15 is a schematic diagram illustrating an example of interface changes corresponding to an operation of performing all revocation operations on deleted characters according to an embodiment of the present disclosure;
FIG. 16 is a schematic flowchart of another input processing method provided in the embodiments of the present application;
fig. 17 is a schematic view of an example of an interface including interface prompt information according to an embodiment of the present disclosure;
FIG. 18 is a schematic diagram of an example interface including a rights inquiry interface according to an embodiment of the present application;
fig. 19 is a schematic structural diagram of an example input processing device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application. In the description of the embodiments herein, "/" means "or" unless otherwise specified, for example, a/B may mean a or B; "and/or" herein is merely an association describing an associated object, and means that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, in the description of the embodiments of the present application, "a plurality" means two or more than two.
In the following, the terms "first", "second" and "third" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, features defined as "first", "second", "third" may explicitly or implicitly include one or more of the features.
Reference throughout this specification to "one embodiment" or "some embodiments," or the like, means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," or the like, in various places throughout this specification are not necessarily all referring to the same embodiment, but rather "one or more but not all embodiments" unless specifically stated otherwise. The terms "comprising," "including," "having," and variations thereof mean "including, but not limited to," unless expressly specified otherwise.
In order to better understand the embodiments of the present application, terms or concepts that may be referred to in the embodiments are explained below.
1. Input method temporary file
Inputting a temporary file of a method: refers to a temporary file generated during the use of the input method. The input method temporary file is used for storing characters input in the input window. The input window refers to a window for inputting characters by an input method, and includes, but is not limited to, an input box (e.g., an input box in a conversation chat interface, an input box in a memo interface, etc.), an edit page in a document interface (e.g., an interface of a word document, a notepad, etc.), a search box in various application program interfaces or web pages, and so on. Note that the input method temporary file is not deleted for the character deleted in the input window. The suffix of the input method temporary file may be temp.
Temporary file of historical input method: refers to an input method temporary file generated before the current time.
A first input method temporary file: the method refers to a newly created input method temporary file.
2. About the direction
It can be understood that the reading direction of the characters is different according to the difference of the language environment, the reading habit and the like. For example, in the context of languages such as chinese, english, etc., the reading direction is from Left To Right (LTR). For example, in the language environment of arabic and uygur, the reading direction is from Right To Left (RTL).
In different reading directions, the relative directions have different meanings as indicated by the words. For convenience of description, in the embodiments of the present application, the definition "before" refers to the starting direction of the reading direction, and "after" refers to the extending direction of the reading direction, i.e. the direction opposite to the starting direction of the reading direction. Taking the reading direction from left to right as an example, the left side is the starting direction of the reading direction, and the right side is the extending direction of the reading direction, then, "front" means the left side, "rear" means the right side, the character before the a character means the character located on the left side of the a character, and the character after the a character means the character located on the right side of the a character. The other reading directions are the same, and are not described again.
3. About characters
Character: the characters in the embodiment of the application can include literal characters, numeric characters, punctuation characters, emoticons and the like.
Deleted characters: which refers to a character that is input through the input window and then deleted by performing a deletion operation. It is understood that the characters displayed in the current input window do not include the deleted characters, and all the characters input by the input method are stored in the first input method temporary file, so that the deleted characters are also the characters existing in the first input method temporary file but not existing in the content currently displayed in the input window.
Reference character: the character is the character which is positioned in front of the cursor in the input window and is closest to the cursor in the content currently displayed in the input window.
Deleted characters before cursor: refers to a deleted character that precedes the reference character before being deleted.
Deleted characters after cursor: refers to a deleted character that is located after the reference character before being deleted.
Referring to the corresponding characters: refers to the character corresponding to the reference character in the first input method temporary file. Correspondence means that the characters are identical and the relative positions are identical. The same character means that the reference character is the same as the reference corresponding character. The relative position identity means that the relative position of the reference character and each character in the content currently displayed in the input box and the relative position of the reference corresponding character and each character in the first input method temporary file except the deleted character are the same.
4. Revoking delete instructions
The delete-withdraw instruction is used for indicating the deleted character to withdraw, namely restoring the deleted character, so that the deleted character is displayed in the input window again.
The command for withdrawing and deleting can comprise a command for withdrawing by pressing words before the cursor, a command for withdrawing by pressing words after the cursor, a command for withdrawing all characters before the cursor, a command for withdrawing all characters after the cursor and a command for withdrawing all the deleted characters.
1) Word-pressed before cursor withdraw instruction: indicating that a character has been deleted before the cursor is restored.
Optionally, when the characters before the cursor withdraw, the characters may be restored according to the sequence corresponding to the reading direction, that is, among the characters deleted before the cursor, the character far from the reference character is restored first. When the characters before the cursor withdraw, the characters can also be restored according to the sequence corresponding to the reverse direction of the reading direction, namely, the characters which are close to the reference character in the deleted characters before the cursor are restored first. In this embodiment, the word-before-cursor withdrawal deleting instruction when the characters are restored according to the sequence corresponding to the reading direction is defined as a word-before-first-cursor withdrawal instruction, and the word-before-cursor withdrawal deleting instruction when the characters are restored according to the sequence corresponding to the reverse direction of the reading direction is defined as a word-before-second-cursor withdrawal instruction. The first pre-cursor word withdraw instruction is used to indicate the restoration of the one pre-cursor deleted character that is farthest from the reference character. The second pre-cursor word withdraw instruction is for indicating to retrieve a pre-cursor deleted character that is closest to the reference character. Taking the reading direction as left to right as an example, the first pre-cursor word-press withdrawal instruction is used for indicating that a deleted character which is positioned at the left of the reference character before being deleted and is farthest from the reference character is recovered, and the second pre-cursor word-press withdrawal instruction is used for indicating that a deleted character which is positioned at the left of the reference character before being deleted and is closest to the reference character is recovered.
For example, fig. 1-1 is a schematic diagram of an example of a character position relationship provided in the embodiment of the present application. As shown in fig. 1-1, the reading direction is illustrated as being from left to right. The input window inputs characters "a", "b", "c", "d", "e", "f", "g", and "h" from left to right in sequence, wherein the characters "a", "b", "e", and "f" are deleted, i.e., the characters "a", "b", "e", and "f" are deleted characters. The current cursor is located behind the character "d", i.e., the character "d" is the reference character. Before being deleted, the character "a" and the character "b" are positioned before the reference character, and thus, the character "a" and the character "b" are the deleted characters before the cursor. Before being deleted, the character "e" and the character "f" are positioned after the reference character, and thus, the character "e" and the character "f" are deleted characters after the cursor. The pre-cursor word withdraw instruction is used to instruct the character "a" or the character "b" to be restored. The first pre-cursor word withdraw instruction is used to instruct the character "a" to be restored. The second pre-cursor word withdraw instruction is used to instruct the character "b" to be restored.
2) Command is withdrawn by pressing word after cursor: indicating that a character has been deleted after a cursor is restored.
Optionally, the characters may be restored according to the sequence corresponding to the reading direction when the characters withdraw after the cursor, that is, among the deleted characters after the cursor, the character close to the reference character is restored first. When the characters are withdrawn after the cursor, the characters can also be restored according to the sequence corresponding to the reverse direction of the reading direction, namely, the characters far away from the reference character in the deleted characters after the cursor are restored first. In this embodiment, the command for retracting the word after the cursor when the character is restored according to the sequence corresponding to the reading direction is defined as the command for retracting the word after the first cursor, and the command for retracting the word after the cursor when the character is restored according to the sequence corresponding to the reverse direction of the reading direction is defined as the command for retracting the word after the second cursor. The first post-cursor word withdraw instruction is used to indicate that the character has been deleted after the cursor closest to the reference character is restored. The second post-cursor word withdraw instruction is used to indicate that the character has been deleted after the cursor farthest from the reference character is restored. Taking the reading direction as left to right as an example, the first post-cursor word-press withdrawal instruction is used for indicating that a deleted character which is positioned at the right of the reference character before being deleted and is closest to the reference character is recovered, and the second post-cursor word-press withdrawal instruction is used for indicating that a deleted character which is positioned at the right of the reference character before being deleted and is farthest from the reference character is recovered.
Continuing with the example of fig. 1-1, a post-cursor word withdraw instruction is used to indicate that either the character "e" or the character "f" is to be restored. The word withdraw after first cursor instruction is used to instruct the character "e" to be restored. A second post-cursor word withdraw instruction is used to indicate that the character "f" is to be restored.
3) All withdrawal commands before the cursor: indicating that all pre-cursor deleted characters were restored. Continuing with the example of fig. 1-1, the pre-cursor total withdraw instruction is used to instruct that all deleted characters (characters "a" and "b") to the left of character "d" are all restored.
4) All withdrawal commands behind the cursor: for indicating that all the characters have been deleted after the cursor is restored. Continuing with the example of fig. 1-1, the post-cursor total recall instruction is used to indicate that all deleted characters (characters "e" and "f") to the right of character "d" are all restored.
5) Deleted characters all retire instruction: indicating that all deleted characters are restored. Continuing with the example of fig. 1-1, the deleted characters all retire instruction is used to indicate that all of the deleted characters (characters "a", "b", "e", and "f") to the left and right of character "d" are restored.
An application scenario and a technical problem to be solved according to the embodiment of the present application will be described below with reference to the accompanying drawings.
In daily work and life, when characters are input by using an input method in an intelligent terminal, the characters are often deleted by mistake due to operation errors. For example, fig. 1-2 are schematic diagrams illustrating a scenario of character input using an intelligent terminal in one embodiment. Taking the conversation chat as an example, as shown in (a) in fig. 1-2, suppose that the user opens a conversation chat interface, and after "you will add red rice in the noon today" is keyed in the input box, the user finds that the input is wrong, and needs to delete "will add red rice" and change to "go home to eat". The user can delete the four wrong input words "will add rice" by continuously clicking the delete key 101. However, when the delete key 101 is continuously clicked, the number of clicks and the click time are not easily controlled, and there is a possibility that other characters are deleted by mistake. As shown in fig. 1-2 (b), the user clicks the delete key 101 a plurality of times, and deletes the "noon of the day" by mistake, and displays the character "you today" in the input box. Alternatively, the user operates a preset all-deletion key (e.g., holds the deletion key 101 and slides to the left) due to an operation mistake, resulting in that all characters in the input box are deleted by mistake.
In the related art, the deleted content cannot be recovered, that is, the deletion cannot be withdrawn, so that the user needs to re-input the characters deleted by mistake after the characters deleted by mistake are deleted by mistake, the operation is repeated, the user time is wasted, and especially for the input of some characters which are not used frequently, the re-input is very troublesome, and the user experience is influenced. The input processing method provided by the embodiment of the application aims to solve the problem.
The input processing method provided by the embodiment of the application can be applied to electronic devices such as mobile phones, tablet computers, wearable devices, vehicle-mounted devices, Augmented Reality (AR)/Virtual Reality (VR) devices, Personal Digital Assistants (PDAs) and the like, which can be provided with application programs (APPs), and the embodiment of the application does not limit the specific types of the electronic devices at all.
For example, fig. 2 is a schematic structural diagram of an example of the electronic device 100 according to the embodiment of the present application. The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a Universal Serial Bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a key 190, a motor 191, an indicator 192, a camera 193, a display screen 194, a Subscriber Identification Module (SIM) card interface 195, and the like. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.
It is to be understood that the illustrated structure of the embodiment of the present application does not specifically limit the electronic device 100. In other embodiments of the present application, electronic device 100 may include more or fewer components than shown, or some components may be combined, some components may be split, or a different arrangement of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
Processor 110 may include one or more processing units, such as: the processor 110 may include an Application Processor (AP), a modem processor, a Graphics Processing Unit (GPU), an Image Signal Processor (ISP), a controller, a memory, a video codec, a Digital Signal Processor (DSP), a baseband processor, and/or a neural-Network Processing Unit (NPU), etc. The different processing units may be separate devices or may be integrated into one or more processors.
A memory may also be provided in processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that have just been used or recycled by the processor 110. If the processor 110 needs to reuse the instruction or data, it can be called directly from memory. Avoiding repeated accesses reduces the latency of the processor 110, thereby increasing the efficiency of the system.
The internal memory 121 may be used to store computer-executable program code, which includes instructions. The processor 110 executes various functional applications of the electronic device 100 and data processing by executing instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. The storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required by at least one function, and the like. The storage data area may store data (such as audio data, phone book, etc.) created during use of the electronic device 100, and the like. In addition, the internal memory 121 may include a high-speed random access memory, and may further include a nonvolatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (UFS), and the like.
The electronic device 100 implements display functions via the GPU, the display screen 194, and the application processor. The GPU is a microprocessor for image processing, and is connected to the display screen 194 and an application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
The display screen 194 is used to display images, video, and the like. The display screen 194 includes a display panel. The display panel may adopt a Liquid Crystal Display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (active-matrix organic light-emitting diode, AMOLED), a flexible light-emitting diode (FLED), a miniature, a Micro-oeld, a quantum dot light-emitting diode (QLED), and the like. In some embodiments, the electronic device 100 may include 1 or N display screens 194, with N being a positive integer greater than 1.
The touch sensor 180K is also referred to as a "touch panel". The touch sensor 180K may be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, which is also called a "touch screen". The touch sensor 180K is used to detect a touch operation applied thereto or nearby. The touch sensor can communicate the detected touch operation to the application processor to determine the touch event type. Visual output associated with the touch operation may be provided through the display screen 194. In other embodiments, the touch sensor 180K may be disposed on a surface of the electronic device 100, different from the position of the display screen 194.
The software system of the electronic device 100 may employ a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present application takes an Android system with a layered architecture as an example, and exemplarily illustrates a software structure of the electronic device 100.
Fig. 3 is a block diagram of a software structure of the electronic device 100 according to the embodiment of the present application. The layered architecture divides the software into several layers, each layer having a clear role and division of labor. The layers communicate with each other through a software interface. In some embodiments, the Android system is divided into four layers, which are an application layer, an application framework layer, an Android runtime (Android runtime) (not shown) and a system library (not shown), and a kernel layer (not shown) from top to bottom.
The application layer may include a series of application packages. As shown in fig. 3, the application package may include an input method APP. In addition, the application package may include APPs (not shown) such as camera, gallery, calendar, phone call, map, navigation, WLAN, bluetooth, music, video, short message, etc.
In addition, in this embodiment of the application, the application layer may further include Input Method Manager (IMM).
The application framework layer provides an Application Programming Interface (API) and a programming framework for the application program of the application layer. The application framework layer includes a number of predefined functions.
As shown in fig. 3, in the embodiment of the present application, the application framework layer may include an Input Method Manager Service (IMMS), an Input Method Service (IMS), and temporary (temp) file management.
In the embodiment of the application, the temporary file management is used for establishing and managing the input method temporary file. The IMM, the IMMs and the IMS form a data transmission channel (hereinafter referred to as a data channel), and the input method APP can perform data transmission with other modules through the data channel, including but not limited to data transmission with temporary file management.
In some embodiments, not shown, the application framework layer may also include a window manager, content provider, view system, phone manager, resource manager, notification manager, and the like (not shown).
The Android runtime comprises a core library and a virtual machine. The Android runtime is responsible for scheduling and managing an Android system.
The core library comprises two parts: one part is a function which needs to be called by java language, and the other part is a core library of android.
The application layer and the application framework layer run in a virtual machine. And executing java files of the application program layer and the application program framework layer into a binary file by the virtual machine. The virtual machine is used for performing the functions of object life cycle management, stack management, thread management, safety and exception management, garbage collection and the like.
The system library may include a plurality of functional modules. For example: surface managers (surface managers), media libraries (media libraries), three-dimensional graphics processing libraries (e.g., OpenGL ES), 2D graphics engines (e.g., SGL), and the like.
The kernel layer is a layer between hardware and software. The inner core layer at least comprises a display driver, a camera driver, an audio driver and a sensor driver.
For convenience of understanding, in the following embodiments of the present application, an electronic device with a structure shown in fig. 2 and fig. 3 is taken as an example, and an electronic device is taken as an example of a mobile phone, and with reference to the drawings and application scenarios, an input processing method provided in the embodiments of the present application is specifically described.
First, it should be noted that the input processing method provided in the embodiment of the present application is used for recovering a deleted character in a process of inputting a character through an input method. The method can be applied to a plurality of application scenarios. Exemplarily, fig. 4 is an interface schematic diagram corresponding to three application scenarios of the input processing method according to an embodiment of the present application. As shown in fig. 4, application scenarios of the method provided in the embodiment of the present application include, but are not limited to, the following:
1) a conversational chat scenario. For example, when a conversation chat is performed by using a short message or an instant messaging APP (e.g., WeChat, QQ, etc.), characters are input in an input box, as shown in fig. 4 (a).
2) And editing scenes by using the file. For example, character input is performed through a notepad, a memo, a word document, a spreadsheet, or a slide (PPT), etc., as shown in (b) of fig. 4.
3) A scene of content is searched. For example, when searching for target content in an APP or a web page, characters are input through a search box, as shown in (c) of fig. 4.
Of course, the above scenarios are only examples, and do not set any limit to the application scenarios of the method provided in the embodiments of the present application. The method provided by the embodiment of the application can be applied to any scene needing character input. For convenience of explanation, the following embodiments are all described by taking the example that the input processing method is applied to a conversation chat scene.
Please refer to fig. 5, fig. 6-1 and fig. 6-2 together, in which fig. 5 is a schematic flow chart of an example of an input processing method provided in an embodiment of the present application, and fig. 6-1 and fig. 6-2 are schematic interface change diagrams corresponding to the input processing method provided in an embodiment of the present application. Wherein (e) in fig. 6-2 is continued to (d) in fig. 6-1.
As shown in fig. 5, the method includes:
s501, a user clicks an input box to start an input method, IMS responds to the operation of the user and sends an interface pull-up instruction to an input method APP through a data channel, and the interface pull-up instruction is used for indicating to pull up an input method interface.
And S502, the input method APP responds to the interface pull-up instruction, and the input method interface is pulled up.
Specifically, when the user clicks the input box, the touch sensor of the electronic device detects touch data generated by the user clicking operation, and sends the touch data to the touch data processing module. The touch data processing module processes the touch data, generates a touch event and distributes the touch event to the IMS. And the IMS determines that the user executes the input method starting operation by analyzing the touch event, and then the IMS generates an interface pull-up instruction. And the IMS sends the interface pull instruction to the IMMS. The IMMS sends an interface pull instruction to the IMM. And the IMM sends the interface pull-up instruction to the input method APP. And the input method APP responds to the interface pull-up instruction to pull up the input method interface.
As shown in fig. 6-1 (a), the user clicks an input box 600 in the conversation chat interface, and starts an input method. And the IMS responds to the input method starting operation of the user and generates an interface pull-up instruction. And the IMS sends the interface pull-up instruction to an input method APP through a data channel. The input method APP pulls up the input method interface according to the interface pull-up instruction, as shown at 601 in (b) in fig. 6-1.
In this embodiment, the input method is started by the user clicking the input box. It can be understood that, in the conversation chat scenario provided in this embodiment, the input method may also be initiated through other preset operations. In addition, the operation of starting the input method may be different in different application scenarios. For example, in applications such as a memo, a notepad, a schedule and the like, the input method can be started by clicking a "new" control.
S503, the IMS determines whether the input method interface is successfully pulled up.
It can be understood that, in the process of executing interface pull-up according to the interface pull-up instruction sent by the IMS, the input method APP has the possibility of interface pull-up failure. Optionally, the IMS may determine whether the input method interface is displayed after sending the interface pull instruction to the input method APP.
As a possible implementation manner, the IMS may send an inquiry message to the input method APP through the data channel to confirm whether the input method interface is displayed. As another possible implementation manner, the input method APP may also feed back a message that the interface is successfully pulled up to the IMS through the data channel after the interface of the input method is successfully pulled up, so that the IMS can determine whether the interface of the input method is displayed.
If the IMS determines that the input method interface is displayed, S504 is performed.
S504, the IMS sends a first temp clear instruction to the temporary file management. The first temp clear instruction is used for indicating to clear the temporary file of the historical input method.
And S505, after receiving the first temp clearing instruction, the temporary file management determines whether a history input method temporary file exists.
It can be understood that, in the Android system, besides the input method temporary file, temporary files of other application programs may exist. The Android system can manage the input method temporary file and temporary files of other application programs through various methods, so that the input method temporary file and the temporary files of other application programs can be distinguished conveniently. Optionally, the temporary file may be distinguished by a storage location. Specifically, the input method temporary file may be stored in a preset storage location, where the preset storage location is used only for storing the input method temporary file or only for storing the input method related file. That is, the temporary files of other applications do not exist in the preset storage location. With this file management method, in step S505, the temporary file management may search in the preset storage location to determine whether a file suffixed to temp exists. If yes, determining that the temporary file of the historical input method exists, and executing step S506. If not, determining that no history input method temporary file exists, and executing step S507.
Optionally, the temporary files may also be distinguished by file names. Specifically, the input method temporary file may be named a preset name, which is different from temporary files of other application programs. With this file management method, in step S505, the temporary file management may determine whether or not a file with a name of the preset name followed by temp exists by searching. If yes, determining that the temporary file of the historical input method exists, and executing step S506. If not, determining that no history input method temporary file exists, and executing step S507.
S506, managing and deleting the temporary file of the history input method by the temporary file.
And S507, managing the new first input method temporary file by the temporary file.
The naming and storage modes of the newly created first input method temporary file and the like can be executed according to the management method of the temporary file.
S508, inputting characters in an input box by a user, refreshing an interface by an input method APP, and displaying the characters input by the user in the input box.
It will be appreciated that the user may enter one or more characters in the input box at a time. After the user inputs characters each time, the input method APP refreshes the interface so as to add the characters input by the user at this time in the input box. For example, the user can input the characters "today", "thursday", "we" and "there" in sequence in the input box, the input method APP refreshes the interface after each input, and the characters input by the user are displayed. After the user inputs the character "yes", the input method APP refreshes the interface display as shown in (c) in fig. 6-1.
And S509, the input method APP sends the characters input by the user each time to the IMS through a data channel.
And S510, the IMS sends the characters input by the user each time to temporary file management.
And S511, the temporary file management writes the characters input by the user each time into the first input method temporary file.
The characters entered by the user in the input box are typically in text format. In some possible embodiments, the input method APP and the temporary file management hold a consistent encoding protocol. The input method APP may encode the characters input by the user according to the encoding protocol each time before transmitting the characters input by the user, and encode the characters in a text format into characters in a string format. The input method APP sends the characters in the character string format to the IMS through the data channel. The IMS sends the characters in the string format to the temporary file management. And the temporary file management decodes the characters in the character string format according to the coding protocol to generate characters in a text format, and writes the characters in the text format into the first input method temporary file. Similarly, when the temporary file management needs to send characters to the input method APP, the temporary file management can be executed according to the reverse process of the above process.
In other possible embodiments, the input method APP and the temporary file management may also hold a consistent encryption protocol. Before sending the characters input by the user, the input method APP can encrypt the characters input by the user according to the encryption protocol to obtain the characters of the ciphertext. And the input method APP sends the characters of the ciphertext to the IMS through a data channel. And the IMS sends the characters of the ciphertext to temporary file management. And the temporary file management decrypts the characters of the ciphertext according to the encryption protocol to obtain the characters of the plaintext, and writes the characters of the plaintext into the first input method temporary file. When the temporary file management needs to send content to the input method APP, the process may be performed in reverse of the above process. In the embodiment, the characters transmitted between the input method APP and the temporary file management are encrypted, so that the content input by the user is prevented from being maliciously read, the privacy of the user is prevented from being leaked, and the confidentiality and the safety of the content input by the user are improved, so that the user experience is improved.
In addition, it will be appreciated that in some embodiments, in addition to writing characters entered by the user into the first input method temporary file, historical characters displayed in the input box may need to be written into the first input method temporary file. The history characters refer to characters which are displayed in an input window before the input method APP pulls up the input method interface. For example, when the user opens a certain conversation chat interface, before the user clicks the input box, a character which is input before but not transmitted is displayed in the input box or a character which is input by the user through pasting and the like is displayed. Or, when a user opens a certain notepad document, and when the user does not start editing and does not input an input method interface pull-up instruction, the notepad document already stores the document previously stored by the user. For such an application scenario, after the first input method temporary file is created, the related function module may be further invoked to determine whether the input window displays history characters. If the input window displays history characters, the temporary file management may write the history characters into the first input method temporary file first. And then writing the characters input by the user into the first input method temporary file according to the steps in the temporary file. Therefore, the first input method temporary file can be ensured to comprise all characters displayed in the input window and the characters which are deleted after being input by a user after the input method interface is pulled up, the temporary file management is facilitated to determine the characters which need to be deleted according to the first input method temporary file and the currently displayed content of the input window, and the accuracy of recovering the deleted characters is improved.
S512, the user executes deleting operation, the characters in the input box are deleted, the input method APP refreshes an interface, and the rest characters are displayed in the input box.
For example, as shown in (c) in fig. 6-1, after the user inputs "today, thursday, we have", the characters "these" and "have" are deleted by clicking the delete key 602 twice in (c) in fig. 6-1. The input method APP refreshes the interface, displaying the remaining character "thursday, me" in the input box, as shown in (d) of fig. 6-1.
Then, the user inputs 'start meeting, and no red rice is added in the noon' in turn in the input box. The electronic device repeats the above steps S508 to S511, and the electronic device displays the interface as shown in (e) of fig. 6-2.
The user finds that the character 'will add red rice' is input wrongly, and the character 'go home to eat'. Then, the user deletes the character "will cook rice" in the input box by the delete key 602 in the input method interface shown in (e) in fig. 6-2. In the deleting process, the operation error causes that the 'noon is not' deleted by mistake in the input box, and the 'today thursday, i meeting' is displayed in the input box, as shown in (f) in fig. 6-2.
S513, the user inputs an option display instruction through the input method interface, and the input method APP displays the option of deleting the withdrawal instruction.
The option display instruction is used for indicating the input method APP to display the deletion withdrawal instruction option.
Optionally, the user may input the option display instruction by voice input, gesture input, or preset physical key input. Optionally, the user may also input an option display instruction through an option display control preset in the input method interface. The option display control can be a newly added control in the existing input method interface or can be a multiplexing control in the existing input method interface. For example, a long-press delete key may be set to indicate that an option presentation instruction is input without conflict with other input functions. That is, if the user presses the delete key in the input method interface for a long time, the option display instruction is input.
Specifically, a touch sensor of the electronic device detects touch data of a user on the display screen in real time and sends the touch data to the touch data processing module. And the touch data processing module generates a touch event according to the touch data and distributes the touch event to the input method APP. And the input method APP analyzes the touch event, and if the touch operation of the user is determined to be long-time pressing of a delete key, the input method interface is refreshed, and a delete withdrawal instruction option is displayed.
Optionally, the withdrawal deletion instruction option may include a pre-cursor withdrawal option and a post-cursor withdrawal option. In addition, the recall delete instruction options may also include pre-cursor and post-cursor recall options. Optionally, the command-canceling-by-word command-canceling option and the command-canceling-by-all option may be included in the command-canceling-deleting option.
For example, as shown in (f) of fig. 6-2, when the user presses the delete key 602 for a long time, the input method interface displays a recall deletion instruction option, which may be displayed in the form of a tab, as shown in a recall deletion tab 603 in (g) of fig. 6-2. Optionally, the revocation deletion tab 603 may include a word-by-word revocation option 604 and an all-revocation option 605. Optionally, a withdrawal range selection switch 606 may be further included in the withdrawal deletion tab 603. The recall range selection switch 606, which is used to select the range of recall deletions, may include three setting positions: a pre-cursor withdrawal position, an intermediate position, and a post-cursor withdrawal position. When the withdrawal range selection switch 606 is set to the pre-cursor withdrawal position, it indicates that the pre-cursor withdrawal option is selected; withdraw the option before and after the cursor when withdrawing the range selection switch 606 to set to the middle position to represent the selection cursor; when the withdrawal range selection switch 606 is set to the withdrawal position after the cursor is selected, the options are withdrawn after the cursor is selected. Alternatively, the withdrawal range selection switch 606 may be set to the post-cursor withdrawal position by default, as shown in (g) of fig. 6-2.
It will be appreciated that when the user simultaneously selects the pre-cursor withdrawal option and the word-press withdrawal option, i.e. enters a pre-cursor word-press withdrawal instruction. When the user selects the option to withdraw after cursor and the option to withdraw after pressing the word at the same time, namely the command to withdraw after pressing the word after inputting the cursor. When the user selects the pre-cursor withdrawal option and the total withdrawal option at the same time, the total withdrawal instruction before the cursor is input. When the user selects the option to withdraw after the cursor and the option to withdraw after all, namely, the instruction to withdraw after the cursor is input. When the user selects the options of withdrawing before the cursor and after the cursor simultaneously, and all the options of withdrawing, namely all the withdrawal instructions of the deleted characters are input.
Of course, (g) in fig. 6-2 is only one display example of the revocation deletion instruction option, and the revocation deletion instruction option may have various designs according to actual needs, for example, five options may be included in the revocation deletion card for the user to select: a pre-cursor word-press withdrawal option, a post-cursor word-press withdrawal option, a pre-cursor all withdrawal option, a post-cursor all withdrawal option, and a pre-cursor and post-cursor all withdrawal option. The embodiment of the present application does not set any limit to the specific form of the option of revoking the deletion instruction.
S514, the user inputs a cancel deletion command through the cancel deletion option, and the input method APP sends a first message to the IMS through the data channel, where the first message may include: and the information of the type of the deletion instruction, the currently displayed content of the input box, the current position of the cursor and the like is withdrawn.
Alternatively, the current position of the cursor may be represented by the relative position relationship between the cursor and the character. The position of the character may be indicated by the rank order of the character in the content currently displayed in the input box. For example, in the case of a reading direction from left to right, the currently displayed content of the input box may be sorted in order from left to right, with the leftmost character being displayed as the first character, the adjacent character to the right of the first character being displayed as the second character, and so on. The current position of the cursor may be indicated as "after the third character", for example.
Specifically, after the input method APP analyzes the type of the deletion-withdrawing option input by the user, a first message may be generated according to the type of the deletion-withdrawing instruction, the content currently displayed in the input box, the current position of the cursor, and other information, and the first message and the second message are sent to the IMM. The IMM sends the first message to the IMMs. The IMMS sends the first message to the IMS. The IMS sends the first message to temporary file management.
And S515, the IMS sends the first message to temporary file management.
S516, comparing the content in the first input method temporary file with the content currently displayed in the input box according to the first message by the temporary file management to generate first content; the first content includes at least one deleted character therein.
This step is further elaborated in the examples that follow.
And S517, the temporary file management sends the first content to the IMS.
S518, the IMS sends the first content to an input method APP through a data channel.
S519, the input method APP refreshes the interface according to the first content, and the first content is displayed in the input box.
S520, the user inputs a message sending instruction, the input method APP packages the content in the input box, and sends the packaged content to a communication service (not shown in the figure) in the Android system through the data channel, so that the communication service sends the packaged content to the peer device through the server.
Alternatively, the user may enter a message send command by clicking the "send" key.
And S521, before, after or simultaneously with the input method APP for packaging and sending the data, sending a second clearing instruction to the IMS through the data channel. And the second temp clear instruction is used for indicating to delete the first input method temporary file.
S522, the IMS sends the second temp clear instruction to the temporary file management.
And S523, after the temporary file management receives the second temp clear instruction, deleting the first input method temporary file.
Optionally, in another implementation manner, while the input method APP packages and sends data, the data channel may also indicate the IMS to determine whether a temporary historical input method file exists, and if so, delete the temporary historical input method file. That is, after step S520, the step S505 to S506 are executed again, and the temporary file management clears the first input method temporary file as the historical input method temporary file, so that the function of clearing the historical input method temporary file can be reused, code resources are saved, and system operation efficiency is improved.
In this embodiment, the clearing of the first input method temporary file is triggered by a sending operation of a user. It can be understood that, in the session chat scenario provided in this embodiment, the removal of the first input method temporary file may also be triggered by other operations, for example, the user inputs an input method interface retraction instruction, or the user exits from the current session box. Optionally, the user may input an input method interface retraction instruction by clicking an interface retraction control in the input method interface, or may input an input method interface retraction instruction by clicking an area other than the input frame and the input method interface in the chat session interface. Wherein exiting the current dialog box is closing the input box.
In addition, the triggering operation for clearing the first input method temporary file may be different in different application scenarios. For example, in a file editing scenario, the removal of the first input method temporary file may be triggered by a user closing the document (clicking on the close document option). Wherein closing the document also closes the input window. In the search content scene, the clearing of the first input method temporary file can be triggered by at least one of starting a search operation (clicking a start search button), retracting an input method interface, exiting a search page and the like. Wherein exiting the search page closes the input window. The embodiment of the application does not limit the time and the triggering mode for executing the clearing operation of the first input method temporary file, and can be designed according to actual requirements.
In this embodiment, the content input by the input box is written into the first input method temporary file by creating the first input method temporary file. When a deletion withdrawal instruction input by a user is received, according to the first message, generating first content comprising at least one deleted character by comparing the content in the first input method temporary file with the content currently displayed in the input box, and displaying the first content in the input box, thereby realizing the recovery of the deleted character. According to the method provided by the embodiment, the user does not need to input again under the condition that the user deletes the data by mistake, so that the time of the user is saved, and the user experience is improved. Meanwhile, in the embodiment of the present application, the withdrawal deletion instruction may include a word-pressing withdrawal instruction before the cursor, a word-pressing withdrawal instruction after the cursor, a total withdrawal instruction before the cursor, a total withdrawal instruction after the cursor, and a deleted total withdrawal instruction. The multiple withdrawal deletion instructions can realize withdrawal deletion of different types in different ranges, different use requirements of users are met, and user experience is further improved. In addition, in the embodiment, before the content is input, the historical input method temporary file is cleared and the first input method temporary file is newly created, so that the privacy of a user can be prevented from being revealed, the user experience is improved, the correctness of the input method temporary file used when the deletion is withdrawn can be ensured, the accuracy of recovering the deleted characters is improved, and the user experience is further improved. Similarly, the first input method temporary file is cleared after the user sends the content, the file is prevented from being maliciously read due to the fact that the file is reserved, the privacy of the user is prevented from being revealed, user experience is improved, the first input method temporary file can be prevented from being confused with other input method temporary files, the content in the first input method temporary file is prevented from being used when other input windows execute deletion withdrawing operation, the accuracy of subsequent deletion withdrawing operation is improved, and the user experience is further improved.
With reference to the drawings, the following describes specific implementation processes of comparing the content in the first input method temporary file with the content currently displayed in the input box according to the first message and generating the first content in the five types of deletion revocation operations, step S516, and the temporary file management respectively.
A) Pre-cursor word press recall
In practical applications, the user may perform some input operations after performing the deletion operation. At this point, the user finds that the previously deleted character needs to be restored. That is, the character that the user needs to restore is the character deleted before the cursor. For example, as shown in (c) and (d) in fig. 6-1 and (e) and (f) in fig. 6-2, the user deletes "there are", after which the user performs some input operations and deletion operations, and the cursor is positioned at the end of the content. At this time, the user finds that the characters "have" or "have" need to be recovered, or recovers both of "have" and "have". In the related art, the characters can be input again after the cursor is moved to the character 'me', the operation is complicated, and the user experience is poor. The method provided by the embodiment can directly recover the deleted characters before the cursor, does not need to adjust the cursor position by a user, does not need to input again, simplifies the operation, effectively improves the input efficiency of the user, and improves the user experience. And the method provided by the embodiment can withdraw the deleted characters before the cursor word by word, so that the user can conveniently recover part of the characters in the deleted characters before the cursor as required, and the user experience is further improved.
In this embodiment, an input processing method is described by taking a word-press-before-first-cursor withdrawal instruction as an example, that is, a character deleted before a cursor closest to a reference character is restored by executing the word-press-before-first-cursor withdrawal instruction. The input processing method corresponding to the word-pressing withdrawal instruction before the second cursor is similar to the following process, and is not described in detail.
Fig. 7 is a schematic diagram of an interface change corresponding to an exemplary operation of withdrawing a word before executing a cursor according to an embodiment of the present application. Continuing with (g) in fig. 6-2, the user sets the withdrawal range selection switch 606 to the pre-cursor withdrawal position as shown in (a) in fig. 7. The user then clicks once on the press words recall option 604 and the previously deleted characters "a few" are restored, and the input box displays "today, thursday, we meet," as shown in fig. 7 (b). After that the user clicks once more on the withdraw from by word option 604 as in (b) of fig. 7, the character "have" deleted before the cursor is restored, and the content displayed in the input box is "thursday, we have a meeting", as shown in (c) of fig. 7. Subsequently, the user clicks an arbitrary position other than the withdrawal deletion tab 603 in the input method interface shown in fig. 7 (c), and exits the withdrawal deletion option interface, as shown in fig. 7 (d). Of course, the method for exiting the cancel deletion option interface in this embodiment is only an example, and in practical applications, other exiting manners may be designed as needed.
Corresponding to the interface change process, the operation process in the electronic device is as follows: after the user sets the withdrawal range selection switch to the withdrawal position before the cursor and clicks the word pressing withdrawal option, the input method APP analyzes the touch event and determines that the instruction input by the user is a word pressing withdrawal instruction before the cursor. The input method APP sends first information to temporary file management through a data channel, wherein the first information comprises the type of a withdrawal instruction, i.e. withdrawal of a character before a cursor, the content currently displayed in an input box, i.e. the 10 th character in the content currently displayed in the input box, i.e. the tail of the content currently displayed in the input box, i.e. the meeting of the user on the day and on the thursday, and the current position of the cursor.
And the temporary file management compares the content in the first input method temporary file with the content currently displayed in the input box according to the first information to generate first content. In this embodiment, the first display content includes a first target character, where the first target character is a deleted character located before the reference corresponding character and farthest from the reference corresponding character in the first input method temporary file.
Exemplarily, fig. 8 is a schematic flowchart of another example of an input processing method provided in the embodiment of the present application. As shown in fig. 8, in this embodiment, the temporary file management may generate the first content according to the following procedure, that is, step S516 includes:
s801, the temporary file management determines a reference character according to the content currently displayed by the input box in the first information and the current position of the cursor.
Specifically, continuing with the scenario illustrated in fig. 7 as an example, referring to table 1, the content currently displayed by the input box "day, thursday, me meeting," and the current position of the cursor is after the 10 th character in the content currently displayed by the input box. The content in the first input method temporary file is 'today thursday, we have a meeting, and no red rice can be added in noon'. The deleted characters before the cursor comprise the characters 'A' and 'B'. The deleted characters after the cursor include the character "no red rice will be added at noon". The temporary file management determines that the reference character is the 10 th character in the content currently displayed by the input box according to the content currently displayed by the input box, namely ' four weeks today, i meet ' and the current position of the cursor '.
TABLE 1
Figure 829571DEST_PATH_IMAGE001
S802, the temporary file management compares the content currently displayed by the input box with the content in the first input method temporary file, determines that characters exist in the first input method temporary file but do not exist in the content displayed by the current input box, obtains deleted characters, and marks the deleted characters.
Referring to table 1, the temporary file management compares the content currently displayed in the input box with the content in the first input method temporary file, and determines that the deleted characters include the 8 th character, the 9 th character, and the 13 th to 19 th characters in the first input method temporary file. The temporary file management marks the deleted characters. The specific manner of marking is not limited.
S803, the temporary file management compares the unmarked characters in the first input method temporary file with the currently displayed content of the input box, determines the characters corresponding to the reference characters in the first input method temporary file, and obtains the reference corresponding characters.
Optionally, the temporary file management may compare the characters in the content currently displayed by the input box with the unmarked characters in the first input method temporary file one by one according to a preset sequence, determine the characters which are the same as the reference characters and have the same relative positions in the unmarked characters in the first input method temporary file, and obtain the reference corresponding characters. The preset sequence may be from front to back, from back to front, from the reference character to back, or from the reference character to both sides. This is not a limitation of the present application.
Of course, the temporary file management may determine the reference corresponding character in other ways. As an alternative implementation manner, the temporary file management may determine, according to a position of a reference character in the content currently displayed in the input box, a character that is the same as the position among the unmarked characters in the first input method temporary file, and determine the character as a reference corresponding character. For example, the temporary file management may determine a sorting order number of the reference character in the content currently displayed in the input box, sort the unmarked characters in the first input method temporary file in the same sorting manner as the content currently displayed in the input box, and determine the unmarked characters in the sorting that are the same as the sorting order number of the reference character, that is, the reference corresponding characters.
In addition, the temporary file management may also use other methods to determine the reference corresponding characters. The embodiment of the application does not limit the specific way of determining the reference character at all, and can be selected according to actual situations.
Referring to table 1, the reference corresponding character determined by the temporary file management is the 12 th character ",' in the first input method temporary file.
S804, the temporary file management determines a deleted character which is positioned in the first input method temporary file before the reference corresponding character and is farthest away from the reference corresponding character according to the reference corresponding character to obtain a first target character.
Referring to table 1, the first target character determined by the temporary document management is the 9 th character "a" in the first input method temporary document.
S805, the temporary file management determines first content according to the first target character.
Alternatively, the first content may include only the first target character. In this case, the temporary file management directly determines the first target character as the first content. That is, in the above example, the first content specified by the temporary document management is the 9 th character "a" in the first input method temporary document.
Optionally, the first content may also include all characters required to be displayed after the revocation deletion. That is, the first content includes the content currently displayed by the input box and the first target character. In this case, the temporary file management may copy the unmarked character and the first target character in the first input method temporary file, and obtain the first content while keeping the relative positions of the respective characters unchanged at the time of copying. That is, in the above example, the first content determined by the temporary file management is "today, thursday, we meet".
Then, steps S517 to S519 are executed, the temporary file management sends the first content to the input method APP through the data channel, and the input method APP displays according to the first content. Optionally, in a case that the first content only includes the first target character, the input method APP displays the first target character according to a relative position of the first target character and the reference character. The relative position of the first target character and the reference character can be determined by the input method APP according to the deletion records of each deletion, and can also be sent to the input method APP by temporary file management. This is not a limitation of the present application.
Optionally, in a case where the first content includes all characters that need to be displayed after the revocation deletion, the input method APP overwrites the content currently displayed in the input box with the first content, thereby displaying the first content in the input box.
It is understood that the above steps S514, S801 to S805, S517 to S519 are processes performed by the electronic apparatus after the user performs one pre-cursor word-pressing withdrawal operation. When the user performs the pre-cursor word-pressing withdrawal operation again, the electronic device may repeat the above steps S514, S801 to S805, and S517 to S519.
In the input processing method provided in this embodiment, when the user inputs a word-pressing withdrawal instruction before the cursor, the reference character is determined according to the content currently displayed in the input box and the current position of the cursor, the content currently displayed in the input box is compared with the content in the first input method temporary file, the deleted character is determined, and the deleted character is marked. Then, the temporary file management compares the unmarked characters in the first input temporary file with the currently displayed content of the input box, and determines the reference corresponding characters. A first target character is determined from the reference corresponding character, thereby determining first content from the first target character. According to the method provided by the embodiment, the first content can be determined only according to the content currently displayed by the input box, the current position of the cursor and the first input method temporary file, the deleted character is synchronously sent to the temporary file management in the character deleting process of the user through the input method APP, the operation burden of the input method APP is reduced, the algorithm executing process is simplified, the operation efficiency is improved, the input method APP response speed is further improved, and the user experience is improved.
B) Word press withdrawal after cursor
In many usage scenarios, when the user does not perform other operations after executing the deletion operation, it is found that some erroneously deleted contents in the current deletion operation need to be restored, and the user does not need to restore the deleted contents before the currently executed deletion operation position. That is, the user needs to restore the cursor to delete the character. For example, as shown in (c) and (d) in fig. 6-1 and (e) and (f) in fig. 6-2, the user performs the deletion operation twice in total, the first deletion operation deletes "people have", the second deletion operation deletes "no red rice is added at noon", and the cursor is positioned at the end of the content after the second deletion operation. At this time, the user finds that the characters deleted by the second deleting operation need to be restored, and the characters deleted by the first deleting operation need not to be restored. The method provided by the embodiment can directly recover the deleted characters after the cursor, does not need to be input again by the user, simplifies the operation, effectively improves the input efficiency of the user, and improves the user experience. In addition, the method provided by the embodiment can withdraw the characters deleted after the cursor word by word, so that a user can conveniently recover part of the characters in the characters deleted after the cursor as required, and the user experience is further improved.
In this embodiment, an input processing method is described by taking a word-pressing withdrawal instruction after a first cursor as an example, that is, a deleted character after a cursor closest to a reference character is recovered by executing the word-pressing withdrawal instruction after the first cursor. The input processing method corresponding to the word-pressing withdrawal instruction after the second cursor is similar to the following process, and is not described again.
For example, fig. 9-1 and 9-2 are schematic diagrams illustrating an example of interface change corresponding to a word-pressing withdrawal operation after a cursor is executed according to an embodiment of the present application. Wherein (a) in fig. 9-1 is continued to (g) in fig. 6-2, and (d) in fig. 9-2 is continued to (c) in fig. 9-1.
As shown in (a) in fig. 9-1, the user sets the withdrawal range selection switch 606 to the post-cursor withdrawal position. The user then clicks once on the press words recall option 604 and the deleted characters "in" are restored after the cursor, with the input box showing "today Thursday, I's meeting, in" as shown in FIG. 9-1 (b). The user then clicks once more on the withdraw by word option 604 in (b) of fig. 9-1, the deleted character "noon" after the cursor is restored, and the content displayed in the input box is "thursday, me meeting, noon", as shown in (c) of fig. 9-1. The user then clicks once more on the withdraw from by word option 604 in (c) of fig. 9-1, the character deleted after the cursor character "no" is restored, and the content displayed in the input box is "thursday, me meeting, noon is no", as shown in (d) of fig. 9-2. Subsequently, the user clicks an arbitrary position other than the withdrawal deletion tab 603 in the input method interface shown in (d) in fig. 9-2, and exits the withdrawal deletion option interface, as shown in (e) in fig. 9-2.
Corresponding to the interface change process, the operation process in the electronic device is as follows: after the user sets the withdrawal range selection switch to the position of the cursor for withdrawing, and clicks the word-pressing withdrawal option, the input method APP analyzes the touch event, and determines that the instruction input by the user is the word-pressing withdrawal instruction after the cursor is determined. The input method APP sends first information to temporary file management through a data channel, wherein the first information comprises the type of a withdrawal instruction, i.e. withdrawal by characters after a cursor, the content currently displayed by an input box, i.e. the 10 th character in the content currently displayed by the input box, i.e. the tail of the content currently displayed by the input box, i.e. the content currently displayed by the input box is started on my day and on my day.
And the temporary file management compares the content in the first input method temporary file with the content currently displayed in the input box according to the first information to generate first content. In this embodiment, the first display content includes a second target character, where the second target character is a deleted character located after the reference corresponding character and closest to the reference corresponding character in the first input method temporary file.
Exemplarily, fig. 10 is a schematic flowchart of another input processing method provided in the embodiment of the present application. As shown in fig. 10, in this embodiment, the temporary file management may generate the first content according to the following procedure, that is, step S516 includes:
s1001, the temporary file management determines a reference character according to the content displayed currently by the input box in the first information and the current position of the cursor.
This step is the same as step S801 described above, and is not described herein again.
S1002, the temporary file management compares the content displayed by the input box at present with the content in the first input method temporary file, determines that characters exist in the first input method temporary file but do not exist in the content displayed by the input box at present, obtains deleted characters, and marks the deleted characters.
This step is the same as step S802 described above, and is not described herein again.
S1003, the temporary file management compares the unmarked characters in the first input method temporary file with the currently displayed content of the input box, determines the characters corresponding to the reference characters in the first input method temporary file, and obtains the reference corresponding characters.
This step is the same as step S803 described above, and is not described again here.
And S1004, the temporary file management determines a deleted character which is positioned behind the reference corresponding character and is closest to the reference corresponding character in the first input method temporary file according to the reference corresponding character to obtain a second target character.
Referring to table 1, in the present embodiment, the second target character determined by the temporary file management is the 13 th character "middle" in the first input method temporary file.
S1005, the temporary file management determines the first content according to the second target character.
Alternatively, the first content may include only the second target character. In this case, the temporary file management directly determines the second target character as the first content. That is, in the above example, the first content specified by the temporary file management is the 13 th character "middle" in the first input method temporary file.
Optionally, the first content may also include all characters required to be displayed after the revocation deletion. That is, the first content includes the content currently displayed by the input box and the second target character. In this case, the temporary file management may copy the unmarked character and the second target character in the first input method temporary file, and obtain the first content while keeping the relative positions of the respective characters unchanged at the time of copying. That is, in the above example, the first content determined by the temporary file management is "today on thursday, i meet, in".
Then, steps S517 to S519 are executed, the temporary file management sends the first content to the input method APP through the data channel, and the input method APP displays according to the first content. Optionally, in a case that the first content only includes the second target character, the input method APP displays the second target character according to a relative position of the second target character and the reference character. The relative position of the second target character and the reference character can be determined by the input method APP according to the deletion records of each deletion, and can also be sent to the input method APP by temporary file management. This is not a limitation of the present application.
Optionally, in a case where the first content includes all characters that need to be displayed after the revocation deletion, the input method APP overwrites the content currently displayed in the input box with the first content, thereby displaying the first content in the input box.
It is understood that the above steps S514, S1001 to S1005, and S517 to S519 are processes performed by the electronic apparatus after the user performs one pre-cursor word-pressing withdrawal operation. When the user performs the pre-cursor word-pressing withdrawal operation again, the electronic device may repeat the above steps S514, S1001 to S1005, and S517 to S519.
In the input processing method provided in this embodiment, when the user inputs the cursor and then withdraws the instruction by pressing the word, the reference character is determined according to the content currently displayed in the input box and the current position of the cursor, the content currently displayed in the input box is compared with the content in the first input method temporary file, the deleted character is determined, and the deleted character is marked. Then, the temporary file management compares the unmarked characters in the first input temporary file with the currently displayed content of the input box, and determines the reference corresponding characters. A second target character is determined from the reference corresponding character, thereby determining the first content from the second target character. According to the method provided by the embodiment, the first content can be determined only according to the content currently displayed by the input box, the current position of the cursor and the first input method temporary file, the deleted character is synchronously sent to the temporary file management in the character deleting process of the user through the input method APP, the operation burden of the input method APP is reduced, the algorithm executing process is simplified, the operation efficiency is improved, the input method APP response speed is further improved, and the user experience is improved.
C) Total pre-cursor withdrawal
In some scenarios, the user needs to restore all pre-cursor deleted characters. For example, as shown in (c) and (d) in fig. 6-1 and (e) and (f) in fig. 6-2, the user deletes "there are" after which the user performs some input operations and deletion operations with the cursor positioned at the end of the content. At this time, the user finds that the characters "have" and "have" need to be all recovered. The method provided by the embodiment can directly recover the deleted characters before the cursor, does not need to adjust the cursor position by a user, does not need to input again, simplifies the operation, effectively improves the input efficiency of the user, and improves the user experience. In addition, according to the method provided by the embodiment, the user can restore all the characters deleted before the cursor by performing one operation, the operation is convenient, and particularly under the condition that more characters are deleted before the cursor, the restoration efficiency of the deleted characters can be effectively improved, and the user experience is further improved.
For example, fig. 11 is a schematic view of an interface change corresponding to an example of a total withdrawal operation before a cursor is executed according to an embodiment of the present application. Continuing to (g) in fig. 6-2, as shown in (a) in fig. 11, the user sets the withdrawal range selection switch 606 to the pre-cursor withdrawal position. The user then clicks the all recall option 605 and the previously deleted characters "from" and "have" are restored at the same time, and the input box displays "today Thursday, we have a meeting," as shown in (b) of FIG. 11. Subsequently, the user clicks an arbitrary position other than the withdrawal deletion tab 603 in the input method interface shown in fig. 11 (b), and exits the withdrawal deletion option interface, as shown in fig. 11 (c).
Corresponding to the interface change process, the operation process in the electronic device is as follows: after the user sets the withdrawal range selection switch to the position of the withdrawal before the cursor and clicks all withdrawal options, the input method APP analyzes the touch event and determines that the instruction input by the user is the instruction of all withdrawal before the cursor. The input method APP sends first information to temporary file management through a data channel, wherein the first information comprises the type of a withdrawal instruction, namely all withdrawals before a cursor and the content currently displayed by an input box, namely 'four weeks, i.e. meeting today,' the current position of the cursor, and the position of the 10 th character in the content currently displayed by the input box, namely the tail of the content currently displayed by the input box.
And the temporary file management compares the content in the first input method temporary file with the content currently displayed in the input box according to the first information to generate first content. The first content comprises first target content, and the first target content refers to all deleted characters which are positioned before the reference corresponding characters in the first input method temporary file.
Exemplarily, fig. 12 is a schematic flowchart of another input processing method provided in the embodiment of the present application. As shown in fig. 12, in this embodiment, the temporary file management may generate the first content according to the following procedure, that is, step S516 includes:
s1201, the temporary file management determines a reference character according to the content currently displayed by the input box in the first information and the current position of the cursor.
This step is the same as step S801 described above, and is not described herein again.
S1202, the temporary file management compares the content displayed by the input box at present with the content in the first input method temporary file, determines that characters exist in the first input method temporary file but do not exist in the content displayed by the input box at present, obtains deleted characters, and marks the deleted characters.
This step is the same as step S802 described above, and is not described herein again.
S1203, comparing the unmarked characters in the first input method temporary file with the currently displayed content of the input box by the temporary file management, determining characters corresponding to the reference characters in the first input method temporary file, and obtaining the reference corresponding characters.
This step is the same as step S803 described above, and is not described again here.
S1204, the temporary file management determines all deleted characters positioned before the reference corresponding character in the first input method temporary file according to the reference corresponding character to obtain first target content.
Referring to table 1, in the present embodiment, the first target contents determined by the temporary document management are the 8 th character "and the 9 th character" have ".
And S1205, the temporary file management determines the first content according to the first target content.
Alternatively, the first content may include only the first target content. In this case, the temporary file management directly determines the first target content as the first content. That is, in the above example, the first content specified by the temporary document management is the 8 th character "and the 9 th character" in the first input method temporary document.
Optionally, the first content may also include all characters required to be displayed after the revocation deletion. That is, the first content includes the content currently displayed by the input box and the first target content. In this case, the temporary file management may copy all characters before referring to the corresponding character in the first input method temporary file, and obtain the first content while keeping the relative positions of the respective characters unchanged during the copying. That is, in the above example, the first content determined by the temporary file management is "today on thursday, we have a meeting".
Then, steps S517 to S519 are executed, the temporary file management sends the first content to the input method APP through the data channel, and the input method APP displays according to the first content. Optionally, in a case that the first content only includes the first target content, the input method APP displays each character in the first target content according to a relative position of each character in the first target content and the reference character. The relative position of each character in the first target content and the reference character can be determined by the input method APP according to the deletion record of each deletion, and can also be sent to the input method APP through temporary file management. This is not a limitation of the present application.
Optionally, in a case where the first content includes all characters that need to be displayed after the revocation deletion, the input method APP overwrites the content currently displayed in the input box with the first content, thereby displaying the first content in the input box.
In the input processing method provided in this embodiment, when the user inputs all the command to withdraw before the cursor, the reference character is determined according to the content currently displayed in the input box and the current position of the cursor, the content currently displayed in the input box is compared with the content in the first input method temporary file, the deleted character is determined, and the deleted character is marked. Then, the temporary file management compares the unmarked characters in the first input temporary file with the currently displayed content of the input box, and determines the reference corresponding characters. The first target content is determined based on the reference corresponding character, thereby determining the first content based on the first target content. According to the method provided by the embodiment, the first content can be determined only according to the content currently displayed by the input box, the current position of the cursor and the first input method temporary file, the deleted character is synchronously sent to the temporary file management in the character deleting process of the user through the input method APP, the operation burden of the input method APP is reduced, the algorithm executing process is simplified, the operation efficiency is improved, the input method APP response speed is further improved, and the user experience is improved.
D) Total withdrawal after cursor
In some scenarios, the user needs to restore all post-cursor deleted characters. For example, as shown in (c) and (d) in fig. 6-1 and (e) and (f) in fig. 6-2, the user performs the deletion operation twice in total, the first deletion operation deletes "people have", the second deletion operation deletes "no red rice is added at noon", and the cursor is positioned at the end of the content after the second deletion operation. At this time, the user finds that the character deleted by the second deleting operation needs to be restored, namely that red rice can not be added at noon, and the character deleted by the first deleting operation does not need to be restored. The method provided by the embodiment can directly recover the deleted characters after the cursor, does not need to be input again by the user, simplifies the operation, effectively improves the input efficiency of the user, and improves the user experience. In addition, according to the method provided by the embodiment, the user can restore all the deleted characters after the cursor is operated once, the operation is convenient, and particularly under the condition that more characters are deleted after the cursor, the recovery efficiency of the deleted characters can be effectively improved, and the user experience is further improved.
For example, fig. 13 is a schematic view of an interface change corresponding to an example of all retraction operations after executing a cursor according to an embodiment of the present application. Continuing with (g) in fig. 6-2, as shown in (a) in fig. 13, the user sets the withdrawal range selection switch 606 to the post-cursor withdrawal position. The user then clicks the all withdraw option 605, all the characters deleted after the cursor "no red rice will be added at noon" are restored, and "today thursday, i meet, no red rice will be added at noon" is displayed in the input box as shown in (b) in fig. 13. Subsequently, the user clicks an arbitrary position other than the withdrawal deletion tab 603 in the input method interface shown in fig. 13 (b), and exits the withdrawal deletion option interface, as shown in fig. 13 (c).
Corresponding to the interface change process, the operation process in the electronic device is as follows: after the user sets the withdrawal range selection switch to the position of the cursor after withdrawing, and clicks all withdrawal options, the input method APP analyzes the touch event, and determines that the instruction input by the user is the all withdrawal instruction after the cursor. The input method APP sends first information to temporary file management through a data channel, wherein the first information comprises the type of a withdrawal instruction, namely the type of the withdrawal instruction, i.e. the total withdrawal after a cursor, the content currently displayed by an input box, i.e. the type of the withdrawal instruction, i.e. the content currently displayed by the input box, i.e. the type of the withdrawal instruction, i.e. the content currently displayed by the input box, i.e. the type of the withdrawal instruction, i.e. the 10 th character in the content currently displayed by the input box, i.e. the current position of the cursor, i.
And the temporary file management compares the content in the first input method temporary file with the content currently displayed in the input box according to the first information to generate first content. In this embodiment, the first display content includes second target content, where the second target content refers to all deleted characters located after the reference corresponding character in the first input method temporary file.
Exemplarily, fig. 14 is a schematic flowchart of another input processing method provided in the embodiment of the present application. As shown in fig. 14, in this embodiment, the temporary file management may generate the first content according to the following procedure, that is, step S516 includes:
s1401, the temporary file management determines a reference character according to the content currently displayed by the input box in the first information and the current position of the cursor.
This step is the same as step S801 described above, and is not described herein again.
S1402, the temporary file management compares the content displayed by the input box at present with the content in the first input method temporary file, determines that the characters exist in the first input method temporary file but do not exist in the content displayed by the input box at present, obtains deleted characters, and marks the deleted characters.
This step is the same as step S802 described above, and is not described herein again.
And S1403, the temporary file management compares the unmarked characters in the first input method temporary file with the currently displayed content of the input box, determines the characters corresponding to the reference characters in the first input method temporary file, and obtains the reference corresponding characters.
This step is the same as step S803 described above, and is not described again here.
And S1404, the temporary file management determines all deleted characters positioned after the reference corresponding characters in the first input method temporary file according to the reference corresponding characters to obtain second target content.
Referring to table 1, in the present embodiment, the second target content determined by the temporary file management is the 13 th to 19 th characters in the first input method temporary file, i.e., the character "no red rice added at noon".
S1405, the temporary file management determines the first content according to the second target content.
Alternatively, the first content may include only the second target content. In this case, the temporary file management directly determines the second target content as the first content. That is, in the above example, the first content determined by the temporary file management is the 13 th to 19 th characters in the first input method temporary file, i.e., the character "red rice will not be added at noon".
Optionally, the first content may also include all characters required to be displayed after the revocation deletion. That is, the first content includes the content currently displayed by the input box and the second target content. In this case, the temporary file management may copy all characters before referring to the corresponding character in the first input method temporary file, and obtain the first content while keeping the relative positions of the respective characters unchanged during the copying. That is, in the above example, the first content determined by the temporary file management is "today on thursday, i am in a meeting, and no red rice will be added at noon".
Then, steps S517 to S519 are executed, the temporary file management sends the first content to the input method APP through the data channel, and the input method APP displays according to the first content. Optionally, in a case that the first content only includes the second target content, the input method APP displays each character in the second target content according to a relative position of each character in the second target content and the reference character. The relative position of each character in the second target content and the reference character can be determined by the input method APP according to the deletion record of each deletion, and can also be sent to the input method APP through temporary file management. This is not a limitation of the present application.
Optionally, in a case where the first content includes all characters that need to be displayed after the revocation deletion, the input method APP overwrites the content currently displayed in the input box with the first content, thereby displaying the first content in the input box.
In the input processing method provided in this embodiment, when the user inputs the cursor and then withdraws the instruction completely, the reference character is determined according to the content currently displayed in the input box and the current position of the cursor, the content currently displayed in the input box is compared with the content in the first input method temporary file, the deleted character is determined, and the deleted character is marked. Then, the temporary file management compares the unmarked characters in the first input temporary file with the currently displayed content of the input box, and determines the reference corresponding characters. The second target content is determined based on the reference corresponding character, thereby determining the first content based on the second target content. According to the method provided by the embodiment, the first content can be determined only according to the content currently displayed by the input box, the current position of the cursor and the first input method temporary file, the deleted character is synchronously sent to the temporary file management in the character deleting process of the user through the input method APP, the operation burden of the input method APP is reduced, the algorithm executing process is simplified, the operation efficiency is improved, the input method APP response speed is further improved, and the user experience is improved.
E) Deleted characters all-retire
In some scenarios, the user may need to restore all pre-cursor deleted characters as well as all post-cursor deleted characters. For example, as shown in (c) and (d) in fig. 6-1 and (e) and (f) in fig. 6-2, the user performs the deletion operation twice in total, the first deletion operation deletes "people have", the second deletion operation deletes "no red rice is added at noon", and the cursor is positioned at the end of the content after the second deletion operation. At this time, the user needs to restore the characters "people have" deleted by the first deletion operation and also needs to restore the characters "no red rice will be added at noon" deleted by the second deletion operation. The method provided by the embodiment can recover all the deleted characters at the same time, does not need to be input again by the user, simplifies the operation, effectively improves the input efficiency of the user and improves the user experience. In addition, according to the method provided by the embodiment, all the deleted characters can be completely recovered by a user through one operation, the operation is convenient, especially under the condition that the number of the deleted characters is large, the recovery efficiency of the deleted characters can be effectively improved, and the user experience is further improved.
For example, fig. 15 is a schematic diagram of an interface change corresponding to an example of executing all revocation operations of deleted characters according to an embodiment of the present application. Continuing to (g) in fig. 6-2, the user sets the withdrawal range selection switch 606 to the intermediate position as shown in (a) in fig. 15. The user then clicks the all withdraw option 605, all the characters "am" and "yes" deleted before the cursor, and all the characters "no red rice at noon" deleted after the cursor are all restored, and the input box displays "thursday, we have a meeting, no red rice at noon" as shown in (b) of fig. 15. Subsequently, the user clicks an arbitrary position other than the withdrawal deletion tab 603 in the input method interface shown in fig. 15 (b), and exits the withdrawal deletion option interface, as shown in fig. 15 (c).
Corresponding to the interface change process, the operation process in the electronic device is as follows: after the user sets the withdrawal range selection switch to the middle position and clicks all withdrawal options, the input method APP analyzes the touch event and determines that the command input by the user is a command for withdrawing all deleted characters. The input method APP sends first information to temporary file management through a data channel, wherein the first information comprises the type of a withdrawal instruction, namely all deleted characters are withdrawn, the currently displayed content of an input box, namely 'today, thursday, me meeting', the current position of a cursor, and the position of the 10 th character in the currently displayed content of the input box, namely the tail of the currently displayed content of the input box.
And the temporary file management compares the content in the first input method temporary file with the content currently displayed in the input box according to the first information to generate first content. In this embodiment, the first display content includes third target content, where the third target content refers to all deleted characters located before and after the reference corresponding character in the first input method temporary file.
Exemplarily, fig. 16 is a schematic flowchart of another input processing method provided in the embodiment of the present application. As shown in fig. 16, in this embodiment, the temporary file management may generate the first content according to the following procedure, that is, step S516 includes:
s1601, the temporary file management compares the content displayed by the input box at present with the content in the first input method temporary file, and determines that the characters exist in the first input method temporary file but do not exist in the content displayed by the input box at present, so as to obtain deleted characters.
This step is the same as step S802 described above, and is not described herein again.
S1602, the temporary file management determines all deleted characters as third target content.
Referring to table 1, in the present embodiment, the third target contents determined by the temporary document management are the 8 th character "and" there "of the 9 th character, and the 13 th to 19 th characters (i.e., the character" no red rice will be added at noon ") in the first input method temporary document.
S1603, the temporary file management determines the first content based on the third target content.
Alternatively, the first content may include only the third target content. In this case, the temporary file management directly determines the second target content as the first content. That is, in the above example, the first contents determined by the temporary document management are the 8 th character "they", the 9 th character "there", and the 13 th to 19 th characters in the first input method temporary document (i.e., the character "red rice will not be added at noon").
Optionally, the first content may also include all characters required to be displayed after the revocation deletion. That is, the first content includes the content currently displayed by the input box and the third target content. In this case, the temporary file management may copy all characters before referring to the corresponding character in the first input method temporary file, and obtain the first content while keeping the relative positions of the respective characters unchanged during the copying. That is, in the above example, the first content determined by the temporary file management is "today on thursday, we have a meeting, and no red rice will be added at noon".
Then, steps S517 to S519 are executed, the temporary file management sends the first content to the input method APP, and the input method APP displays according to the first content. Optionally, in a case that the first content only includes the third target content, the input method APP displays each character in the third target content according to a relative position of each character in the third target content and the reference character. The relative position of each character in the third target content and the reference character can be determined by the input method APP according to the deletion record of each deletion, and can also be sent to the input method APP by the temporary file management. This is not a limitation of the present application.
Optionally, in a case that the first content includes all characters that need to be displayed after the revocation deletion, the input method APP overwrites the content currently displayed in the input box with the first content, and displays the first content in the input box.
In the input processing method provided in this embodiment, when the user inputs a command to withdraw all the deleted characters, the content currently displayed in the input box is compared with the content in the first input method temporary file, and the deleted characters are determined. Thereafter, the temporary file management determines all the deleted characters as the third target content. The first content is determined based on the third target content. According to the method provided by the embodiment, the first content can be determined only according to the content currently displayed by the input box and the first input method temporary file, the deleted character is synchronously sent to the temporary file management in the process of deleting the character by the user through the input method APP, the operation burden of the input method APP is reduced, the algorithm execution process is simplified, the operation efficiency is improved, the response speed of the input method APP is further improved, and the user experience is improved.
In addition, in practical application, there may be several scenarios:
1. after the first input method temporary file is newly created in step S507, if the user does not perform any input operation, the cancel deletion operation is performed, and the first content obtained after performing step S516 is empty.
That is, the first input method temporary file does not include any character, and the temporary file management determines that the obtained first content is empty.
2. In the case where the user has performed an input operation but has not performed any deletion operation, a revocation deletion operation is performed, and any deleted character is not included in the first input method temporary file.
3. When the user performs an input operation and a deletion operation, a revocation deletion operation is performed, but the deleted character does not match the revocation deletion instruction, and the deleted character satisfying the requirement is not included in the first input method temporary file. For example, only the deleted characters before the cursor exist in the first input method temporary file, and the deleted characters meeting the requirement do not exist if the instruction input by the user is a command for withdrawing by pressing the characters after the cursor or a command for withdrawing all characters after the cursor.
In the above cases, the user can be reminded through the interface that the character is recoverable. In short, the temporary file management may remind the user through the interface that the character is recoverable in case that it is determined that there is no character in the first input method temporary file that conforms to the character that needs to be recovered indicated by the revocation deletion instruction. Specifically, under the condition that the determined first target character, second target character, first target content and second target content are empty or the content of the determined first target character, second target character, first target content and second target content is the same as the content of the input box currently displayed, the temporary file management may send a second message to the input method APP through the data channel, where the second message is used to indicate that no deleted character is recoverable. And the input method APP outputs prompt information after receiving the second message. The prompt message is used for prompting the user that no character which conforms to the delete-withdraw instruction can be recovered currently.
Optionally, the prompt message may include an interface prompt message. The interface prompt information can be displayed on the display interface in a mode of pop-up window, banner, capsule and the like. The interface prompt information may be, for example: "No currently retrievable deleted content! ", as shown at 1701 in fig. 17. The interface prompt message may disappear after displaying a preset duration. Optionally, the prompt message may further include a voice prompt message. The voice guidance information may be a warning sound such as "drip-". The content, the type, the form and the like of the prompt message are not limited at all, and the prompt message can be designed according to actual needs.
In this embodiment, when there is no character that can be restored and conforms to the delete-withdraw instruction, the input method temporarily manages to send a second message to the input method APP through the data channel, so that the input method APP inputs prompt information to prompt a user that no content can be restored currently. Therefore, the prompt can be given to the user in time, the interaction with the user is enhanced, and the user experience is improved.
Optionally, in an embodiment, before the step S509 is executed, and before the input method APP sends the character input each time by the user to the IMS through the data channel, the input processing method further includes:
and obtaining the content storage authority by an input method APP. The content storage authority refers to the acquisition and storage authority of the content input by the user in the input box by the temporary file management.
Optionally, the input method APP may ask the user whether to grant the content storage right through the presentation right inquiry interface. The permission query interface may include permission query information, and the permission query information may be, for example, "the input method needs to temporarily acquire the content input by the input box, and whether to agree", as illustrated at 1801 in fig. 18. And as shown at 1801 in fig. 18, options of "yes" and "no" may be included in the permission query interface. When the user clicks "yes", the content saving authority is obtained, and steps S509 to S511 are executed, otherwise steps S509 to S511 are not executed.
Optionally, the input method APP may obtain the content storage right when the user uses the input method APP for the first time, and the content storage right is not repeatedly obtained after the content storage right is obtained. Optionally, the input method APP may also acquire the content saving permission before performing the operation of clearing the temporary history input method file (i.e., step S509) after the input method interface is successfully pulled up (i.e., the result in step S503 is "IMS determines input method interface display"). The embodiment of the application does not limit the acquisition time, the acquisition mode and the like of the content storage right, and can be selected according to actual requirements.
In the embodiment, the user consent is obtained by obtaining the content storage permission, so that the protection on the user privacy is improved, the interaction with the user is enhanced, and the user experience is further improved.
The above details examples of the input processing method provided by the embodiments of the present application. It will be appreciated that the electronic device, in order to implement the above-described functions, comprises corresponding hardware and/or software modules for performing the respective functions. Those of skill in the art would readily appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as hardware or combinations of hardware and computer software. Whether a function is performed as hardware or computer software drives hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, with the embodiment described in connection with the particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiment of the present application, the electronic device may be divided into the functional modules according to the method example, for example, the functional modules may be divided into the functional modules corresponding to the functions, such as the detection unit, the processing unit, the display unit, and the like, or two or more functions may be integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. It should be noted that, in the embodiment of the present application, the division of the module is schematic, and is only one logic function division, and there may be another division manner in actual implementation.
It should be noted that all relevant contents of each step related to the above method embodiment may be referred to the functional description of the corresponding functional module, and are not described herein again.
The electronic device provided by the embodiment is used for executing the input processing method, so that the same effect as the implementation method can be achieved.
In case of an integrated unit, the electronic device may further comprise a processing module, a storage module and a communication module. The processing module can be used for controlling and managing the action of the electronic equipment. The memory module may be used to support the electronic device in executing stored program codes and data, etc. The communication module can be used for supporting the communication between the electronic equipment and other equipment.
The processing module may be a processor or a controller. Which may implement or perform the various illustrative logical blocks, modules, and circuits described in connection with the disclosure. A processor may also be a combination of computing functions, e.g., a combination of one or more microprocessors, a Digital Signal Processing (DSP) and a microprocessor, or the like. The storage module may be a memory. The communication module may specifically be a radio frequency circuit, a bluetooth chip, a Wi-Fi chip, or other devices that interact with other electronic devices.
In an embodiment, when the processing module is a processor and the storage module is a memory, the electronic device according to this embodiment may be a device having the structure shown in fig. 2.
Referring to fig. 19, an embodiment of the present application further provides an input processing apparatus, including:
a receiving module 1901, configured to receive a cancel deletion instruction input by a user, where the cancel deletion instruction is used to resume displaying deleted characters in an input window in the input window;
an obtaining module 1902, configured to, in response to the delete revocation instruction, obtain a first temporary file and current display content in the input window, where the first temporary file is used to store all characters input in the input window;
a determining module 1903, configured to determine, according to the revocation deletion instruction, the current display content, and the first temporary file, a target character to be restored to display;
a display module 1904, configured to display the target character on the input window if the target character exists.
The receiving module 1901 and the display module 1904 may be related functional modules in the input method APP in the above embodiments. The obtaining module 1902 and the determining module 1903 may be related functional modules in the temporary file management in the above embodiments.
In an embodiment, the receiving module 1901 is specifically configured to: receiving a withdrawal deletion instruction input by a user when the user operates a withdrawal deletion selection control in an input method interface, wherein the withdrawal deletion selection control is used for selecting the type of the withdrawal deletion instruction, and the type of the withdrawal deletion instruction comprises the following steps: at least one of a pre-cursor word-press withdrawal instruction, a post-cursor word-press withdrawal instruction, a pre-cursor total withdrawal instruction, a post-cursor total withdrawal instruction, and a deleted character total withdrawal instruction.
In one embodiment, the display module 1904 is further configured to: receiving an option display instruction input by a user through an input method interface, wherein the option display instruction is used for indicating a deletion withdrawal instruction control to be displayed in the input method interface; and responding to the option display instruction, and displaying a deletion withdrawal selection control in the input method interface.
In one embodiment, the type of the withdrawal deletion instruction is one of a pre-cursor word-pressing withdrawal instruction, a post-cursor word-pressing withdrawal instruction, a pre-cursor all-withdrawal instruction, a post-cursor all-withdrawal instruction or a deleted character all-withdrawal instruction; the word-pressing-before-cursor withdrawal instruction is used for indicating to recover a character deleted before the cursor, the character deleted before the cursor refers to the character deleted before the reference character before the deleted character, and the reference character refers to the character which is positioned before the cursor in the input window and is closest to the cursor in the current display content; the word-pressing withdrawal instruction after the cursor is used for indicating to restore a deleted character after the cursor, wherein the deleted character after the cursor refers to a deleted character which is positioned after the reference character before being deleted; all withdrawal instructions before the cursor are used for indicating that all characters deleted before the cursor are restored; all withdrawal instructions behind the cursor are used for indicating that all characters are deleted after the cursor is restored; the deleted characters all delete instruction is used to instruct all deleted characters to be restored.
In an embodiment, the determining module 1903 is specifically configured to: comparing the characters in the current display content with the characters in the first temporary file, and determining deleted characters in the first temporary file; and determining a target character in the first temporary file according to the type of the deletion withdrawing instruction and the deleted character.
In one embodiment, the type of the withdraw delete instruction is one of a pre-cursor word-press withdraw instruction, a post-cursor word-press withdraw instruction, a pre-cursor total withdraw instruction, or a post-cursor total withdraw instruction, and the determining module 1903 is specifically configured to: acquiring the current position of a cursor; determining a reference character according to the current display content and the current position of the cursor; determining a reference corresponding character corresponding to the reference character in the first temporary file according to the current display content and the first temporary file; and determining a target character in the first temporary file according to the type of the deletion withdrawing instruction, the reference corresponding character and the deleted character.
In an embodiment, the type of the withdraw delete instruction is a pre-cursor word-press withdraw instruction, and the determining module 1903 is specifically configured to: and determining a deleted character in the first temporary file before the reference corresponding character as a target character.
In one embodiment, the pre-cursor word-pressing withdraw instruction is specifically configured to indicate that a pre-cursor deleted character farthest from the reference character is recovered, and the determining module 1903 is specifically configured to: and determining the deleted character which is positioned in the first temporary file before the reference corresponding character and is farthest from the reference corresponding character as the target character.
In one embodiment, the pre-cursor word-press withdrawal instruction is specifically configured to indicate that a pre-cursor deleted character closest to the reference character is to be restored, and the determining module 1903 is specifically configured to: and determining the deleted character which is positioned in the first temporary file before the reference corresponding character and is closest to the reference corresponding character as the target character.
In an embodiment, the type of the withdraw delete instruction is a word-by-word withdraw instruction after a cursor, and the determining module 1903 is specifically configured to: and determining a deleted character in the first temporary file after the reference corresponding character as a target character.
In an embodiment, the post-cursor word-press withdrawal instruction is specifically configured to indicate that a post-cursor deleted character closest to the reference character is recovered, and the determining module 1903 is specifically configured to: and determining the deleted character which is positioned behind the reference corresponding character and is closest to the reference corresponding character in the first temporary file as a target character.
In an embodiment, the word withdraw after cursor instruction is specifically configured to indicate to recover a word deleted after cursor farthest from the reference character, and the determining module 1903 is specifically configured to: and determining the deleted character which is positioned behind the reference corresponding character and farthest from the reference corresponding character in the first temporary file as a target character.
In an embodiment, the types of the recall deletion instruction are all recall instructions before a cursor, and the determining module 1903 is specifically configured to: all deleted characters in the first temporary file that are located before the reference corresponding character are determined as target characters.
In an embodiment, the types of the withdraw deletion instruction are all withdraw instructions after a cursor, and the determining module 1903 is specifically configured to: all deleted characters in the first temporary file that are located after the reference corresponding character are determined as target characters.
In an embodiment, the type of the revocation deletion instruction is a revocation instruction with all deleted characters, and the determining module 1903 is specifically configured to: and determining all deleted characters in the first temporary file as target characters.
In an embodiment, the determining module 1903 is specifically configured to: and comparing the characters in the current display content with the characters in the first temporary file, and determining the characters which exist in the first temporary file and do not exist in the current display content as deleted characters.
In one embodiment, the display module 1904 is specifically configured to: generating target display content according to the target characters and the current display content; and overlaying and displaying the target display content in the input window.
In one embodiment, the display module 1904 is specifically configured to: and displaying the target character in the input window according to the relative position relation between the target character and the reference character before the target character is deleted, wherein the reference character refers to the character which is positioned in front of the cursor in the input window and is closest to the cursor in the current display content.
In an embodiment, the input processing apparatus further includes an establishing module 1905, configured to, in a case that the input method interface pull-up operation is successfully performed, establish a first temporary file, where the input method interface pull-up operation is used to pull up an interface of an input method in an interface where an input window is located; and writing historical characters and characters input in an input window by a user through an input method into a first temporary file, wherein the historical characters refer to characters displayed in the input window before the interface is pulled up.
The building module 1905 may be a related functional module in the temporary file management in the above embodiment.
In one embodiment, the input processing apparatus further includes a deletion module 1906 for determining whether a history temporary file exists, the history temporary file being a file created before the current time for storing characters input in the input window; and if the history temporary file exists, deleting the history temporary file.
The deleting module 1906 may be a related functional module in the temporary file management in the above embodiment.
In one embodiment, the delete module 1906 is further configured to: deleting the first temporary file under the condition that the input method interface retraction operation is successfully executed and/or the preset operation of the user is received; and the input method interface folding operation is used for folding the interface of the input method, and the preset operation comprises at least one of sending operation of the content in the input window, searching operation based on the content in the input window and closing operation of the input window.
In one embodiment, the display module 1904 is further configured to: and if the target character does not exist, displaying prompt information, wherein the prompt information is used for prompting that the user can recover the character which does not accord with the deletion withdrawal instruction currently.
The input processing apparatus provided in this embodiment can execute the corresponding method provided above, and therefore, the beneficial effects that can be achieved by the input processing apparatus refer to the beneficial effects in the corresponding method provided above, and are not described herein again.
The embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed by a processor, the processor is enabled to execute the input processing method of any one of the above embodiments.
The embodiment of the present application further provides a computer program product, which when running on a computer, causes the computer to execute the above related steps to implement the input processing method in the above embodiment.
In addition, embodiments of the present application also provide an apparatus, which may be specifically a chip, a component or a module, and may include a processor and a memory connected to each other; the memory is used for storing computer execution instructions, and when the device runs, the processor can execute the computer execution instructions stored in the memory, so that the chip can execute the input processing method in the above-mentioned method embodiments.
The electronic device, the computer-readable storage medium, the computer program product, or the chip provided in this embodiment are all configured to execute the corresponding method provided above, so that the beneficial effects achieved by the electronic device, the computer-readable storage medium, the computer program product, or the chip may refer to the beneficial effects in the corresponding method provided above, and are not described herein again.
Through the description of the above embodiments, those skilled in the art will understand that, for convenience and simplicity of description, only the division of the above functional modules is used as an example, and in practical applications, the above function distribution may be completed by different functional modules as needed, that is, the internal structure of the device may be divided into different functional modules to complete all or part of the above described functions.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, a module or a unit may be divided into only one logic function, and may be implemented in other ways, for example, a plurality of units or components may be combined or integrated into another apparatus, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
Units described as separate parts may or may not be physically separate, and parts displayed as units may be one physical unit or a plurality of physical units, may be located in one place, or may be distributed to a plurality of different places. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application may be essentially or partially contributed to by the prior art, or all or part of the technical solutions may be embodied in the form of a software product, where the software product is stored in a storage medium and includes several instructions to enable a device (which may be a single chip, a chip, or the like) or a processor (processor) to execute all or part of the steps of the methods of the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (25)

1. An input processing method, characterized in that the method comprises:
receiving a revocation deletion instruction input by a user, wherein the revocation deletion instruction is used for restoring the display of the deleted characters in the input window;
responding to the deletion withdrawing instruction, acquiring a first temporary file and current display content in the input window, wherein the first temporary file is used for storing all characters input in the input window;
determining a target character to be restored to display according to the deletion withdrawing instruction, the current display content and the first temporary file;
and if the target character exists, displaying the target character in the input window.
2. The method of claim 1, wherein receiving a revocation deletion instruction input by a user comprises:
receiving a withdrawal deletion instruction input by a user when the user operates a withdrawal deletion selection control in an input method interface, wherein the withdrawal deletion selection control is used for selecting the type of the withdrawal deletion instruction, and the type of the withdrawal deletion instruction comprises the following steps: at least one of a pre-cursor word-press withdrawal instruction, a post-cursor word-press withdrawal instruction, a pre-cursor total withdrawal instruction, a post-cursor total withdrawal instruction, and a deleted character total withdrawal instruction.
3. The method of claim 2, wherein prior to receiving the revocation deletion instruction input by a user operating a revocation deletion selection control in an input method interface, the method further comprises:
receiving an option display instruction input by a user through the input method interface, wherein the option display instruction is used for indicating that the deletion withdrawal instruction control is displayed in the input method interface;
and responding to the option display instruction, and displaying the deletion withdrawing selection control in the input method interface.
4. The method according to claim 1, wherein the type of the withdrawal deletion instruction is one of a pre-cursor word-pressing withdrawal instruction, a post-cursor word-pressing withdrawal instruction, a pre-cursor total withdrawal instruction, a post-cursor total withdrawal instruction, or a deleted character total withdrawal instruction;
the pre-cursor word-pressing withdrawal instruction is used for indicating to recover a pre-cursor deleted character, wherein the pre-cursor deleted character refers to a deleted character before a reference character before being deleted, and the reference character refers to a character before and closest to a cursor in the input window in the current display content;
the post-cursor word-press withdrawal instruction is used for indicating to restore a post-cursor deleted character, which is a deleted character located after the reference character before deletion;
the all-before-cursor withdrawal instruction is used for indicating to recover all the characters deleted before the cursor;
all withdrawing instructions behind the cursor are used for indicating that all characters deleted after the cursor is restored;
and the deleted character all deletion instruction is used for indicating to restore all the deleted characters.
5. The method of claim 4, wherein determining the target character to be restored to display according to the revocation deletion instruction, the current display content and the first temporary file comprises:
comparing the characters in the current display content with the characters in the first temporary file, and determining the deleted characters in the first temporary file;
and determining the target character in the first temporary file according to the type of the withdrawing deletion instruction and the deleted character.
6. The method according to claim 5, wherein the type of the recall deletion instruction is one of a pre-cursor word recall instruction, a post-cursor word recall instruction, a pre-cursor total recall instruction, or a post-cursor total recall instruction, and the determining the target character in the first temporary file according to the type of the recall deletion instruction and the deleted character comprises:
acquiring the current position of the cursor;
determining the reference character according to the current display content and the current position of the cursor;
determining a reference corresponding character corresponding to the reference character in the first temporary file according to the current display content and the first temporary file;
and determining the target character in the first temporary file according to the type of the deletion withdrawing instruction, the reference corresponding character and the deleted character.
7. The method according to claim 6, wherein the type of the recall deletion instruction is the pre-cursor word recall instruction, and the determining the target character in the first temporary file according to the type of the recall deletion instruction, the reference corresponding character and the deleted character comprises:
and determining a deleted character which is positioned before the reference corresponding character in the first temporary file as the target character.
8. The method according to claim 7, wherein the pre-cursor word withdraw instruction is specifically configured to instruct to recover a pre-cursor deleted character farthest from the reference character, and the determining a deleted character in the first temporary file that precedes the reference corresponding character as the target character includes:
and determining the deleted character which is positioned in the first temporary file before the reference corresponding character and is farthest from the reference corresponding character as the target character.
9. The method according to claim 7, wherein the pre-cursor word withdraw instruction is specifically configured to indicate to recover one of the pre-cursor deleted characters that is closest to the reference character, and the determining a deleted character in the first temporary file that is located before the reference corresponding character as the target character comprises:
and determining the deleted character which is positioned in the first temporary file before the reference corresponding character and is closest to the reference corresponding character as the target character.
10. The method according to claim 6, wherein the type of the recall deletion instruction is a word-by-word recall instruction after the cursor, and the determining the target character in the first temporary file according to the type of the recall deletion instruction, the reference corresponding character and the deleted character comprises:
and determining a deleted character in the first temporary file after the reference corresponding character as the target character.
11. The method according to claim 10, wherein the post-cursor word withdraw instruction is specifically configured to indicate to recover a post-cursor deleted character that is closest to the reference character, and the determining a deleted character in the first temporary file that is located after the reference corresponding character as the target character includes:
and determining the deleted character which is positioned behind the reference corresponding character and is closest to the reference corresponding character in the first temporary file as the target character.
12. The method according to claim 10, wherein the post-cursor word withdraw instruction is specifically configured to indicate to recover a post-cursor deleted character that is farthest from the reference character, and the determining a deleted character in the first temporary file that is located after the reference corresponding character as the target character includes:
and determining the deleted character which is positioned behind the reference corresponding character and farthest from the reference corresponding character in the first temporary file as the target character.
13. The method according to claim 6, wherein the type of the recall deletion instruction is all recall instructions before the cursor, and the determining the target character in the first temporary file according to the type of the recall deletion instruction, the reference corresponding character and the deleted character comprises:
and determining all deleted characters which are positioned before the reference corresponding character in the first temporary file as the target character.
14. The method according to claim 6, wherein the type of the recall deletion instruction is all recall instructions after the cursor, and the determining the target character in the first temporary file according to the type of the recall deletion instruction, the reference corresponding character and the deleted character comprises:
and determining all deleted characters positioned after the reference corresponding character in the first temporary file as the target character.
15. The method according to claim 5, wherein the type of the revocation deletion instruction is a revocation instruction of all the deleted characters, and the determining the target character in the first temporary file according to the type of the revocation deletion instruction and the deleted characters comprises:
determining all the deleted characters in the first temporary file as the target characters.
16. The method of claim 5, wherein comparing the characters in the currently displayed content to the characters in the first temporary file, and determining the deleted characters in the first temporary file comprises:
comparing the characters in the current display content with the characters in the first temporary file, and determining the characters which exist in the first temporary file and do not exist in the current display content as the deleted characters.
17. The method of claim 1, wherein the displaying the target character in the input window comprises:
generating target display content according to the target characters and the current display content;
and overlaying and displaying the target display content in the input window.
18. The method of claim 1, wherein the displaying the target character in the input window comprises:
and displaying the target character in the input window according to the relative position relation between the target character and a reference character before the target character is deleted, wherein the reference character refers to a character which is positioned in front of a cursor in the input window and is closest to the cursor in the current display content.
19. The method of any one of claims 1 to 18, wherein prior to receiving a user-entered undo delete command, the method further comprises:
under the condition that the input method interface pulling operation is successfully executed, establishing the first temporary file, wherein the input method interface pulling operation is used for pulling up an interface of an input method in an interface where the input window is located;
and writing historical characters and characters input in the input window by the user through the input method into the first temporary file, wherein the historical characters refer to characters displayed in the input window before the interface pull-up operation is executed.
20. The method of claim 19, wherein prior to said creating the first temporary file, the method further comprises:
determining whether a history temporary file exists, wherein the history temporary file is a file which is established before the current moment and is used for storing characters input in the input window;
and if the history temporary file exists, deleting the history temporary file.
21. The method of claim 19, further comprising:
deleting the first temporary file under the condition that the input method interface retraction operation is successfully executed and/or the preset operation of a user is received; the input method interface retracting operation is used for retracting the interface of the input method, and the preset operation comprises at least one of sending operation of the content in the input window, searching operation based on the content in the input window and closing operation of the input window.
22. The method of claim 1, further comprising:
and if the target character does not exist, displaying prompt information, wherein the prompt information is used for prompting that the user can recover the character which does not accord with the deletion withdrawing instruction currently.
23. An electronic device, comprising: a processor, a memory, and an interface;
the processor, memory and interface cooperate to cause the electronic device to perform the method of any of claims 1-22.
24. A computer-readable storage medium, in which a computer program is stored which, when executed by a processor, causes the processor to carry out the method of any one of claims 1 to 22.
25. A computer program product, the computer program product comprising: computer program code which, when run on an electronic device, causes the electronic device to perform the method of any of claims 1 to 22.
CN202210091736.9A 2022-01-26 2022-01-26 Input processing method, electronic device, and computer-readable storage medium Active CN114116113B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210091736.9A CN114116113B (en) 2022-01-26 2022-01-26 Input processing method, electronic device, and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210091736.9A CN114116113B (en) 2022-01-26 2022-01-26 Input processing method, electronic device, and computer-readable storage medium

Publications (2)

Publication Number Publication Date
CN114116113A true CN114116113A (en) 2022-03-01
CN114116113B CN114116113B (en) 2022-07-26

Family

ID=80361546

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210091736.9A Active CN114116113B (en) 2022-01-26 2022-01-26 Input processing method, electronic device, and computer-readable storage medium

Country Status (1)

Country Link
CN (1) CN114116113B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102929485A (en) * 2012-10-30 2013-02-13 广东欧珀移动通信有限公司 Character input method and device
CN103558985A (en) * 2013-11-14 2014-02-05 华为技术有限公司 Character recovery method and terminal equipment
US20150370477A1 (en) * 2013-02-07 2015-12-24 Lg Electronics Inc. Terminal and method for operating same
US20160062839A1 (en) * 2014-08-29 2016-03-03 Dropbox, Inc. Undo changes on a client device
CN107515681A (en) * 2017-08-24 2017-12-26 维沃移动通信有限公司 A kind of character input method, mobile terminal and computer-readable recording medium
CN111949194A (en) * 2020-08-11 2020-11-17 深圳传音控股股份有限公司 Character input method, terminal device and computer readable storage medium
CN112667141A (en) * 2020-12-28 2021-04-16 平安普惠企业管理有限公司 Input revocation method, device, electronic equipment and computer-readable storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102929485A (en) * 2012-10-30 2013-02-13 广东欧珀移动通信有限公司 Character input method and device
US20150370477A1 (en) * 2013-02-07 2015-12-24 Lg Electronics Inc. Terminal and method for operating same
CN103558985A (en) * 2013-11-14 2014-02-05 华为技术有限公司 Character recovery method and terminal equipment
US20160062839A1 (en) * 2014-08-29 2016-03-03 Dropbox, Inc. Undo changes on a client device
CN107515681A (en) * 2017-08-24 2017-12-26 维沃移动通信有限公司 A kind of character input method, mobile terminal and computer-readable recording medium
CN111949194A (en) * 2020-08-11 2020-11-17 深圳传音控股股份有限公司 Character input method, terminal device and computer readable storage medium
CN112667141A (en) * 2020-12-28 2021-04-16 平安普惠企业管理有限公司 Input revocation method, device, electronic equipment and computer-readable storage medium

Also Published As

Publication number Publication date
CN114116113B (en) 2022-07-26

Similar Documents

Publication Publication Date Title
US20220342850A1 (en) Data transmission method and related device
CN113805747B (en) Information reminding method, electronic equipment and computer readable storage medium
WO2021104030A1 (en) Split-screen display method and electronic device
US10299110B2 (en) Information transmission method and system, device, and computer readable recording medium thereof
KR102039553B1 (en) Method and apparatus for providing intelligent service using inputted character in a user device
TW201606631A (en) Context menu utilizing a context indicator and floating menu bar
TW201539297A (en) Scalable user interface display
WO2022033342A1 (en) Data transmission method and device
US10565301B2 (en) Stateful editing of rich content using a basic text box
WO2022057852A1 (en) Method for interaction between multiple applications
EP3044698A2 (en) Creating inforgraphics from text data in electronic documents
CN104104766A (en) Terminal apparatus, server and method of controlling the same
WO2023142763A1 (en) Inter-application information sharing method and terminal
CN115700461A (en) Cross-device handwriting input method and system in screen projection scene and electronic device
CN114885328A (en) Vehicle machine connecting method and device
CN114116113B (en) Input processing method, electronic device, and computer-readable storage medium
CN117933197A (en) Method for recording content, method for presenting recorded content, and electronic device
CN114465975A (en) Content pushing method and device, storage medium and chip system
CN114513760B (en) Font library synchronization method, device and storage medium
CN112230906B (en) Method, device and equipment for creating list control and readable storage medium
WO2023125832A1 (en) Image sharing method and electronic device
EP4293489A1 (en) Call service guidance method, electronic device, and storage medium
EP3635527B1 (en) Magnified input panels
CN116682465A (en) Method for recording content and electronic equipment
CN118426660A (en) Annotation display method and electronic equipment

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