CN107436691B - Method, client, server and device for correcting errors of input method - Google Patents

Method, client, server and device for correcting errors of input method Download PDF

Info

Publication number
CN107436691B
CN107436691B CN201610362648.2A CN201610362648A CN107436691B CN 107436691 B CN107436691 B CN 107436691B CN 201610362648 A CN201610362648 A CN 201610362648A CN 107436691 B CN107436691 B CN 107436691B
Authority
CN
China
Prior art keywords
character string
correction
error correction
input
string
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
CN201610362648.2A
Other languages
Chinese (zh)
Other versions
CN107436691A (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 CN201610362648.2A priority Critical patent/CN107436691B/en
Publication of CN107436691A publication Critical patent/CN107436691A/en
Application granted granted Critical
Publication of CN107436691B publication Critical patent/CN107436691B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

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

Abstract

The embodiment of the invention provides a method, a client, a server and a device for correcting errors of an input method, wherein the method comprises the following steps: receiving a coded character string input by a user; carrying out error correction processing on the coding character string locally at a client to obtain a corresponding first correction character string; sending the encoded character string and the first correction character string to a server, wherein the server is used for carrying out error correction processing on the encoded character string to obtain a second correction character string, acquiring a target candidate item based on the first correction character string and the second correction character string, and returning the target candidate item to the client; and receiving target candidate items returned by the server, and displaying at least part of the target candidate items. According to the invention, by the distributed processing method of transmitting the local calculation result of the wrong input string to the correct string back to the cloud, the overhead of repeatedly calculating and correcting the string by the cloud is avoided, and the error of the user can be corrected more accurately.

Description

Method, client, server and device for correcting errors of input method
Technical Field
The invention relates to the technical field of input methods, in particular to a method for correcting errors of an input method, a client for correcting errors of the input method, a server for correcting errors of the input method and a device for correcting errors of the input method.
Background
With the development of information technology, many works and entertainment in daily life of people are performed on various electronic devices, and users frequently need to input information through an input method application program to complete human-computer interaction. However, due to the influence of the language habit, the geographical distinction, the input environment, etc., the user may input the wrong code string when inputting the code string, and it is difficult to obtain the required candidate result. In order to reduce the number of times of user modification and improve the input speed, some input methods achieve the error correction function at present.
In the prior art, the error correction function of the input method includes client local error correction and cloud error correction, and the implementation logic of the cloud error correction is as follows: the client sends an original encoding character string input by a user to the cloud server, the cloud server corrects the encoding character string, and then a target candidate item obtained after error correction is returned to the client.
However, since the client may send a cloud request to the cloud server whenever the code string in the user input box changes (e.g. input "cihfan", may send 6 cloud requests), the number of requests that the cloud server needs to process is very large. This results in the cloud error correction logic not being as complex as the client error correction (the client obtains the correct input string by replacing, inserting, deleting, exchanging, etc. different positions of the input string, and then uses the correct input string to query the system lexicon, etc., which is a computationally intensive task and is time consuming), otherwise the cloud pressure is too high and the request processing is overtime.
The error correction logic commonly used in the cloud server is generally implemented by querying a cloud error correction cache library (the error correction cache library stores high-frequency error strings — correct string pairs), so as to ensure the speed of the error correction logic. However, the cloud error correction result is realized in such a way that the cloud error correction result is too dependent on the scale and the correctness of the cloud error correction cache library, so that the accuracy of the cloud error correction result is not high enough.
Disclosure of Invention
In view of the above problems, in order to solve the problem that the accuracy of the error correction result is not high, embodiments of the present invention provide a method for performing error correction by using an input method, a corresponding client for performing error correction by using the input method, a server for performing error correction by using the input method, and a device for performing error correction by using the input method.
In order to solve the above problem, an embodiment of the present invention discloses a method for performing error correction on an input method, where the method includes:
receiving a coded character string input by a user;
carrying out error correction processing on the coding character string locally at a client to obtain a corresponding first correction character string;
sending the encoded character string and the first correction character string to a server, wherein the server is used for carrying out error correction processing on the encoded character string to obtain a second correction character string, acquiring a target candidate item based on the first correction character string and the second correction character string, and returning the target candidate item to the client;
and receiving target candidate items returned by the server, and displaying at least part of the target candidate items.
Preferably, before the step of performing error correction processing on the encoded character string locally at the client to obtain a corresponding first correction character string, the method further includes:
judging whether the coded character string has an input error;
and if the coding character string has an input error, executing the step of carrying out error correction processing on the coding character string locally at the client to obtain a corresponding first correction character string.
Preferably, the step of performing error correction processing on the encoded character string locally at the client to obtain a corresponding first correction character string includes:
collecting historical input information of a user;
calculating input habit information of a user based on the historical input information;
and carrying out error correction processing on the coding character string according to the input habit information to obtain a first correction character string.
Preferably, the input habit information includes a normal pressing pressure range, and the step of performing error correction processing on the code character string according to the input habit information to obtain a first correction character string includes:
detecting a key position of a user and a pressing pressure value in the key position;
and if the pressing pressure value is not within the normal pressing pressure range, deleting the key value corresponding to the key position in the code character string to obtain a first correction character string.
Preferably, the input habit information includes a misinput character string, and the misinput character string is a character string with a misinput frequency higher than a preset threshold;
the step of performing error correction processing on the code character string according to the input habit information to obtain a first correction character string includes:
establishing a wrong input habit database of the user based on the input habit information, wherein the wrong input habit database comprises the corresponding relation between various wrong input character strings and corresponding correct character strings of the user;
and when the code character string is matched with the wrong input character string in the wrong input habit database, replacing the wrong character string in the code character string with the correct character string to obtain the first correction character string.
The embodiment of the invention also discloses a method for correcting the error of the input method, which comprises the following steps:
receiving a coded character string and a first correction character string sent by a client, wherein the first correction character string is an error correction result obtained after the client performs error correction processing on the coded character string locally, and the coded character string is an original character string input by a user;
carrying out error correction processing on the coded character string to obtain a second correction character string;
acquiring a target candidate item based on the first correction character string and the second correction character string;
and returning the target candidate item to the client.
Preferably, the step of performing error correction processing on the encoded character string to obtain a second correction character string includes:
matching the code character strings in a preset error correction database, wherein the error correction database comprises a corresponding relation between a plurality of error character strings acquired by a server and corresponding correct character strings;
if the matching is successful, determining an error character string in the code character string;
acquiring a correct character string corresponding to the error character string;
and replacing the error character string in the code character string with the correct character string to obtain a second correction character string.
Preferably, the step of obtaining target candidates based on the first correction string and the second correction string includes:
and if the first corrected character string is consistent with the second corrected character string, matching the first corrected character string or the second corrected character string in a preset cloud system word bank to obtain a matched target candidate item.
Preferably, the step of obtaining a target candidate item based on the first correction string and the second correction string includes:
if the first correction character string is inconsistent with the second correction character string, respectively matching the first correction character string and the second correction character string in a preset cloud system word bank to obtain a first error correction result matched with the first correction character string and a second error correction result matched with the second correction character string;
if the first error correction result is consistent with the second error correction result, taking the first error correction result or the second error correction result as the target candidate item;
and if the first error correction result is inconsistent with the second error correction result, taking the first error correction result and the second error correction result as the target candidate.
The embodiment of the invention also discloses a client for correcting the error of the input method, which comprises the following steps:
the code character string receiving module is used for receiving a code character string input by a user;
the correction module is used for carrying out error correction processing on the coding character string locally at the client so as to obtain a corresponding first correction character string;
the character string sending module is used for sending the encoded character string and the first correction character string to a server, and the server is used for carrying out error correction processing on the encoded character string to obtain a second correction character string, acquiring a target candidate item based on the first correction character string and the second correction character string, and returning the target candidate item to the client;
and the display module is used for receiving the target candidate items returned by the server and displaying at least part of the target candidate items.
The embodiment of the invention also discloses a server for correcting errors by the input method, which comprises the following steps:
the character string receiving module is used for receiving a coding character string and a first correction character string sent by a client, wherein the first correction character string is an error correction result obtained after the client performs error correction processing on the coding character string locally, and the coding character string is an original character string input by a user;
the error correction processing module is used for carrying out error correction processing on the coding character string to obtain a second correction character string;
a candidate item acquisition module, configured to acquire a target candidate item based on the first corrected character string and the second corrected character string;
and the candidate item sending module is used for returning the target candidate item to the client.
The embodiment of the invention also discloses a device for correcting the error of the input method, which comprises a memory and one or more programs, wherein the one or more programs are stored in the memory, and the one or more programs are configured to be executed by one or more processors and comprise instructions for:
receiving a coded character string input by a user;
carrying out error correction processing on the coding character string locally at a client to obtain a corresponding first correction character string;
sending the encoded character string and the first correction character string to a server, wherein the server is used for carrying out error correction processing on the encoded character string to obtain a second correction character string, acquiring a target candidate item based on the first correction character string and the second correction character string, and returning the target candidate item to the client;
and receiving target candidate items returned by the server, and displaying at least part of the target candidate items.
The embodiment of the invention has the following advantages:
in the embodiment of the invention, each client is used as the distributed client of the cloud server, when the client judges that an error exists in the input of the user, the code character string originally input by the user is uploaded to the cloud server, and a first correction character string obtained by error correction of the code character string by the client is simultaneously uploaded to the server, so that the overhead of repeatedly calculating the correction string by the cloud is avoided by the distributed processing method of returning the error transmission string to the local calculation result of the correct string.
Furthermore, the first correction character string obtained by the client is obtained according to the user habit information, the input scene and the like, so that the individual requirements of the user can be met, the accuracy of the cloud error correction result is higher, and the error of the user can be corrected more accurately.
Drawings
FIG. 1 is a flowchart illustrating a first embodiment of a method for error correction in an input method according to the present invention;
FIGS. 2A-2C are exemplary diagrams of a virtual keyboard according to embodiments of the present invention;
FIG. 3 is a flowchart illustrating steps of a second embodiment of a method for error correction according to an input method of the present invention;
FIG. 4 is a block diagram of an embodiment of a client for error correction according to an input method of the present invention;
FIG. 5 is a block diagram of a server for error correction according to an input method of the present invention;
FIG. 6 is a block diagram illustrating an apparatus for error correction of an input method in accordance with an exemplary embodiment;
fig. 7 is a schematic diagram illustrating a configuration of a server according to an example embodiment.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below.
Referring to fig. 1, a flowchart illustrating a first step of an embodiment of a method for performing error correction by an input method according to the present invention is shown, and the embodiment of the present invention may be applied to a terminal having an information input function, where the information input function is implemented by a program (e.g., a virtual keyboard) embedded in the terminal, or implemented by a physical keyboard, a handwriting pad, a sound collection device, and the like connected to the terminal.
The terminal may include a mobile phone, a PDA (Personal Digital Assistant), a laptop computer, a palmtop computer, a desktop computer, a signature terminal for providing an electronic signature for a user, and the like, which is not limited in this embodiment of the present invention.
The terminal can support operating systems such as Windows, Android, IOS and Windows Phone.
The embodiment of the invention specifically comprises the following steps:
step 101, receiving a code character string input by a user;
in a specific implementation, after a user starts an input method application installed in a terminal, the user can input a coded character string into the terminal in a physical keyboard, a virtual keyboard, a handwriting pad, a sound acquisition device and the like. Accordingly, the user's input includes a key input, a handwriting input, a voice input, and the like.
The virtual keyboard may include a squared keyboard, a full keyboard (e.g., a QWERT keyboard), and the like. The virtual keyboard may typically have one or more virtual keys, which are often multiplexed, mapped with one or more characters, which may be used to input characters, and mapped to different characters for different languages, such as chinese, english, japanese, etc.
In order to make those skilled in the art better understand the embodiments of the present invention, in the embodiments of the present invention, a chinese character is described as an example of a language.
In a specific implementation, the characters of the virtual key mapping may specifically include, but are not limited to, at least one of input numeric characters, english characters, chinese characters (e.g., pinyin characters, stroke characters, etc.), and symbolic characters.
For example, referring to fig. 2A and 2B, there are shown exemplary diagrams of a virtual keyboard 200, which may be referred to as a squared or 9-key keyboard, according to embodiments of the present invention.
For the virtual key 201, as shown in fig. 2A, in the pinyin input mode, the virtual key 201 maps pinyin characters, an initial "d", a final "e", and an initial "f"; in the numeric input mode, the virtual button 201 may map the numeric character "3", and in the english input mode, the virtual button 201 may map the english characters "d", "e", "f"; in the pinyin input mode, the numeric input mode, and the english input mode, the virtual keys 202 may map symbolic characters, commas, "; as shown in FIG. 2B, in the stroke input mode, the virtual key 201 maps stroke characters "" down "" and "" down "".
For another example, referring to fig. 2C, which shows an exemplary view of another virtual keyboard of embodiments of the present invention, the virtual keyboard 210 may be referred to as a full keyboard or 26-key keyboard, and a typical full keyboard or 26-key keyboard may be a QWERT keyboard.
For the virtual key 211, in the pinyin input mode, the virtual key 211 may map a pinyin character, a semi-vowel "w"; in the english input mode, the virtual key 211 can map an english character "w"; in the number input mode, the virtual key 211 may have a number character of "2"; for the virtual key 212, in the pinyin input mode, the virtual key 212 may map the pinyin character "g"; in the english input mode, the virtual key 211 may map an english character "g", and in the symbol input mode, may map a symbol character, a percentile "%".
Of course, the virtual keyboard and the virtual keys are only examples, and other virtual keyboards and virtual keys may be set according to actual situations when implementing the embodiment of the present invention, which is not limited in the embodiment of the present invention. In addition, besides the virtual keyboard and the virtual keys, those skilled in the art may also adopt other virtual keyboards and virtual keys according to actual needs, which is not limited in the embodiment of the present invention.
The encoding string may include, but is not limited to: at least one of a numeric string, an English string, a Chinese string (e.g., a Pinyin string, a stroke string, etc.), a symbolic string, and a hybrid string (including at least two different strings).
102, carrying out error correction processing on the coding character string locally at a client to obtain a corresponding first correction character string;
when the client of the input method application program receives the code character string input by the user, the client can carry out error correction processing on the code character string locally to obtain a corresponding first correction character string.
In a specific implementation, after a user inputs an encoded character string, the user interacts with a computer through an input method application program to convert the encoded character string into a corresponding word, the error correction is performed according to errors which may occur in the conversion process, and related error correction scenarios may include, but are not limited to, the following types:
(1) southern fuzzy sound: due to regional limitation, China has many dialects, and the pronunciation of people in different places has certain difference, for example, the southern people can distinguish the curled tongue-flat tongue, the anterior nose sound-posterior nose sound differently from the northern people.
(2) The operation is uncoordinated: it is common to interchange left and right hand keys or two keys in succession with the same hand, such as inputting the syllable "le" to "el", or mistakenly inputting the left hand input sequence "er" to "re". Of course, the former case requires distinguishing between a "bad" spool and a true "le-el" error (wrong form-correct form, the same applies below).
(3) Frequently occurring key press errors: for example, the user mistakenly presses the "y" key into the "u" key due to the reasons of the flexibility degree of the fingers, the characteristics of the keyboard and the like; or pressing intermediate the "u" key and the "y" key causes both keys to be recognized as pressed, these erroneous inputs are often accompanied by a backspace correction by the user.
(4) The keyboard buttons are relatively narrow: for example, in an input environment where the size of the virtual keyboard is limited, the keyboard buttons are relatively narrow and the operation is completed by a thumb with a large area, so that erroneous input such as mistaken pressing, excessive pressing and the like is easily caused, and the associated key positions are often adjacent to the target key positions on the keyboard.
(5) Button response hysteresis: for example, the key response is delayed due to the quality of the keyboard, which is easy to cause the repeated input of the user. For example, system problems cause the key to be insensitive, and the user may not see the input screen after first clicking, which may result in subsequent multi-tap by the user.
Based on the error occurring in the error correction scenario, in a preferred embodiment of the present invention, before step 102, after receiving the encoded character string input by the user, the embodiment of the present invention may first determine whether the encoded character string has an input error.
In a specific implementation, a client of the input method application program can judge whether an input error occurs in the code character string through language simulation, input history behavior statistics and other modes.
Specifically, one or more of the following manners may be used to determine whether an input error occurs in the encoded character string, but it should be understood that the embodiments of the present invention are not limited to this:
(1) setting legal pinyin database, which contains multiple legal pinyin strings composed of legal pinyin syllables including 413 of a, ai …, zuo, etc. If the adjacent k (e.g. 3) characters in the character string input by the user are not part of the legal pinyin string, for example: if the afn in the chiafn is not part of the legal pinyin, it can be determined that there is an error.
(2) And setting an error correction database, wherein the error correction database comprises a plurality of error input character strings. If the code character string input by the user hits a certain character string in the error correction database, judging that the code character string has errors.
(3) When the coded character string input by the user can not hit any entry in word banks such as a system word bank and a user word bank, judging that the coded character string has an error;
(4) in a mobile client such as a mobile phone, whether the code character string is input incorrectly can be judged by judging whether the pressing force degree when the user inputs the code character string is within a normal pressing force degree range and/or the deviation size from the pressing point to the central point of the key.
(5) Language model (N-Gram) statistics: N-Gram is a Language Model commonly used in large vocabulary continuous speech recognition, and is commonly referred to as Chinese Language Model (CLM) for Chinese.
The Chinese language model can calculate the sentences with the maximum probability by using the collocation information between adjacent words in the context when the continuous blank-free pinyin, strokes or numbers representing letters or strokes are required to be converted into Chinese character strings (namely sentences), thereby realizing the automatic conversion to Chinese characters.
The embodiment of the invention can analyze the input fragment, consider the context and judge whether the input fragment is reasonable or not. For example, in the case of no support for pinyin and english input, "tre" is an illegal sequence based on normal user input statistics.
(6) Input time interval of two continuous keys and layout of the two keys: if two adjacent key positions are continuously input and the time interval is extremely short, the possibility that the user mistakenly clicks one more key exists.
If the client determines that the encoded string input by the user is incorrect, step 102 may be executed to perform error correction processing on the encoded string locally at the client to obtain a corresponding first corrected string.
In a preferred embodiment of the present invention, step 102 may comprise the following sub-steps:
a substep S11 of collecting historical input information of the user;
in practical applications, the historical input information of the user may include input content (including a user word stock and content displayed on a screen), user behavior characteristics, input environment characteristics, input method input modes, and the like.
In a specific implementation, when the user uses the input method application, the user may use the log to record the input behavior of the user, and then the above-mentioned historical input information of the user may be obtained from the log.
A substep S12 of calculating input habit information of a user based on the historical input information;
when the historical input information of the user is collected, the historical input information can be analyzed to obtain the input habit information of the user.
As a preferred embodiment of the present invention, the input habit information of the user may include, but is not limited to: the normal pressing pressure range of the user pressing the key, the mistaken input character string with the mistaken input frequency higher than the preset threshold value (the character string which is frequently input by the user in a wrong way), the input method mode selected by the user (the last syllable initial simplified pinyin, the full simplified pinyin and the like), the key position of the key frequently pressed by the user or mistakenly pressed by the user, the proficiency degree of the user on the input method application program and the like.
In a specific implementation, the input habit information of the user may be analyzed in one or more of the following ways, but it should be understood that the embodiments of the present invention are not limited thereto:
1) for the content of the user word stock, the coding habits related to the user word stock and the entries can be obtained. In addition, if the user word stock can store a relatively long user input sequence, the input habit of the user can be obtained from the user input sequence.
2) The user's input proficiency may be estimated based on the speed per letter, speed per entry, etc. of historical inputs.
3) The key positions of the keys frequently pressed and wrongly pressed by the user and the flexibility of fingers related to the key positions can be recorded.
4) The client side counts the operation of backspace before the user is on the screen to learn the error input habit of the user, namely the operation of modifying the input pinyin by the user, learns the frequent error input condition of the user according to the different comparison of the character string before modification and the character string after modification, and can learn the frequent error input habit of the user after a period of automatic intelligent learning.
5) Since the habitual pressing pressure degree of each user has the characteristic of the habitual pressing pressure degree, the pressing pressure when the user inputs a plurality of character strings can be recorded, and the normal pressing pressure range of the user can be obtained according to the weighted average of the recorded pressing pressures.
6) And analyzing the habits of the user according to the feedback of the user.
And a substep S13, performing error correction processing on the code string according to the input habit information to obtain a first correction string.
After the input habit information of the user is obtained, the error correction processing can be carried out on the coding character string according to the input habit information, and the obtained first correction character string can meet the personalized requirements of the user.
In a specific implementation, the error correction processing of the client on the encoded character string may be a combination of one or more error correction methods based on the proximity key position, the touch force, the position, and the like.
Specifically, in a preferred embodiment of the present invention, if the input habit information is a normal pressing pressure range, the sub-step S13 may include the following sub-steps:
a sub-step S11 of detecting a key position of a user and a pressing pressure value in the key position;
in practical application, the key position can be detected and the pressing pressure value on the key position can be obtained through a set of touch technology integrating capacitive touch and infrared induction.
Specifically, if the terminal is a terminal with a touch screen, one or more infrared transmitters may be disposed below the touch screen, and infrared light may be transmitted to the touch screen glass cover at a specific angle.
These angles are selected to provide 100% reflection of reflected light from the top and bottom surfaces of the cover, as well as from the ambient air and fingers.
When the light in the glass cover is reflected, the emitted infrared rays will trigger a receiver which can calculate the total number of total internal reflections, and the receiver displays different output readings according to whether the reflected light comes from the surrounding air or the finger of the user, thereby realizing the detection of the pressing pressure.
Of course, in addition to the above, a pressure sensor may be attached under the touch screen to detect the pressing pressure, or the pressing pressure may be detected by other methods, which is not limited in the embodiment of the present invention.
And a substep S12, if the pressing pressure value is not within the normal pressing pressure range, deleting the key value corresponding to the key position in the code character string to obtain a first correction character string.
In a specific implementation, if a pressing pressure value of a user in a certain key is not within the pressing pressure range, the key value corresponding to the key position in the code character string may be deleted, and a first correction character string is obtained. For example, when the user accidentally touches the key where the character b is located during input, the pressing force is generally not within the normal input force, and the character b can be deleted and corrected.
In another preferred embodiment of the present invention, if the input habit information of the user includes a wrong input character string with a wrong input frequency higher than a preset threshold; the sub-step S13 may include the following sub-steps:
a substep S21, establishing a wrong input habit database of the user based on the input habit information, wherein the wrong input habit database comprises the corresponding relation between various wrong input character strings and correct character strings of the user;
and a substep S22, when the code character string is matched with the misinput character string in the misinput habit database, replacing the error character string in the code character string with the correct character string to obtain the first correction character string.
Specifically, the input habit information of the user may further include a mistakenly input character string with the mistaken input frequency higher than a preset threshold value, the embodiment of the present invention may organize the partial character string and the corresponding correct character string into a mistakenly input habit database, and when the encoded character string hits the mistakenly input habit database, extract the corresponding correct character string, and replace the mistakenly input part of the encoded character string with the correct character string.
In the embodiment of the invention, the first correction character string after error correction processing of the code character string can be obtained by combining with the personalized characteristics of the user. For example, the user a intends to input "may", the user B intends to input "may", but both of them are wrongly input as "kleyima", the client of the user a obtains the optimal first correction character string as "keyima" by the personalized characteristics such as the wrong input habit of the user, and the client of the user B obtains the optimal first correction character string as "leyima" by the personalized characteristics such as the wrong input habit of the user.
Step 103, sending the code character string and the first correction character string to a server;
when the method and the device are applied to the embodiment of the invention, if the condition that the coding character string is wrongly input is detected, the client side can simultaneously send the coding character string and the first correction character string to the server after obtaining the first correction character string.
In a specific implementation, the client may send a correction request to the server, where the correction request includes at least the code string and the first correction string.
In practice, if the client does not detect that the encoded string has an erroneous input condition, in order to avoid the missing determination of the client, the client may only send the encoded string to the server for error correction.
On the server side, the error correction processing on the server side can be performed according to the encoding character string and the first correction character string. In a preferred embodiment, the server may be a cloud server.
In one embodiment, the server may maintain an error correction database, where error strings and corresponding correct strings of multiple users collected by the cloud server are stored in the error correction database. Firstly, the server can match the code character string in an error correction database, if the matching is successful, a corresponding correct character string is obtained, and an error character string in the code character string is replaced by the correct character string, so that a second correction character string is obtained.
And then, the cloud server obtains a target candidate item according to the first correction character string and the second correction character string, and returns the target candidate item to the client, wherein the target candidate item can be a character, a word, a sentence and the like matched with the first correction character string and/or the second correction character string.
In a specific implementation, the server may further include a system lexicon, and the lexicon may include various language information, for example:
(1) an entry;
although an input method can be constructed on the basis of characters, the input method uses entries in a large number because words are the smallest units of semantic meaning commonly used in chinese.
For example, when a user inputs the string "zhuan" based on the pinyin criterion, there are multiple homophones, and it is difficult to determine which word the user wants to input "turn, specialize, earn, brick … …".
Similarly, when the user inputs the character string "li" based on the pinyin specification, a plurality of homophones exist, and it is difficult to determine which character of "li, li … …" the user wants to input.
However, if the user continuously inputs the character string "zhuanli" based on the pinyin criterion, the input method may determine that the word "patent" is input by the user with a high probability according to the existing entry rule.
(2) And (4) word frequency.
Homophones exist in large numbers and homophones still exist, so the input method generally lists all options for the user to select.
However, the position of the candidate has a great influence on the usability of the input method, and it is often more beneficial for the user to put the more frequently used candidate at a position, i.e. the word frequency (i.e. the use frequency of the entry, including the use frequency of the current user and the use frequency of the group users) is one of the bases for sorting the candidates.
In addition, the input method often integrates the function of self-constructed words and sentences, and in this case, the word frequency is also one of the bases for word and sentence construction.
Of course, in addition, the word stock may also include other information, such as language connection relationships, that is, connection relationships between words, for example, "of" often appears after adjectives, nouns, pronouns, and the like, and "of" often appears after adverbs, and the like, which is not limited in the embodiment of the present invention.
The server may match the first corrected string and/or the second corrected string in the system lexicon to obtain a target candidate.
In an embodiment, the cloud server may first determine whether the first corrected string and the second corrected string are consistent, and if the first corrected string and the second corrected string are consistent, the first corrected string or the second corrected string may be matched in a preset cloud system lexicon to obtain a matched target candidate.
If the first correction character string and the second correction character string are not consistent, the first correction character string and the second correction character string can be matched in a preset cloud system word bank respectively, a first error correction result matched with the first correction character string is obtained, and a second error correction result matched with the second correction character string is obtained.
Then, whether the first error correction result is consistent with the second error correction result is judged, and if the two error correction results are consistent, one of the two error correction results (the first error correction result or the second error correction result) can be used as a target candidate to be returned to the client.
If the two error correction results are not consistent, the target candidate item can be determined in the following way:
1) the first error correction result and the second error correction result may be combined as target candidates.
2) The word frequencies of the first error correction result and the second error correction result can be respectively obtained, and the weights are calculated according to the word frequencies, generally speaking, the higher the word frequency is, the higher the weight is, and conversely, the lower the word frequency is, the lower the weight is. And then, sorting the first error correction result and the second error correction result according to the weight, and returning the first error correction result and the second error correction result to the client according to the sorting order.
3) A user attribute;
different users may need to use the same word, but the importance of the word may vary from user to user.
For example, the homophones "research" and "smoking and drinking" are used more often in academic areas, while the latter are used more often in daily life, but both are possible.
Thus, when the user enters the pinyin string "yanjiu", both may appear in the candidate. However, if it is clear that the current user is a student, the "study" is more likely to be required by the current user, and the weight thereof may be increased.
4) Inputting an environment;
the weight of the lexicon and/or the entry can be dynamically adjusted through the use environment of the input method.
For example, if the input method includes two cell word banks of "office words" and "network words," the entry words commonly used in office and the entry words commonly used in network chat are recorded, respectively.
The two Word banks are generally the same in priority, but when the input method identifies that the input is made in Word, the Word bank of the office expression can be weighted, and when the user makes an input in the conversation window of the instant messaging tool, the Word bank of the network expression can be weighted.
5) Location.
If the word banks in the word bank are ordered according to the weights, if the entry with the high weight is ordered in the front, the relative position of the entry in the word bank can express the weight of the entry.
In a specific implementation, taking a chinese character as an example, the server matches the first corrected character string and/or the second corrected character string in a preset cloud system lexicon, and when obtaining a matched target candidate item, the following decoding process may be included:
a. pinyin analysis: the character string is segmented into pinyin.
For example, the character string "keyima" is divided into "ke", "yi", and "ma", and the character string "leyima" is divided into "le", "yi", and "ma".
b. Chinese character decoding: and searching characters, words and sentences corresponding to the pinyin in a system word bank.
The language information needed by the input method is stored in the system word stock, and as different characters may correspond to the same code, for a specific character string, the input method can complete the conversion of the character string with the characters, the words and the sentences through the word stock, and guess the real input intention of the user.
In the embodiment of the invention, when the server performs error correction processing, the server can perform processing by combining the error correction processing result fed back by the client so as to obtain a more accurate error correction result. For example, according to the above example, if the client of the user a sends the encoded character string "kleyima" and the first correction character string "keyima" to the server at the same time, the server obtains the second correction character string "keyima" and "leyima" according to the encoded character string "kleyima", where "keyima" is the same as the first correction character string, and therefore, the weight of "keyima" is set to be 2, the weight of "leyima" is set to be 1, the server queries "keyima" and "leyima" in the system thesaurus to obtain the target candidates of "may be" and "be", and the weight of "may be" is 2, and the weight of "may be" is 1, and then "may be" is first returned to the client.
And 104, receiving the target candidate items returned by the server, and displaying at least part of the target candidate items.
After receiving the target candidate items returned by the server, the client side can display at least part of the target candidate items.
Specifically, because the positions in the candidate bar are generally limited, especially in electronic devices with small screens such as mobile phones, the obtained target candidates may be displayed in a paginated manner, the top-ranked target candidates are preferentially displayed in the candidate bar, and the other candidates may be displayed in the candidate bar generally through a page-turning operation.
After the target candidate items are shown to the user, if a certain target candidate item is a candidate item required by the user, the user can perform screen-up operation by performing pressing operation or clicking operation on the candidate item.
When the client detects the pressing operation or the clicking operation, a position where the pressing operation or the clicking operation occurs may be determined, and if a target candidate item is displayed in the position, the pressing operation or the clicking operation for the candidate item may be determined to be detected.
In the embodiment of the invention, each client is taken as the distributed client of the cloud server, when the client judges that an error exists in the input of the user, the code character string originally input by the user is uploaded to the cloud server, and the error correction result of the code character string by the client is simultaneously uploaded to the server, so that the overhead of repeatedly calculating and correcting the string by the cloud is avoided by the distributed processing method of returning the error transmission string to the local calculation result of the correct string.
Furthermore, the first correction character string obtained by the client is obtained according to the user habit information, the input scene and the like, so that the individual requirements of the user can be met, the accuracy of the cloud error correction result is higher, and the error of the user can be corrected more accurately.
Referring to fig. 3, a flowchart illustrating steps of a second embodiment of the method for performing error correction by using an input method of the present invention is shown, which may specifically include the following steps:
step 301, receiving a code character string and a first correction character string sent by a client;
the first correction character string is an error correction result obtained after the client performs error correction processing on the coding character string locally; the code character string is an original character string input by a user.
Step 302, performing error correction processing on the encoded character string to obtain a second correction character string;
step 303, acquiring a target candidate item based on the first corrected character string and the second corrected character string;
step 304, returning the target candidate item to the client.
In a preferred embodiment of the present invention, step 302 may include the following sub-steps:
substep S31, matching the code character strings in a preset error correction database, wherein the error correction database comprises a corresponding relationship between a plurality of error character strings collected by the server and corresponding correct character strings;
substep S32, if the matching is successful, determining an error character string in the code character string;
a substep S33, obtaining a correct character string corresponding to the error character string;
and a substep S34, replacing the error character string in the code character string with the correct character string to obtain a second correction character string.
In a preferred embodiment of the present invention, step 303 may further include: and if the first corrected character string is consistent with the second corrected character string, matching the first corrected character string or the second corrected character string in a preset cloud system word bank to obtain a matched target candidate item.
In another preferred embodiment of the present invention, step 303 may further include: if the first correction character string is inconsistent with the second correction character string, respectively matching the first correction character string and the second correction character string in a preset cloud system word bank to obtain a first error correction result matched with the first correction character string and a second error correction result matched with the second correction character string; if the first error correction result is consistent with the second error correction result, taking the first error correction result or the second error correction result as the target candidate item; and if the first error correction result is inconsistent with the second error correction result, taking the first error correction result and the second error correction result as the target candidate.
The embodiment of fig. 3 is substantially similar to the embodiment of fig. 1, so that the description is simple, and the relevant points can be described by referring to the embodiment of fig. 1.
It should be noted that, for simplicity of description, the method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the illustrated order of acts, as some steps may occur in other orders or concurrently in accordance with the embodiments of the present invention. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred and that no particular act is required to implement the invention.
Referring to fig. 4, a block diagram of a structure of an embodiment of a client for error correction by an input method according to the present invention is shown, and the structure may specifically include the following modules:
a code string receiving module 401, configured to receive a code string input by a user;
a correcting module 402, configured to perform error correction processing on the encoded character string locally at the client to obtain a corresponding first corrected character string;
a character string sending module 403, configured to send the encoded character string and the first correction character string to a server, where the server is configured to perform error correction processing on the encoded character string to obtain a second correction character string, obtain a target candidate item based on the first correction character string and the second correction character string, and return the target candidate item to the client;
and the display module 404 is configured to receive the target candidate item returned by the server, and display at least a part of the target candidate item.
In an embodiment of the present invention, the client may further include the following modules:
the judging module is used for judging whether the code character string has input errors or not; if the code string has an input error, the correcting module 402 is called.
In one embodiment of the present invention, the correcting module 402 comprises:
the historical data acquisition submodule is used for acquiring historical input information of a user;
the input habit analysis submodule is used for calculating input habit information of a user based on the historical input information;
and the correction submodule is used for carrying out error correction processing on the coding character string according to the input habit information to obtain a first correction character string.
In an embodiment of the invention, the input habit information includes a normal pressing pressure range, and the correction submodule is further configured to:
detecting a key position of a user and a pressing pressure value in the key position;
and if the pressing pressure value is not within the normal pressing pressure range, deleting the key value corresponding to the key position in the code character string to obtain a first correction character string.
In another embodiment of the present invention, the input habit information includes a misinput character string, and the misinput character string is a character string with a misinput frequency higher than a preset threshold;
the correction submodule is further configured to:
establishing a wrong input habit database of the user based on the input habit information, wherein the wrong input habit database comprises the corresponding relation between various wrong input character strings and corresponding correct character strings of the user;
and when the code character string is matched with the wrong input character string in the wrong input habit database, replacing the wrong character string in the code character string with the correct character string to obtain the first correction character string.
With regard to the client in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment related to the method, and will not be elaborated here.
Referring to fig. 5, a block diagram of a server for performing error correction by using an input method according to an embodiment of the present invention is shown, and the server may specifically include the following modules:
a character string receiving module 501, configured to receive a code character string and a first correction character string sent by a client, where the first correction character string is an error correction result obtained after the client performs error correction on the code character string locally, and the code character string is an original character string input by a user;
an error correction processing module 502, configured to perform error correction processing on the encoded character string to obtain a second corrected character string;
a candidate item obtaining module 503, configured to obtain a target candidate item based on the first corrected character string and the second corrected character string;
a candidate sending module 504, configured to return the target candidate to the client.
In one embodiment of the present invention, the error correction processing module 502 includes:
the first matching submodule is used for matching the coding character strings in a preset error correction database, wherein the error correction database comprises a corresponding relation between a plurality of error character strings acquired by a server and corresponding correct character strings;
an error character determining sub-module, configured to determine an error character string in the encoded character string when the matching is successful;
the correct character acquisition sub-module is used for acquiring a correct character string corresponding to the error character string;
and the character replacing submodule is used for replacing the correct character string with the wrong character string in the coded character string to obtain a second corrected character string.
In an embodiment of the present invention, the candidate item obtaining module 503 includes:
and the second matching sub-module is used for matching the first corrected character string or the second corrected character string in a preset cloud system word bank to obtain a matched target candidate item when the first corrected character string is consistent with the second corrected character string.
In an embodiment of the present invention, the candidate item obtaining module 503 includes:
the third matching sub-module is used for respectively matching the first correction character string and the second correction character string in a preset cloud system word library when the first correction character string is inconsistent with the second correction character string, and obtaining a first error correction result matched with the first correction character string and a second error correction result matched with the second correction character string; if the first error correction result is consistent with the second error correction result, taking the first error correction result or the second error correction result as the target candidate item; and if the first error correction result is inconsistent with the second error correction result, taking the first error correction result and the second error correction result as the target candidate.
With regard to the server in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment related to the method, and will not be elaborated here.
Fig. 6 is a block diagram illustrating an apparatus 600 for error correction of an input method according to an example embodiment. For example, the apparatus 600 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.
Referring to fig. 6, apparatus 600 may include one or more of the following components: processing component 602, memory 604, power component 606, multimedia component 608, audio component 610, input/output (I/O) interface 612, sensor component 614, and communication component 616.
The processing component 602 generally controls overall operation of the device 600, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing elements 602 may include one or more processors 620 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 602 can include one or more modules that facilitate interaction between the processing component 602 and other components. For example, the processing component 602 can include a multimedia module to facilitate interaction between the multimedia component 608 and the processing component 602.
The memory 604 is configured to store various types of data to support operations at the apparatus 600. Examples of such data include instructions for any application or method operating on device 600, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 604 may be implemented by any type or combination of volatile or non-volatile 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 disks.
Power supply component 606 provides power to the various components of device 600. The power components 606 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the apparatus 600.
The multimedia component 608 includes a screen that provides an output interface between the device 600 and a 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 an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 608 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the device 600 is in an operating 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 a focal length and optical zoom capability.
The audio component 610 is configured to output and/or input audio signals. For example, audio component 610 includes a Microphone (MIC) configured to receive external audio signals when apparatus 600 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal may further be stored in the memory 604 or transmitted via the communication component 616. In some embodiments, audio component 610 further includes a speaker for outputting audio signals.
The I/O interface 612 provides an interface between the processing component 602 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor component 614 includes one or more sensors for providing status assessment of various aspects of the apparatus 600. For example, the sensor component 614 may detect an open/closed state of the device 600, the relative positioning of components, such as a display and keypad of the apparatus 600, the sensor component 614 may also detect a change in position of the apparatus 600 or a component of the apparatus 600, the presence or absence of user contact with the apparatus 600, orientation or acceleration/deceleration of the apparatus 600, and a change in temperature of the apparatus 600. The sensor assembly 614 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 614 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 614 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 616 is configured to facilitate communications between the apparatus 600 and other devices in a wired or wireless manner. The apparatus 600 may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 616 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 616 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 600 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, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer readable storage medium comprising instructions, such as the memory 604 comprising instructions, executable by the processor 620 of the apparatus 600 to perform the above-described method is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
A non-transitory computer readable storage medium having instructions therein which, when executed by a processor of a mobile terminal, enable the mobile terminal to perform a method of error correction for an input method, the method comprising: receiving a coded character string input by a user; carrying out error correction processing on the coding character string locally at a client to obtain a corresponding first correction character string; sending the encoded character string and the first correction character string to a server, wherein the server is used for carrying out error correction processing on the encoded character string to obtain a second correction character string, acquiring a target candidate item based on the first correction character string and the second correction character string, and returning the target candidate item to the client; and receiving target candidate items returned by the server, and displaying at least part of the target candidate items.
Fig. 7 is a schematic structural diagram of a server in an embodiment of the present invention. The server 700 may vary significantly depending on configuration or performance, and may include one or more Central Processing Units (CPUs) 722 (e.g., one or more processors) and memory 732, one or more storage media 730 (e.g., one or more mass storage devices) storing applications 742 or data 744. Memory 732 and storage medium 730 may be, among other things, transient storage or persistent storage. The program stored in the storage medium 730 may include one or more modules (not shown), each of which may include a series of instruction operations for the server. Further, the central processor 722 may be configured to communicate with the storage medium 730, and execute a series of instruction operations in the storage medium 730 on the server 700.
The server 700 may also include one or more power supplies 726, one or more wired or wireless network interfaces 750, one or more input-output interfaces 758, one or more keyboards 756, and/or one or more operating systems 741, such as Windows Server, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.
Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.
It will be understood that the invention is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the invention is only limited by the appended claims
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (24)

1. A method for correcting errors of an input method, the method comprising:
receiving a coded character string input by a user;
carrying out error correction processing on the coding character string locally at a client to obtain a corresponding first correction character string;
sending the encoded character string and the first correction character string to a server, wherein the server is used for carrying out error correction processing on the encoded character string to obtain a second correction character string, acquiring a target candidate item based on the first correction character string and the second correction character string, and returning the target candidate item to the client; the server is used for respectively matching the first correction character string and the second correction character string in a preset cloud system word bank if the first correction character string is inconsistent with the second correction character string, and obtaining a first error correction result matched with the first correction character string and a second error correction result matched with the second correction character string; if the first error correction result is consistent with the second error correction result, taking the first error correction result or the second error correction result as the target candidate item; if the first error correction result is inconsistent with the second error correction result, taking the first error correction result and the second error correction result as the target candidate items;
and receiving target candidate items returned by the server, and displaying at least part of the target candidate items.
2. The method according to claim 1, further comprising, before the step of performing error correction processing on the encoded string locally at the client to obtain a corresponding first correction string:
judging whether the coded character string has an input error;
and if the coding character string has an input error, executing the step of carrying out error correction processing on the coding character string locally at the client to obtain a corresponding first correction character string.
3. The method according to claim 1 or 2, wherein the step of performing error correction processing on the encoded string locally at the client to obtain a corresponding first correction string comprises:
collecting historical input information of a user;
calculating input habit information of a user based on the historical input information;
and carrying out error correction processing on the coding character string according to the input habit information to obtain a first correction character string.
4. The method according to claim 3, wherein the input habit information includes a normal pressing pressure range, and the step of performing error correction processing on the code string according to the input habit information to obtain a first correction string includes:
detecting a key position of a user and a pressing pressure value in the key position;
and if the pressing pressure value is not within the normal pressing pressure range, deleting the key value corresponding to the key position in the code character string to obtain a first correction character string.
5. The method according to claim 3, wherein the input habit information comprises a misinput character string, and the misinput character string is a character string with a misinput frequency higher than a preset threshold;
the step of performing error correction processing on the code character string according to the input habit information to obtain a first correction character string includes:
establishing a wrong input habit database of the user based on the input habit information, wherein the wrong input habit database comprises the corresponding relation between various wrong input character strings and corresponding correct character strings of the user;
and when the code character string is matched with the wrong input character string in the wrong input habit database, replacing the wrong character string in the code character string with the correct character string to obtain the first correction character string.
6. A method for correcting errors of an input method, the method comprising:
receiving a coded character string and a first correction character string sent by a client, wherein the first correction character string is an error correction result obtained after the client performs error correction processing on the coded character string locally, and the coded character string is an original character string input by a user;
carrying out error correction processing on the coded character string to obtain a second correction character string;
acquiring a target candidate item based on the first correction character string and the second correction character string;
returning the target candidate item to the client;
the step of obtaining a target candidate based on the first correction string and the second correction string comprises:
if the first correction character string is inconsistent with the second correction character string, respectively matching the first correction character string and the second correction character string in a preset cloud system word bank to obtain a first error correction result matched with the first correction character string and a second error correction result matched with the second correction character string;
if the first error correction result is consistent with the second error correction result, taking the first error correction result or the second error correction result as the target candidate item;
and if the first error correction result is inconsistent with the second error correction result, taking the first error correction result and the second error correction result as the target candidate.
7. The method of claim 6, wherein the step of performing error correction processing on the encoded string to obtain a second correction string comprises:
matching the code character strings in a preset error correction database, wherein the error correction database comprises a corresponding relation between a plurality of error character strings acquired by a server and corresponding correct character strings;
if the matching is successful, determining an error character string in the code character string;
acquiring a correct character string corresponding to the error character string;
and replacing the error character string in the code character string with the correct character string to obtain a second correction character string.
8. The method of claim 6 or 7, wherein the step of obtaining target candidates based on the first correction string and the second correction string comprises:
and if the first corrected character string is consistent with the second corrected character string, matching the first corrected character string or the second corrected character string in a preset cloud system word bank to obtain a matched target candidate item.
9. A client for error correction of an input method, the client comprising:
the code character string receiving module is used for receiving a code character string input by a user;
the correction module is used for carrying out error correction processing on the coding character string locally at the client so as to obtain a corresponding first correction character string;
the character string sending module is used for sending the encoded character string and the first correction character string to a server, and the server is used for carrying out error correction processing on the encoded character string to obtain a second correction character string, acquiring a target candidate item based on the first correction character string and the second correction character string, and returning the target candidate item to the client; the server is used for respectively matching the first correction character string and the second correction character string in a preset cloud system word bank if the first correction character string is inconsistent with the second correction character string, and obtaining a first error correction result matched with the first correction character string and a second error correction result matched with the second correction character string; if the first error correction result is consistent with the second error correction result, taking the first error correction result or the second error correction result as the target candidate item; if the first error correction result is inconsistent with the second error correction result, taking the first error correction result and the second error correction result as the target candidate items;
and the display module is used for receiving the target candidate items returned by the server and displaying at least part of the target candidate items.
10. The client of claim 9, further comprising: the judging module is used for judging whether the code character string has input errors or not; and if the coding character string has an input error, calling a correction module.
11. The client of claim 9, wherein the correction module comprises:
the historical data acquisition submodule is used for acquiring historical input information of a user;
the input habit analysis submodule is used for calculating input habit information of a user based on the historical input information;
and the correction submodule is used for carrying out error correction processing on the coding character string according to the input habit information to obtain a first correction character string.
12. The client of claim 11, wherein the input habit information includes a normal compression pressure range, and wherein the correction submodule is further configured to:
detecting a key position of a user and a pressing pressure value in the key position;
and if the pressing pressure value is not within the normal pressing pressure range, deleting the key value corresponding to the key position in the code character string to obtain a first correction character string.
13. The client according to claim 11, wherein the input habit information includes a misinput character string, and the misinput character string is a character string with a misinput frequency higher than a preset threshold;
the correction submodule is further configured to:
establishing a wrong input habit database of the user based on the input habit information, wherein the wrong input habit database comprises the corresponding relation between various wrong input character strings and corresponding correct character strings of the user;
and when the code character string is matched with the wrong input character string in the wrong input habit database, replacing the wrong character string in the code character string with the correct character string to obtain the first correction character string.
14. A server for correcting errors of an input method, the server comprising:
the character string receiving module is used for receiving a coding character string and a first correction character string sent by a client, wherein the first correction character string is an error correction result obtained after the client performs error correction processing on the coding character string locally, and the coding character string is an original character string input by a user;
the error correction processing module is used for carrying out error correction processing on the coding character string to obtain a second correction character string;
a candidate item acquisition module, configured to acquire a target candidate item based on the first corrected character string and the second corrected character string;
the candidate item sending module is used for returning the target candidate item to the client;
the candidate item obtaining module further includes:
the third matching sub-module is used for respectively matching the first correction character string and the second correction character string in a preset cloud system word library when the first correction character string is inconsistent with the second correction character string, and obtaining a first error correction result matched with the first correction character string and a second error correction result matched with the second correction character string;
if the first error correction result is consistent with the second error correction result, taking the first error correction result or the second error correction result as the target candidate item;
and if the first error correction result is inconsistent with the second error correction result, taking the first error correction result and the second error correction result as the target candidate.
15. The server according to claim 14, wherein the error correction processing module includes:
the first matching submodule is used for matching the coding character strings in a preset error correction database, wherein the error correction database comprises a corresponding relation between a plurality of error character strings acquired by a server and corresponding correct character strings;
an error character determining sub-module, configured to determine an error character string in the encoded character string when the matching is successful;
the correct character acquisition sub-module is used for acquiring a correct character string corresponding to the error character string;
and the character replacing submodule is used for replacing the correct character string with the wrong character string in the coded character string to obtain a second corrected character string.
16. The server of claim 14, wherein the candidate acquisition module comprises:
and the second matching sub-module is used for matching the first corrected character string or the second corrected character string in a preset cloud system word bank to obtain a matched target candidate item when the first corrected character string is consistent with the second corrected character string.
17. An apparatus for error correction of an input method, comprising a memory, and one or more programs, wherein the one or more programs are stored in the memory, and wherein execution of the one or more programs by one or more processors comprises instructions for:
receiving a coded character string input by a user;
carrying out error correction processing on the coding character string locally at a client to obtain a corresponding first correction character string;
sending the encoded character string and the first correction character string to a server, wherein the server is used for carrying out error correction processing on the encoded character string to obtain a second correction character string, acquiring a target candidate item based on the first correction character string and the second correction character string, and returning the target candidate item to the client; the server is used for respectively matching the first correction character string and the second correction character string in a preset cloud system word bank if the first correction character string is inconsistent with the second correction character string, and obtaining a first error correction result matched with the first correction character string and a second error correction result matched with the second correction character string; if the first error correction result is consistent with the second error correction result, taking the first error correction result or the second error correction result as the target candidate item; if the first error correction result is inconsistent with the second error correction result, taking the first error correction result and the second error correction result as the target candidate items;
and receiving target candidate items returned by the server, and displaying at least part of the target candidate items.
18. The apparatus of claim 17, further comprising instructions to:
judging whether the coded character string has an input error;
and if the coding character string has an input error, executing the step of carrying out error correction processing on the coding character string locally at the client to obtain a corresponding first correction character string.
19. The apparatus according to claim 17 or 18, wherein the step of performing error correction processing on the encoded string locally at the client to obtain a corresponding first correction string comprises:
collecting historical input information of a user;
calculating input habit information of a user based on the historical input information;
and carrying out error correction processing on the coding character string according to the input habit information to obtain a first correction character string.
20. The apparatus according to claim 19, wherein the input habit information includes a normal pressing pressure range, and the step of performing error correction processing on the code string according to the input habit information to obtain a first correction string comprises:
detecting a key position of a user and a pressing pressure value in the key position;
and if the pressing pressure value is not within the normal pressing pressure range, deleting the key value corresponding to the key position in the code character string to obtain a first correction character string.
21. The apparatus of claim 19, wherein the input habit information comprises a misinput character string, and the misinput character string is a character string with a misinput frequency higher than a preset threshold;
the step of performing error correction processing on the code character string according to the input habit information to obtain a first correction character string includes:
establishing a wrong input habit database of the user based on the input habit information, wherein the wrong input habit database comprises the corresponding relation between various wrong input character strings and corresponding correct character strings of the user;
and when the code character string is matched with the wrong input character string in the wrong input habit database, replacing the wrong character string in the code character string with the correct character string to obtain the first correction character string.
22. An apparatus for error correction of an input method, comprising a memory, and one or more programs, wherein the one or more programs are stored in the memory, and wherein execution of the one or more programs by one or more processors comprises instructions for:
receiving a coded character string and a first correction character string sent by a client, wherein the first correction character string is an error correction result obtained after the client performs error correction processing on the coded character string locally, and the coded character string is an original character string input by a user;
carrying out error correction processing on the coded character string to obtain a second correction character string;
acquiring a target candidate item based on the first correction character string and the second correction character string;
returning the target candidate item to the client;
the step of obtaining a target candidate based on the first correction string and the second correction string comprises:
if the first correction character string is inconsistent with the second correction character string, respectively matching the first correction character string and the second correction character string in a preset cloud system word bank to obtain a first error correction result matched with the first correction character string and a second error correction result matched with the second correction character string;
if the first error correction result is consistent with the second error correction result, taking the first error correction result or the second error correction result as the target candidate item;
and if the first error correction result is inconsistent with the second error correction result, taking the first error correction result and the second error correction result as the target candidate.
23. The apparatus according to claim 22, wherein said step of performing error correction processing on said encoded string to obtain a second correction string comprises:
matching the code character strings in a preset error correction database, wherein the error correction database comprises a corresponding relation between a plurality of error character strings acquired by a server and corresponding correct character strings;
if the matching is successful, determining an error character string in the code character string;
acquiring a correct character string corresponding to the error character string;
and replacing the error character string in the code character string with the correct character string to obtain a second correction character string.
24. The apparatus of claim 22 or 23, wherein the step of obtaining target candidates based on the first correction string and the second correction string comprises:
and if the first corrected character string is consistent with the second corrected character string, matching the first corrected character string or the second corrected character string in a preset cloud system word bank to obtain a matched target candidate item.
CN201610362648.2A 2016-05-26 2016-05-26 Method, client, server and device for correcting errors of input method Active CN107436691B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610362648.2A CN107436691B (en) 2016-05-26 2016-05-26 Method, client, server and device for correcting errors of input method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610362648.2A CN107436691B (en) 2016-05-26 2016-05-26 Method, client, server and device for correcting errors of input method

Publications (2)

Publication Number Publication Date
CN107436691A CN107436691A (en) 2017-12-05
CN107436691B true CN107436691B (en) 2021-12-28

Family

ID=60453645

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610362648.2A Active CN107436691B (en) 2016-05-26 2016-05-26 Method, client, server and device for correcting errors of input method

Country Status (1)

Country Link
CN (1) CN107436691B (en)

Families Citing this family (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110389666A (en) * 2018-04-16 2019-10-29 北京搜狗科技发展有限公司 A kind of input error correction method and device
CN108829674A (en) * 2018-06-08 2018-11-16 Oppo(重庆)智能科技有限公司 Content error correction method and relevant apparatus
CN110780749B (en) * 2018-07-11 2024-03-08 北京搜狗科技发展有限公司 Character string error correction method and device
CN109491515B (en) * 2018-10-23 2022-12-06 维沃移动通信有限公司 Input method, intelligent terminal and computer readable storage medium
CN109460158A (en) * 2018-10-29 2019-03-12 维沃移动通信有限公司 Characters input method, character correction model training method and mobile terminal
CN111221710B (en) * 2018-11-27 2024-04-26 北京搜狗科技发展有限公司 Method, device and equipment for identifying user type
CN109597500A (en) * 2018-12-06 2019-04-09 北京金山安全软件有限公司 Input error correction method and device for Chinese pinyin and electronic equipment
CN109656384B (en) * 2018-12-24 2023-07-18 抖音视界有限公司 Character string input method and device
CN109739368A (en) * 2018-12-29 2019-05-10 咪咕文化科技有限公司 A kind of method, apparatus of the fractionation of the Chinese phonetic alphabet
CN111522448B (en) * 2019-02-02 2024-04-30 北京搜狗科技发展有限公司 Method, device and equipment for providing input candidate items
CN110297549B (en) * 2019-05-15 2023-06-20 北京百度网讯科技有限公司 Input processing method, device, equipment and storage medium
CN110764647B (en) * 2019-10-21 2023-10-31 科大讯飞股份有限公司 Input error correction method, input error correction device, electronic equipment and storage medium
CN111028834B (en) * 2019-10-30 2023-01-20 蚂蚁财富(上海)金融信息服务有限公司 Voice message reminding method and device, server and voice message reminding equipment
CN111931489B (en) * 2020-07-29 2023-08-08 中国工商银行股份有限公司 Text error correction method, device and equipment
CN112836497A (en) * 2021-01-29 2021-05-25 上海寻梦信息技术有限公司 Address correction method, device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101937313A (en) * 2010-09-13 2011-01-05 中兴通讯股份有限公司 Dynamic generation and input method and device for touch keyboard
CN103257718A (en) * 2012-02-17 2013-08-21 腾讯科技(深圳)有限公司 Chinese character input method, device and system
CN103389915A (en) * 2013-07-23 2013-11-13 百度在线网络技术(北京)有限公司 Input error correcting method, input error correcting device, input error correcting server and input error correcting server system
CN103617253A (en) * 2013-11-29 2014-03-05 百度在线网络技术(北京)有限公司 Searching method, client terminal and server

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090063406A1 (en) * 2007-08-27 2009-03-05 Amit Golander Method, Service and Search System for Network Resource Address Repair

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101937313A (en) * 2010-09-13 2011-01-05 中兴通讯股份有限公司 Dynamic generation and input method and device for touch keyboard
CN103257718A (en) * 2012-02-17 2013-08-21 腾讯科技(深圳)有限公司 Chinese character input method, device and system
CN103389915A (en) * 2013-07-23 2013-11-13 百度在线网络技术(北京)有限公司 Input error correcting method, input error correcting device, input error correcting server and input error correcting server system
CN103617253A (en) * 2013-11-29 2014-03-05 百度在线网络技术(北京)有限公司 Searching method, client terminal and server

Also Published As

Publication number Publication date
CN107436691A (en) 2017-12-05

Similar Documents

Publication Publication Date Title
CN107436691B (en) Method, client, server and device for correcting errors of input method
CN107544684B (en) Candidate word display method and device
CN107092424B (en) Display method and device of error correction items and device for displaying error correction items
CN107102746B (en) Candidate word generation method and device and candidate word generation device
CN107844199B (en) Input method, system and device for inputting
US11640503B2 (en) Input method, input device and apparatus for input
CN107870677B (en) Input method, input device and input device
CN107564526B (en) Processing method, apparatus and machine-readable medium
CN108345612B (en) Problem processing method and device for problem processing
CN109002183B (en) Information input method and device
CN107797676B (en) Single character input method and device
CN107424612B (en) Processing method, apparatus and machine-readable medium
CN108803890B (en) Input method, input device and input device
CN107688397B (en) Input method, system and device for inputting
CN107132927B (en) Input character recognition method and device for recognizing input characters
CN112133295B (en) Speech recognition method, device and storage medium
CN107422921B (en) Input method, input device, electronic equipment and storage medium
CN113936697B (en) Voice processing method and device for voice processing
KR102327790B1 (en) Information processing methods, devices and storage media
CN109388252B (en) Input method and device
CN113743102A (en) Method and device for recognizing characters and electronic equipment
CN107817942B (en) Sliding input method and system and device for sliding input
CN114610163A (en) Recommendation method, apparatus and medium
CN113515618A (en) Voice processing method, apparatus and medium
CN108227952B (en) Method and system for generating custom word and device for generating custom word

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