[go: up one dir, main page]

CN112905023B - Input error correction method, device and device for input error correction - Google Patents

Input error correction method, device and device for input error correction Download PDF

Info

Publication number
CN112905023B
CN112905023B CN201911222518.9A CN201911222518A CN112905023B CN 112905023 B CN112905023 B CN 112905023B CN 201911222518 A CN201911222518 A CN 201911222518A CN 112905023 B CN112905023 B CN 112905023B
Authority
CN
China
Prior art keywords
input
string
error correction
user
pairing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911222518.9A
Other languages
Chinese (zh)
Other versions
CN112905023A (en
Inventor
刘世军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Sogou Technology Development Co Ltd
Original Assignee
Beijing Sogou Technology Development Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Sogou Technology Development Co Ltd filed Critical Beijing Sogou Technology Development Co Ltd
Priority to CN201911222518.9A priority Critical patent/CN112905023B/en
Publication of CN112905023A publication Critical patent/CN112905023A/en
Application granted granted Critical
Publication of CN112905023B publication Critical patent/CN112905023B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/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

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Input From Keyboards Or The Like (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

本申请实施例公开了一种输入纠错方法、装置和用于输入纠错的装置。该方法的实施例包括:检测用户对输入串的纠错操作,得到与输入串对应的纠错串;若纠错操作满足预设条件,则建立输入串与纠错串的配对,并存储配对;在检测到用户再次输入该输入串时,基于配对,将用户再次输入的输入串替换为纠错串。该实施方式提高了输入效率。

The embodiment of the present application discloses an input error correction method, device and device for input error correction. The embodiment of the method includes: detecting the error correction operation of the user on the input string, obtaining the error correction string corresponding to the input string; if the error correction operation meets the preset conditions, establishing a pairing of the input string and the error correction string, and storing the pairing; when it is detected that the user inputs the input string again, based on the pairing, replacing the input string inputted by the user again with the error correction string. This implementation improves input efficiency.

Description

Input error correction method and device for input error correction
Technical Field
The embodiment of the application relates to the technical field of computers, in particular to an input error correction method and device and a device for input error correction.
Background
With the development of computer technology, the functions of input method application are becoming more and more abundant. The input method application can correct the error content input by the user, so as to obtain correct candidates and provide the candidates for the user, thereby improving the input efficiency.
However, when the input scenes are different, the user generally has different input habits. The error correction function applied by the existing input method can only be suitable for common input errors and cannot meet the personalized requirements of users. For example, when a user composes related content about "static variables" in the computer field in word, more words such as "static", "variable" and the like need to be displayed. When the user wants to screen the word "static", the user inputs the word "jingtia" by mistake, and the existing input method application can only display that the user has the input intention of "jingtian" by inference, so that the word "frightening day" is displayed and the word is waited for. At this time, the user is required to backspace delete part of the character string and re-input, and modify "jingtia" to "jingtai" to display the candidate word "static". When the user inputs the input string with the same error next time, manual correction needs to be repeated, resulting in lower input efficiency.
Disclosure of Invention
The embodiment of the application provides an input error correction method, an input error correction device and an input error correction device, which are used for solving the technical problem of low input efficiency in the prior art.
In a first aspect, an embodiment of the present application provides an input error correction method, where the method includes detecting an error correction operation performed on an input string by a user to obtain an error correction string corresponding to the input string, if the error correction operation meets a preset condition, establishing a pairing between the input string and the error correction string, and storing the pairing, and when detecting that the input string is input again by the user, replacing the input string input again by the error correction string based on the pairing.
In a second aspect, an embodiment of the present application provides an input error correction apparatus, including a detection unit configured to detect an error correction operation of an input string by a user, to obtain an error correction string corresponding to the input string, a storage unit configured to establish a pairing of the input string and the error correction string if the error correction operation satisfies a preset condition, and store the pairing, and a replacement unit configured to replace the input string input again by the user with the error correction string based on the pairing when detecting that the input string is input again by the user.
In a third aspect, an embodiment of the present application provides an apparatus for inputting error correction, including a memory, and one or more programs, where the one or more programs are stored in the memory, and configured to be executed by one or more processors, the one or more programs include instructions for detecting an error correction operation of an input string by a user, obtaining an error correction string corresponding to the input string, establishing a pairing of the input string and the error correction string if the error correction operation satisfies a preset condition, and storing the pairing, and when detecting that the input string is input again by the user, replacing the input string input again by the error correction string based on the pairing.
In a fourth aspect, embodiments of the present application provide a computer readable medium having stored thereon a computer program which, when executed by a processor, implements a method as described in the first aspect above.
The input error correction method, the input error correction device and the input error correction device provided by the embodiment of the application are used for obtaining the error correction string corresponding to the input string by detecting the error correction operation of the user on the input string, establishing the pairing between the input string and the error correction string if the error correction operation meets the preset condition, storing the pairing, and replacing the input string input by the user again by the error correction string based on the pairing when the input string input by the user is detected again. Therefore, when the error correction cannot be automatically performed or the input error is not automatically detected to cause the manual error correction by the user, the pairing of the input string manually corrected by the user and the error correction string can be stored, so that when the input string is input next time, the error input string can be automatically replaced by the error correction string according to the pairing, the user does not need to repeatedly and manually correct the input string, and the input efficiency is improved.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the detailed description of non-limiting embodiments, made with reference to the accompanying drawings in which:
FIG. 1 is a flow chart of one embodiment of an input error correction method according to the present application;
FIG. 2 is a flow chart of yet another embodiment of an input error correction method in accordance with the present application;
FIG. 3 is a schematic diagram of an embodiment of an input error correction device in accordance with the present application;
FIG. 4 is a schematic diagram of an apparatus for input error correction in accordance with the present application;
fig. 5 is a schematic diagram of a server in some embodiments according to the application.
Detailed Description
The application is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the application and are not limiting of the application. It should be noted that, for convenience of description, only the portions related to the present application are shown in the drawings.
It should be noted that, without conflict, the embodiments of the present application and features of the embodiments may be combined with each other. The application will be described in detail below with reference to the drawings in connection with embodiments.
Referring to FIG. 1, a flow 100 of one embodiment of an input error correction method according to the present application is shown. The input error correction method may be implemented in a variety of electronic devices including, but not limited to, servers, smartphones, tablet computers, electronic book readers, MP3 (moving picture experts compression standard audio layer 3,Moving Picture Experts Group Audio Layer III) players, MP4 (moving picture experts compression standard audio layer 4,Moving Picture Experts Group Audio Layer IV) players, laptop portable computers, car computers, desktop computers, set top boxes, smart televisions, wearable devices, and the like.
The electronic device can be provided with an input method application. The input method application mentioned in the embodiment of the application can support a plurality of input methods. The input method may be an encoding method employed for inputting various symbols into electronic devices such as computers, mobile phones, etc., and a user may conveniently input a desired character or character string into the electronic device using an input method application. It should be noted that, in the embodiment of the present application, the input method may support other language input methods (such as japanese hiragana input method, korean input method, etc.) in addition to the common chinese input method (such as pinyin input method, wubi input method, zhuyin input method, voice input method, handwriting input method, etc.), and the input method and the language type of the input method are not limited.
The input error correction method in this embodiment may include the following steps:
step 101, detecting error correction operation of a user on an input string to obtain an error correction string corresponding to the input string.
In this embodiment, after receiving an input string input by a user, an execution body of the input error correction method (e.g., the electronic device) may detect an error correction operation performed on the input string by the user, thereby obtaining an error correction string corresponding to the input string. The input string may be various character strings input by a user using an input method, such as pinyin character strings. The error correction operation may be a modification operation to the input string, such as may include a backspace deletion operation, an input operation, and the like. The new input string obtained after the user performs the error correction operation is the error correction string.
As an example, when a user wants to screen a word of "static" and misplaces the word of "jingtia", the existing input method application can generally infer that the user has an input intention of "jingtian", so that a word of "surprise day" waiting for a selection is displayed, and the "static" cannot be used as a candidate word. At this point, the user may backspace delete the partial string "ia" and reenter "ai" to modify "jingtia" to "jingtai" to render and bring on screen the candidate word "static". Thus, it can be considered that the user performs an error correction operation of correcting the input string "jingtia" to "jingtai", thereby setting a new input string after the error correction operation as an error correction string corresponding to the original input string.
In some alternative implementations of the present embodiment, the execution body may detect the error correction operation of the input string by the user by first acquiring the input string in the input process. And then, when detecting that the user performs at least one of deleting a character, re-inputting a character after deleting a character, inserting a character into the input string, and exchanging a character sequence in the input string, determining that the user performs an error correction operation on the input string.
Step 102, if the error correction operation meets the preset condition, the pairing of the input string and the error correction string is established and stored.
In this embodiment, the execution body may determine whether the error correction operation satisfies a preset condition. If the preset condition is met, a pairing of the input string and the error correction string can be established and stored. Wherein, the preset condition may be a condition for triggering pairing operation. The preset conditions may be preset as needed. For example, it may be set that the number of times the user performs the error correction operation on the input string reaches a preset threshold (e.g., 2 times, 3 times, etc.).
In practice, pairing of the input string with the error correction string may be established by a key-value peer-to-peer form. For example, the input string is "jingtia", the error correction string is "jingtai", and the key is "jingtia", the value is "jingtai", and a pairing in the form of a key-value pair is established and stored.
It should be noted that pairing of the input string with the error correction string may be established in other forms. For example, the pairing of "jingtia" with "jingtai" can be characterized by the string "jingtia- > jingtai". The embodiment of the application does not limit the representation mode of pairing.
In some optional implementations of this embodiment, after detecting an error correction operation performed on an input string by a user and obtaining an error correction string corresponding to the input string, the execution body may store the pairing according to the following steps:
The first step is to obtain the execution times of the error correction operation of the input string by the user in the current input scene.
Here, the current input scenario may be an application currently used, such as an instant messaging tool, a text editing tool (e.g., word), and the like.
As an example, if the user is currently writing related content about "static variables" in the computer domain in a word, the current input environment is the word document that the user is editing. In the current input environment, the execution subject may acquire the number of times of execution of the error correction operation (i.e., the operation of correcting the input string "jingtia" to "jingtai") of the input string "jingtia" by the user in the current input scene (i.e., the word document currently being edited) after detecting the error correction operation of the input string "jingtia" to "jingtai".
And secondly, if the execution times are equal to a preset threshold (such as 2 times), establishing a pairing (such as jingtia- > jingtai ") of the input string and the error correction string, and storing the pairing in a local cache (cache).
Here, since the buffer memory can increase the data access speed, the pairing of the input string and the error correction string is stored in the buffer memory, so that the search speed can be increased when searching for the pairing, thereby increasing the input efficiency.
In the above implementation manner, optionally, if the execution number (i.e., the execution number) is smaller than the preset threshold, the execution body may update the execution number (i.e., the execution number is increased by 1), and continue to detect the error correction operation of the user on the input string, until the execution number reaches the preset threshold, establish a pairing between the input string and the error correction string, and store the pairing.
In the above implementation, optionally, after storing the pairing in a local cache, the execution body may further delete the pairing from the cache after detecting that the user exits the current input scenario (e.g., the user closes a word document currently being edited). Thereby, the error correction string in the pairing can be prevented from affecting the content input in other input scenes.
Step 103, when detecting that the user inputs the input string again, replacing the input string input again by the user with an error correction string based on the pairing.
In this embodiment, when it is detected that the user inputs the input string again, the execution body may replace the input string input again by the user with the error correction string based on the pairing. Specifically, the input string may be used as a keyword to find a stored pairing including the keyword. Then, the error correction string in the pair is extracted, thereby replacing the input string input again with the error correction string.
In some alternative implementations of the present embodiment, the step of searching for the pairing from the cache may be performed first upon detecting that the user again enters the input string (e.g., "jingtia") in the current input scenario (e.g., the word document currently being edited). If the pairing is found, the input string input by the user again is replaced by the error correction string in the pairing. Therefore, when the stored input string in the pairing is input again in the current scene, the input string can be automatically replaced by the error correction string, repeated manual error correction by a user is not needed, and the input efficiency is improved.
It should be noted that, if the found pairing includes at least two pairs, the execution body may first acquire the context information of the input string input by the user again. The context information may include, among other things, a word (e.g., a previous word) before and/or a word (e.g., a next word) after the input focus (e.g., a cursor position in a word document) in the current input scene. As an example, the user enters text in a word document that includes the word "variable," which is context information pertaining to the input string, when the user moves the input focus in front of the word "variable," and enters "jingtia" in the input method application.
Then, based on the context information, a target pair of the pairs may be determined so that the input string input again by the user is replaced with an error correction string of the target pair. In practice, the pairing associated with the context information may be selected as the target pairing. The degree of association of the context information with the pairing can be determined by the word frequency of the phrase formed by the context information and the error correction string in the pairing. The higher the word frequency, the higher the degree of association.
As an example, if the input string is "jingtia" with two pairs, the error correction strings in these two pairs are "jingtai" and "jingtou", respectively. If the context information includes "variable", it is known by word frequency analysis that the word frequency of the phrase formed by the words "static" and "variable" is highest for "jigntai", and at this time, the pairing including the input string "jingtai" may be regarded as the target pairing, so that the input string input again by the user may be replaced with the error correction string "jingtai" in the target pairing.
The method provided by the embodiment of the application comprises the steps of obtaining an error correction string corresponding to an input string by detecting error correction operation of a user on the input string, establishing pairing between the input string and the error correction string if the error correction operation meets preset conditions, storing the pairing, and replacing the input string input by the user again by the error correction string based on the pairing when the input string is detected to be input by the user again. Therefore, when the error correction cannot be automatically performed or the input error is not automatically detected to cause the manual error correction by the user, the pairing of the input string manually corrected by the user and the error correction string can be stored, so that when the input string is input next time, the error input string can be automatically replaced by the error correction string according to the pairing, the user does not need to repeatedly and manually correct the input string, and the input efficiency is improved.
With further reference to fig. 2, a flow 200 of yet another embodiment of an input error correction method is shown. The process 200 of the input error correction method includes the steps of:
Step 201, detecting error correction operation of a user on an input string, and obtaining an error correction string corresponding to the input string.
Step 201 in this embodiment can be referred to step 101 in the embodiment of fig. 1, and will not be described here again.
Step 202, presenting candidates corresponding to the error correction string.
In this embodiment, after the error correction string is obtained, candidates corresponding to the error correction string may be presented. For example, the input string is "jingtia", and the candidate "static", "cloisonne", "jingtai" or the like of "jingtai" can be obtained by correcting the input string to "jingtai".
Step 203, detecting a triggering operation of the user on the presented candidate, and taking the candidate indicated by the triggering operation as a target candidate.
In this embodiment, the execution body may detect a triggering operation (such as a clicking operation) of the presented candidate by the user, and take the candidate indicated by the triggering operation as the target candidate. Continuing with the above example, if the user clicks "static," the "static" may be considered as the target candidate.
Step 204, obtaining the execution times of the error correction operation of the input string by the user in the current input scene.
In this embodiment, the execution body may acquire the number of times of execution of the error correction operation of the input string by the user in the current input scene. Here, the current input scenario may be an application currently used, such as an instant messaging tool, a text editing tool (e.g., word), and the like.
As an example, if the user is currently writing related content about "static variables" in the computer domain in a word, the current input environment is the word document that the user is editing. In the current input environment, the execution subject may acquire the number of times of execution of the error correction operation (i.e., the operation of correcting the input string "jingtia" to "jingtai") of the input string "jingtia" by the user in the current input scene (i.e., the word document currently being edited) after detecting the error correction operation of the input string "jingtia" to "jingtai".
In step 205, if the number of executions is equal to the preset threshold, a pairing between the input string and the error correction string is established, and the pairing is stored in a local cache.
In this embodiment, if the execution number is equal to a preset threshold (e.g. 2 times), a pairing (e.g. "jingtia- > jingtai") of the input string and the error correction string is established, and the pairing is stored in a local cache (cache).
Here, since the buffer memory can increase the data access speed, the pairing of the input string and the error correction string is stored in the buffer memory, so that the search speed can be increased when searching for the pairing, thereby increasing the input efficiency.
In this embodiment, if the execution number (i.e., the execution number) is smaller than the preset threshold, the execution body may update the execution number (i.e., the execution number is increased by 1), and continue to detect the error correction operation of the input string by the user, until the execution number reaches the preset threshold, a pairing of the input string and the error correction string is established, and the pairing is stored.
In this embodiment, after storing the pairing in the local cache, the execution body may further delete the pairing from the cache after detecting that the user exits the current input scenario (e.g., the user closes the word document currently being edited). Thereby, the error correction string in the pairing can be prevented from affecting the content input in other input scenes.
And step 206, searching the pairing from the cache when detecting that the user inputs the input string again in the current input scene.
In this embodiment, when detecting that the user inputs the input string (e.g., "jingtia") again in the current input scene (e.g., the word document currently being edited), the execution body may search the cache for the pairing.
In step 207, when the pairing is found, the input string input by the user again is replaced with the error correction string in the pairing.
At step 208, at least one candidate item is presented that includes the target candidate item.
In this embodiment, the execution body may present at least one candidate including the target candidate (e.g., the candidate "static" in the example described in step 203) after replacing the input string input again by the user with the error correction string in the pairing.
It will be appreciated that the user has previously manually error corrected the input string and selected the target candidate for screening, and thus the user's intent to enter the input string is to screen the target candidate. Therefore, after the user inputs the input string again and corrects errors automatically, the candidate item containing the target candidate item is presented, so that the user can select the candidate item conveniently, and the input efficiency is improved.
As can be seen from fig. 2, in comparison with the embodiment corresponding to fig. 1, in one aspect, the present embodiment relates to a step of presenting a target candidate word after detecting that a user inputs a paired stored input string again in a current input scene and automatically correcting errors. Therefore, the presented candidate words are more in line with the intention of the user, the selection of the user can be facilitated, and the input efficiency is improved. On the other hand, the embodiment also relates to an operation of storing the pairing into the cache, and because the cache can improve the data access speed, storing the pairing of the input string and the error correction string into the cache can improve the searching speed when searching the pairing, thereby further improving the input efficiency. In yet another aspect, the present embodiment further relates to the operation of deleting the corresponding pairing from the cache after detecting that the user exits the current input scenario (e.g., the user closes the word document currently being edited). Thereby, the error correction string in the pairing can be prevented from affecting the content input in other input scenes.
With further reference to fig. 3, as an implementation of the method shown in the foregoing figures, the present application provides an embodiment of an input error correction apparatus, which corresponds to the method embodiment shown in fig. 1, and which is particularly applicable to various electronic devices.
As shown in fig. 3, the input error correction device 300 according to this embodiment includes a detection unit 301 configured to detect an error correction operation performed on an input string by a user to obtain an error correction string corresponding to the input string, a storage unit 302 configured to establish a pairing of the input string and the error correction string and store the pairing if the error correction operation satisfies a preset condition, and a replacement unit 303 configured to replace the input string input again by the user with the error correction string based on the pairing when detecting that the input string is input again by the user.
In some optional implementations of this embodiment, the detecting unit 301 is further configured to obtain an input string during the input process, and determine that the user performs an error correction operation on the input string when detecting that the user performs at least one of deleting a character on the input string, re-inputting a character after deleting a character, inserting a character in the input string, and exchanging a character order in the input string.
In some optional implementations of this embodiment, the storage unit 302 is further configured to obtain a number of times of execution of the error correction operation on the input string by the user in the current input scenario, and if the number of times of execution is equal to a preset threshold, establish a pairing between the input string and the error correction string, and store the pairing in a local cache.
In some optional implementations of this embodiment, the apparatus further includes an updating unit configured to update the execution times and continue to detect an error correction operation of the input string by the user if the execution times are less than the preset threshold.
In some optional implementations of this embodiment, the replacing unit 303 is further configured to, when detecting that the user inputs the input string again in the current input scenario, find the pairing from the cache, replace the input string input again by the user with the error correction string in the pairing if the pairing is found, and include acquiring context information of the input string input again by the user if the found pairing includes at least two, determine a target pairing in the pairing based on the context information, and replace the input string input again by the user with the error correction string in the target pairing.
In some optional implementations of this embodiment, the apparatus further includes a deleting unit configured to delete the pairing from the cache after detecting that the user exits the current input scene.
In some optional implementations of this embodiment, the apparatus further includes a first presenting unit configured to present candidates corresponding to the error correction string, a trigger operation detecting unit configured to detect a trigger operation of the presented candidates by a user and to take the candidates indicated by the trigger operation as target candidates, and a second presenting unit configured to present at least one candidate including the target candidates after the input string input again by the user is replaced with the error correction string.
The device provided by the embodiment of the application obtains the error correction string corresponding to the input string by detecting the error correction operation of the user on the input string, establishes the pairing between the input string and the error correction string if the error correction operation meets the preset condition, stores the pairing, and replaces the input string input by the user again with the error correction string based on the pairing when the user is detected to input the input string again. Therefore, when the error correction cannot be automatically performed or the input error is not automatically detected to cause the manual error correction by the user, the pairing of the input string manually corrected by the user and the error correction string can be stored, so that when the input string is input next time, the error input string can be automatically replaced by the error correction string according to the pairing, the user does not need to repeatedly and manually correct the input string, and the input efficiency is improved.
Fig. 4 is a block diagram illustrating an apparatus 400 for input, which apparatus 400 may be a smart terminal or a server, according to an exemplary embodiment. For example, apparatus 400 may be a mobile phone, computer, digital broadcast terminal, messaging device, game console, tablet device, medical device, exercise device, personal digital assistant, or the like.
Referring to FIG. 4, the apparatus 400 may include one or more of a processing component 402, a memory 404, a power supply component 406, a multimedia component 408, an audio component 410, an input/output (I/O) interface 412, a sensor component 414, and a communication component 416.
The processing component 402 generally controls the overall operation of the apparatus 400, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing element 402 may include one or more processors 420 to execute instructions to perform all or part of the steps of the methods described above. Further, the processing component 402 can include one or more modules that facilitate interaction between the processing component 402 and other components. For example, the processing component 402 may include a multimedia module to facilitate interaction between the multimedia component 408 and the processing component 402.
Memory 404 is configured to store various types of data to support operations at apparatus 400. Examples of such data include instructions for any application or method operating on the apparatus 400, contact data, phonebook data, messages, pictures, videos, and the like. The memory 404 may be implemented by any type or combination of volatile or nonvolatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disk.
The power supply component 406 provides power to the various components of the apparatus 400. The power supply components 406 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the apparatus 400.
The multimedia component 408 includes a screen that provides an output interface between the device 400 and the user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensor may sense not only a boundary of a touch or a sliding action but also a duration and a pressure related to the touch or the sliding operation. In some embodiments, the multimedia component 408 includes a front camera and/or a rear camera. The front camera and/or the rear camera may receive external multimedia data when the device 400 is in an operational mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
The audio component 410 is configured to output and/or input audio signals. For example, the audio component 410 includes a Microphone (MIC) configured to receive external audio signals when the apparatus 400 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may be further stored in the memory 404 or transmitted via the communication component 416. In some embodiments, audio component 410 further includes a speaker for outputting audio signals.
The I/O interface 412 provides an interface between the processing component 402 and peripheral interface modules, which may be a keyboard, click wheel, buttons, etc. These buttons may include, but are not limited to, a home button, a volume button, an activate button, and a lock button.
The sensor assembly 414 includes one or more sensors for providing status assessment of various aspects of the apparatus 400. For example, the sensor assembly 414 may detect the on/off state of the device 400, the relative positioning of the components, such as the display and keypad of the apparatus 400, the sensor assembly 414 may also detect the change in position of the apparatus 400 or one component of the apparatus 400, the presence or absence of user contact with the apparatus 400, the orientation or acceleration/deceleration of the apparatus 400, and the change in temperature of the apparatus 400. The sensor assembly 414 may include a proximity sensor configured to detect the presence of nearby objects in the absence of any physical contact. The sensor assembly 414 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 414 may also include an acceleration sensor, a gyroscopic sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 416 is configured to facilitate communication between the apparatus 400 and other devices in a wired or wireless manner. The apparatus 400 may access a wireless network based on a communication standard, such as WiFi,2G or 3G, or a combination thereof. In one exemplary embodiment, the communication component 416 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, the communication component 416 described above further includes a Near Field Communication (NFC) module to facilitate short range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, ultra Wideband (UWB) technology, bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 400 may be implemented by one or more Application Specific Integrated Circuits (ASICs), digital Signal Processors (DSPs), digital Signal Processing Devices (DSPDs), programmable Logic Devices (PLDs), field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic elements for executing the methods described above.
In an exemplary embodiment, a non-transitory computer-readable storage medium is also provided, such as memory 404, including instructions executable by processor 420 of apparatus 400 to perform the above-described method. For example, the non-transitory computer readable storage medium may be ROM, random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.
Fig. 5 is a schematic diagram of a server in some embodiments of the application. The server 500 may vary considerably in configuration or performance and may include one or more central processing units (central processing units, CPUs) 522 (e.g., one or more processors) and memory 532, one or more storage mediums 530 (e.g., one or more mass storage devices) that store applications 542 or data 544. Wherein memory 532 and storage medium 530 may be transitory or persistent. The program stored in the storage medium 530 may include one or more modules (not shown), each of which may include a series of instruction operations on a server. Still further, the central processor 522 may be configured to communicate with a storage medium 530 and execute a series of instruction operations in the storage medium 530 on the server 500.
The server 500 may also include one or more power supplies 526, one or more wired or wireless network interfaces 550, one or more input/output interfaces 558, one or more keyboards 556, and/or one or more operating systems 541, such as Windows Server, mac OS XTM, unixTM, linuxTM, freeBSDTM, and the like.
A non-transitory computer readable storage medium, which when executed by a processor of an apparatus (smart terminal or server) causes the apparatus to perform an input error correction method, the method comprising detecting an error correction operation of an input string by a user to obtain an error correction string corresponding to the input string, establishing a pairing of the input string and the error correction string if the error correction operation satisfies a preset condition, and storing the pairing, and replacing the input string re-input by the user with the error correction string based on the pairing when the re-input of the input string by the user is detected.
Optionally, the detecting the error correction operation of the user on the input string includes obtaining the input string in the input process, and determining that the user has performed the error correction operation on the input string when detecting that the user has performed at least one of deleting a character on the input string, re-inputting a character after deleting the character, inserting a character in the input string, and exchanging the character sequence in the input string.
Optionally, if the error correction operation meets a preset condition, establishing a pairing between the input string and the error correction string, and storing the pairing, including obtaining the execution times of the error correction operation of the input string by the user in the current input scene, and if the execution times are equal to a preset threshold, establishing a pairing between the input string and the error correction string, and storing the pairing in a local cache.
Optionally, the apparatus is configured to execute the one or more programs by one or more processors, including instructions for updating the execution times if the execution times are less than the preset threshold, and continuing to detect error correction operations of the input string by the user.
Optionally, when the input string input by the user is detected to be input again, the input string input by the user is replaced with the error correction string based on the pairing, the method comprises the steps of searching the pairing from the cache when the input string input by the user is detected to be input again in the current input scene, replacing the input string input by the user again with the error correction string in the pairing if the pairing is detected, and acquiring context information of the input string input by the user again if the pairing is detected to include at least two pairs, determining a target pairing in the pairing based on the context information, and replacing the input string input by the user again with the error correction string in the target pairing.
Optionally, the apparatus is configured to execute the one or more programs by one or more processors including instructions for deleting the pairing from the cache upon detecting that the user exits the current input scenario.
Optionally, the apparatus is configured to execute the one or more programs by one or more processors including instructions for presenting candidates corresponding to the error correction string, detecting a triggering operation of the presented candidates by a user and taking the candidates indicated by the triggering operation as target candidates, and presenting at least one candidate including the target candidates after the replacing the input string input by the user again with the error correction string.
Other embodiments of the application will be apparent to those skilled in the art from consideration of the specification and practice of the application disclosed herein. This application is intended to cover any variations, uses, or adaptations of the application following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the application pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
It is to be understood that the application is not limited to the precise arrangements and instrumentalities shown in the drawings, which have been described above, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the application is limited only by the appended claims.
The foregoing description of the preferred embodiments of the application is not intended to be limiting, but rather is intended to cover all modifications, equivalents, alternatives, and improvements that fall within the spirit and scope of the application.
The foregoing describes in detail a method and apparatus for error correction and a device for error correction of input provided by the present application, and the specific examples are provided herein to illustrate the principles and embodiments of the present application, and the above examples are provided to assist in understanding the method and core ideas of the present application, and meanwhile, to those skilled in the art, there are variations in the specific embodiments and application scope according to the ideas of the present application, so that the disclosure should not be construed as limiting the scope of the present application.

Claims (11)

1.一种输入纠错方法,其特征在于,所述方法包括:1. An input error correction method, characterized in that the method comprises: 检测用户对输入串的纠错操作,得到与所述输入串对应的纠错串;Detecting a user's error correction operation on an input string, and obtaining an error correction string corresponding to the input string; 获取当前输入场景下用户对所述输入串的纠错操作的执行次数;Obtaining the number of executions of the error correction operation performed by the user on the input string in the current input scenario; 若所述执行次数等于预设阈值,则建立所述输入串与所述纠错串的配对,并将所述配对存储至本地的缓存;If the execution number is equal to a preset threshold, a pairing of the input string and the error correction string is established, and the pairing is stored in a local cache; 在检测到所述用户在所述当前输入场景下再次输入所述输入串时,基于所述配对,将所述用户再次输入的所述输入串替换为所述纠错串;When it is detected that the user inputs the input string again in the current input scenario, based on the pairing, the input string input again by the user is replaced with the error correction string; 所述方法还包括:The method further comprises: 在检测到用户退出所述当前输入场景后,从所述缓存中删除所述配对。After detecting that the user exits the current input scene, the pairing is deleted from the cache. 2.根据权利要求1所述的方法,其特征在于,所述检测用户对输入串的纠错操作,包括:2. The method according to claim 1, characterized in that the detecting the user's error correction operation on the input string comprises: 获取输入过程中的输入串;Get the input string during the input process; 在检测到用户对所述输入串进行了删除字符、删除字符后重新输入字符、在所述输入串中插入字符、调换所述输入串中的字符顺序中的至少一项时,确定所述用户对所述输入串执行了纠错操作。When it is detected that the user has performed at least one of deleting characters, re-entering characters after deleting characters, inserting characters into the input string, and changing the order of characters in the input string, it is determined that the user has performed an error correction operation on the input string. 3.根据权利要求1所述的方法,其特征在于,所述方法还包括:3. The method according to claim 1, characterized in that the method further comprises: 若所述执行次数小于所述预设阈值,则更新所述执行次数,并继续检测用户对输入串的纠错操作。If the execution times are less than the preset threshold, the execution times are updated, and the user's error correction operation on the input string is continuously detected. 4.根据权利要求1所述的方法,其特征在于,所述在检测到所述用户再次输入所述输入串时,基于所述配对,将所述用户再次输入的所述输入串替换为所述纠错串,包括:4. The method according to claim 1, characterized in that when detecting that the user re-enters the input string, based on the pairing, replacing the input string re-entered by the user with the error correction string comprises: 在检测到所述用户在所述当前输入场景下再次输入所述输入串时,从所述缓存中查找所述配对;When detecting that the user inputs the input string again in the current input scenario, searching for the pairing from the cache; 在查找到所述配对的情况下,将所述用户再次输入的所述输入串替换为所述配对中的所述纠错串;When the pair is found, replacing the input string re-entered by the user with the error correction string in the pair; 其中,所述在查找到所述配对的情况下,将所述用户再次输入的所述输入串替换为所述配对中的所述纠错串,包括:Wherein, when the pair is found, replacing the input string input again by the user with the error correction string in the pair includes: 若所查找到的配对包括至少两个,则获取所述用户再次输入的所述输入串的上下文信息;If the found pairings include at least two, obtaining context information of the input string input again by the user; 基于所述上下文信息,确定所述配对中的目标配对,将所述用户再次输入的所述输入串替换为所述目标配对中的纠错串。Based on the context information, a target pairing in the pairing is determined, and the input string re-entered by the user is replaced with the error correction string in the target pairing. 5.根据权利要求1所述的方法,其特征在于,在所述得到与所述输入串对应的纠错串之后,所述方法还包括:5. The method according to claim 1, characterized in that after obtaining the error correction string corresponding to the input string, the method further comprises: 呈现与所述纠错串对应的候选项;presenting candidate items corresponding to the error correction string; 检测用户对所呈现的候选项的触发操作,并将所述触发操作所指示的候选项作为目标候选项;以及Detecting a trigger operation of a user on the presented candidate items, and taking the candidate items indicated by the trigger operation as target candidate items; and 在所述将所述用户再次输入的所述输入串替换为所述纠错串之后,所述方法还包括:After replacing the input string re-entered by the user with the error correction string, the method further includes: 呈现包含所述目标候选项的至少一个候选项。At least one candidate item including the target candidate item is presented. 6.一种输入纠错装置,其特征在于,所述装置包括:6. An input error correction device, characterized in that the device comprises: 检测单元,被配置成检测用户对输入串的纠错操作,得到与所述输入串对应的纠错串;a detection unit configured to detect a user's error correction operation on an input string and obtain an error correction string corresponding to the input string; 存储单元,被配置成获取当前输入场景下用户对所述输入串的纠错操作的执行次数;若所述执行次数等于预设阈值,则建立所述输入串与所述纠错串的配对,并将所述配对存储至本地的缓存;A storage unit is configured to obtain the number of executions of the error correction operation of the user on the input string in the current input scenario; if the execution number is equal to a preset threshold, establish a pairing of the input string and the error correction string, and store the pairing in a local cache; 替换单元,被配置成在检测到所述用户在所述当前输入场景下再次输入所述输入串时,基于所述配对,将所述用户再次输入的所述输入串替换为所述纠错串;a replacement unit, configured to, when detecting that the user re-enters the input string in the current input scenario, replace the input string re-entered by the user with the error correction string based on the pairing; 所述装置还包括:The device also includes: 删除单元,被配置成在检测到用户退出所述当前输入场景后,从所述缓存中删除所述配对。The deleting unit is configured to delete the pairing from the cache after detecting that the user exits the current input scene. 7.根据权利要求6所述的装置,其特征在于,所述检测单元,进一步被配置成:7. The device according to claim 6, characterized in that the detection unit is further configured to: 获取输入过程中的输入串;Get the input string during the input process; 在检测到用户对所述输入串进行了删除字符、删除字符后重新输入字符、在所述输入串中插入字符、调换所述输入串中的字符顺序中的至少一项时,确定所述用户对所述输入串执行了纠错操作。When it is detected that the user has performed at least one of deleting characters, re-entering characters after deleting characters, inserting characters into the input string, and changing the order of characters in the input string, it is determined that the user has performed an error correction operation on the input string. 8.根据权利要求6所述的装置,其特征在于,所述装置还包括:8. The device according to claim 6, characterized in that the device further comprises: 更新单元,被配置成若所述执行次数小于所述预设阈值,则更新所述执行次数,并继续检测用户对输入串的纠错操作。The updating unit is configured to update the execution times if the execution times are less than the preset threshold value, and continue to detect the error correction operation of the user on the input string. 9.根据权利要求6所述的装置,其特征在于,所述替换单元,进一步被配置成:9. The device according to claim 6, characterized in that the replacement unit is further configured to: 在检测到所述用户在所述当前输入场景下再次输入所述输入串时,从所述缓存中查找所述配对;When detecting that the user inputs the input string again in the current input scenario, searching for the pairing from the cache; 在查找到所述配对的情况下,将所述用户再次输入的所述输入串替换为所述配对中的所述纠错串;When the pair is found, replacing the input string re-entered by the user with the error correction string in the pair; 其中,所述在查找到所述配对的情况下,将所述用户再次输入的所述输入串替换为所述配对中的所述纠错串,包括:Wherein, when the pair is found, replacing the input string input again by the user with the error correction string in the pair includes: 若所查找到的配对包括至少两个,则获取所述用户再次输入的所述输入串的上下文信息;If the found pairings include at least two, obtaining context information of the input string input again by the user; 基于所述上下文信息,确定所述配对中的目标配对,将所述用户再次输入的所述输入串替换为所述目标配对中的纠错串。Based on the context information, a target pairing in the pairing is determined, and the input string re-entered by the user is replaced with the error correction string in the target pairing. 10.一种用于输入纠错的装置,其特征在于,包括有存储器,以及一个或者一个以上的程序,其中一个或者一个以上程序存储于存储器中,且经配置以由一个或者一个以上处理器执行所述一个或者一个以上程序包含用于进行如权利要求1-5中任一所述的方法。10. A device for input error correction, characterized in that it includes a memory and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by one or more processors to include performing the method as described in any one of claims 1-5. 11.一种计算机可读介质,其上存储有计算机程序,其特征在于,该程序被处理器执行时实现如权利要求1-5中任一所述的方法。11. A computer-readable medium having a computer program stored thereon, wherein when the program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.
CN201911222518.9A 2019-12-03 2019-12-03 Input error correction method, device and device for input error correction Active CN112905023B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911222518.9A CN112905023B (en) 2019-12-03 2019-12-03 Input error correction method, device and device for input error correction

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911222518.9A CN112905023B (en) 2019-12-03 2019-12-03 Input error correction method, device and device for input error correction

Publications (2)

Publication Number Publication Date
CN112905023A CN112905023A (en) 2021-06-04
CN112905023B true CN112905023B (en) 2024-12-27

Family

ID=76104146

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911222518.9A Active CN112905023B (en) 2019-12-03 2019-12-03 Input error correction method, device and device for input error correction

Country Status (1)

Country Link
CN (1) CN112905023B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115509374A (en) * 2022-10-24 2022-12-23 科大讯飞股份有限公司 Input method, input device, electronic equipment and storage medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109426354A (en) * 2017-08-25 2019-03-05 北京搜狗科技发展有限公司 A kind of input method, device and the device for input

Family Cites Families (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008257704A (en) * 2007-03-09 2008-10-23 Matsushita Electric Ind Co Ltd Information processing apparatus, program, and storage medium
JP2009252053A (en) * 2008-04-08 2009-10-29 Nippon Telegr & Teleph Corp <Ntt> Data input support system and its program
CN101382857A (en) * 2008-10-15 2009-03-11 宇龙计算机通信科技(深圳)有限公司 Error correcting method for touch screen input, apparatus and communication terminal
US9009591B2 (en) * 2008-12-11 2015-04-14 Microsoft Corporation User-specified phrase input learning
CN102135814B (en) * 2011-03-30 2017-08-08 北京搜狗科技发展有限公司 A kind of character and word input method and system
CN102866826B (en) * 2012-07-09 2016-01-20 张作玮 A kind of characters input method and device thereof
CN102867040B (en) * 2012-08-31 2015-03-18 中国科学院计算技术研究所 Chinese search engine mixed speech-oriented query error correction method and system
CN104243084B (en) * 2013-06-07 2018-09-04 中国科学院深圳先进技术研究院 Error correction coding/decoding method and its device applied to human body communication channel
CN103685747B (en) * 2013-12-06 2016-06-01 北京奇虎科技有限公司 Input number correction method and correction device
WO2015139497A1 (en) * 2014-03-19 2015-09-24 北京奇虎科技有限公司 Method and apparatus for determining similar characters in search engine
CN107688399B (en) * 2016-08-05 2022-04-12 北京搜狗科技发展有限公司 Input method and device and input device
CN107918496B (en) * 2016-10-10 2021-10-22 北京搜狗科技发展有限公司 Input error correction method and device for input error correction
CN107977089B (en) * 2016-10-21 2021-12-14 北京搜狗科技发展有限公司 Input method and device and input device
CN108052499B (en) * 2017-11-20 2021-06-11 北京百度网讯科技有限公司 Text error correction method and device based on artificial intelligence and computer readable medium

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109426354A (en) * 2017-08-25 2019-03-05 北京搜狗科技发展有限公司 A kind of input method, device and the device for input

Also Published As

Publication number Publication date
CN112905023A (en) 2021-06-04

Similar Documents

Publication Publication Date Title
US20170150290A1 (en) Method and device for information push
WO2017114020A1 (en) Speech input method and terminal device
CN107688399B (en) Input method and device and input device
CN105956067A (en) Resource searching method and apparatus
CN107977089B (en) Input method and device and input device
CN113987128B (en) Related Articles Search Method, Device, Electronic Device and Storage Medium
CN108073291B (en) Input method and device and input device
CN110389666B (en) Input error correction method and device
CN112905023B (en) Input error correction method, device and device for input error correction
CN112306251B (en) Input method, device and device for input
CN110780749B (en) Character string error correction method and device
CN109144286B (en) An input method and device
CN113918029B (en) Input method and device
CN113805707B (en) Input method, device and device for inputting
CN112068793B (en) Voice input method and device
CN112181163B (en) Input method, device and device for input
CN112083811B (en) Candidate item display method and device
CN109388328B (en) Input method, device and medium
CN115373523B (en) Input method, device and device for input
CN115712385B (en) Information display method, device and device for displaying information
CN115543099B (en) Input method, apparatus, and apparatus for input
CN107688400B (en) Input error correction method and device for input error correction
CN113534972B (en) A method and device for prompting an entry and a device for prompting an entry
CN114675748B (en) Input method and device and electronic equipment
CN115480653B (en) Input method, device and device for input

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
TG01 Patent term adjustment
TG01 Patent term adjustment