CN110837305A - Input method error correction method and device - Google Patents

Input method error correction method and device Download PDF

Info

Publication number
CN110837305A
CN110837305A CN201810936030.1A CN201810936030A CN110837305A CN 110837305 A CN110837305 A CN 110837305A CN 201810936030 A CN201810936030 A CN 201810936030A CN 110837305 A CN110837305 A CN 110837305A
Authority
CN
China
Prior art keywords
error correction
input
key
holding posture
mapping relation
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.)
Pending
Application number
CN201810936030.1A
Other languages
Chinese (zh)
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 CN201810936030.1A priority Critical patent/CN110837305A/en
Publication of CN110837305A publication Critical patent/CN110837305A/en
Pending legal-status Critical Current

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
    • 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/017Gesture based interaction, e.g. based on a set of recognized hand gestures

Landscapes

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

Abstract

The invention discloses an input method error correction method and a device, wherein the method comprises the following steps: determining a holding posture type corresponding to a current key in a user input process; acquiring an error correction mapping relation table corresponding to the holding posture type; and carrying out error correction processing according to the error correction mapping relation table to obtain one or more input strings after error correction. The invention can improve the error correction capability and accuracy of the input method and improve the input quality of the user.

Description

Input method error correction method and device
Technical Field
The invention relates to the field of input method error correction, in particular to an input method error correction method and device.
Background
The input method is a coding method for inputting various symbols into a computer or other equipment, and is an indispensable tool for interaction between human beings and computers, for example, pinyin input is one of a plurality of input methods, Chinese characters are input according to pinyin rules, special memory is not needed, the Chinese characters accord with thinking habits of people, and the Chinese characters can be input as long as pinyin is available.
In the input process of a user, sometimes, carelessness is caused or the key clicking speed is high, the condition of clicking wrong keys often occurs, so that input errors are caused. In the prior art, the error correction techniques of the input method are roughly divided into two types: key error correction and position error correction. Wherein, the key correction does not consider the position relationship between keys, and only considers the logical relationship of key sequence, such as: zle, key press corrections may be corrected to zhe; location error correction is the prediction of the likelihood of correcting a nearby key based on the coordinates of the key.
In practical use, different input errors may be generated due to different user equipment, input habits and the like, so that no matter the key error correction or the position error correction is performed, the factors considered in the error correction are limited, and the accuracy of the error correction result still needs to be improved.
Disclosure of Invention
The embodiment of the invention provides an input method error correction method and device, which are used for improving the error correction capability and accuracy of an input method and improving the input quality of a user.
Therefore, the invention provides the following technical scheme:
an input method error correction method, the method comprising:
determining a holding posture type corresponding to a current key in a user input process;
acquiring an error correction mapping relation table corresponding to the holding posture type;
and carrying out error correction processing according to the error correction mapping relation table to obtain one or more input strings after error correction.
Preferably, the determining of the grip type corresponding to the current key comprises:
acquiring a holding posture identification characteristic when a current key is triggered; the gripping posture identification features comprise any one or more of the following: location information, time information, motion information, device direction, device type;
the location information includes any one or more of: the key coordinates, the distance between two adjacent keys and the area of the keys on the keyboard;
the time information includes: time difference of two adjacent keys;
the motion information includes: acceleration, rotational angular velocity;
and inputting the gripping posture identification characteristics into a pre-constructed gripping posture identification model, and determining a gripping posture type corresponding to the current key according to the output of the gripping posture identification model.
Preferably, the method further comprises: the holding posture recognition model is constructed in the following way:
determining a topological structure of a holding posture identification model;
collecting training data, the training data comprising: the user inputs gripping posture identification characteristics under different gripping postures in the process;
and training by using the training data to obtain parameters of the holding posture recognition model.
Preferably, the grip posture types include: left-handed input by a left-handed holding machine, right-handed input by a right-handed holding machine, and single-thumb input by a double-handed holding machine.
Preferably, the method further comprises:
constructing an error correction mapping relation table corresponding to each holding posture type according to the following modes:
determining each key of which the operating distance is greater than a set value under the holding posture type, and taking the key as a key to be corrected;
recording and counting error correction information of the key to be corrected, wherein the error correction information comprises: other keys and replacement times which are replaced by the keys to be corrected in the input process of the user;
and establishing an error correction mapping relation table corresponding to the holding posture type according to the error correction information of the key to be corrected.
Preferably, the mapping relationship in the error correction mapping relationship table is a unidirectional mapping relationship.
Preferably, the performing error correction processing according to the error correction mapping relation table to obtain one or more error-corrected input strings includes:
and if the error correction mapping relation table has the mapping relation corresponding to the current key, replacing the character corresponding to the current key in the input string with the character in the mapping relation to obtain one or more corrected input strings.
Preferably, the performing error correction processing according to the error correction mapping relation table to obtain one or more error-corrected input strings includes:
if the mapping relation corresponding to the current key exists in the error correction mapping relation table, replacing the character corresponding to the current key in the input string by using the character in the mapping relation to obtain a replaced input string;
respectively calculating scores of the input string before the character is replaced and the input string after the character is replaced;
and acquiring the input string with higher score as the input string after error correction.
Preferably, the method further comprises:
recording the use habits of all keys in the input process of a user;
before the error correction processing is carried out according to the error correction mapping relation table, judging whether the error correction processing needs to be carried out on the characters triggering the current key input according to the recorded use habits of the current key;
and if so, executing the step of carrying out error correction processing according to the error correction mapping relation table.
Preferably, the usage habit of the key comprises: the number of times of wrong key pressing and the total number of times of key use;
the step of judging whether the error correction processing needs to be carried out on the characters triggering the current key input according to the recorded use habits of the current key comprises the following steps:
calculating the error rate of the current key according to the recorded times of pressing the current key by mistake and the total times of using the current key;
if the error rate is greater than the set error threshold value, determining that error correction processing needs to be carried out on the characters triggering the current key input;
otherwise, determining that the error correction processing is not needed for the character triggering the current key input.
An input method error correction apparatus, the apparatus comprising:
the holding posture determining module is used for determining the holding posture type corresponding to the current key in the input process of the user;
the mapping relation determining module is used for acquiring an error correction mapping relation table corresponding to the holding posture type;
and the error correction module is used for carrying out error correction processing according to the error correction mapping relation table to obtain one or more input strings after error correction.
Preferably, the grip posture determining module includes:
the characteristic acquisition unit is used for acquiring holding posture identification characteristics when the current key is triggered in the input process of a user; the gripping posture identification features comprise any one or more of the following: location information, time information, motion information, device direction, device type;
the location information includes any one or more of: the key coordinates, the distance between two adjacent keys and the area of the keys on the keyboard;
the time information includes: time difference of two adjacent keys;
the motion information includes: acceleration, rotational angular velocity.
And the holding posture detection unit is used for inputting the holding posture identification characteristics into a pre-constructed holding posture identification model and determining the holding posture type corresponding to the current key according to the output of the holding posture identification model.
Preferably, the apparatus further comprises:
the model building module is used for building the holding posture recognition model; the model building module comprises:
the topological structure determining unit is used for determining the topological structure of the holding posture identifying model;
a data acquisition unit for acquiring training data, the training data comprising: the user inputs gripping posture identification characteristics under different gripping postures in the process;
and the parameter training unit is used for training by using the training data to obtain the parameters of the holding posture recognition model.
Preferably, the grip posture types include: left-handed input by a left-handed holding machine, right-handed input by a right-handed holding machine, and single-thumb input by a double-handed holding machine.
Preferably, the apparatus further comprises:
the relation table establishing module is used for establishing an error correction mapping relation table corresponding to each holding posture type in advance; the relationship table establishing module comprises:
the key to be corrected determining unit is used for determining each key of which the operating distance is greater than a set value under the holding posture type and taking the key as the key to be corrected;
the statistical unit is used for recording and counting the error correction information of the key to be corrected, and the error correction information comprises: other keys and replacement times which are replaced by the keys to be corrected in the input process of the user;
and the relationship establishing unit is used for establishing an error correction mapping relationship table corresponding to the holding posture type according to the error correction information of the key to be corrected.
Preferably, the mapping relationship in the error correction mapping relationship table is a unidirectional mapping relationship.
Preferably, the error correction module is specifically configured to, when the mapping relationship corresponding to the current key exists in the error correction mapping relationship table, replace a character corresponding to the current key in an input string with a character in the mapping relationship, so as to obtain one or more input strings after error correction.
Preferably, the error correction module includes:
a character replacing unit, configured to, when the error correction mapping relationship table has a mapping relationship corresponding to the current key, replace a character in the input string corresponding to the current key with a character in the mapping relationship, so as to obtain a replaced input string;
a score calculation unit for calculating scores of the input string before the character replacement and the input string after the character replacement, respectively;
and an output unit for acquiring the input string with higher score as the input string after error correction.
Preferably, the apparatus further comprises:
the recording module is used for recording the use habits of all keys in the input process of the user;
the error correction judging module is used for judging whether the error correction processing needs to be carried out on the character input by triggering the current key according to the use habit of the current key recorded by the recording module before the error correction processing is carried out by the error correction module according to the error correction mapping relation table; and if so, triggering the error correction module to perform error correction processing according to the error correction mapping relation table.
Preferably, the usage habit of the key comprises: the number of times of wrong key pressing and the total number of times of key use;
the error correction judgment module is specifically used for calculating the error rate of the current key according to the number of times of pressing the current key by mistake and the total number of times of using the current key, which are recorded by the recording module; if the error rate is greater than the set error threshold value, determining that error correction processing needs to be carried out on the characters triggering the current key input; otherwise, determining that the error correction processing is not needed for the character triggering the current key input.
A computer device, comprising: one or more processors, memory;
the memory is configured to store computer-executable instructions and the processor is configured to execute the computer-executable instructions to implement the method described above.
A readable storage medium having stored thereon instructions which are executed to implement the foregoing method.
According to the input method error correction method and device provided by the embodiment of the invention, in the input process of the user, the holding posture type is determined through detecting the holding posture of the user, and then error correction processing is carried out according to the error correction mapping relation table corresponding to the holding posture type to obtain one or more input strings after error correction, so that the error correction capability and accuracy of the input method are effectively improved, and the input quality of the user is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or technical solutions in the prior art, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments described in the present invention, and other drawings can be obtained by those skilled in the art according to the drawings.
FIG. 1 is a flow chart of a gripping posture recognition model constructed in an input method error correction method according to an embodiment of the present invention;
FIG. 2 is a flow chart of an input method error correction method according to an embodiment of the present invention;
FIG. 3 is a keyboard layout example in the input method error correction method according to the embodiment of the present invention;
FIG. 4 is another flow chart of an input method error correction method according to an embodiment of the present invention;
FIG. 5 is a schematic structural diagram of an input method error correction apparatus according to an embodiment of the present invention;
FIG. 6 is a schematic structural diagram of a model building module in the input method error correction apparatus according to the embodiment of the present invention;
FIG. 7 is a schematic diagram of another structure of an input method error correction apparatus according to an embodiment of the present invention;
FIG. 8 is a block diagram illustrating an apparatus for an input method error correction method in accordance with an exemplary embodiment;
fig. 9 is a schematic structural diagram of a server in an embodiment of the present invention.
Detailed Description
In order to make the technical field of the invention better understand the scheme of the embodiment of the invention, the embodiment of the invention is further described in detail with reference to the drawings and the implementation mode.
In consideration of the fact that the gesture of holding the input device by the user greatly influences the operation of the key by the user when the user performs input, especially in the case of single-hand input, the key input error is easily caused. In view of the above situation, embodiments of the present invention provide an input method error correction method and apparatus, in a user input process, a grip posture is detected to determine a grip posture type, and then error correction processing is performed according to an error correction mapping relation table corresponding to the grip posture type, so as to obtain one or more input strings after error correction.
When the holding posture is detected, the pre-established holding posture identification model can be utilized to input the acquired holding posture identification characteristics when each key is triggered into the holding posture identification model, and the holding posture type corresponding to the key is determined according to the output of the model. Of course, the specific grip type may also be determined based on other information, such as feature sensing, and the like, and the embodiment of the present invention is not limited thereto.
As shown in fig. 1, the flowchart of constructing a grip posture recognition model in the embodiment of the present invention includes the following steps:
step 101, determining a topological structure of a gripping posture identification model.
The topology structure of the gripping posture identification model can adopt any one of the following structures: DNN (deep Neural Networks), RNN (Recurrent Neural Networks), LSTM (Long Short-Term Memory Networks).
In practical applications, the gripping posture recognition model may be a classification model or a regression model, and the embodiment of the present invention is not limited thereto.
The input of the holding posture identification model is the holding posture identification characteristic, and the output of the holding posture identification model is different according to whether the model adopts a classification model or a regression model. Specifically, if a classification model is adopted, the output of the model is the judgment result of the gripping posture type. If a regression model is adopted, the output of the model is the probability of each holding posture type, and the probability value is higher, which indicates that the possibility of the holding posture type is higher; therefore, according to the probability and the set probability threshold, the grip type corresponding to the current key can be determined, and specifically, if the probability of a grip type is greater than the set probability threshold, the grip type of the current key is the grip type.
Step 102, collecting training data, wherein the training data comprises: the user inputs gripping posture identifying characteristics of different gripping postures in the process.
The gripping posture identifying characteristics include, but are not limited to, any one or more of the following: location information, time information, motion information, device orientation, device type. Wherein:
the location information includes any one or more of: the key coordinates, the distance between two adjacent keys and the area of the key on the keyboard. The distance between the two adjacent keys is the distance between the current key and the previous key, and the distance can be calculated according to the coordinates of the two keys; the area of the key on the keyboard refers to whether the current key is located on the left side or the right side of the keyboard. Although the layout and on-screen location of the keys on the keyboard may vary from input device to input device, such information is available through the application program interface provided by the input device.
The time information includes: time difference between two adjacent keys. Specifically, the time difference between the current key and the previous key can be obtained by recording the time of triggering each key and subtracting the time of triggering the current key and the time of triggering the previous key.
The motion information includes: acceleration, rotational angular velocity. This information is also available through an application program interface provided by the input device, which typically has an accelerometer and a gyroscope to sense these two parameters, respectively.
It should be noted that the training data may be derived from a plurality of different users using various different grip gestures for input, and the amount of the training data is sufficient, because the more training samples, the more accurate the model parameters obtained by training.
And 103, training by using the training data to obtain parameters of the grip posture recognition model.
The prior art can be adopted as the training mode of the model parameters, and the principle is as follows:
1) initializing weights, such as randomizing the initial weights with a normal distribution;
2) selecting a sample set, namely one sample (Ai, Bi) of training data, wherein Ai is the training data, namely the holding posture identification characteristic; bi is a label, namely the holding posture corresponding to Ai;
3) inputting Ai into the network, and calculating the output Y of the network;
4) calculating the error between the predicted value and the actual value: d is Bi-Y;
5) adjusting a weight matrix W according to the error D;
6) the above process is repeated for each sample until the error does not exceed the specified range for the entire sample set.
Through the process, the weight matrix W of the network, namely the parameters of the holding posture identification model, is finally obtained.
It should be noted that, in the process of inputting by the user using the input method using the error correction scheme of the present invention, data required for model training may also be collected, and the parameters of the grip posture recognition model are updated by using these data, for example, when the collected data reaches a certain amount, the newly collected data is retrained with all or part of the original training data to obtain updated model parameters; or using weights of a pre-trained model as initialization weights and then adjusting the weights for the new data set, training can be faster and the resulting model parameters are more accurate than starting from random initialization.
According to the input method error correction method provided by the embodiment of the invention, in the input process of a user, the holding posture type corresponding to each key is detected, and then the error correction mapping relation table corresponding to the holding posture type is utilized to carry out error correction processing on the key with the input error.
As shown in fig. 2, it is a flowchart of an input method error correction method according to an embodiment of the present invention, and the method includes the following steps:
step 201, in the process of user input, determining the holding posture type corresponding to the current key.
For example, the current grip type may be determined based on the grip recognition model described above. Specifically, firstly, a holding posture identification feature when a current key is triggered is obtained, then the holding posture identification feature is input into a pre-constructed holding posture identification model, and a holding posture type corresponding to the current key is determined according to the output of the holding posture identification model.
The gripping posture identification features are the same as those used in the construction of the front gripping posture identification model, and may specifically include, but are not limited to, any one or more of the following: location information, time information, motion information, device orientation, device type. Wherein the position information comprises any one or more of the following: the key coordinates, the distance between two adjacent keys and the area of the keys on the keyboard; the time information includes: time difference of two adjacent keys; the motion information includes: acceleration, rotational angular velocity.
The specific meaning and how to obtain the above-mentioned gripping gesture recognition features are explained in detail in the foregoing, and are not described herein again.
As mentioned above, the input of the gripping posture recognition model is the gripping posture recognition feature, and the output of the gripping posture recognition model is different according to whether the classification model or the regression model is adopted by the model. Specifically, if a classification model is adopted, the output of the model is the judgment result of the gripping posture type. If a regression model is adopted, the output of the model is the probability of each holding posture type, and the probability value is higher, which indicates that the possibility of the holding posture type is higher; therefore, according to the probability and the set probability threshold, the grip type corresponding to the current key can be determined, and specifically, if the probability of a grip type is greater than the set probability threshold, the grip type of the current key is the grip type.
Considering that the phenomenon of key input error caused by the holding posture is mainly the case of one-hand input when the user performs input, in practical application, the holding posture types may include: left-handed input by a left-handed holding machine, right-handed input by a right-handed holding machine, and single-thumb input by a double-handed holding machine. Of course, more detailed differentiation can be made, for example, in addition to the above-mentioned grip types, any one or more of the following types can be further included: two-hand holding machine and two-hand input, left-hand holding machine and right-hand holding machine and left-hand input, equipment fixing and one-hand input and the like.
Step 202, obtaining an error correction mapping relation table corresponding to the holding posture type.
The error correction mapping relation table may be constructed in advance according to the distribution condition and the position relation of the keys in the keyboard and the statistical information of the related keys, may be constructed automatically or manually, and is not limited in the embodiments of the present invention. The error correction mapping relation table reflects the mapping relation of the keys which are easy to be mistakenly input under the corresponding holding posture.
Specifically, one construction method of the error correction mapping relationship table corresponding to each grip posture type is as follows:
determining each key of which the operating distance is greater than a set value under the holding posture type, and taking the key as a key to be corrected;
recording and counting error correction information of the key to be corrected, wherein the error correction information comprises: other keys and replacement times which are replaced by the keys to be corrected in the input process of the user;
and establishing an error correction mapping relation table corresponding to the holding posture type according to the error correction information of the key to be corrected. For example, for the keyboard layout shown in fig. 3, corresponding to the case that the grip gesture type is right-hand input of the right-hand handheld device, the keys in the keyboard region of the right-hand diagonal corner may be used as the basis, because the manipulation distances of the keys in the region are relatively long, such as the keys q, w, e, a, s, d, z, and the like, which are used as the keys to be corrected, the error correction information of the keys is recorded and counted, and the mapping relationship is established according to the error correction information.
It should be noted that the mapping relationship in the error correction mapping relationship table is different from the mapping relationship of ordinary error correction, and is a unidirectional mapping relationship, for example, the mapping relationship is s- > q, and in practical application, the mapping relationship may be a one-to-one mapping relationship or a one-to-many mapping relationship according to the difference of keyboard layout.
And 203, performing error correction processing according to the error correction mapping relation table to obtain one or more corrected input strings.
Specifically, when performing the error correction processing, it may first check whether a mapping relation corresponding to the current key exists in the error correction mapping relation table, and if so, replace the character corresponding to the current key in the input string with the character in the mapping relation. Since the mapping relationship may be one-to-one or one-to-many, there may be one or more input strings after error correction. Of course, if the error correction mapping relation table does not have the mapping relation corresponding to the current key, the character replacement is not needed, and the next key input is continuously detected.
For example, a user holds the computer right hand for input, and uses the pinyin input method to input "hanqin", the character string to be input is hanqin, but since the character string is far away from the key q, when the key q is clicked, the key s is clicked by mistake, and as a result, the input string becomes hansin. The method comprises the steps of detecting that a user is right-handed input of a right-handed machine in advance, establishing an error correction mapping relation corresponding to the right-handed input of the right-handed machine, replacing an input character's' with 'q' according to the mapping relation s- > q to obtain an error-corrected input string 'hanqin', and outputting a candidate word 'hanqin' corresponding to the input string 'hanqin' in a candidate column.
It should be noted that the input process of the user is continuous, and accordingly, the error correction process described above needs to be performed for each key input.
Further, in order to avoid the false replacement, in another embodiment of the method of the present invention, when performing the error correction processing, the character corresponding to the current key in the input string may be replaced according to the error correction processing manner, so as to obtain a replaced input string; then, respectively calculating scores of the input string before the character is replaced and the input string after the character is replaced, wherein the scores can be sorting scores in an input method; and acquiring the input string with higher score as the input string after error correction.
According to the input method error correction method provided by the embodiment of the invention, in the input process of the user, the holding posture type corresponding to the current key is detected, and then the error correction mapping relation table corresponding to the holding posture type is utilized to carry out error correction processing on the key with the input error, so that the error correction capability and accuracy of the input method are effectively improved, particularly the key input error caused by the input of the user by holding a mobile phone with one hand can be well corrected, and the input quality of the user is greatly improved.
As shown in fig. 4, it is another flowchart of the input method error correction method according to the embodiment of the present invention, and the method includes the following steps:
at step 401, the user initiates an input.
Step 402, determining a holding posture type corresponding to the current key.
The grip posture types may include: left-handed input by a left-handed holding machine, right-handed input by a right-handed holding machine, and single-thumb input by a double-handed holding machine. Of course, more detailed differentiation can be made, for example, in addition to the above-mentioned grip types, any one or more of the following types can be further included: two-hand holding machine and two-hand input, left-hand holding machine and right-hand holding machine and left-hand input, equipment fixing and one-hand input and the like.
And 403, acquiring an error correction mapping relation table corresponding to the holding posture type.
Step 404, checking whether the error correction mapping relation table has a mapping relation corresponding to the current key; if yes, go to step 405; otherwise, return to step 402.
The mapping relationship may be one-to-one or one-to-many, and in step 404, if one-to-many mapping relationship is detected, step 405 is executed as long as one mapping relationship corresponding to the current key is detected.
Step 405, judging whether error correction processing needs to be carried out on the characters triggering the current key input according to the recorded use habits of the current key; if so, go to step 406; otherwise, return to step 402.
The key usage habits may include: the number of times the key was pressed incorrectly and the total number of times the key was used. The use habits of all the keys can be recorded and counted in the input process of the user.
When judging whether error correction processing needs to be carried out on the characters triggering the current key input, calculating the error rate of the current key according to the recorded times of wrong pressing of the current key and the total times of using the current key; if the error rate is greater than the set error threshold value, determining that error correction processing needs to be carried out on the characters triggering the current key input; otherwise, determining that the error correction processing is not needed for the character triggering the current key input.
And step 406, performing error correction processing according to the error correction mapping relation table to obtain one or more corrected input strings.
And the error correction processing is mainly to replace the character corresponding to the current key in the input string by using the character in the mapping relation. Similarly, to avoid the false replacement, when the error correction processing is performed, the scores of the input string before the character replacement and the input string after the character replacement may be calculated respectively, and the scores may be specifically the ranking scores in the input method; and acquiring the input string with higher score as the input string after error correction. Of course, if the mapping relationship is a one-to-many relationship, a plurality of input strings after error correction can also be obtained.
Compared with the embodiment shown in fig. 2, in the input method error correction method of the embodiment, by recording the use habits of each key in the user input process, the historical operation habits of each key in the user input process are comprehensively considered during error correction processing, so that the error correction accuracy is further improved, and the input experience of the user is improved.
It should be noted that the input method error correction method provided in the embodiment of the present invention can be applied to various input methods, and is not only applicable to chinese input implemented by using various input methods, but also applicable to input of english and other languages, and if the input is english, the candidate word finally output is an english word.
Correspondingly, the embodiment of the invention also provides an input method error correction device, which can be integrated in user equipment, wherein the user equipment can be a notebook, a computer, a PAD, a mobile phone and the like. When a user performs an input operation, the user needs to press or touch a corresponding key in a keyboard of the user equipment, where the keyboard may be an entity keyboard or a virtual keyboard on a touch screen of the user equipment.
Fig. 5 is a schematic structural diagram of an input method error correction apparatus according to an embodiment of the present invention.
In this embodiment, the apparatus comprises:
a holding posture determining module 501, configured to determine a holding posture type corresponding to the current key in a user input process;
a mapping relation determining module 502, configured to obtain an error correction mapping relation table corresponding to the grip posture type;
and an error correction module 503, configured to perform error correction processing according to the error correction mapping relation table to obtain one or more input strings after error correction.
The gripping posture determining module 501 may specifically determine the gripping posture type corresponding to the current key in a model-based manner, and of course, may also determine the specific gripping posture type based on other information, such as feature sensing, and the like, which is not limited in this embodiment of the present invention.
One specific implementation structure of the grip posture determining module 501 may include: a feature acquisition unit and a grip posture detection unit (not shown). The characteristic acquisition unit is used for acquiring holding posture identification characteristics when a current key is triggered in the input process of a user; the holding posture detection unit is used for inputting the holding posture identification characteristics into a pre-constructed holding posture identification model, and determining the holding posture type corresponding to the current key according to the output of the holding posture identification model.
The gripping posture identification features are the same as those used in the construction of the front gripping posture identification model, and may specifically include, but are not limited to, any one or more of the following: location information, time information, motion information, device orientation, device type. Wherein the position information comprises any one or more of the following: the key coordinates, the distance between two adjacent keys and the area of the keys on the keyboard; the time information includes: time difference of two adjacent keys; the motion information includes: acceleration, rotational angular velocity.
The specific meaning and how to obtain the above-mentioned gripping gesture recognition features are explained in detail in the foregoing, and are not described herein again.
And the holding posture detection unit inputs the holding posture identification characteristics into a pre-constructed holding posture identification model, and determines the holding posture type corresponding to the current key according to the output of the holding posture identification model. Specifically, the gripping posture identification model may be a classification model or a regression model, and if a regression model is adopted, the output of the gripping posture identification model is the probability of each gripping posture type; the holding posture detection unit needs to further compare the probability of each holding posture type with a set probability threshold, and if the probability of a certain holding posture type is greater than the set probability threshold, the holding posture type of the current key is the holding posture type.
In practical applications, the grip type may include: left-handed input by a left-handed holding machine, right-handed input by a right-handed holding machine, and single-thumb input by a double-handed holding machine. Of course, more detailed differentiation can be made, for example, in addition to the above-mentioned grip types, any one or more of the following types can be further included: two-hand holding machine and two-hand input, left-hand holding machine and right-hand holding machine and left-hand input, equipment fixing and one-hand input and the like.
The error correction mapping relation table can be constructed manually or by a system in advance according to the distribution condition and the position relationship of the keys in the keyboard, and the error correction mapping relation table comprises the mapping relation of the keys which are easy to be mistakenly input under the condition of corresponding holding posture. The mapping relationship may be a one-to-one relationship or a one-to-many relationship, and the mapping relationship is unidirectional. For example, a relationship table establishing module (not shown) may be provided, the error correction mapping relationship table corresponding to each grip posture type is pre-established, and the relationship table establishing module may be integrated with the input method error correction apparatus of the present invention, may be independent of the input method error correction apparatus of the present invention, and is not limited thereto.
A specific structure of the relationship table establishing module may include the following units:
the key to be corrected determining unit is used for determining each key of which the operating distance is greater than a set value under the holding posture type and taking the key as the key to be corrected;
the statistical unit is used for recording and counting the error correction information of the key to be corrected, and the error correction information comprises: other keys and replacement times which are replaced by the keys to be corrected in the input process of the user;
and the relationship establishing unit is used for establishing an error correction mapping relationship table corresponding to the holding posture type according to the error correction information of the key to be corrected.
The error correction module 503 mainly checks whether the mapping relationship corresponding to the current key exists in the error correction mapping relationship table, and if so, replaces the character corresponding to the current key in the input string with the character in the mapping relationship to obtain one or more input strings after error correction. Of course, if the error correction mapping relation table does not have the mapping relation corresponding to the current key, the character replacement is not needed.
It should be noted that the input process of the user is continuous, and accordingly, the error correction process described above needs to be performed for each key input.
To avoid the false replacement, the error correction module 503 may further calculate scores of the input string before the character replacement and the input string after the character replacement, respectively, where the scores may be sorting scores in the input method, and the input string with a higher score may be used as the input string after the error correction. Accordingly, a specific structure of the error correction module 503 may include the following units:
a character replacing unit, configured to, when the error correction mapping relationship table has a mapping relationship corresponding to the current key, replace a character in the input string corresponding to the current key with a character in the mapping relationship, so as to obtain a replaced input string;
a score calculation unit for calculating scores of the input string before the character replacement and the input string after the character replacement, respectively;
and an output unit for acquiring the input string with higher score as the input string after error correction.
According to the input method error correction device provided by the embodiment of the invention, in the input process of a user, the holding posture type corresponding to each key is detected, and then the error correction mapping relation table corresponding to the holding posture type is utilized to carry out error correction processing on the key with the input error, so that the error correction capability and accuracy of the input method are effectively improved, particularly, the error correction effect can be very good for the key input error caused by the input of the user by holding a mobile phone with one hand, and the input quality of the user is greatly improved.
The gripping posture recognition model can be constructed by a model construction module by utilizing a large amount of collected training data, and the model construction module can be integrated with the input method error correction device and can be independent of the input method error correction device, so that the gripping posture recognition model is not limited.
Fig. 6 is a schematic structural diagram of a model building module in the input method error correction apparatus according to the embodiment of the present invention.
The model building module comprises the following units:
a topological structure determining unit 61, configured to determine a topological structure of the gripping posture recognition model; the topology may employ, but is not limited to, any of the following: DNN, RNN, LSTM, etc.
A data acquisition unit 62 for acquiring training data, the training data comprising: the user inputs gripping posture identifying characteristics of different gripping postures in the process. The training data may be derived from a plurality of different users using various different grip gestures for input, and the grip gesture recognition features have been described in detail above and are not described herein again.
And the parameter training unit 63 is used for obtaining parameters of the gripping posture recognition model by training the training data. The training mode of the model parameters may adopt the prior art, and is not described herein again.
It should be noted that, in practical applications, the data acquisition unit 63 may also acquire data required by model training in each input process of the user, and update the parameters of the grip posture recognition model by using the data, for example, when the acquired data reaches a certain amount, the parameter training unit 64 is triggered to retrain the grip posture recognition model by using the newly acquired data together with all or part of the original training data to obtain updated model parameters; or trigger the parameter training unit 64 to use the weights of the pre-trained model as initialization weights and then adjust the weights for the new data set, can be trained faster and the resulting model parameters are more accurate than starting from random initialization.
Fig. 7 is a schematic diagram of another structure of the input method error correction apparatus according to the embodiment of the present invention.
The difference from the embodiment shown in fig. 5 is that in this embodiment, the apparatus not only includes the aforementioned grip posture determining module 501, mapping relation determining module 502, and error correcting module 503, but also further includes: a recording module 504 and an error correction judgment module 505. Wherein:
the recording module 504 is used for recording the use habits of all keys in the input process of the user;
the error correction judging module 505 is configured to judge whether error correction processing needs to be performed on the character triggering the current key input according to the usage habit of the current key recorded by the recording module 504 before the error correction module 503 performs error correction processing according to the error correction mapping relation table; and if so, triggering the error correction module 503 to perform error correction processing according to the error correction mapping relation table.
Wherein, the use habit of the key can include: the number of times the key was pressed incorrectly and the total number of times the key was used.
Correspondingly, the error correction determining module 505 may specifically calculate the error rate of the current key according to the number of times that the current key is pressed by mistake and the total number of times that the current key is used, which are recorded by the recording module 504; if the error rate is greater than the set error threshold value, determining that error correction processing needs to be carried out on the characters triggering the current key input; otherwise, determining that the error correction processing is not needed for the character triggering the current key input.
With regard to the apparatus in the above embodiments, the specific manner in which each module performs the operations may refer to the description of the embodiments related to the method, and will not be described in detail herein.
Therefore, the input method error correction device of the embodiment of the invention records the use habits of each key in the input process of the user, comprehensively considers the historical operation habits of each key in the input process of the user during the error correction processing, further improves the accuracy of error correction, and improves the input experience of the user.
The input method error correction device provided by the embodiment of the invention can be applied to various different input methods, is not only suitable for Chinese input realized by various input methods, but also suitable for input of English and other languages, such as English input.
It should be noted that the input method error correction method and apparatus provided in the embodiments of the present invention may be used independently, or may be combined with other existing error correction schemes, as an optimization scheme for other existing error correction schemes, that is, error correction based on grip posture detection is performed first, and then error correction of other schemes is performed, so that the error correction capability and accuracy of the input method can be further improved, and the input quality of the user can be improved.
The method and the device of the embodiment of the invention can be suitable for a physical keyboard or a virtual keyboard on a screen of user equipment, wherein the user equipment can be a computer, a notebook, a mobile phone, a PAD and the like.
Fig. 8 is a block diagram illustrating an apparatus 800 for an input method error correction method according to an example embodiment. For example, the apparatus 800 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. 8, the apparatus 800 may include one or more of the following components: processing component 802, memory 804, power component 806, multimedia component 808, audio component 810, input/output (I/O) interface 812, sensor component 814, and communication component 816.
The processing component 802 generally controls overall operation of the device 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing elements 802 may include one or more processors 820 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 802 can include one or more modules that facilitate interaction between the processing component 802 and other components. For example, the processing component 802 can include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
The memory 804 is configured to store various types of data to support operation at the device 800. Examples of such data include instructions for any application or method operating on device 800, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 804 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 component 806 provides power to the various components of device 800. The power components 806 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for the device 800.
The multimedia component 808 includes a screen that provides an output interface between the device 800 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 808 includes a front facing camera and/or a rear facing camera. The front-facing camera and/or the rear-facing camera may receive external multimedia data when the device 800 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 810 is configured to output and/or input audio signals. For example, the audio component 810 includes a Microphone (MIC) configured to receive external audio signals when the apparatus 800 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 804 or transmitted via the communication component 816. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.
The I/O interface 812 provides an interface between the processing component 802 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 assembly 814 includes one or more sensors for providing various aspects of state assessment for the device 800. For example, the sensor assembly 814 may detect the open/closed state of the device 800, the relative positioning of the components, such as a display and keypad of the apparatus 800, the sensor assembly 814 may also detect a change in position of the apparatus 800 or a component of the apparatus 800, the presence or absence of user contact with the apparatus 800, orientation or acceleration/deceleration of the apparatus 800, and a change in temperature of the apparatus 800. Sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 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 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 816 is configured to facilitate communications between the apparatus 800 and other devices in a wired or wireless manner. The device 800 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 816 receives a broadcast signal or broadcast associated information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communications component 816 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 800 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 804 comprising instructions, executable by the processor 820 of the device 800 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.
The present invention also provides a non-transitory computer readable storage medium, wherein instructions in the storage medium, when executed by a processor of a mobile terminal, enable the mobile terminal to perform some or all of the steps in the above-described method embodiments to implement error correction on a corresponding input error.
Fig. 9 is a schematic structural diagram of a server in an embodiment of the present invention. The server 1900, which may vary widely in configuration or performance, may include one or more Central Processing Units (CPUs) 1922 (e.g., one or more processors) and memory 1932, one or more storage media 1930 (e.g., one or more mass storage devices) that store applications 1942 or data 1944. Memory 1932 and storage medium 1930 can be, among other things, transient or persistent storage. The program stored in the storage medium 1930 may include one or more modules (not shown), each of which may include a series of instructions operating on a server. Still further, a central processor 1922 may be provided in communication with the storage medium 1930 to execute a series of instruction operations in the storage medium 1930 on the server 1900.
The server 1900 may also include one or more power supplies 1926, one or more wired or wireless network interfaces 1950, one or more input-output interfaces 1958, one or more keyboards 1956, and/or one or more operating systems 1941, 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 (10)

1. An input method error correction method, characterized in that the method comprises:
determining a holding posture type corresponding to a current key in a user input process;
acquiring an error correction mapping relation table corresponding to the holding posture type;
and carrying out error correction processing according to the error correction mapping relation table to obtain one or more input strings after error correction.
2. The method of claim 1, wherein the determining the grip type corresponding to the current key comprises:
acquiring a holding posture identification characteristic when a current key is triggered; the gripping posture identification features comprise any one or more of the following: location information, time information, motion information, device direction, device type;
the location information includes any one or more of: the key coordinates, the distance between two adjacent keys and the area of the keys on the keyboard;
the time information includes: time difference of two adjacent keys;
the motion information includes: acceleration, rotational angular velocity;
and inputting the gripping posture identification characteristics into a pre-constructed gripping posture identification model, and determining a gripping posture type corresponding to the current key according to the output of the gripping posture identification model.
3. The method of claim 1, further comprising:
constructing an error correction mapping relation table corresponding to each holding posture type according to the following modes:
determining each key of which the operating distance is greater than a set value under the holding posture type, and taking the key as a key to be corrected;
recording and counting error correction information of the key to be corrected, wherein the error correction information comprises: other keys and replacement times which are replaced by the keys to be corrected in the input process of the user;
and establishing an error correction mapping relation table corresponding to the holding posture type according to the error correction information of the key to be corrected.
4. The method according to claim 1, wherein said performing error correction processing according to the error correction mapping table to obtain one or more corrected input strings comprises:
and if the error correction mapping relation table has the mapping relation corresponding to the current key, replacing the character corresponding to the current key in the input string with the character in the mapping relation to obtain one or more corrected input strings.
5. The method according to claim 1, wherein said performing error correction processing according to the error correction mapping table to obtain one or more corrected input strings comprises:
if the mapping relation corresponding to the current key exists in the error correction mapping relation table, replacing the character corresponding to the current key in the input string by using the character in the mapping relation to obtain a replaced input string;
respectively calculating scores of the input string before the character is replaced and the input string after the character is replaced;
and acquiring the input string with higher score as the input string after error correction.
6. An input method error correction apparatus, characterized in that the apparatus comprises:
the holding posture determining module is used for determining the holding posture type corresponding to the current key in the input process of the user;
the mapping relation determining module is used for acquiring an error correction mapping relation table corresponding to the holding posture type;
and the error correction module is used for carrying out error correction processing according to the error correction mapping relation table to obtain one or more input strings after error correction.
7. The apparatus of claim 6, wherein the grip posture determination module comprises:
the characteristic acquisition unit is used for acquiring holding posture identification characteristics when the current key is triggered in the input process of a user; the gripping posture identification features comprise any one or more of the following: location information, time information, motion information, device direction, device type;
the location information includes any one or more of: the key coordinates, the distance between two adjacent keys and the area of the keys on the keyboard;
the time information includes: time difference of two adjacent keys;
the motion information includes: acceleration, rotational angular velocity.
And the holding posture detection unit is used for inputting the holding posture identification characteristics into a pre-constructed holding posture identification model and determining the holding posture type corresponding to the current key according to the output of the holding posture identification model.
8. The apparatus of claim 6, further comprising:
the relation table establishing module is used for establishing an error correction mapping relation table corresponding to each holding posture type in advance; the relationship table establishing module comprises:
the key to be corrected determining unit is used for determining each key of which the operating distance is greater than a set value under the holding posture type and taking the key as the key to be corrected;
the statistical unit is used for recording and counting the error correction information of the key to be corrected, and the error correction information comprises: other keys and replacement times which are replaced by the keys to be corrected in the input process of the user;
and the relationship establishing unit is used for establishing an error correction mapping relationship table corresponding to the holding posture type according to the error correction information of the key to be corrected.
9. A computer device, comprising: one or more processors, memory;
the memory is for storing computer-executable instructions, and the processor is for executing the computer-executable instructions to implement the method of any one of claims 1 to 5.
10. A readable storage medium having stored thereon instructions that are executed to implement the method of any one of claims 1 to 5.
CN201810936030.1A 2018-08-16 2018-08-16 Input method error correction method and device Pending CN110837305A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810936030.1A CN110837305A (en) 2018-08-16 2018-08-16 Input method error correction method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810936030.1A CN110837305A (en) 2018-08-16 2018-08-16 Input method error correction method and device

Publications (1)

Publication Number Publication Date
CN110837305A true CN110837305A (en) 2020-02-25

Family

ID=69574190

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810936030.1A Pending CN110837305A (en) 2018-08-16 2018-08-16 Input method error correction method and device

Country Status (1)

Country Link
CN (1) CN110837305A (en)

Similar Documents

Publication Publication Date Title
US11514706B2 (en) Method and device for detecting hand gesture key points
CN107436691B (en) Method, client, server and device for correcting errors of input method
US11138422B2 (en) Posture detection method, apparatus and device, and storage medium
CN107870677B (en) Input method, input device and input device
CN107340880B (en) Association input method and device and electronic equipment for realizing association input
US20150242118A1 (en) Method and device for inputting
CN107544684B (en) Candidate word display method and device
CN108345581A (en) A kind of information identifying method, device and terminal device
CN107688399B (en) Input method and device and input device
CN107132927B (en) Input character recognition method and device for recognizing input characters
CN107958273B (en) Volume adjusting method and device and storage medium
CN112015279B (en) Key false touch error correction method and device
US20230393649A1 (en) Method and device for inputting information
CN110968246A (en) Intelligent Chinese handwriting input recognition method and device
CN110837305A (en) Input method error correction method and device
CN110858120B (en) Input keyboard recommendation method and device
CN113177408A (en) Text detection method, device and equipment
CN110858099B (en) Candidate word generation method and device
CN110673753B (en) Key false touch error correction method and device
CN109388252B (en) Input method and device
CN110554780A (en) sliding input method and device
CN111913590A (en) Input method, device and equipment
CN113222075B (en) Evaluation method and device and electronic equipment
CN110908523A (en) Input method and device
CN114527919B (en) Information display method and device and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination