CN109656384A - Character string input method and device - Google Patents

Character string input method and device Download PDF

Info

Publication number
CN109656384A
CN109656384A CN201811581792.0A CN201811581792A CN109656384A CN 109656384 A CN109656384 A CN 109656384A CN 201811581792 A CN201811581792 A CN 201811581792A CN 109656384 A CN109656384 A CN 109656384A
Authority
CN
China
Prior art keywords
code character
target code
character string
determining
strings
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201811581792.0A
Other languages
Chinese (zh)
Other versions
CN109656384B (en
Inventor
陈小帅
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN201811581792.0A priority Critical patent/CN109656384B/en
Publication of CN109656384A publication Critical patent/CN109656384A/en
Application granted granted Critical
Publication of CN109656384B publication Critical patent/CN109656384B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/0236Character input methods using selection techniques to select from displayed items

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)
  • Document Processing Apparatus (AREA)
  • Input From Keyboards Or The Like (AREA)

Abstract

Present disclose provides a kind of character string input method and devices, and wherein method includes: to parse to the source code character string of acquisition, determine multiple candidate target code character strings corresponding with source code character string;Multiple candidate target code character strings are shown in input interface;Detect the triggering mode of each object code character string in multiple candidate target code character strings, if meet preset condition;If the triggering mode of either objective code character string meets preset condition, it is determined that target code character to be modified in either objective code character string;According to the corresponding source code character of target code character, replacement target code character is determined;When determining that any replacement target code character is selected, target code character is replaced using selected replacement target code character, to generate object code character string corresponding with source code character string.This method not only simplifies user's operation, also reduces the cost that user re-enters, improves character string input efficiency.

Description

Character string input method and device
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method and an apparatus for inputting a character string.
Background
At present, the input method can comprise five-stroke input, pinyin input, two-stroke input and the like, wherein the pinyin input is the simplest and most widely applied one. However, when a user inputs a character string by using the pinyin input method, the provided candidate character string is often not satisfactory to the user, so that the user needs to manually delete the input character string and then re-input the character string word by word. For example, as shown in fig. 1, the character string input by the user is "zhu/xing/guang", and the user intends to input "zhuangguang", but the candidate character string returned by the input method is "zhuangguang", at this time, the user is required to delete the currently input character string and input the character string word by word again, which not only is cumbersome to operate and affects the input efficiency, but also increases the input cost of the user. Especially, for the elderly users with difficult input, the input again causes higher input cost.
Disclosure of Invention
The present disclosure provides a character string input method and device, which are used for solving the problems of complicated operation, increased input cost of a user and influence on input efficiency when a character string is input by using an input method in the related art.
An embodiment of one aspect of the present disclosure provides a character string input method, including: analyzing the obtained source code character string, and determining a plurality of candidate target code character strings corresponding to the source code character string; displaying the candidate object code character strings in an input interface; detecting whether the trigger mode of each target code character string in the candidate target code character strings meets a preset condition or not; if the trigger mode of any target code character string meets a preset condition, determining a target code character to be corrected in any target code character string; determining a replacing target code character according to a source code character corresponding to the target code character; and when any replacing target code character is determined to be selected, replacing the target code character by using the selected replacing target code character to generate a target code character string corresponding to the source code character string.
Another embodiment of the present disclosure provides a character string input device, which includes: the first determining module is used for analyzing the obtained source code character strings and determining a plurality of candidate target code character strings corresponding to the source code character strings; the display module is used for displaying the candidate target code character strings in an input interface; the judging module is used for detecting whether the trigger mode of each target code character string in the candidate target code character strings meets a preset condition or not; the second determination module is used for determining the target code character to be corrected in any target code character string if the trigger mode of any target code character string meets the preset condition; the third determining module is used for determining a replacing target code character according to the source code character corresponding to the target code character; and the replacing module is used for replacing the target code character by using the selected replacing target code character when any replacing target code character is determined to be selected so as to generate a target code character string corresponding to the source code character string.
In another embodiment of the present disclosure, an electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor executes the computer program to implement the character string input method described in the first embodiment.
A computer-readable storage medium of a further embodiment of the present disclosure has a computer program stored thereon, which, when executed by a processor, implements the character string input method described in the first embodiment.
The technical scheme disclosed by the disclosure has the following beneficial effects:
the method comprises the steps of firstly analyzing an obtained source code character string, determining a plurality of candidate target code character strings corresponding to the source code character string, displaying the plurality of candidate target code character strings in an input interface, detecting a trigger mode of each target code character string in the plurality of candidate target code character strings, judging whether a preset condition is met, if the trigger mode of any target code character string meets the preset condition, determining target code characters to be corrected in any target code character string, determining target code character replacement according to the source code character corresponding to the target code character, and replacing the target code character with the selected target code character when any target code character replacement is determined to be selected, so as to generate the target code character string corresponding to the source code character string. Therefore, the candidate character strings meeting the intention of the user are selected, the candidate character strings are corrected, the expected character strings are obtained, the candidate character strings provided by the display interface can be effectively utilized, the operation of the user is simplified, the cost of re-input of the user is reduced, and the character string input efficiency is improved.
Additional aspects and advantages of the disclosure will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the disclosure.
Drawings
The above and/or additional aspects and advantages of the present disclosure will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which,
FIG. 1 is a diagram of candidate character strings returned by a related art input method based on an input character string;
FIG. 2 is a schematic flow chart diagram illustrating a method of string input according to an embodiment of the present disclosure;
FIG. 3 is a schematic flow chart illustrating the determination of target code characters to be corrected in any one of the target code character strings according to an embodiment of the present disclosure;
FIG. 4 is a schematic flow chart diagram illustrating a method of string input according to another embodiment of the present disclosure;
FIG. 5 is a schematic diagram illustrating moving an input focus to a location where an object code character to be corrected is located, according to an embodiment of the present disclosure;
FIG. 6 is a schematic structural diagram illustrating a character string input device according to one embodiment of the present disclosure;
fig. 7 is a schematic structural diagram of an electronic device shown in accordance with an embodiment of the present disclosure.
Detailed Description
Reference will now be made in detail to the embodiments of the present disclosure, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the drawings are exemplary and intended to be illustrative of the present disclosure, and should not be construed as limiting the present disclosure.
The embodiments of the present disclosure provide a character string input method, which aims at the problems that in the related art, when a character string is input by using an input method, the operation is complicated, the input cost of a user is increased, and the input efficiency is affected.
The method and the device for generating the target code character string comprise the steps of analyzing an obtained source code character string, determining a plurality of candidate target code character strings corresponding to the source code character string, displaying the candidate target code character strings in an input interface, detecting a trigger mode of each target code character string in the candidate target code character strings, judging whether a preset condition is met, if the trigger mode of any target code character string meets the preset condition, determining target code characters to be corrected in any target code character string, determining a replacement target code character according to the source code character corresponding to the target code character, and replacing the target code character with the selected replacement target code character when any replacement target code character is determined to be selected so as to generate the target code character string corresponding to the source code character string. Therefore, the candidate character strings meeting the intention of the user are selected to correct the candidate character strings to obtain the expected character strings, so that the candidate character strings provided by the display interface can be effectively utilized, the user operation is simplified, the cost of re-input of the user is reduced, and the character string input efficiency is improved
The character string input method and apparatus of the embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.
First, referring to fig. 2, a specific description will be given of a character string input method according to an embodiment of the present disclosure.
As illustrated in fig. 2, the character string input method according to the embodiment of the present disclosure includes the following steps:
step 201, analyzing the obtained source code character string, and determining a plurality of candidate target code character strings corresponding to the source code character string.
The character string input method provided by the embodiment of the disclosure can be executed by the electronic device provided by the embodiment of the disclosure. The electronic equipment is provided with a character string input device to realize control of inputting the character string. In this embodiment, the electronic device may be, but is not limited to: smart phones, wearable devices, personal computers, palm top computers, personal digital assistants, and the like.
In practical use, a one-to-many relationship may exist between the source code character string input by the user and the candidate character string, for example, a one-to-many relationship exists between the chinese pinyin and the chinese hanzi. For example, the pinyin string "xing", the corresponding chinese kanji includes: "star, xing, row, type", etc.
Therefore, in the embodiment of the present disclosure, after receiving a source code character string input by a user, the electronic device may determine a plurality of candidate target character strings corresponding to the source code character string by analyzing the obtained source code character string.
As an optional implementation manner, when determining a plurality of candidate target code character strings corresponding to a source code character string, the present embodiment may determine each source code character in the source code character string by performing word segmentation processing on the source code character string, and then determine a plurality of candidate target character strings according to each candidate target code character corresponding to each source code character and a combination probability between each candidate target code character.
In specific implementation, the method can be realized by the following steps of determining a plurality of candidate target code character strings corresponding to the source code character strings:
the method comprises the following steps: performing word segmentation processing on the source code character string;
the method comprises the steps of obtaining source code character strings of the source code character strings, and performing word segmentation processing on the source code character strings by using a word segmentation method based on character string matching, a word segmentation method based on understanding, a word segmentation method based on statistics and the like.
Step two: searching words;
through comparing each source code character with entries in a pre-constructed word stock, entries which accord with a hit mode, such as pinyin complete hit, pinyin prefix hit and the like, are taken out to be used as a candidate list 1.
Step three: word forming;
this step is suitable for acquiring a source code string with a long input length of a single time, such as "buzhidaoguoqiingshifujiaban", by a user. In order to accurately determine the candidate target code character string corresponding to the source code character string, the candidate list 2 is constructed by combining a plurality of entries. Such as: the candidate list 2 corresponding to the longer source code character string is constructed by combining a plurality of entries, and may be, for example: "not/know/national celebration/not/overtime", "not/island country/solicit/no/splint/".
That is, this step is responsible for building a word group candidate list conforming to the language statistical habit based on a language model or the like.
Step four: sequencing and frequency modulation:
namely, the candidate list 1 and the candidate list 2 constructed in the second step and the third step are subjected to summary sorting.
In general, information such as context of source code character string input by a user, input environment, geographical location of the user, and the like is combined to reasonably sort the candidate list 1 and the candidate list 2.
And then, the candidate code characters in the ordered candidate list are a plurality of candidate target character strings corresponding to the source code character strings.
And 202, displaying a plurality of candidate target code character strings in an input interface.
Step 203, detecting whether the trigger mode of each target code character string in the candidate target code character strings meets a preset condition.
And step 204, if the trigger mode of any target code character string meets the preset condition, determining the target code character to be corrected in any target code character string.
The preset conditions may be set according to actual use, and are not specifically limited herein.
In the related art, when the electronic device determines the candidate target code character string according to the source code character string input by the user, a statistical model based on a large number of users and corpora is generally adopted, and the returned candidate target code character string is generally a high-frequency candidate. Even if the context frequency modulation sequence of the input source code character string and the user personalized sorting model are combined, the candidate target code character string finally provided for the user cannot completely meet the input intention of the user at any time. At this time, in order to input the target code character string according with the intention of the user, the user is required to manually delete the input source code character string, and then input the character by character again, or input the character by character, which increases the difficulty for the input operation of the user and affects the input efficiency.
In contrast, according to the embodiment of the present disclosure, after a plurality of candidate target code character strings corresponding to the source code character string are determined according to the obtained source code character string and displayed, a trigger model of each target code character string in the plurality of candidate target code character strings is also detected, so as to determine whether a preset condition is satisfied according to a trigger mode of each target code character string, and when a trigger mode of any target code character string satisfies the preset condition, a target code character to be corrected in the target code character string is determined.
That is to say, when none of the candidate target code character strings displayed in the input interface completely meets the user's expectations, the user may select a target code character string partially meeting the user's input intention from among the candidate target code character strings, so that the target code character string enters a correction mode, determine a target code character to be corrected, and perform corresponding correction processing on the determined target code character to be corrected.
In this embodiment, the trigger mode of each target code character string in the candidate target code character strings may be detected through the following steps, and whether the trigger mode satisfies a preset condition is detected.
The first method is as follows:
and detecting whether the touch pressure of each target code character string in the candidate target code character strings is greater than a preset value.
At present, electronic equipment generally has an auxiliary function of a three-dimensional Touch technology (3D Touch), so that a dimension of "pressing a screen" is added in addition to basic operations such as clicking, sliding and the like can be realized through the 3D Touch, and meanwhile, vibration feedback is provided, so that a user feels that the screen can be pressed down, thereby enriching an interaction mode between the user and the electronic equipment. Namely, 3D Touch enables the electronic equipment to increase the dimension of heavy pressing on the basis of light point and light pressing.
Therefore, in the embodiment of the present disclosure, the touch pressure of each target code character string can be respectively obtained through the pressure sensor, and the touch pressures are respectively compared with the preset values, and when the touch pressure value of a certain target code character string is greater than the preset value, it can be determined that the target code character string satisfies the preset condition.
That is, in order to distinguish the operation of the user for commonly selecting the candidate target code character string, the present disclosure may predefine a preset value of the Touch pressure, for example, when the force for pressing a certain candidate target code character string is defined to be greater than a preset value based on the currently popular 3D-Touch manner, it indicates that the target code character string partially satisfies the current input intention of the user, that is, satisfies the preset condition.
For example, when the touch pressure value of the 2 nd target code character string in the 10 candidate target code character strings is greater than the preset value, the 2 nd target code character string satisfies the preset condition.
The second method comprises the following steps:
and detecting whether the point contact mode of each target code character string in the candidate target code character strings is matched with a preset mode.
In the embodiment of the present disclosure, a point contact manner of each candidate target code character string in a plurality of candidate target code character strings provided in an input interface may be detected, and the detected point contact manner may be matched with a preset manner. When the point touch mode of any candidate target code character string is matched with the preset mode, the candidate target code character string meets the preset condition.
For example, if the preset mode is to press the candidate target code character string again, when the 3 rd candidate target code character string in the plurality of candidate target code character strings is pressed again, it is determined that the 3 rd candidate target code character string satisfies the preset condition.
Further, after it is determined that the trigger mode of any one of the candidate target code character strings satisfies the preset condition, the embodiment of the present disclosure may further determine a target code character to be corrected in the target code character string.
Wherein, the following embodiments are referred to for determining the target code character to be corrected in any target code character string.
Step 205, determining the replaced target code character according to the source code character corresponding to the target code character.
Optionally, after determining the target code character to be corrected, the electronic device may determine, according to the source code character corresponding to the target code character, a replacement target code character by using the prior art.
For example, if the target code character to be corrected is "star", the electronic device may determine that the source code character is "xing" according to the "star", and further may determine that the target code character to be replaced may be: "xing, sex, shape, and happiness".
And step 206, replacing the target code character by the selected replacing target code character to generate a target code character string corresponding to the source code character string when any replacing target code character is determined to be selected.
Continuing with the above example, if "xing" of the replacing object code characters "xing, apricot, line, sex, shape, and fortunate" is selected, and the object code character string corresponding to the object code character to be processed is: "vermilion light", the electronic device may replace the object code character "star" to be processed with "xing" to generate a string of source code characters: "zhu/xing/guang", corresponding object code string: "Zhuxingguang".
The character string input method provided by the embodiment of the disclosure includes the steps of firstly analyzing an obtained source code character string, determining a plurality of candidate target code character strings corresponding to the source code character string, displaying the candidate target code character strings in an input interface, detecting a trigger mode of each target code character string in the candidate target code character strings, judging whether a preset condition is met, if the trigger mode of any target code character string meets the preset condition, determining target code characters to be corrected in any target code character string, determining target code character replacement according to the source code character corresponding to the target code character, and replacing the target code character with the selected replacement target code character when any replacement target code character is determined to be selected so as to generate the target code character string corresponding to the source code character string. Therefore, the candidate character strings meeting the intention of the user are selected, the candidate character strings are corrected, the expected character strings are obtained, the candidate character strings provided by the display interface can be effectively utilized, the operation of the user is simplified, the cost of re-input of the user is reduced, and the character string input efficiency is improved.
The following describes in detail a process of determining a target code character to be corrected in any one of the target code character strings in the embodiment of the present disclosure with reference to fig. 3.
As shown in fig. 3, the determining of the target code character to be corrected in any one of the target code character strings in the embodiment may include the following steps:
step 301, determining the number of the replacement characters corresponding to each target code character according to the number of the candidate target code characters corresponding to each source code character in the source code character string.
Step 302, determining target code characters to be corrected in any target code character string according to the number of the replacement characters corresponding to each target code character in any target code character string.
For example, if the source code string is "zhu/xing/guang", the number of the replacement characters corresponding to "zhu", "xing", and "guang" is determined by analyzing "zhu", "xing", and "guang" in the source code string "zhu/xing/guang", respectively. It is assumed that the number of the replacement characters corresponding to "zhu" is 10, the number of the replacement characters corresponding to "xing" is 30, and the number of the replacement characters corresponding to "guang" is 5.
Then, the electronic device may determine the "star" with the number of replacement characters of 30 in the target code character string X as the target code character to be corrected, in a manner that the repetition rate is high.
Further, in this embodiment, determining the target code character to be corrected in any target code character string may further include:
and determining the target code character to be corrected in any target code character string according to the historical correction frequency corresponding to each target code character in any target code character string.
In this embodiment, when determining a target code character to be corrected in any one of the target code character strings, a target code character with a high historical correction frequency may be selected.
For example, the object code string is "vermilion light", where according to the object code string: deleting 'star light' in 'Zhu Xinggu' and inputting the correction frequency of 'Xinggu' again to construct P (star- > xing | Zhu), namely constructing the probability that 'Zhu Xinggu' is wrongly developed into 'star' by 'xing'. If the frequency of correcting the starlight in the 'Zhu Xinggao' to the 'xing' is higher than that in other cases, the target code character can be determined to be 'star'.
It should be noted that, in the embodiment of the present disclosure, when determining a target code character to be corrected in any one of the target code character strings, the determination may be performed not only at the electronic device side but also at the cloud service side.
That is to say, when determining the target code character to be corrected, the embodiments of the present disclosure may adopt different manners, so that the determined target code character to be corrected meets the user intention as much as possible, thereby reducing the operation steps of inputting the target code character string by the user, and improving the input efficiency.
As can be seen from the above analysis, in the embodiment of the present disclosure, the trigger mode of each target code character string is detected, so that when the trigger mode of any target code character string satisfies the preset condition, the target code character to be corrected is determined, then the target code character is determined to be replaced according to the source code character corresponding to the target code character, and the target code character is replaced by the selected replacement target code character, so as to generate the target code character string.
In a specific implementation, after the target code character to be corrected is determined according to a trigger mode of any target code character string meeting a preset condition, if the determined target code character to be corrected is not the target code character intended to be corrected by the user, the embodiment of the disclosure may further receive an input focus moving instruction, update the target code character to be corrected according to the input focus moving instruction, and perform correction processing on the updated target code character to be corrected, thereby obtaining the target code character string meeting the intention of the user. The following describes the above procedure of the character string input method according to the embodiment of the present disclosure with reference to fig. 4.
Fig. 4 is a flowchart illustrating a character string input method according to another embodiment of the present disclosure. As shown in fig. 4, the character string input method of the embodiment of the present disclosure may include the steps of:
step 401, analyzing the obtained source code character string, and determining a plurality of candidate target code character strings corresponding to the source code character string.
Step 402, displaying a plurality of candidate target code character strings in an input interface.
Step 403, detecting whether the trigger mode of each target code character string in the plurality of candidate target code character strings meets a preset condition.
In step 404, if the trigger mode of any target code character string satisfies the preset condition, the target code character to be corrected in any target code character string is determined.
Step 405, moving the current input focus to the target code character to be corrected.
After determining the target code character to be corrected according to the implementation manner of the foregoing embodiment, the electronic device may correspondingly move the current input focus to the target code character to be corrected, and determine an operation of replacing the target code character according to the source code character corresponding to the target code character to be corrected.
Step 406, if an instruction for indicating movement of the input focus is detected, updating the target code character to be corrected according to the target position in the instruction.
In practical use, in order to facilitate a user to select a target code character to be corrected, which meets the user's intention, the electronic device in the embodiment of the present disclosure may further segment and display a target code character string meeting a preset condition, so that when it is determined that the target code character to be corrected does not meet the user's intention in the target code character string, the user may update the target code character to be corrected by triggering an input focus movement instruction.
For example, as shown in fig. 5, when it is determined that "star" in the target code character string "vermilion" is a target code character to be corrected, the electronic apparatus may move the input focus to a position where the target code character "star" to be corrected is located. At this time, if the electronic device detects that the input focus movement instruction is instructed, the electronic device may analyze the input focus movement instruction to obtain the target position. Assuming that the obtained target position is the position of the target code character "light", the electronic device may control the input focus to move to the position of the target code character "light".
Step 407, determining a replacement target code character according to the source code character corresponding to the updated target code character to be corrected.
Continuing with the above example, when the updated target code character to be corrected is "light", the electronic device may determine that the source code character is "guang" according to the "light", and then determine that the target code character to be replaced may be: "Guang, you, boorish, bang", etc.
And 408, replacing the target code character by the selected replacing target code character to generate a target code character string corresponding to the source code character string when any replacing target code character is determined to be selected.
Continuing with the above example, if "Wide" of the replacing target code characters "Wide, strolling, boorish, bang" is selected, and the target code character string corresponding to the target code character to be processed is: "vermilion light", then the electronic device can replace the target code character "light" to be processed with the selected "guan" to generate the string of source code characters: the object code string corresponding to "zhuxingguang": "Zhu xing guang".
The character string input method provided by the embodiment of the disclosure determines a target code character to be corrected in any one of the candidate target code character strings when a trigger mode of any one of the candidate target code character strings is determined to meet a preset condition, moves a current input focus to the target code character to be corrected, updates the target code character to be corrected according to a target position in an instruction if the instruction for indicating the movement of the input focus is detected, determines a replacement target code character according to a source code character corresponding to the updated target code character to be corrected, replaces the target code character with the selected replacement target character when any one of the replacement target code characters is selected, generates a target code character string corresponding to the source code character string, and accordingly, when the determined target code character to be corrected does not meet the user intention, the target code character to be corrected is updated, so that the current candidate result can be utilized, the re-input cost of the user can be reduced, and the input experience of the user is improved.
In order to implement the above embodiments, the present disclosure also provides a character string input device.
Fig. 6 is a schematic structural diagram illustrating a character string input device according to an embodiment of the present disclosure. As shown in fig. 6, the character string input device of the embodiment of the present disclosure includes: the device comprises a first determination module 11, a display module 12, a judgment module 13, a second determination module 14, a third determination module 15 and a replacement module 16.
The first determining module 11 is configured to analyze the obtained source code character string, and determine a plurality of candidate target code character strings corresponding to the source code character string;
the display module 12 is configured to display the candidate object code character strings in an input interface;
the judging module 13 is configured to detect whether a trigger mode of each target code character string in the candidate target code character strings meets a preset condition;
the second determining module 14 is configured to determine a target code character to be corrected in any target code character string if the trigger mode of any target code character string satisfies a preset condition;
the third determining module 15 is configured to determine a replacement target code character according to the source code character corresponding to the target code character;
the replacing module 16 is configured to replace the target code character with the selected replacement target code character when it is determined that any replacement target code character is selected, so as to generate a target code character string corresponding to the source code character string.
Optionally, in an optional implementation manner of the present disclosure, the determining module 13 is specifically configured to:
detecting whether the touch pressure of each target code character string in the candidate target code character strings is larger than a preset value or not;
or,
and detecting whether the point contact mode of each target code character string in the candidate target code character strings is matched with a preset mode.
Optionally, in an optional implementation manner of the present disclosure, the second determining module 14 is specifically configured to:
and determining the target code characters to be corrected in any target code character string according to the number of the replacement characters corresponding to each target code character in any target code character string.
Optionally, in an optional implementation manner of the present disclosure, the character string input apparatus further includes: and a fourth determination module.
The fourth determining module is configured to determine, according to the number of candidate target code characters corresponding to each source code character in the source code character string, the number of replacement characters corresponding to each target code character.
Optionally, in an optional implementation manner of the present disclosure, the second determining module 14 is specifically configured to:
and determining the target code character to be corrected in any target code character string according to the historical correction frequency corresponding to each target code character in any target code character string.
Optionally, in an optional implementation manner of the present disclosure, the character string input apparatus further includes: the device comprises a moving module and an updating module.
The moving module is used for moving the current input focus to the target code character to be corrected;
and the updating module is used for updating the target code character to be corrected according to the target position in the instruction if the instruction for indicating the movement of the input focus is detected.
Optionally, in an optional implementation manner of the present disclosure, the first determining module 11 is further configured to:
determining a plurality of candidate target code strings corresponding to the source code string, including:
performing word segmentation processing on the source code character string to determine each source code character in the source code character string;
and determining a plurality of candidate target code character strings according to the candidate target code characters corresponding to the source code characters and the combination probability value among the candidate target code characters.
It should be noted that the foregoing explanation of the embodiment of the character string input method is also applicable to the character string input device of the embodiment, and the implementation principle thereof is similar, and is not repeated here.
The character string input device provided by the embodiment of the disclosure firstly analyzes an acquired source code character string, determines a plurality of candidate target code character strings corresponding to the source code character string, displays the plurality of candidate target code character strings in an input interface, detects a trigger mode of each target code character string in the plurality of candidate target code character strings, determines a target code character to be corrected in any target code character string if the trigger mode of any target code character string satisfies a preset condition, determines a replacement target code character according to the source code character corresponding to the target code character, and replaces the target code character with the selected replacement target code character when determining that any replacement target code character is selected, so as to generate the target code character string corresponding to the source code character string. Therefore, the candidate character strings meeting the intention of the user are selected, the candidate character strings are corrected, the expected character strings are obtained, the candidate character strings provided by the display interface can be effectively utilized, the operation of the user is simplified, the cost of re-input of the user is reduced, and the character string input efficiency is improved.
In order to implement the above embodiments, the present disclosure further provides an electronic device.
Fig. 7 is a schematic structural diagram of an electronic device shown in accordance with an embodiment of the present disclosure.
Referring now to FIG. 7, a block diagram of an electronic device 800 suitable for use in implementing embodiments of the present disclosure is shown. The electronic devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, notebook computers, PDAs (personal digital assistants), PADs (tablet computers), and the like, and fixed terminals such as desktop computers and the like. The electronic device shown in fig. 7 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 7, an electronic device 800 may include a processing means (e.g., central processing unit, graphics processor, etc.) 801 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)802 or a program loaded from a storage means 808 into a Random Access Memory (RAM) 803. In the RAM 803, various programs and data necessary for the operation of the electronic apparatus 800 are also stored. The processing apparatus 801, the ROM 802, and the RAM 803 are connected to each other by a bus 804. An input/output (I/O) interface 805 is also connected to bus 804.
Generally, the following devices may be connected to the I/O interface 805: input devices 806 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 807 including, for example, a Liquid Crystal Display (LCD), speakers, vibrators, and the like; storage 808 including, for example, magnetic tape, hard disk, etc.; and a communication device 809. The communication means 809 may allow the electronic device 800 to communicate wirelessly or by wire with other devices to exchange data. While fig. 7 illustrates an electronic device 800 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication means 809, or installed from the storage means 808, or installed from the ROM 802. The computer program, when executed by the processing apparatus 801, performs the above-described functions defined in the methods of the embodiments of the present disclosure.
It should be noted that, for the implementation process and the technical principle of the electronic device of this embodiment, reference is made to the foregoing explanation of the character string input method of the embodiment of the first aspect, and details are not repeated here.
The electronic device provided by the embodiment of the disclosure firstly analyzes the acquired source code character string, determines a plurality of candidate target code character strings corresponding to the source code character string, displays the plurality of candidate target code character strings in an input interface, detects a trigger mode of each target code character string in the plurality of candidate target code character strings, determines a target code character to be corrected in any target code character string if the trigger mode of any target code character string satisfies a preset condition, determines a replacement target code character according to the source code character corresponding to the target code character, and replaces the target code character with the selected replacement target code character when determining that any replacement target code character is selected, so as to generate the target code character string corresponding to the source code character string. Therefore, the candidate character strings meeting the intention of the user are selected, the candidate character strings are corrected, the expected character strings are obtained, the candidate character strings provided by the display interface can be effectively utilized, the operation of the user is simplified, the cost of re-input of the user is reduced, and the character string input efficiency is improved.
To achieve the above object, the present disclosure also provides a computer-readable storage medium.
Wherein the computer readable storage medium has stored thereon a computer program which, when executed by a processor, implements the character string input method as described in the embodiments of the first aspect.
In an alternative implementation, the embodiments may be implemented in any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
To achieve the above object, the present disclosure also provides a computer program. Wherein the computer program is adapted to carry out the method of string input described in the embodiments of the first aspect when executed by a processor.
In the present disclosure, unless otherwise expressly stated or limited, the terms "disposed," "connected," and the like are to be construed broadly, e.g., as meaning both mechanically and electrically connected; they may be directly connected or indirectly connected through intervening media, or they may be connected internally or in any other suitable relationship, unless expressly stated otherwise. The specific meaning of the above terms in the present disclosure can be understood by those of ordinary skill in the art as appropriate.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present disclosure.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and the scope of the preferred embodiments of the present disclosure includes other implementations in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the embodiments of the present disclosure.
It should be understood that portions of the present disclosure may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and when the program is executed, the program includes one or a combination of the steps of the method embodiments.
The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc. Although embodiments of the present disclosure have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present disclosure, and that changes, modifications, substitutions and alterations may be made to the above embodiments by those of ordinary skill in the art within the scope of the present disclosure.

Claims (10)

1. A character string input method, comprising:
analyzing the obtained source code character string, and determining a plurality of candidate target code character strings corresponding to the source code character string;
displaying the candidate object code character strings in an input interface;
detecting whether the trigger mode of each target code character string in the candidate target code character strings meets a preset condition or not;
if the trigger mode of any target code character string meets a preset condition, determining a target code character to be corrected in any target code character string;
determining a replacing target code character according to a source code character corresponding to the target code character;
and when any replacing target code character is determined to be selected, replacing the target code character by using the selected replacing target code character to generate a target code character string corresponding to the source code character string.
2. The method of claim 1, wherein the detecting whether the trigger pattern of each of the plurality of candidate target code strings satisfies a predetermined condition comprises:
detecting whether the touch pressure of each target code character string in the candidate target code character strings is larger than a preset value or not;
or,
and detecting whether the point contact mode of each target code character string in the candidate target code character strings is matched with a preset mode.
3. The method of claim 1, wherein said determining the target code character to be corrected in any of said target code strings comprises:
and determining the target code characters to be corrected in any target code character string according to the number of the replacement characters corresponding to each target code character in any target code character string.
4. The method as claimed in claim 3, wherein before determining the target code character to be corrected in any target code character string according to the number of the replacement characters corresponding to each target code character in any target code character string, the method further comprises:
and determining the number of the replacement characters corresponding to each target code character according to the number of the candidate target code characters corresponding to each source code character in the source code character string.
5. The method of claim 1, wherein said determining the target code character to be corrected in any of said target code strings comprises:
and determining the target code character to be corrected in any target code character string according to the historical correction frequency corresponding to each target code character in any target code character string.
6. The method as claimed in any one of claims 1-5, wherein after determining the target code character to be corrected in any one of said target code character strings, further comprising:
moving the current input focus to the target code character to be corrected;
and if an instruction for indicating the movement of the input focus is detected, updating the target code character to be corrected according to the target position in the instruction.
7. The method of any of claims 1-5, wherein determining a plurality of candidate target code strings corresponding to the source code string comprises:
performing word segmentation processing on the source code character string to determine each source code character in the source code character string;
and determining a plurality of candidate target code character strings according to the candidate target code characters corresponding to the source code characters and the combination probability value among the candidate target code characters.
8. A character string input device, comprising:
the first determining module is used for analyzing the obtained source code character strings and determining a plurality of candidate target code character strings corresponding to the source code character strings;
the display module is used for displaying the candidate target code character strings in an input interface;
the judging module is used for detecting whether the trigger mode of each target code character string in the candidate target code character strings meets a preset condition or not;
the second determination module is used for determining the target code character to be corrected in any target code character string if the trigger mode of any target code character string meets the preset condition;
the third determining module is used for determining a replacing target code character according to the source code character corresponding to the target code character;
and the replacing module is used for replacing the target code character by using the selected replacing target code character when any replacing target code character is determined to be selected so as to generate a target code character string corresponding to the source code character string.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor when executing the program implementing the string input method as claimed in any one of claims 1 to 7.
10. A computer-readable storage medium on which a computer program is stored, the program being characterized by implementing the character string input method according to any one of claims 1 to 7 when executed by a processor.
CN201811581792.0A 2018-12-24 2018-12-24 Character string input method and device Active CN109656384B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811581792.0A CN109656384B (en) 2018-12-24 2018-12-24 Character string input method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811581792.0A CN109656384B (en) 2018-12-24 2018-12-24 Character string input method and device

Publications (2)

Publication Number Publication Date
CN109656384A true CN109656384A (en) 2019-04-19
CN109656384B CN109656384B (en) 2023-07-18

Family

ID=66115005

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811581792.0A Active CN109656384B (en) 2018-12-24 2018-12-24 Character string input method and device

Country Status (1)

Country Link
CN (1) CN109656384B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110427328A (en) * 2019-08-07 2019-11-08 北京字节跳动网络技术有限公司 Text handling method, device, equipment and storage medium
CN111930245A (en) * 2020-08-10 2020-11-13 维沃移动通信有限公司 Character input control method and device and electronic equipment
CN112306253A (en) * 2019-07-30 2021-02-02 北京搜狗科技发展有限公司 Method, device and equipment for determining input object
CN112347142A (en) * 2020-11-17 2021-02-09 上海幻电信息科技有限公司 Data processing method and device
CN113765769A (en) * 2020-06-02 2021-12-07 腾讯科技(深圳)有限公司 Message display method, message sending method, device, equipment and medium
CN116088692A (en) * 2021-11-03 2023-05-09 百度国际科技(深圳)有限公司 Method and apparatus for presenting candidate character strings and training discriminant models

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101276245A (en) * 2008-04-16 2008-10-01 北京搜狗科技发展有限公司 Reminding method and system for coding to correct error in input process
CN101710262A (en) * 2009-12-11 2010-05-19 北京搜狗科技发展有限公司 Error correction method and error correction device of characters
CN103473003A (en) * 2013-09-12 2013-12-25 天津三星通信技术研究有限公司 Character input error correction method and device
CN106886294A (en) * 2015-12-15 2017-06-23 北京搜狗科技发展有限公司 A kind of input method error correction method and device
CN107092424A (en) * 2016-02-18 2017-08-25 北京搜狗科技发展有限公司 A kind of display methods of error correction, device and the device of the display for error correction
CN107179835A (en) * 2016-03-11 2017-09-19 北京搜狗科技发展有限公司 A kind of input method and device, a kind of device for being used to input
CN107436691A (en) * 2016-05-26 2017-12-05 北京搜狗科技发展有限公司 A kind of input method carries out method, client, server and the device of error correction
CN107544684A (en) * 2016-06-29 2018-01-05 北京搜狗科技发展有限公司 A kind of candidate word display methods and device
CN107688397A (en) * 2016-08-03 2018-02-13 北京搜狗科技发展有限公司 A kind of input method, system and the device for input
US20180067919A1 (en) * 2016-09-07 2018-03-08 Beijing Xinmei Hutong Technology Co., Ltd. Method and system for ranking candidates in input method
CN109002183A (en) * 2017-06-07 2018-12-14 北京搜狗科技发展有限公司 A kind of method and device of information input

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101276245A (en) * 2008-04-16 2008-10-01 北京搜狗科技发展有限公司 Reminding method and system for coding to correct error in input process
CN101710262A (en) * 2009-12-11 2010-05-19 北京搜狗科技发展有限公司 Error correction method and error correction device of characters
CN103473003A (en) * 2013-09-12 2013-12-25 天津三星通信技术研究有限公司 Character input error correction method and device
CN106886294A (en) * 2015-12-15 2017-06-23 北京搜狗科技发展有限公司 A kind of input method error correction method and device
CN107092424A (en) * 2016-02-18 2017-08-25 北京搜狗科技发展有限公司 A kind of display methods of error correction, device and the device of the display for error correction
CN107179835A (en) * 2016-03-11 2017-09-19 北京搜狗科技发展有限公司 A kind of input method and device, a kind of device for being used to input
CN107436691A (en) * 2016-05-26 2017-12-05 北京搜狗科技发展有限公司 A kind of input method carries out method, client, server and the device of error correction
CN107544684A (en) * 2016-06-29 2018-01-05 北京搜狗科技发展有限公司 A kind of candidate word display methods and device
CN107688397A (en) * 2016-08-03 2018-02-13 北京搜狗科技发展有限公司 A kind of input method, system and the device for input
US20180067919A1 (en) * 2016-09-07 2018-03-08 Beijing Xinmei Hutong Technology Co., Ltd. Method and system for ranking candidates in input method
CN109002183A (en) * 2017-06-07 2018-12-14 北京搜狗科技发展有限公司 A kind of method and device of information input

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112306253A (en) * 2019-07-30 2021-02-02 北京搜狗科技发展有限公司 Method, device and equipment for determining input object
CN110427328A (en) * 2019-08-07 2019-11-08 北京字节跳动网络技术有限公司 Text handling method, device, equipment and storage medium
CN113765769A (en) * 2020-06-02 2021-12-07 腾讯科技(深圳)有限公司 Message display method, message sending method, device, equipment and medium
CN113765769B (en) * 2020-06-02 2023-11-07 腾讯科技(深圳)有限公司 Message display method, message sending device, message display equipment and medium
CN111930245A (en) * 2020-08-10 2020-11-13 维沃移动通信有限公司 Character input control method and device and electronic equipment
CN112347142A (en) * 2020-11-17 2021-02-09 上海幻电信息科技有限公司 Data processing method and device
CN112347142B (en) * 2020-11-17 2024-03-01 上海幻电信息科技有限公司 Data processing method and device
CN116088692A (en) * 2021-11-03 2023-05-09 百度国际科技(深圳)有限公司 Method and apparatus for presenting candidate character strings and training discriminant models
CN116088692B (en) * 2021-11-03 2024-04-19 百度国际科技(深圳)有限公司 Method and apparatus for presenting candidate character strings and training discriminant models

Also Published As

Publication number Publication date
CN109656384B (en) 2023-07-18

Similar Documents

Publication Publication Date Title
CN109656384A (en) Character string input method and device
KR102632647B1 (en) Methods and devices, electronic devices, and memory media for detecting face and hand relationships
JP7230081B2 (en) Form image recognition method and device, electronic device, storage medium, and computer program
US8751972B2 (en) Collaborative gesture-based input language
KR102482850B1 (en) Electronic device and method for providing handwriting calibration function thereof
US20170003746A1 (en) Hand-gesture input
CN111582454B (en) Method and device for generating neural network model
US11669990B2 (en) Object area measurement method, electronic device and storage medium
KR102087807B1 (en) Character inputting method and apparatus
CN112306235B (en) Gesture operation method, device, equipment and storage medium
CN111563593B (en) Training method and device for neural network model
CN115063875B (en) Model training method, image processing method and device and electronic equipment
CN111582477B (en) Training method and device for neural network model
CN103713845B (en) Method for screening candidate items and device thereof, text input method and input method system
JP7285899B2 (en) USER IMAGE RECOGNITION MODEL UPDATE METHOD, APPARATUS, ELECTRONIC DEVICE, COMPUTER-READABLE RECORDING MEDIUM, AND COMPUTER PROGRAM
US20220027575A1 (en) Method of predicting emotional style of dialogue, electronic device, and storage medium
CN109558600B (en) Translation processing method and device
JP2015167031A (en) Method, apparatus and computer program for adjusting layout size of hyperlink (adjusting layout size of hyperlink)
CN112487871A (en) Handwriting data processing method and device and electronic equipment
EP2947584A1 (en) Multimodal search method and device
CN104346052A (en) Method and device for Chinese characters input
CN110850982A (en) AR-based human-computer interaction learning method, system, device and storage medium
CN105589570B (en) A kind of method and apparatus handling input error
CN112183388B (en) Image processing method, device, equipment and medium
JP7456287B2 (en) Display device, program, display method

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
CB02 Change of applicant information
CB02 Change of applicant information

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

Applicant after: Douyin Vision Co.,Ltd.

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

Applicant before: Tiktok vision (Beijing) Co.,Ltd.

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

Applicant after: Tiktok vision (Beijing) Co.,Ltd.

Address before: Room B0035, 2nd floor, No. 3 Courtyard, 30 Shixing Street, Shijingshan District, Beijing, 100041

Applicant before: BEIJING BYTEDANCE NETWORK TECHNOLOGY Co.,Ltd.

GR01 Patent grant
GR01 Patent grant