Character string input method and device
Technical field
This disclosure relates to field of computer technology more particularly to a kind of character string input method and device.
Background technique
Currently, input method may include the modes such as five inputs, Pinyin Input, two inputs, wherein Pinyin Input is the most
Simply and most widely used one kind.However, user is frequently encountered when using spelling input method input character string
The candidate character strings of offer do not meet user's expectation, cause user to need to delete the character string inputted manually, then word for word
It re-enters.For example, as shown in Figure 1, the character string of user's input is " zhu/xing/guang ", and user is intended to input " Zhu
Xing Guang ", but the candidate character strings that input method returns are " Zhu Xingguang ", just need user to delete character currently entered at this time
String, word for word inputs again, not only cumbersome, influences input efficiency, also increases the cost of user's input.In particular, to defeated
Enter difficult old user, re-enters and will cause higher input cost.
Summary of the invention
The disclosure provides a kind of character string input method and device, is inputted in the related technology using input method for solving
It is existing cumbersome when character string, increase the problem of user inputs cost, influences input efficiency.
Disclosure one side embodiment provides a kind of character string input method, this method comprises: to the source code character of acquisition
String is parsed, and determines multiple candidate target code character strings corresponding with the source code character string;Institute is shown in input interface
State multiple candidate target code character strings;Detect the triggering of each object code character string in the multiple candidate target code character string
Mode, if meet preset condition;If the triggering mode of either objective code character string meets preset condition, it is determined that described
Target code character to be modified in one object code character string;According to the corresponding source code character of the target code character, replacement is determined
Target code character;When determining that any replacement target code character is selected, institute is replaced using selected replacement target code character
Target code character is stated, to generate object code character string corresponding with the source code character string.
Disclosure another aspect embodiment provides a kind of character string input unit, which includes: the first determining module, uses
It is parsed in the source code character string of acquisition, determines multiple candidate target code character strings corresponding with the source code character string;
Display module, for showing the multiple candidate target code character string in input interface;Judgment module is described more for detecting
The triggering mode of each object code character string in a candidate target code character string, if meet preset condition;Second determines
Module, if the triggering mode for either objective code character string meets preset condition, it is determined that the either objective code character string
In target code character to be modified;Third determining module, for according to the corresponding source code character of the target code character, determination to be replaced
Change target code character;Replacement module, for utilizing selected replacement mesh when determining that any replacement target code character is selected
Coding character replaces the target code character, to generate object code character string corresponding with the source code character string.
The another aspect embodiment of the disclosure provides a kind of electronic equipment, which includes memory, processor and deposit
Storage on a memory and the computer program that can run on a processor, when the processor execution described program, to realize the
Character string input method described in one side embodiment.
The computer readable storage medium of disclosure another further aspect embodiment, is stored thereon with computer program, the calculating
When machine program is executed by processor, to realize character string input method described in first aspect embodiment.
Technical solution disclosed in the disclosure, has the following beneficial effects:
First by parsing to the source code character string of acquisition, multiple candidate targets corresponding with source code character string are determined
Code character string, and multiple candidate target code character strings are shown in input interface, it detects in multiple candidate target code character strings
The triggering mode of each object code character string, if meet preset condition, if the triggering mode of either objective code character string is full
Sufficient preset condition, it is determined that target code character to be modified in either objective code character string, and it is corresponding according to target code character
Source code character determines replacement target code character, and when determining that any replacement target code character is selected, using selected
It replaces target code character and replaces target code character, to generate object code character string corresponding with source code character string.Hereby it is achieved that
Meet the candidate character strings of user's intention by selected section, to be modified to candidate character strings, obtains expectation character string, from
And the candidate character strings of display interface offer can be provided, user's operation is not only simplified, it is again defeated to also reduce user
The cost entered improves character string input efficiency.
The additional aspect of the disclosure and advantage will be set forth in part in the description, and will partially become from the following description
It obtains obviously, or recognized by the practice of the disclosure.
Detailed description of the invention
The disclosure is above-mentioned and/or additional aspect and advantage will become from the following description of the accompanying drawings of embodiments
Obviously and it is readily appreciated that, wherein
Fig. 1 is the relevant technologies input method according to input character string, the schematic diagram of the candidate character strings of return;
Fig. 2 is the flow diagram for implementing the character string input method exemplified according to the disclosure one;
Fig. 3 is to implement target code character to be modified in the determination either objective code character string exemplified according to the disclosure one
Flow diagram;
Fig. 4 is the flow diagram according to another character string input method for implementing to exemplify of the disclosure;
Fig. 5 is the position where input focus to be moved to target code character to be modified for implementing to exemplify according to the disclosure one
The schematic diagram set;
Fig. 6 is the structural schematic diagram according to the character string input unit shown in an embodiment of the present disclosure;
Fig. 7 is the structural schematic diagram for implementing the electronic equipment exemplified according to the disclosure one.
Specific embodiment
Embodiment of the disclosure is described below in detail, examples of the embodiments are shown in the accompanying drawings, wherein from beginning to end
Same or similar label indicates same or similar element or element with the same or similar functions.Below with reference to attached
The embodiment of figure description is exemplary, it is intended to for explaining the disclosure, and should not be understood as the limitation to the disclosure.
Each embodiment of the disclosure is directed in the related technology, existing cumbersome when inputting character string using input method, is increased
The problem of large user inputs cost, influences input efficiency, proposes a kind of character string input method.
The embodiment of the present disclosure, by parsing to the source code character string of acquisition, determination is corresponding with source code character string more
A candidate target code character string, and multiple candidate target code character strings are shown in input interface, then detect multiple candidate mesh
The triggering mode of each object code character string in coding character string, if meet preset condition, if either objective code character string
Triggering mode meet preset condition, it is determined that target code character to be modified in either objective code character string, and according to target
The corresponding source code character of code character determines replacement target code character, when determining that any replacement target code character is selected, utilizes
Selected replacement target code character replaces target code character, to generate object code character string corresponding with source code character string.By
This, realizes the candidate character strings for meeting user's intention by selected section, to be modified to candidate character strings, obtains expectation
Character string not only simplifies user's operation, also reduces use so as to efficiently use the candidate character strings of display interface offer
The cost that family is re-entered improves character string input efficiency
Below with reference to the accompanying drawings the character string input method and device for describing the embodiment of the present disclosure are described in detail.
Fig. 2 is combined first, and embodiment of the present disclosure character string input method is specifically described.
As described in Figure 2, the embodiment of the present disclosure character string input method the following steps are included:
Step 201, the source code character string of acquisition is parsed, determines multiple candidate targets corresponding with source code character string
Code character string.
Wherein, the character string input method that the embodiment of the present disclosure provides can be set by the electronics that the embodiment of the present disclosure provides
It is standby to execute.Wherein, it is provided with character string input unit in electronic equipment, input character string is controlled with realizing.This implementation
In example, electronic equipment may be, but not limited to: smart phone, wearable device, PC, palm PC, individual digital are helped
Reason etc..
In actual use, due between the source code character string and candidate character strings of user's input, it is understood that there may be one-to-many
Relationship, for example there is a situation where between Chinese pinyin and Chinese character one-to-many.For example, pinyin character string " xing ", corresponding
Chinese character include: " star, emerging, capable, type " etc..
It therefore,, can be by obtaining after electronic equipment receives the source code character string of user's input in the embodiment of the present disclosure
The source code character string taken is parsed, and determines multiple candidate target character strings corresponding with source code character string.
Wherein, as a kind of optional implementation, the present embodiment is determining multiple candidates corresponding with source code character string
It, can be by the way that source code character string be carried out word cutting processing, to determine each source code character in source code character string, so when object code character string
Afterwards according to the combined probability between the corresponding each candidate target code character of each source code character and each candidate target code character, determination is more
A candidate target character string.
It when specific implementation, can be realized by following steps, determine multiple candidate target code words corresponding with source code character string
Symbol string:
Step 1: source code character string word cutting processing;
Wherein, using the segmenting method based on string matching, the segmenting method based on understanding, the participle based on statistics
The modes such as method carry out word cutting processing to source code character string, obtain each source code character in source code character string.
Step 2: word is looked into;
By the way that each source code character to be compared with the entry in the dictionary constructed in advance respectively, hit mode will be met,
Such as phonetic is hit completely, phonetic prefix hit etc. entry take out, as candidate list 1.
Step 3: group word;
This step is suitable for getting user's single and inputs longer source code character string, such as
"buzhidaoguoqingshifoujiaban".In order to accurately determine the corresponding candidate target code character of the source code character string
String combines building candidate list 2 by multiple entries at this time.Such as: above-mentioned longer source is constructed by the combination of multiple entries
The corresponding candidate list 2 of code character string, may be, for example: " not/know/National Day/whether/overtime work ", " do not worth/island country/ask for instructions/it is no/
Clamping plate/".
That is, the step is responsible for constructing the group word candidate column for meeting language statistics habit based on language model etc.
Table.
Step 4: sequence frequency modulation:
Carry out summarizing sequence by the candidate list 1 and candidate list 2 that construct step 2 and step 3.
Wherein, geographical location locating for the context, input environment, user of user's input source code character string etc. can generally be combined
Information etc. carries out reasonability sequence to candidate list 1 and candidate list 2.
In turn, the Candidate key character in the candidate list after sequence, multiple candidate mesh as corresponding with source code character string
Mark character string.
Step 202, multiple candidate target code character strings are shown in input interface.
Step 203, the triggering mode of each object code character string in multiple candidate target code character strings is detected, if full
The preset condition of foot.
Step 204, if the triggering mode of either objective code character string meets preset condition, it is determined that either objective code character
Target code character to be modified in string.
Wherein, preset condition can be configured according to actual use, be not especially limited herein.
In the related technology, electronic equipment is when the source code character string inputted according to user determines candidate target code character string,
The statistical model based on a large number of users, corpus is usually used, the candidate target code character string of return is generally high frequency candidate.I.e.
Just in conjunction with the context frequency modulation sequence of input source code character string, user individual order models, it can finally be provided to the candidate of user
Object code character string, which can not be completely secured, meets user's input whenever intention.At this point, meeting user's meaning to input
The object code character string of figure then needs user to delete the source code character string inputted manually, then word for word inputs again, or by
Word carries out selection input, this just increases difficulty to the input operation of user, affects input efficiency.
In this regard, the embodiment of the present disclosure is determined corresponding with source code character string multiple in the source code character string according to acquisition
Candidate target code character string, and after showing multiple candidate target code character strings, also in multiple candidate target code character strings
The trigger model of each object code character string is detected, according to the triggering mode of each object code character string, it is determined whether
Meet preset condition, and when the triggering mode of either objective code character string meets preset condition, determines the target code word
Target code character to be modified in symbol string.
That is, when the multiple candidate target code character strings shown in input interface it is expected not in full conformity with user
When, user selected section can meet the object code character string that user inputs intention in multiple candidate target code character strings, with
So that the object code character string is entered modification model, determine target code character to be modified, thus to determining target to be modified
Code character carries out corresponding correcting process.
Wherein, in the present embodiment, each target in multiple candidate target code character strings can be detected by following steps
The triggering mode of code character string, if meet preset condition.
Mode one:
Detect the touch-control pressure of each object code character string in multiple candidate target code character strings, if be greater than preset
Value.
Currently, electronic equipment usually has the miscellaneous function of three-dimensional touch technology (3D Touch), to pass through 3D Touch
It may be implemented to click, slide etc. except basic operations, increase the dimension of one " pressing screen ", while vibrational feedback being provided, allow
User feels that screen can press down, thus the interactive mode of abundant user and electronic equipment.That is 3D Touch makes
Electronic equipment dub, flicking on the basis of, also add again by dimension.
Therefore, the embodiment of the present disclosure can obtain respectively the touch-control pressure of each object code character string by pressure sensor,
And be compared above-mentioned touch-control pressure with preset value respectively, it is preset when the touch-control pressure value of a certain object code character string is greater than
Value when, then can determine that the object code character string meets preset condition.
That is, the disclosure in order to distinguish the operation that user commonly selects candidate target code character string, predefined can be touched
The preset value of governor pressure, such as based on 3D-Touch touch control manner generally popular at present, definition presses a certain candidate target code word
When the dynamics of symbol string is greater than preset value, indicates that this object code string portions meets the current input intention of user, that is, meet
Preset condition.
For example, in 10 candidate target code character strings the 2nd object code character string touch-control pressure value, be greater than preset value
When, then the 2nd object code character string meets preset condition.
Mode two:
Detect the point touching mode of each object code character string in multiple candidate target code character strings, if with preset side
Formula matching.
It in the embodiments of the present disclosure, can be every in the multiple candidate target code character strings provided in input interface by detecting
The point touching mode of a candidate target code character string, and the point touching mode of above-mentioned detection is matched with preset mode.When it
In any candidate target code character string point touching mode, when matching with preset mode, then illustrate the candidate target code character string
Meet preset condition.
For example, if preset mode is attached most importance to by candidate target code character string, then when in multiple candidate target code character strings
3rd candidate target code character string is attached most importance on time, it is determined that the 3rd candidate target code character string meets preset condition.
Further, full in the triggering mode for determining the either objective code character string in multiple candidate target code character strings
After sufficient preset condition, the embodiment of the present disclosure can also further determine target code word to be modified in above-mentioned object code character string
Symbol.
Wherein it is determined that target code character to be modified in either objective code character string is referring to following example.
Step 205, according to the corresponding source code character of target code character, replacement target code character is determined.
Optionally, after determining target code character to be modified, electronic equipment can be corresponding according to the target code character
Source code character determines replacement target code character using the prior art.
For example, electronic equipment can determine that source code character is according to " star " if target code character to be modified is " star "
" xing ", and then can determine that replacement target code character can are as follows: " emerging, apricot, row, property, shape, good fortune " according to source code character " xing ".
Step 206, it when determining that any replacement target code character is selected, is replaced using selected replacement target code character
Target code character is changed, to generate object code character string corresponding with source code character string.
Continuation is illustrated with above-mentioned example, if " emerging " quilt in replacement target code character " emerging, apricot, row, property, shape, good fortune "
It chooses, and the corresponding object code character string of target code character to be processed are as follows: " Zhu Xingguang ", then electronic equipment is replaced using " emerging "
Target code character " star " to be processed is changed, to generate and source code character string: " zhu/xing/guang ", corresponding target code character
String: " Zhu Xingguang ".
The character string input method that the embodiment of the present disclosure provides, first by being parsed to the source code character string of acquisition,
It determines multiple candidate target code character strings corresponding with source code character string, and shows multiple candidate target code words in input interface
Symbol string, detects the triggering mode of each object code character string in multiple candidate target code character strings, if meet preset item
Part, if the triggering mode of either objective code character string meets preset condition, it is determined that be modified in either objective code character string
Target code character, and according to the corresponding source code character of target code character, determine replacement target code character, and determining any replace
Change target code character it is selected when, target code character is replaced using selected replacement target code character, to generate and source code word
The corresponding object code character string of symbol string.Hereby it is achieved that meeting the candidate character strings of user's intention by selected section, to time
It selects character string to be modified, obtains expectation character string, so as to efficiently use the candidate character strings of display interface offer, not only
User's operation is simplified, the cost that user re-enters is also reduced, improves character string input efficiency.
Below with reference to Fig. 3, to target code character to be modified in either objective code character string determining in the embodiment of the present disclosure
Process be described in detail.
As shown in figure 3, determining that target code character to be modified in either objective code character string may include in the present embodiment
Following steps:
Step 301, according to the corresponding candidate target code character quantity of source code character each in source code character string, each target is determined
The quantity of the corresponding substitute character of code character.
Step 302, it according to the quantity of the corresponding substitute character of target code character each in either objective code character string, determines and appoints
Target code character to be modified in one object code character string.
For example, if source code character string is " zhu/xing/guang ", then by the source code character string " zhu/xing/
" zhu " " xing " " guang " is analyzed and processed respectively in guang ", determines that " zhu " " xing " " guang " is corresponding
The quantity of substitute character.Where it is assumed that the quantity of " zhu " corresponding substitute character is 10, " xing " corresponding substitute character
Quantity is 30, the quantity of " guang " corresponding substitute character is 5.
So, substitute character quantity in object code character string X is 30 by the mode that electronic equipment can be high according to the repetition rate of coding
" star " be determined as target code character to be modified.
Further, target code character to be modified in either objective code character string is determined in the present embodiment, can also be wrapped
It includes:
The frequency is corrected according to the corresponding history of target code character each in either objective code character string, determines either objective code word
Target code character to be modified in symbol string.
In the present embodiment, when determining target code character to be modified in either objective code character string, optional history is repaired
The high target code character of the positive frequency.
For example, object code character string is " Zhu Xingguang ", wherein according to the object code character string: " starlight " in " Zhu Xingguang "
It is deleted, and re-enters the amendment frequency of " Xing Guang ", constructed P (star -> emerging | Zhu), that is, construct in " Zhu Xingguang ",
Being above " Zhu " is the probability of " star " by " emerging " accidentally exhibition.If the above-mentioned frequency that " starlight " in " Zhu Xingguang " is modified to " Xing Guang ",
Higher than the amendment of other situations, then it can determine that target code character is " star ".
It should be noted that in the embodiment of the present disclosure, when determining target code character to be modified in either objective code character string,
It can not only carry out, can also be carried out in cloud server terminal at electronic equipment end.
That is, the embodiment of the present disclosure when determining target code character to be modified, can make in different ways
It obtains determining target code character to be modified and meets user's intention as far as possible, to reduce the operation that user inputs object code character string
Step improves input efficiency.
By above-mentioned analysis it is found that the embodiment of the present disclosure is by detecting the triggering mode of each object code character string, with
When the triggering mode of either objective code character string meets preset condition, target code character to be modified is determined, then according to target
The corresponding source code character of code character determines replacement target code character, and replaces target using selected replacement target code character
Code character generates object code character string.
In specific implementation, it when meeting preset condition according to the triggering mode of either objective code character string, determines to be modified
Target code character after, if the target code character to be modified of the determination be not user be intended to modified target code character,
Then the embodiment of the present disclosure also can receive input focus move, to update mesh to be modified according to input focus move
Coding character, and processing is modified to the updated target code character to be modified, obtain the target for meeting user's intention
Code character string.Below with reference to Fig. 4, the above process of embodiment of the present disclosure character string input method is specifically described.
Fig. 4 is the flow diagram according to another character string input method for implementing to exemplify of the disclosure.As shown in figure 4,
The character string input method of the embodiment of the present disclosure may comprise steps of:
Step 401, the source code character string of acquisition is parsed, determines multiple candidate targets corresponding with source code character string
Code character string.
Step 402, multiple candidate target code character strings are shown in input interface.
Step 403, the triggering mode of each object code character string in multiple candidate target code character strings is detected, if full
The preset condition of foot.
Step 404, if the triggering mode of either objective code character string meets preset condition, it is determined that either objective code character
Target code character to be modified in string.
Step 405, current input focus is moved at target code character to be modified.
In the implementation according to previous embodiment, after determining target code character to be modified, electronic equipment can phase
That answers is moved to current input focus at target code character to be modified, and corresponding according to the target code character to be modified
Source code character, determine replacement object code character manipulation.
Step 406, it is used to indicate the mobile instruction of input focus if detecting, according to the target position in instruction, more
New target code character to be modified.
In actual use, the target code character to be modified of itself intention, the disclosure are met in order to facilitate user's selection
Electronic equipment can also show the object code character string for meeting preset condition progress cutting in embodiment, thus when determining target
In code character string, target code character to be modified do not meet user be intended to when, user can by trigger input focus move,
Update target code character to be modified.
For example, as shown in figure 5, when determining that " star " in object code character string " Zhu Xingguang " is target code character to be modified
When, then input focus can be moved to target code character " star " position to be modified by electronic equipment.At this point, if detecting
It is used to indicate after input focus move, electronic equipment can parse the input focus move, obtain target
Position.Assuming that the target position obtained is target code character " light " position, then electronic equipment can control input focus mobile
To target code character " light " position.
Step 407, according to the corresponding source code character of updated target code character to be modified, replacement target code word is determined
Symbol.
It is illustrated with continued reference to above-mentioned example, when updated target code character to be modified is " light ", then electronics
Equipment can determine that source code character is " guang " according to " light ", later according to source code character " guang ", determine replacement target code word
Fu Ke are as follows: " wide, stroll, is rustic, " etc..
Step 408, it when determining that any replacement target code character is selected, is replaced using selected replacement target code character
Target code character is changed, to generate object code character string corresponding with source code character string.
Continuation is illustrated with above-mentioned example, if " wide " in replacement target code character " wide, stroll, is rustic, " is selected, and
The corresponding object code character string of target code character to be processed are as follows: " Zhu Xingguang ", then electronic equipment can utilize selected " wide "
Target code character " light " to be processed is replaced, to generate and source code character string: " zhuxingguang " corresponding target code character
String: " Zhu Xingguang ".
The character string input method that the embodiment of the present disclosure provides, the either objective in determining multiple candidate target code character strings
When the triggering mode of code character string meets preset condition, target code character to be modified in either objective code character string is determined, and
Current input focus is moved at target code character to be modified, is used to indicate the mobile finger of input focus if detecting
It enables, then according to the target position in instruction, target code character to be modified is updated, then according to updated target to be modified
The corresponding source code character of code character determines replacement target code character, and when any replacement target code character is selected, utilizes quilt
The replacement target character replacement target code character chosen, generates object code character string corresponding with source code character string, to realize
When determining target code character to be modified, which does not meet user, to be intended to, according to a user operation instruction treating modified target
Code character is updated, and can not only utilize current candidate result, moreover it is possible to be reduced the cost of user re-entered, be promoted and used
The input at family is experienced.
In order to realize above-described embodiment, the disclosure also proposed a kind of character string input unit.
Fig. 6 is the structural schematic diagram according to the character string input unit shown in an embodiment of the present disclosure.As shown in fig. 6,
The character string input unit of the embodiment of the present disclosure includes: that the first determining module 11, display module 12, judgment module 13, second are true
Cover half block 14, third determining module 15 and replacement module 16.
Wherein, the first determining module 11 is for parsing the source code character string of acquisition, the determining and source code character
Go here and there corresponding multiple candidate target code character strings;
Display module 12 in input interface for showing the multiple candidate target code character string;
Judgment module 13 is used to detect the triggering of each object code character string in the multiple candidate target code character string
Mode, if meet preset condition;
If triggering mode of second determining module 14 for either objective code character string meets preset condition, it is determined that described
Target code character to be modified in either objective code character string;
Third determining module 15 is used to determine replacement target code word according to the corresponding source code character of the target code character
Symbol;
Replacement module 16 is used for when determining that any replacement target code character is selected, and utilizes selected replacement object code
Character replaces the target code character, to generate object code character string corresponding with the source code character string.
Optionally, in an optional implementation of the disclosure, the judgment module 13 is specifically used for:
Detect the touch-control pressure of each object code character string in the multiple candidate target code character string, if be greater than pre-
If value;
Alternatively,
Detect the point touching mode of each object code character string in the multiple candidate target code character string, if with it is default
Mode match.
Optionally, in an optional implementation of the disclosure, second determining module 14 is specifically used for:
According to the quantity of the corresponding substitute character of target code character each in the either objective code character string, described appoint is determined
Target code character to be modified in one object code character string.
Optionally, in an optional implementation of the disclosure, character string input unit, further includes: the 4th determines
Module.
Wherein, the 4th determining module, for according to the corresponding candidate target code of source code character each in the source code character string
Character quantity determines the quantity of the corresponding substitute character of each target code character.
Optionally, in an optional implementation of the disclosure, second determining module 14 is specifically used for:
The frequency is corrected according to the corresponding history of target code character each in the either objective code character string, is determined described any
Target code character to be modified in object code character string.
Optionally, in an optional implementation of the disclosure, character string input unit further include: mobile module and
Update module.
Wherein, mobile module, for current input focus to be moved at the target code character to be modified;
Update module, if the mobile instruction of the input focus is used to indicate for detecting, according in described instruction
Target position, update the target code character to be modified.
Optionally, in an optional implementation of the disclosure, first determining module 11 is also used to:
Determine multiple candidate target code character strings corresponding with the source code character string, comprising:
The source code character string is subjected to word cutting processing, with each source code character in the determination source code character string;
According to the combined probability between the corresponding each candidate target code character of each source code character and each candidate target code character
Value, determines multiple candidate target code character strings.
It should be noted that the aforementioned word for being also applied for the embodiment to the explanation of character string input method embodiment
Symbol string input unit, realization principle is similar, and details are not described herein again.
The character string input unit that the embodiment of the present disclosure provides, first by being parsed to the source code character string of acquisition,
It determines multiple candidate target code character strings corresponding with source code character string, and shows multiple candidate target code words in input interface
Symbol string, detects the triggering mode of each object code character string in multiple candidate target code character strings, if meet preset item
Part, if the triggering mode of either objective code character string meets preset condition, it is determined that be modified in either objective code character string
Target code character, and according to the corresponding source code character of target code character, determine replacement target code character, and determining any replace
Change target code character it is selected when, target code character is replaced using selected replacement target code character, to generate and source code word
The corresponding object code character string of symbol string.Hereby it is achieved that meeting the candidate character strings of user's intention by selected section, to time
It selects character string to be modified, obtains expectation character string, so as to efficiently use the candidate character strings of display interface offer, not only
User's operation is simplified, the cost that user re-enters is also reduced, improves character string input efficiency.
In order to realize above-described embodiment, the disclosure also proposes a kind of electronic equipment.
Fig. 7 is the structural schematic diagram for implementing the electronic equipment exemplified according to the disclosure one.
Below with reference to Fig. 7, it illustrates the structural representations for the electronic equipment 800 for being suitable for being used to realize the embodiment of the present disclosure
Figure.Electronic equipment in the embodiment of the present disclosure can include but is not limited to such as mobile phone, laptop, PDA (a number
Word assistant), the fixed terminal of the mobile terminal of PAD (tablet computer) etc. and such as desktop computer etc..Shown in Fig. 7
Electronic equipment is only an example, should not function to the embodiment of the present disclosure and use scope bring any restrictions.
As shown in fig. 7, electronic equipment 800 may include processing unit (such as central processing unit, graphics processor etc.)
801, random access can be loaded into according to the program being stored in read-only memory (ROM) 802 or from storage device 808
Program in memory (RAM) 803 and execute various movements appropriate and processing.In RAM 803, it is also stored with electronic equipment
Various programs and data needed for 800 operations.Processing unit 801, ROM 802 and RAM 803 pass through the phase each other of bus 804
Even.Input/output (I/O) interface 805 is also connected to bus 804.
In general, following device can connect to I/O interface 805: including such as touch screen, touch tablet, keyboard, mouse, taking the photograph
As the input unit 806 of head, microphone, accelerometer, gyroscope etc.;Including such as liquid crystal display (LCD), loudspeaker, vibration
The output device 807 of dynamic device etc.;Storage device 808 including such as tape, hard disk etc.;And communication device 809.Communication device
809, which can permit electronic equipment 800, is wirelessly or non-wirelessly communicated with other equipment to exchange data.Although Fig. 7 shows tool
There is the electronic equipment 800 of various devices, it should be understood that being not required for implementing or having all devices shown.It can be with
Alternatively implement or have more or fewer devices.
Particularly, in accordance with an embodiment of the present disclosure, it may be implemented as computer above with reference to the process of flow chart description
Software program.For example, embodiment of the disclosure includes a kind of computer program product comprising be carried on computer-readable medium
On computer program, which includes the program code for method shown in execution flow chart.In such reality
It applies in example, which can be downloaded and installed from network by communication device 809, or from storage device 808
It is mounted, or is mounted from ROM 802.When the computer program is executed by processing unit 801, the embodiment of the present disclosure is executed
Method in the above-mentioned function that limits.
It should be noted that the implementation process and technical principle of the electronic equipment of the present embodiment are referring to aforementioned to first aspect
The explanation of the character string input method of embodiment, details are not described herein again.
The electronic equipment that the embodiment of the present disclosure provides, first by being parsed to the source code character string of acquisition, determine with
The corresponding multiple candidate target code character strings of source code character string, and 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 object code to be modified in either objective code character string
Character, and according to the corresponding source code character of target code character, determine replacement target code character, and determining any replacement target
When code character is selected, target code character is replaced using selected replacement target code character, to generate and source code character string pair
The object code character string answered.Hereby it is achieved that meeting the candidate character strings of user's intention by selected section, to candidate characters
String is modified, and is obtained expectation character string and is not only simplified so as to efficiently use the candidate character strings of display interface offer
User's operation also reduces the cost that user re-enters, improves character string input efficiency.
To achieve the above object, the disclosure also proposes a kind of computer readable storage medium.
The wherein computer readable storage medium, is stored thereon with computer program, when which is executed by processor, with
Realize character string input method described in first aspect embodiment.
In a kind of optional way of realization, the present embodiment can be using any group of one or more computer-readable media
It closes.Computer-readable medium can be computer-readable signal media or computer readable storage medium.It is computer-readable to deposit
Storage media for example may be-but not limited to-system, device or the device of electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor
Part, or any above combination.The more specific example (non exhaustive list) of computer readable storage medium includes: to have
The electrical connection of one or more conducting wires, portable computer diskette, hard disk, random access memory (RAM), read-only memory
(ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-
ROM), light storage device, magnetic memory device or above-mentioned any appropriate combination.In this document, computer-readable storage
Medium can be any tangible medium for including or store program, which can be commanded execution system, device or device
Using or it is in connection.
Computer-readable signal media may include in a base band or as carrier wave a part propagate data-signal,
Wherein carry computer-readable program code.The data-signal of this propagation can take various forms, including --- but
It is not limited to --- electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be
Any computer-readable medium other than computer readable storage medium, which can send, propagate or
Transmission is for by the use of instruction execution system, device or device or program in connection.
The program code for including on computer-readable medium can transmit with any suitable medium, including --- but it is unlimited
In --- wireless, electric wire, optical cable, RF etc. or above-mentioned any appropriate combination.
The computer for executing operation of the present invention can be write with one or more programming languages or combinations thereof
Program code, described program design language include object oriented program language-such as Java, Smalltalk, C++,
Further include conventional procedural programming language-such as " C " language or similar programming language.Program code can be with
It fully executes, partly execute on the user computer on the user computer, being executed as an independent software package, portion
Divide and partially executes or executed on a remote computer or server completely on the remote computer on the user computer.?
Be related in the situation of remote computer, remote computer can pass through the network of any kind --- including local area network (LAN) or
Wide area network (WAN)-be connected to subscriber computer, or, it may be connected to outer computer (such as mentioned using Internet service
It is connected for quotient by internet).
To achieve the above object, the disclosure also proposes a kind of computer program.Wherein when computer program is held by processor
When row, to realize character string input method described in first aspect embodiment.
In the disclosure unless specifically defined or limited otherwise, the terms such as term " setting ", " connection " should do broad sense reason
Solution, for example, it may be mechanical connection, is also possible to be electrically connected;It can be directly connected, the indirect phase of intermediary can also be passed through
Even, the connection inside two elements or the interaction relationship of two elements be can be, unless otherwise restricted clearly.For this
For the those of ordinary skill in field, the concrete meaning of above-mentioned term in the disclosure can be understood as the case may be.
In the description of this specification, reference term " one embodiment ", " some embodiments ", " example ", " specifically show
The description of example " or " some examples " etc. means specific features, structure, material or spy described in conjunction with this embodiment or example
Point is contained at least one embodiment or example of the disclosure.
In addition, term " first ", " second " are used for descriptive purposes only and cannot be understood as indicating or suggesting relative importance
Or implicitly indicate the quantity of indicated technical characteristic.Define " first " as a result, the feature of " second " can be expressed or
Implicitly include at least one this feature.
Any process described otherwise above or method description are construed as in flow chart or herein, and expression includes
It is one or more for realizing specific logical function or process the step of executable instruction code module, segment or portion
Point, and the range of the preferred embodiment of the disclosure includes other realization, wherein can not press shown or discussed suitable
Sequence, including according to related function by it is basic simultaneously in the way of or in the opposite order, Lai Zhihang function, this should be by the disclosure
Embodiment person of ordinary skill in the field understood.
It should be appreciated that each section of the disclosure can be realized with hardware, software, firmware or their combination.Above-mentioned
In embodiment, software that multiple steps or method can be executed in memory and by suitable instruction execution system with storage
Or firmware is realized.It, and in another embodiment, can be under well known in the art for example, if realized with hardware
Any one of column technology or their combination are realized: having a logic gates for realizing logic function to data-signal
Discrete logic, with suitable combinational logic gate circuit specific integrated circuit, programmable gate array (PGA), scene
Programmable gate array (FPGA) etc..
Those skilled in the art are understood that realize all or part of step that above-described embodiment method carries
It suddenly is that relevant hardware can be instructed to complete by program, the program can store in a kind of computer-readable storage medium
In matter, which when being executed, includes the steps that one or a combination set of embodiment of the method.
Storage medium mentioned above can be read-only memory, disk or CD etc..Although having been shown and retouching above
Embodiment of the disclosure is stated, it is to be understood that above-described embodiment is exemplary, and should not be understood as the limit to the disclosure
System, those skilled in the art can be changed above-described embodiment, modify, replace and become within the scope of this disclosure
Type.