A kind of customized input method and system
Technical field
The present invention relates to a kind of customized input method, it is suitable for being configured with built-in acceleration sensor more particularly to one kind
Mobile terminal customized input method and system.
Background technique
With the development of mobile internet, mobile terminal, especially smart phone have become modern people's daily life
Indispensable communication tool, people often send short message, chat, online, hair mail, or even editor's document etc. with smart phone.However,
For the input method that existing mobile phone uses, do not support to delete multirow function, while it is again cumbersome to replicate paste functionality;Specifically
Are as follows: when editing text, sometimes want to delete multirow, input method word or can only delete line by line one by one at this time, cause to delete
It is relatively slow;When occasionally wanting to replicate or shear text, it is always necessary to which sliding could accurately cover selected location many times, some to make
It is slower when being replicated with the low side machine of low side TP.In addition, the input method of smart phone does not add any encipherment scheme, the character of input is not
With any encryption function, in the place that crowd is mixed and disorderly, some encrypted messages (especially brief but critically important message in cipher of input
Breath) it is easy to be pried through by people to causing greatly to damage to the safety of user.
Therefore, the improvement plan for mobile terminal, especially intelligent handset input method novel there is an urgent need to one kind,
The text that existing smart phone can be improved is deleted, duplication shearing, and paste functionality and encryption function can judge that user is intended to
And corresponding operation is carried out, increase the convenience and safety of input method.
Summary of the invention
In view of the foregoing deficiencies of prior art, the purpose of the present invention is to provide a kind of customized input method and it is
System provides more convenient and safe use for solving the problems such as copy editor is cumbersome in the prior art, information input is dangerous
In the input method of mobile terminal.
In order to achieve the above objects and other related objects, the present invention provides a kind of customized input method, is applied to configuration
There is the mobile terminal of built-in acceleration sensor, comprising: step 1, under the mode for opening the customized input method, to institute
State mobile terminal execution action command;Step 2, shifting of the built-in acceleration sensor detection mobile terminal along three-dimensional
Dynamic acceleration, determines the action command;Step 3 defines and presets different feature operations according to different action commands,
And store the corresponding relationship of the action command and the feature operation;Step 4, when needing to input preset feature operation,
To the mobile terminal execution action command;The built-in acceleration sensor detects the action command, judges the movement
Whether instruction is consistent with the instruction of the respective action of the feature operation of storage;If so, executing corresponding function operation;If it is not,
Then it is back to step 1.
Further, button is added in the interface layout of the mobile terminal, on or off is beaten by button selection
Close the customized input method.
Further, the action command include upward whipping, downward whipping, to the left whipping, to the right whipping, get rid of forward
Dynamic, whipping or at least two type whippings backward any combination.
Further, the feature operation includes that text is deleted, text duplication, text shearing, text is pasted or data add
It is close.
Further, translational acceleration given threshold of the present invention also to each direction, when built-in acceleration sensor is examined
When measuring the translational acceleration of action command greater than the threshold value, then it is determined as the whipping of corresponding direction.
Specifically, it includes: to open that the present invention, which executes the method that text is deleted, text replicates, text is sheared or text is pasted,
The mode of the customized input method;Preset and store different action commands and function corresponding from the different action commands
It can operate, including enter initial normal condition, state is deleted into text, shearing shape into text duplication state, into text
State operates into text sticking state, execution text delete operation, execution text duplication, executes text shearing manipulation or execution
Text paste operation;When being in deletion state, user is prompted to input the number of the line number to be deleted;After input number, hold
Row action command corresponding with text delete operation is executed, then delete the corresponding line number of text;Or, when being in duplication state
When, prompt user to select start position and the final position of text duplication;Start position and terminal position when selection text duplication
It postpones, executes action command corresponding with text duplication operation is executed, then replicate the text chosen;Or, when in shearing shape
When state, user is prompted to select start position and the final position of text shearing;When the start position and terminal of selection text shearing
Position executes action command corresponding with shearing manipulation is executed, then shears the text chosen;Or, when being in sticking state,
The position for prompting user that text is selected to paste;Behind the position for selecting text to paste, execute corresponding with paste operation is executed
Action command then pastes the text that the duplication or shearing are chosen.
Optionally, it presets and the identification label for storing the button is corresponding with the current state of the customized input method
Relationship, identification label include at least 3 kinds, respectively with initial normal condition, text duplication or sticking state, text shearing or
Deletion state corresponds;When switching to different conditions, the button shows corresponding identification label.
Further, the present invention input text box in execute data encryption method include: preset it is one or more groups of close
Code, and be one serial number of every group of password setting;Open the mode of the customized input method;It presets and stores execution decryption oprerations
Action command;When inputting text box prompt input password, inputted in the input text box corresponding with setting code
Serial number;Execute action command;The built-in acceleration sensor detects the action command, judge the action command whether with
The respective action instruction of the execution decryption oprerations of storage is consistent;If so, executing decryption oprerations, and will be inputted in text box
The serial number be converted into the corresponding password of the serial number;If it is not, not executing the decryption oprerations then.
Alternatively, the method that the present invention executes data encryption in input text box includes: according to encryption rule to setting
Determine password to be encrypted, obtains corresponding character string;Open the mode of the customized input method;It presets and stores execution
The action command of decryption oprerations;When inputting text box prompt input password, the setting is inputted in the input text box
The character string that password obtains after being encrypted;Execute action command;The built-in acceleration sensor detects the movement
Instruction, judges whether the action command is consistent with the instruction of the respective action of the execution decryption oprerations of storage;If so, holding
Row decryption oprerations, and the serial number inputted in text box is converted into the corresponding password of the serial number;If it is not, not executing institute then
State decryption oprerations.
The present invention also provides a kind of customized input method systems, are applied to the shifting configured with built-in acceleration sensor
Dynamic terminal, which is characterized in that the customized input method system includes: built-in acceleration sensor, is used for described in the unlatching
Under the mode of customized input method, the translational acceleration of the three-dimensional of mobile terminal is detected, the mobile terminal is held in judgement
Capable action command;Setting and memory module, are used to defining and presetting different feature operations according to different action commands,
And store the corresponding relationship of the action command and the feature operation;Judgement and execution module are used for pre- when needing to input
If feature operation when and to the mobile terminal execution action command after, according to the built-in acceleration sensor detect institute
Action command is stated, judges whether the action command is consistent with the instruction of the respective action of the feature operation of storage;If so,
Execute corresponding function operation;If it is not, not executing operation then.
As described above, customized input method of the invention and system, the built-in acceleration sensor of mobile terminal configuration can
To be accurately detected translational acceleration of the mobile phone along three-dimensional, when default in advance and storage different action commands and with
After its corresponding feature operation, mobile terminal is referred to by executing action command, the built-in acceleration sensor detection movement
It enables, when judging that the action command is consistent with the instruction of the respective action of the feature operation of storage, that is, executes corresponding function
It can operation.In other words, the present invention utilizes the movement of built-in acceleration sensor senses user, to judge that user is intended to and carries out
Corresponding operation increases the convenience and safety of input method.
Detailed description of the invention
Fig. 1 is shown as the flow diagram of customized input method of the invention.
Fig. 2 is shown as the state switching schematic diagram of one embodiment of the present of invention.
Description of symbols
S11: step 1
S12: step 2
S13: step 3
S14: step 4
Specific embodiment
Illustrate embodiments of the present invention below by way of specific specific example, those skilled in the art can be by this specification
Other advantages and efficacy of the present invention can be easily understood for disclosed content.The present invention can also pass through in addition different specific realities
The mode of applying is embodied or practiced, the various details in this specification can also based on different viewpoints and application, without departing from
Various modifications or alterations are carried out under spirit of the invention.It should be noted that in the absence of conflict, following embodiment and implementation
Feature in example can be combined with each other.
It should be noted that illustrating the basic structure that only the invention is illustrated in a schematic way provided in following embodiment
Think, only shown in schema then with related component in the present invention rather than component count, shape and size when according to actual implementation
Draw, when actual implementation kenel, quantity and the ratio of each component can arbitrarily change for one kind, and its assembly layout kenel
It is likely more complexity.
Customized input method of the invention, as shown in Figure 1, it is applied to the mobile end configured with built-in acceleration sensor
End, comprising:
Step 1, under the mode for opening the customized input method, to the mobile terminal execution action command;
Step 2, the built-in acceleration sensor detection mobile terminal determine institute along the translational acceleration of three-dimensional
State action command;
Step 3 defines and presets different feature operations according to different action commands, and stores the action command
With the corresponding relationship of the feature operation;
Step 4, when needing to input preset feature operation, to the mobile terminal execution action command;It is described built-in
Acceleration transducer detects the action command, judges that whether corresponding with the feature operation of storage the action command is dynamic
Make instruction to be consistent;If so, executing corresponding function operation;If it is not, being then back to step 1.
Wherein, which is preferably mobile phone or smart phone.
The mode of the customized input method voluntarily can be selected or be switched by user.Optionally, by the mobile terminal
Interface layout in add button or option, user opens or closes the customized input method by the button or option selection.
Acquiescently, the customized input method setting of this in mobile terminal is in an open state.
In general, when user's hand-held mobile terminal, when such as smart phone, commonly executable action command includes upward
Any combination of whipping, downward whipping, to the left whipping, to the right whipping, forward whipping, backward whipping or at least two type whippings
Deng, such as whipping+downward whipping to the left, whipping+downward whipping to the right, whipping+downward whipping to the left twice, to the right whipping+2 times to
Lower whipping etc., but not limited to this.
When user executes the movement of the whipping of front and back up and down to mobile phone, built-in acceleration transducer detects intelligence
The translational acceleration along three-dimensional of energy mobile phone, therefore, it is determined that it is clearly acted.For example, when user holds mobile phone whipping to the right
When detect along X-axis positive acceleration, detected when whipping to the left along X-axis negativeacceleration;It detects when upward whipping along Y-axis
Positive acceleration, when downward whipping, detect along Y-axis negativeacceleration;It is detected when whipping forward along Z axis negativeacceleration, to
It is detected when whipping afterwards along Z axis positive acceleration.In order to more effectively determine the whipping movement in certain direction, the present invention is also to each
The translational acceleration given threshold in direction, when built-in acceleration sensor detects the translational acceleration of action command greater than described
When threshold value, then it is determined as the whipping of corresponding direction.
Feature operation to smart phone includes that text is deleted, text duplication, text shearing, text is pasted or data encryption
Deng.Hereinafter, inventor is encrypted as example respectively with documents editing and data, is specifically described operating method of the invention.
Embodiment one
In the present embodiment, executing the method that text is deleted, text replicates, text is sheared or text is pasted includes:
Step 601) opens the mode of the customized input method;
Step 602), it is default and store different action commands and feature operation corresponding from the different action commands,
Including enter initial normal condition, into text delete state, into text duplication state, into text shearing condition, enter
Text sticking state executes text delete operation, executes text duplication operation, executing text shearing manipulation or execute text and paste
Operation;
Step 603) prompts user to input the number of the line number to be deleted when being in deletion state;Input number
Afterwards, action command corresponding with text delete operation is executed is executed, then deletes the corresponding line number of text;
Or,
When being in duplication state, user is prompted to select start position and the final position of text duplication;When selection text
After the start position of duplication and final position, action command corresponding with text duplication operation is executed is executed, then duplication is chosen
Text;
Or,
When being in shearing condition, user is prompted to select start position and the final position of text shearing;When selection text
The start position of shearing and final position execute action command corresponding with shearing manipulation is executed, then shear the text chosen;
Or
When being in sticking state, user is prompted to select the position of text stickup;Behind the position for selecting text to paste, hold
Row action command corresponding with paste operation is executed, then paste the text that the duplication or shearing are chosen.
For example, it pre-defines action command and the corresponding relationship of feature operation is as follows:
1, it is not carried out action command: in initial normal condition;
2, upward whipping is primary: entering text duplication and shearing condition from initial normal condition;
3, upward whipping is primary again: entering text suppression and sticking state from text duplication and shearing condition;
4, upward whipping is primary again: entering initial normal condition from text suppression and sticking state.
As shown in Fig. 2, repeatedly.
5, downward whipping is primary: text is pasted in duplication;
6, whipping is primary to the left: text is deleted in shearing;
When the editor of text box is in initial normal condition, in addition to the operation of " upward whipping is primary ", other operations are not
It works.
When in text duplication and when shearing condition, mobile phone prompt user select text duplication or shearing start position and
Final position;After selecting start position and the final position of text duplication or shearing, if by mobile phone " downward whipping is primary ",
Replicate the text chosen;If mobile phone " whipping is primary to the left " is sheared the text chosen.
When being in text suppression and sticking state, start position and terminal position that mobile phone prompts user that text is selected to shear
It sets, after selecting start position and the final position of text duplication or shearing, if mobile phone " downward whipping is primary " is pasted multiple
System or the text of shearing;If mobile phone " whipping is primary to the left " is deleted the text chosen.
In addition, optionally, mobile phone can also prompt user's input to be deleted when being directly entered text suppression and sticking state
Line number number;After user inputs number, by mobile phone " whipping is primary to the left ", then corresponding line number is deleted.For example, user
Input digital " 2 ", then it is corresponding to delete 2 row texts.It, can be by directly by mobile phone " whipping one to the left if user does not input number
It is secondary ", then represent deletion a line;If " downward whipping is primary " again, successively deletes a line again, and so on.
It should be noted that action command and the corresponding relationship of feature operation can be accustomed to self-defining according to user, without
It is limited to this.
When in view of text editing state, user there may come a time when to forget to be currently at any state, therefore can preset
And the corresponding relationship for storing the identification label of the button and the current state of the customized input method carrys out auxiliary judgment.Button
Identification label be chosen as but be not limited to following two ways:
Mode one indicates current state by verbal description that button is added.Such as " normal " correspondence " initial normal shape
State ", " C&P " expression " text duplication or sticking state ", " C&D " expression " text shearing or deleting state " are switched to not every time
With then showing different verbal descriptions when state.
Mode two shows current state by the background color of button.As red, green, blue respectively corresponds " initial normal shape
State ", " text duplication or sticking state ", " text shearing or deleting state " three kinds of states, when being switched to different conditions every time then
Button makes corresponding color transformation.
From the above mentioned, the present embodiment can quickly and efficiently execute text during carrying out documents editing to mobile phone
All kinds of editor's movements, including duplication is pasted, shearing is deleted etc., increase the convenience of input method.In addition, being deleted in mobile phone operation
When text, multirow can be quickly deleted by selected, avoids the deficiency that can only be deleted word for word or line by line every time in the prior art.
Embodiment two
In the present embodiment, a kind of method executing data encryption in input text box is provided comprising:
Step 801) presets one or more groups of passwords, and is one serial number of every group of password setting;
Step 802) opens the mode of the customized input method;
Step 803), action command that is default and storing execution decryption oprerations;
Step 804), when inputting text box prompt input password, input and setting code in the input text box
Corresponding serial number;Execute action command;The built-in acceleration sensor detects the action command, judges the action command
Whether it is consistent with the instruction of the respective action of the execution decryption oprerations of storage;If so, executing decryption oprerations, and by text box
The serial number of interior input is converted into the corresponding password of the serial number;If it is not, not executing the decryption oprerations then.
For example, firstly, the corresponding relationship of pre-defined action command and feature operation are as follows:
Primary+downward whipping of whipping is primary to the left: decryption oprerations.
Then, one group of password " AABBCCDD " is preset, for one serial number of this group of password setting, such as " 0 ";When defeated toward text box
After entering " 0 ", operation (i.e. primary+downward whipping of whipping is primary to the left) is decrypted, then text box can convert the character of the inside
At the corresponding password of 0 sequence " AABBCCDD ".Equally, the serial number for being password setting can be any of ten sequences of 0-9, can be right
Ten groups of different passwords should be set, and operation is same as described above, and details are not described herein.
This method is convenient and has certain safety, inputs password every time without user, while even if other people peep
The number inputted to user also has no way of learning password, but because having password in mobile phone file, safety is slightly weak.
Embodiment three
In the present embodiment, also providing another method that data encryption is executed in input text box includes:
Step 901) is encrypted setting code according to encryption rule, obtains corresponding character string;
Step 902) opens the mode of the customized input method;
Step 903), action command that is default and storing execution decryption oprerations;
It is close to input the setting when inputting text box prompt input password in the input text box for step 904)
The character string that code obtains after being encrypted;Execute action command;The built-in acceleration sensor detection movement refers to
It enables, judges whether the action command is consistent with the instruction of the respective action of the execution decryption oprerations of storage;If so, executing
Decryption oprerations, and the serial number inputted in text box is converted into the corresponding password of the serial number;If it is not, not executing then described
Decryption oprerations.
For example, firstly, the corresponding relationship of pre-defined action command and feature operation are as follows:
Primary+downward whipping of whipping is primary to the left: decryption oprerations.
Then, to password encryption and corresponding character string, the word that user need to remember are obtained according to common encryption rule
Symbol string.When text box prompts to require input password, then the character string obtained after encryption is inputted, operation is decrypted (i.e. to the left
Primary+downward whipping of whipping is primary), then text box can input corresponding password.
Compared to embodiment two, this method is somewhat cumbersome but safety is higher, and the higher password of safety is suitble to use.
In order to enable users to simultaneously using two methods, user can define movement (to the left whipping once+get rid of downwards
It is dynamic primary) it is that application method one is decrypted, movement (to the left whipping primary+whipping is twice downwards) is that application method two is decrypted.Certainly,
User can also preset the movement that executes of other modes, the encryption and decryption of Lai Jinhang data, and without being limited thereto.
The present invention also provides a kind of customized input method systems, are applied to the shifting configured with built-in acceleration sensor
Dynamic terminal, which is characterized in that the customized input method system includes: built-in acceleration sensor, is used for described in the unlatching
Under the mode of customized input method, the translational acceleration of the three-dimensional of mobile terminal is detected, the mobile terminal is held in judgement
Capable action command;Setting and memory module, are used to defining and presetting different feature operations according to different action commands,
And store the corresponding relationship of the action command and the feature operation;Judgement and execution module are used for pre- when needing to input
If feature operation when and to the mobile terminal execution action command after, according to the built-in acceleration sensor detect institute
Action command is stated, judges whether the action command is consistent with the instruction of the respective action of the feature operation of storage;If so,
Execute corresponding function operation;If it is not, not executing operation then.
In conclusion customized input method of the invention and system, the built-in acceleration sensor of mobile terminal configuration can
To be accurately detected translational acceleration of the mobile phone along three-dimensional, when default in advance and storage different action commands and with
After its corresponding feature operation, mobile terminal is referred to by executing action command, the built-in acceleration sensor detection movement
It enables, when judging that the action command is consistent with the instruction of the respective action of the feature operation of storage, that is, executes corresponding function
It can operation.In other words, the present invention utilizes the movement of built-in acceleration sensor senses user, to judge that user is intended to and carries out
Corresponding operation increases the convenience and safety of input method.
The above-described embodiments merely illustrate the principles and effects of the present invention, and is not intended to limit the present invention.It is any ripe
The personage for knowing this technology all without departing from the spirit and scope of the present invention, carries out modifications and changes to above-described embodiment.Cause
This, institute is complete without departing from the spirit and technical ideas disclosed in the present invention by those of ordinary skill in the art such as
At all equivalent modifications or change, should be covered by the claims of the present invention.