Summary of the invention
The shortcoming of prior art in view of the above, the object of the present invention is to provide a kind of self-defined input method and system, for solving, copy editor in prior art is loaded down with trivial details, the uneasy congruent problem of information input, provides the more convenient and safe input method for mobile terminal.
For achieving the above object and other relevant objects, the invention provides a kind of self-defined input method, it is applied to the mobile terminal being configured with built-in acceleration sensor, comprising: step one, under the pattern of opening described self-defined input method, described mobile terminal is performed an action instruction; Step 2, described built-in acceleration sensor detects mobile terminal along the translational acceleration of three-dimensional, judges described action command; Step 3, according to the definition of different action commands and default different feature operations, and stores the corresponding relation of described action command and described feature operation; Step 4, when the feature operation needing input to preset, to perform an action instruction to described mobile terminal; Described built-in acceleration sensor detects described action command, judges whether described action command conforms to the respective action instruction of the described feature operation stored; If so, corresponding function operation is then performed; If not, then step one is back to.
Further, in the interface layout of described mobile terminal, set up button, select to open or close described self-defined input method by described button.
Further, described action command comprises the combination in any of upwards whipping, downwards whipping, left whipping, to the right whipping, forward whipping, backward whipping or at least two type whippings.
Further, described feature operation comprises word deletion, word copies, word is sheared, word is pasted or data encryption.
Further, the present invention also to the translational acceleration setting threshold value in each direction, when built-in acceleration sensor detects that the translational acceleration of action command is greater than described threshold value, is then judged to be the whipping of correspondence direction.
Particularly, the present invention performs word deletion, word copies, word is sheared or the method for word stickup comprises: the pattern of opening described self-defined input method; Preset and store different action command and the feature operation corresponding from described different action command, comprising and enter initial normal condition, enter word and delete state, enter word replication status, enter word shearing condition, enter word sticking state, perform word deletion action, perform word replicate run, perform word shearing manipulation or perform word paste operation; When being in deletion state, prompting user inputs the numeral of the line number that will delete; After input numeral, perform the action command corresponding with performing word deletion action, then delete line number corresponding to word; Or, when being in replication status, the start position that prompting user selects word to copy and final position; When after the start position selecting word to copy and final position, perform the action command corresponding with performing word replicate run, then copy the word chosen; Or, when being in shearing condition, the start position that prompting user selects word to shear and final position; When the start position selecting word to shear and final position, perform the action command corresponding with performing shearing manipulation, then shear the word chosen; Or, when being in sticking state, the position that prompting user selects word to paste; When behind the position selecting word to paste, perform the action command corresponding with performing paste operation, then copy or shear the word chosen described in pasting.
Alternatively, preset and store the corresponding relation of the identification marking of described button and the current state of described self-defined input method, described identification marking at least comprises 3 kinds, copies respectively or sticking state, word are sheared or the state of deletion one_to_one corresponding with initial normal condition, word; When switching to different conditions, described button demonstrates corresponding identification marking.
Further, the method that the present invention performs data encryption in input text frame comprises: preset one or more groups password, and is often organize password setting sequence number; Open the pattern of described self-defined input method; Preset and store the action command performing decryption oprerations; When input text frame prompting input password, the sequence number that input is corresponding with setting code in described input text frame; Perform an action instruction; Described built-in acceleration sensor detects described action command, judges whether described action command conforms to the respective action instruction of the described execution decryption oprerations stored; If so, then perform decryption oprerations, and convert the described sequence number inputted in text box to this sequence number corresponding password; If not, then described decryption oprerations is not performed.
Alternatively, the method that the present invention performs data encryption in input text frame comprises: be encrypted setting code according to encryption rule, obtains corresponding character string; Open the pattern of described self-defined input method; Preset and store the action command performing decryption oprerations; When input text frame prompting input password, in described input text frame, input the character string obtained after described setting code is encrypted; Perform an action instruction; Described built-in acceleration sensor detects described action command, judges whether described action command conforms to the respective action instruction of the described execution decryption oprerations stored; If so, then perform decryption oprerations, and convert the described sequence number inputted in text box to this sequence number corresponding password; If not, then described decryption oprerations is not performed.
Present invention also offers a kind of self-defined input method system, it is applied to the mobile terminal being configured with built-in acceleration sensor, it is characterized in that, described self-defined input method system comprises: built-in acceleration sensor, it is under the pattern of opening described self-defined input method, detect the translational acceleration of the three-dimensional of mobile terminal, judge the action command that described mobile terminal is performed; Arrange and memory module, it for defining according to different action commands and presetting different feature operations, and stores the corresponding relation of described action command and described feature operation; Judge and execution module, it is for when needing to input the feature operation preset and after the instruction that performs an action to described mobile terminal, according to the described action command that described built-in acceleration sensor detects, judge whether described action command conforms to the respective action instruction of the described feature operation stored; If so, corresponding function operation is then performed; If not, then undo.
As mentioned above, self-defined input method of the present invention and system, the built-in acceleration sensor of mobile terminal configuration accurately can detect the translational acceleration of mobile phone along three-dimensional, when after the different action command preset in advance and store and the feature operation corresponding with it, to mobile terminal by the instruction that performs an action, built-in acceleration sensor detects described action command, when judging that the respective action instruction of described action command with the described feature operation of storage conforms to, namely perform corresponding feature operation.In other words, the present invention utilizes the action of built-in acceleration sensor senses user, thus judges user view and carry out corresponding operation, adds convenience and the security of input method.
Embodiment
Below by way of specific instantiation, embodiments of the present invention are described, those skilled in the art the content disclosed by this instructions can understand other advantages of the present invention and effect easily.The present invention can also be implemented or be applied by embodiments different in addition, and the every details in this instructions also can based on different viewpoints and application, carries out various modification or change not deviating under spirit of the present invention.It should be noted that, when not conflicting, the feature in following examples and embodiment can combine mutually.
It should be noted that, the diagram provided in following examples only illustrates basic conception of the present invention in a schematic way, then only the assembly relevant with the present invention is shown in graphic but not component count, shape and size when implementing according to reality is drawn, it is actual when implementing, and the kenel of each assembly, quantity and ratio can be a kind of change arbitrarily, and its assembly layout kenel also may be more complicated.
Self-defined input method of the present invention, as shown in Figure 1, it is applied to the mobile terminal being configured with built-in acceleration sensor, comprising:
Step one, under the pattern of opening described self-defined input method, to perform an action instruction to described mobile terminal;
Step 2, described built-in acceleration sensor detects mobile terminal along the translational acceleration of three-dimensional, judges described action command;
Step 3, according to the definition of different action commands and default different feature operations, and stores the corresponding relation of described action command and described feature operation;
Step 4, when the feature operation needing input to preset, to perform an action instruction to described mobile terminal; Described built-in acceleration sensor detects described action command, judges whether described action command conforms to the respective action instruction of the described feature operation stored; If so, corresponding function operation is then performed; If not, then step one is back to.
Wherein, this mobile terminal is preferably mobile phone or smart mobile phone.
The pattern of this self-defined input method can be selected voluntarily by user or switch.Alternatively, by setting up button or option in the interface layout of described mobile terminal, user selects to open or close this self-defined input method by this button or option.Acquiescently, this self-defined input method in mobile terminal is set to open mode.
In general, when user's hand-held mobile terminal, during as smart mobile phone, conventional performed an action instruction comprises the combination in any etc. of upwards whipping, downwards whipping, left whipping, to the right whipping, forward whipping, backward whipping or at least two type whippings, as whipping left+whipping downwards, whipping to the right+whipping downwards, twice whipping+whipping downwards left, whipping+2 downward whippings etc. to the right, but be not limited thereto.
When user to perform the action of whipping up and down to mobile phone, built-in acceleration transducer detects the translational acceleration along three-dimensional of smart mobile phone, thus judges its clear and definite action.Such as, when user's handheld mobile phone to the right whipping time detect along X-axis positive acceleration, detect along X-axis negativeacceleration left during whipping; Upwards detect during whipping along Y-axis positive acceleration, detect along Y-axis negativeacceleration during downward whipping; Detect during whipping forward along Z axis negativeacceleration, detect along Z axis positive acceleration backward during whipping.In order to more effectively judge the whipping action in certain direction, the present invention also to the translational acceleration setting threshold value in each direction, when built-in acceleration sensor detects that the translational acceleration of action command is greater than described threshold value, is then judged to be the whipping of correspondence direction.
The feature operation of smart mobile phone is comprised to word is deleted, word copies, word is sheared, word is pasted or data encryption etc.Hereinafter, inventor, respectively for documents editing and data encryption, specifically sets forth method of operating of the present invention.
Embodiment one
In the present embodiment, perform the method that word is deleted, word copies, word is sheared or word is pasted to comprise:
Step 601), open the pattern of described self-defined input method;
Step 602), preset and store different action command and the feature operation corresponding from described different action command, comprising and enter initial normal condition, enter word and delete state, enter word replication status, enter word shearing condition, enter word sticking state, perform word deletion action, perform word replicate run, perform word shearing manipulation or perform word paste operation;
Step 603), when being in deletion state, prompting user inputs the numeral of the line number that will delete; After input numeral, perform the action command corresponding with performing word deletion action, then delete line number corresponding to word;
Or,
When being in replication status, the start position that prompting user selects word to copy and final position; When after the start position selecting word to copy and final position, perform the action command corresponding with performing word replicate run, then copy the word chosen;
Or,
When being in shearing condition, the start position that prompting user selects word to shear and final position; When the start position selecting word to shear and final position, perform the action command corresponding with performing shearing manipulation, then shear the word chosen;
Or
When being in sticking state, the position that prompting user selects word to paste; When behind the position selecting word to paste, perform the action command corresponding with performing paste operation, then copy or shear the word chosen described in pasting.
For example, the corresponding relation of pre-defined action command and feature operation is as follows:
1, do not perform an action instruction: be in initial normal condition;
2, upwards whipping is once: enter text from initial normal condition and copy and shearing condition;
3, upwards whipping is once again: copy from text and enter text suppression and sticking state with shearing condition;
4, upwards whipping is once again: enter initial normal condition from text suppression and sticking state.
As shown in Figure 2, so repeatedly.
5, downward whipping once: copy or paste word;
6, whipping is once left: shear or delete word;
When the editor of text box is in initial normal condition, except the operation of " upwards whipping once ", other operations are inoperative.
When being in text and copying with shearing condition, mobile phone prompting user selects word to copy or the start position sheared and final position; When after the start position selecting word to copy or shear and final position, if by mobile phone " downward whipping once ", then copy the word chosen; If by mobile phone " whipping once ", then shear the word chosen left.
When being in text suppression and sticking state, the start position that mobile phone prompting user selects word to shear and final position, when after the start position selecting word to copy or shear and final position, if by mobile phone " downward whipping once ", then paste the word copying or shear; If by mobile phone " whipping once ", then delete the word chosen left.
In addition, when directly entering text suppression and sticking state, alternatively, mobile phone also can point out user to input the numeral of the line number that will delete; Input after numeral until user, by mobile phone " whipping once ", then delete corresponding line number left.Such as, user inputs numeral " 2 ", then corresponding deletion 2 style of writing words.If user does not input numeral, by directly by mobile phone " whipping once left ", then a line is deleted in representative; If again " downward whipping is once ", then delete a line more successively, the like.
It should be noted that, the corresponding relation of action command and feature operation according to user habit self-defining, and can be not limited thereto.
When considering text editing state, user sometimes may forget and is currently in any state, therefore can preset and the corresponding relation storing the identification marking of described button and the current state of described self-defined input method carrys out auxiliary judgment.The identification marking of button is chosen as but is not limited to following two kinds of modes:
Mode one, the text description of being set up by button represents current state.As " normal " correspondence " initial normal condition ", " C & P " expression " word copies or sticking state ", " C & D " expression " word is sheared or the state of deletion ", then shows different text descriptions when being switched to different conditions at every turn.
Mode two, shows current state by the background color of button.As red, green, blue respectively corresponding " initial normal condition ", " word copies or sticking state ", " word is sheared or the state of deletion " three kinds of states, when being switched to different conditions, then respective color conversion made by button at every turn.
From the above mentioned, the present embodiment is carrying out in documents editing process to mobile phone, can all kinds of editor's actions of execution contexts quickly and efficiently, comprises copying stickup, shearing and delete, and adds the convenience of input method.In addition, when mobile phone operation deletes word, multirow can be deleted fast by selected, avoid the deficiency at every turn can only word for word or line by line deleted in prior art.
Embodiment two
In the present embodiment, provide a kind of method performing data encryption in input text frame, it comprises:
Step 801), preset one or more groups password, and be often organize password setting sequence number;
Step 802), open the pattern of described self-defined input method;
Step 803), preset and store the action command performing decryption oprerations;
Step 804), when input text frame prompting input password, the sequence number that input is corresponding with setting code in described input text frame; Perform an action instruction; Described built-in acceleration sensor detects described action command, judges whether described action command conforms to the respective action instruction of the described execution decryption oprerations stored; If so, then perform decryption oprerations, and convert the described sequence number inputted in text box to this sequence number corresponding password; If not, then described decryption oprerations is not performed.
For example, first, the corresponding relation of pre-defined action command and feature operation is:
Left whipping once+downwards whipping is once: decryption oprerations.
Then, presetting one group of password " AABBCCDD ", is this group password setting sequence number, as " 0 "; When after text box input " 0 ", be decrypted operation (namely left whipping once+downward whipping once), then the text box password " AABBCCDD " that can 0 sequence pair be become to answer the character conversion of the inside.Equally, the sequence number for password setting can be any one in 0-9 ten sequences, and may correspond to and arrange ten groups of different passwords, its operation is same as described above, does not repeat them here.
The method is convenient and have certain security, all inputs password without user at every turn, even if other people peep the numeral of user's input simultaneously, also has no way of learning password, but because has password, so security is slightly weak in mobile phone file.
Embodiment three
In the present embodiment, the another kind of method performing data encryption in input text frame is also provided to comprise:
Step 901), according to encryption rule, setting code is encrypted, obtains corresponding character string;
Step 902), open the pattern of described self-defined input method;
Step 903), preset and store the action command performing decryption oprerations;
Step 904), when input text frame prompting input password, in described input text frame, input the character string obtained after described setting code is encrypted; Perform an action instruction; Described built-in acceleration sensor detects described action command, judges whether described action command conforms to the respective action instruction of the described execution decryption oprerations stored; If so, then perform decryption oprerations, and convert the described sequence number inputted in text box to this sequence number corresponding password; If not, then described decryption oprerations is not performed.
For example, first, the corresponding relation of pre-defined action command and feature operation is:
Left whipping once+downwards whipping is once: decryption oprerations.
Then, obtain corresponding character string according to common encryption rule to password encryption, user need remember the character string obtained.When text box prompting requires input password, then the character string that obtains after input encryption, be decrypted operation (namely left whipping once+whipping is once downwards), then text box can input the password of correspondence.
Compared to embodiment two, still security is higher for the slightly aobvious trouble of this method, the password use that applicable security is higher.
Two kinds of methods can be used in order to user can be made simultaneously, user can define action (left whipping once+downwards whipping is once) for using method one and decipher, and action (left whipping once+whipping twice downwards) is deciphered for using method two.Certainly, user's also the performing an action of other modes predeterminable, carries out the encryption and decryption of data, and is not limited thereto.
Present invention also offers a kind of self-defined input method system, it is applied to the mobile terminal being configured with built-in acceleration sensor, it is characterized in that, described self-defined input method system comprises: built-in acceleration sensor, it is under the pattern of opening described self-defined input method, detect the translational acceleration of the three-dimensional of mobile terminal, judge the action command that described mobile terminal is performed; Arrange and memory module, it for defining according to different action commands and presetting different feature operations, and stores the corresponding relation of described action command and described feature operation; Judge and execution module, it is for when needing to input the feature operation preset and after the instruction that performs an action to described mobile terminal, according to the described action command that described built-in acceleration sensor detects, judge whether described action command conforms to the respective action instruction of the described feature operation stored; If so, corresponding function operation is then performed; If not, then undo.
In sum, self-defined input method of the present invention and system, the built-in acceleration sensor of mobile terminal configuration accurately can detect the translational acceleration of mobile phone along three-dimensional, when after the different action command preset in advance and store and the feature operation corresponding with it, to mobile terminal by the instruction that performs an action, built-in acceleration sensor detects described action command, when judging that the respective action instruction of described action command with the described feature operation of storage conforms to, namely perform corresponding feature operation.In other words, the present invention utilizes the action of built-in acceleration sensor senses user, thus judges user view and carry out corresponding operation, adds convenience and the security of input method.
Above-described embodiment is illustrative principle of the present invention and effect thereof only, but not for limiting the present invention.Any person skilled in the art scholar all without prejudice under spirit of the present invention and category, can modify above-described embodiment or changes.Therefore, such as have in art usually know the knowledgeable do not depart from complete under disclosed spirit and technological thought all equivalence modify or change, must be contained by claim of the present invention.