Embodiment
Embodiments herein proposes a kind of implementation method of new safety input, in client and service end
Generate the dummy keyboard of same key arrangement by identical or corresponding algorithm, client records and to
Click location when service end upload user is inputted on the virtual keyboard so that without using the input of user
Content is in itself, you can realize key message to the upload of service end, and reduce that key message is intercepted can
Energy property, improves the security of key message, so as to solve problems of the prior art.
In embodiments herein, can mutually it be accessed by network between client and service end.Wherein,
Equipment where client can be mobile phone, tablet personal computer, PC (Personal Computer, personal electricity
Brain), terminal or the server such as notebook;Service end may operate in one physically or logically
On server or by two or more share different responsibilities physically or logically server,
Mutually cooperate with to realize the various functions of service end in the embodiment of the present application.The embodiment of the present application is to client
With the species of equipment where service end, and the type of communication network, agreement between client and service end
Deng not limiting.
In the embodiment of the present application, the implementation method of safety input apply flow in client as shown in figure 1,
Apply the flow in service end as shown in Figure 2.
In client, step 110, the key arrangement of dummy keyboard is generated according to client algorithm, and show
Show to user.
Client algorithm can be preset in client when installing client, can also needed by client
Download from service end during safety input, embodiments herein is not limited.
When client need user input key message when, call client algorithm generate dummy keyboard by
Key is laid out, and shows dummy keyboard according to the key arrangement of generation, is used when being inputted for user.
In client, step 120, click location when record user inputs on the virtual keyboard.
When user carries out input operation by clicking on the button on dummy keyboard, client can be from place
The operating system of equipment obtains coordinate of user's clicking point on screen.Shown according to client on screen
The region of dummy keyboard, can calculate the click location of user on the virtual keyboard.User is in virtual key
Click location on disk can be represented with the coordinate of clicking point on the virtual keyboard;To dummy keyboard in screen
The situation of display variable area on curtain, can also be with the Scale Translate of clicking point on the virtual keyboard come table
Show click location.
In client, step 130, input relevant parameter is uploaded to server;Input relevant parameter bag
The click location of user on the virtual keyboard is included, for service end using identical or corresponding with client algorithm
Service end algorithm restore same key arrangement, according to the click location of upload obtain user input
Content.
In service end, step 210, the input relevant parameter that client is uploaded is received.
In service end, step 220, same key arrangement is restored using service end algorithm, according to defeated
Enter the input content that the click location in relevant parameter obtains user.
Client regard the click location of the user of record on the virtual keyboard as input relevant parameter, upload
To service end.Service end receives the input relevant parameter that client is uploaded, by inputting relevant parameter kimonos
End algorithm is engaged in obtain the input content of user.It is any to generate the button cloth for meeting application scenarios needs
The algorithm of office may serve to as identical client algorithm and service end algorithm, any to generate phase
Algorithms of different with key arrangement can serve as corresponding client algorithm and service end algorithm, this Shen
Please embodiment do not limit.
According to implementing for client algorithm and service end algorithm, it can be only included in input relevant parameter
The click location of user on the virtual keyboard, can also also include service end algorithm and be used for also original subscriber in visitor
Family end carries out the other specification needed for used key arrangement during input operation.
For example, client and server synchronization carry out timing, client uses identical algorithm with service end,
The timing time generated according to the present timing time in key arrangement, predetermined amount of time corresponds to identical
Key arrangement;Then client algorithm and service end algorithm can generate same in each predetermined amount of time
Key arrangement, and change key arrangement when entering next predetermined amount of time.In this implementation,
Client can only click location to service end upload user on the virtual keyboard.
For another example, client uses same algorithm with service end, and the algorithm arrives multiple by client with one
The algorithmic variable value of determination generates key arrangement for input.In this implementation, client need by
The algorithmic variable value used during the key arrangement that generation user uses is uploaded to as input relevant parameter
Service end.So, the algorithmic variable value of reception is input in service end algorithm by service end, restores use
The key arrangement that family is used, so that the click location further in input relevant parameter obtains user's
Input content.For example, client can be used as algorithmic variable value using timestamp, needing to be closed
When key information is inputted, client obtains current timestamp, using current timestamp as client algorithm
Input, generates the key arrangement of dummy keyboard;In order that service end can generate same key arrangement,
The timestamp used when client is using the key arrangement for generating dummy keyboard is uploaded as input relevant parameter
To service end.
In one example, when needing user to input key message, client obtains current timestamp,
Using current timestamp as the seed of predetermined pseudo random number algorithm, given birth to according to predetermined pseudo random number algorithm
Into client random number k (k is integer);Button on dummy keyboard is constituted button set, wherein wrapping
Include N (N is natural number) individual button;If k obtains m (i.e. to i modulus:M=k%i), by keyset
M-th of button is taken out in conjunction, is sequentially added in layout sequence, this step is repeated and passs i from N
0 is reduced to, N number of button in such button set will be arranged sequentially in layout sequence with some;According to
The order of button in layout sequence, generates the key arrangement of dummy keyboard, for example can be by layout sequence
Button be placed on one by one in the key mapping of dummy keyboard in order, formed key arrangement.
It is corresponding in above-mentioned example, extracted in service end, the input relevant parameter uploaded from client
Go out timestamp, it is (predetermined with client as predetermined pseudo random number algorithm using the timestamp that client is uploaded
Pseudo random number algorithm is identical) seed, generate service end random number k;By the button group on dummy keyboard
Into button set, including N number of button;(k%i) individual button in button set is taken out, this is pressed
Key order is added in layout sequence, repeats this step and i is decremented into 0 from N;According in layout sequence
The order of button, reduces the key arrangement of dummy keyboard, the defeated of user is obtained according to the click location of upload
Enter content.
Client can be after user completes one click input on the virtual keyboard every time, in service end
Biography once inputs relevant parameter;In this case, in the input process of whole key message, client
End can circulate execution step 120 and step 130, and service end can circulate execution step 210 and step
220.Client can also disposably be uploaded after the input that user completes whole key message to service end
Input relevant parameter including multiple click location.
Some dummy keyboards can carry out input through keyboard feedback after user clicks on some button, by the button
Content (inputting character) is shown on screen.The record screen software of malice can be obtained by operating system
And the content of screen display is recorded, to peep the key message for knowing user., can be with embodiments herein
After the click input of user on the virtual keyboard is received, do not show that user clicks on the press key contents of input,
To avoid the key message of user from shielding software intercepts by record.
If client is generated after a kind of key arrangement, user is on the dummy keyboard using the key arrangement
Input whole key message, then due to input key message during key mapping fix, click location is still
Can so expose in some features of key message, the password of such as user identical character how many, which
Position is identical with which etc..
Protection is provided the user in order to a greater degree of, client can be in record user on the virtual keyboard
After the click location of input operation, the key arrangement of dummy keyboard is updated according to client algorithm, and
It is shown to user and carries out input operation next time for it;Wherein, input operation refers to user to virtual key
On disk the clicking point of the clicking operation of button effective coverage, i.e. user on the button of dummy keyboard rather than
Elsewhere.So, user often inputs a character, and the key arrangement of dummy keyboard will update once,
So that the whole corresponding click location sequence of key message will not reveal the feature of input content.
It is corresponding, in service end, obtained according to key arrangement corresponding to the defeated of one click location of user
Enter after content, the key arrangement of dummy keyboard is updated using service end algorithm, and according to the button after renewal
It is laid out to obtain the input content corresponding to the next click location of user.It should be noted that in client
In the case of end is using algorithmic variable value as input generation key arrangement, client can be to service end upload pair
Should in the algorithmic variable value of each click location, service end successively using one group of corresponding algorithmic variable value and
Click location inputs character to obtain one, finally gives the list entries of user;And in some clients
In the realization of algorithm and service end algorithm, it can be calculated according to initial algorithmic variable value grey iterative generation identical
Method variable value sequence (such as using initial algorithmic variable value as the pseudo random number algorithm of seed), in this feelings
Under condition, client can upload initial algorithmic variable value to service end, be voluntarily iterated by service end
Computing, obtains the algorithmic variable value corresponding to follow-up click location, refer in the application application example to
The scheme gone out.
It can be seen that, in embodiments herein, it is respectively adopted in client and service end identical or corresponding
Client algorithm and service end algorithm, to generate same dummy keyboard key arrangement, client collection is used
The click location of family on the virtual keyboard is uploaded to service end, and service end is according to key arrangement and click location
To obtain the input content of user, so, the input content of user both need not locally be preserved in client,
Uploaded also without to service end, it is to avoid because client local information is stolen or client is uploaded to
The information of service end is intercepted the threat brought to user's key message, improves using the safety with network
Property.
In the application example of the application, client is shown when needing user's input password to user
Code keypad, button includes 10 numerals and determination button from 0 to 9;Button is determined when user clicks on
When, Password Input is completed.
The handling process of client is as shown in Figure 3.
Step 301, current time stamp T imeStamp is obtained, using TimeStamp as random several
Son.
Step 302, predetermined pseudo random number algorithm is run, an integer random number k is generated.
Step 303, button set is generated:{ 0,1,2,3,4,5,6,7,8,9 }, button set includes 10 elements;
Empty layout sequence is generated, i=10 is made.Determine button by consolidating on dummy keyboard in this application example
Positioning is put, and other 10 digital keys have predetermined key mapping on the virtual keyboard, but key assignments will be according to random number
K is determined.
Step 304, k is calculated to the result m of i modulus, i.e. m=(k%i).
Step 305, m-th of element in delete button set, layout sequence is added to by m-th of element
It is last.
Step 306, judge whether i is equal to 0, if it is, performing step 307;If not, i is subtracted
1, go to step 304.
Step 307, the key of digital keys on dummy keyboard is set according to the order of each element in layout sequence
Value, generates key arrangement, and dummy keyboard is shown to user, receives the clicking operation of user.
Step 308, judge whether the button that user clicks on is to determine, if it is, going to step 310;Otherwise
Perform step 309.
Step 309, the coordinate (x, y) of user's clicking point on the virtual keyboard is calculated, and is sequentially recorded down
Come, go to step 302, run predetermined pseudo random number algorithm and obtain next random number, it is new for generating
Key arrangement, input next numeral for user.
Step 310, by { TimeStamp, (x1,y1), (x2,y2) ... (xn,yn) it is used as the related ginseng of input
Number is uploaded to service end.
The handling process of service end is as shown in Figure 4.
Step 401, the input relevant parameter that client is uploaded is received
{ TimeStamp, (x1,y1), (x2,y2) ... (xn,yn), therefrom extraction time stamp TimeStamp and
Click location sequence { (x1,y1), (x2,y2) ... (xn,yn), it regard TimeStamp as random number seed.
Take first coordinate value (x in click location sequence1,y1) it is used as current click coordinate value.Generate user defeated
Enter character string, it is currently empty.
Step 402, predetermined pseudo random number algorithm is run, an integer random number k is generated.Service end
Predetermined pseudo random number algorithm is identical with client, so, when using identical random number seed, by life
Into identical pseudo-random number sequence.
Step 403, button set is generated:{ 0,1,2,3,4,5,6,7,8,9 }, including 10 elements.Generate cloth
Office's sequence, is now sky.Make i=10.
Step 404, k is calculated to the result m of i modulus, i.e. m=(k%i).
Step 405, m-th of element in delete button set, layout sequence is added to by m-th of element
It is last.
Step 406, judge whether i is equal to 0, if it is, performing step 407;If not, i is subtracted
1, go to step 404.
Step 407, the key of digital keys on dummy keyboard is set according to the order of each element in layout sequence
Value, generates key arrangement.The point of current click coordinate value on the virtual keyboard is searched in which digital keys
On, the key assignments of the button is added to the end of user inputs character string.
Step 408, last coordinate whether current click coordinate value is click in position sequence is judged
Value, if it is, performing step 409;Otherwise next coordinate value in position sequence is will click on as working as
Preceding click coordinate value, goes to step 402.
Step 409, using user inputs character string as user input password.
Corresponding with the realization of above-mentioned flow, embodiments herein additionally provides a kind of peace applied to client
What is inputted entirely realizes device, and device is realized in a kind of safety input applied to service end.Both dresses
Putting can be realized by software, can also be realized by way of hardware or software and hardware combining.With soft
It is CPU (the Central Process by place equipment as the device on logical meaning exemplified by part is realized
Unit, central processing unit) corresponding computer program instructions are read what operation in internal memory was formed.From
For hardware view, in addition to the CPU shown in Fig. 5, internal memory and nonvolatile memory, device
The equipment at place generally also includes being used to carry out other hardware such as chip of wireless signal transmitting-receiving, or is used for
Realize other hardware such as board of network communicating function.
What a kind of safety that Fig. 6 show the embodiment of the present application offer was inputted realizes device, applies in client
End, including client layout generation unit, click location recording unit and input parameter uploading unit, its
In:Client layout generation unit is used for the key arrangement that dummy keyboard is generated according to client algorithm, and
It is shown to user;Click location recording unit is used to record click position when user inputs on the virtual keyboard
Put;Input parameter uploading unit is used to input relevant parameter being uploaded to server;The input is related to be joined
Number includes the click location of user on the virtual keyboard, is restored equally using service end algorithm for service end
Key arrangement, according to the click location of upload obtain user input content;The service end algorithm with
Client algorithm is identical or corresponding.
Optionally, described device also includes:Client layout updates unit, for recording user in void
After the click location for intending the last input operation of keyboard, the button of dummy keyboard is updated according to client algorithm
Layout, and user is shown to for its progress input operation next time.
Optionally, described device also includes:Display suppression unit, for receiving user in dummy keyboard
On click input after, do not show user click on input press key contents.
In one example, the input relevant parameter also includes algorithmic variable value, for service end to receive
Algorithmic variable value is the input of service end algorithm, restores same keyboard layout.
In above-mentioned example, client layout generation unit can be specifically for:Obtain the current time
Stamp, using current timestamp as the input of client algorithm, generates the key arrangement of dummy keyboard, and show
Show to user;The algorithmic variable value includes:The timestamp used during the key arrangement for generating dummy keyboard.
In above-mentioned example, it is described according to client be laid out generation unit can include client random number module,
Client button collection modules, client layout sequence module and client key arrangement module, wherein:
Client random number module is used to obtain current timestamp, and predetermined pseudorandom is used as using current timestamp
The seed of method is figured, client random number k is generated;The client random number is integer;Client is pressed
Key collection modules are used to the button on dummy keyboard constituting button set, including N number of button;N
For natural number;Client layout sequence module is used to take out (k%i) individual button in button set, by it
It is sequentially added in layout sequence;Repeat this step and i is decremented to 0 from N;Client key arrangement mould
Block is used for the order according to button in layout sequence, generates the key arrangement of dummy keyboard.
What a kind of safety that Fig. 7 show the embodiment of the present application offer was inputted realizes device, applies in service
End, including input parameter receiving unit and input content acquiring unit, wherein:Input parameter receiving unit
Input relevant parameter for receiving client upload;The input relevant parameter includes user in virtual key
Click location on disk;The key arrangement of the dummy keyboard is generated by client according to client algorithm;
Input content acquiring unit is used to restore same key arrangement using service end algorithm, according to the point
Hit the input content of position acquisition user;The service end algorithm is identical or corresponding with client algorithm.
Optionally, the input content acquiring unit specifically for:Correspond to being obtained according to key arrangement
After the input content of one click location of user, the key arrangement of dummy keyboard is updated using service end algorithm,
And input content corresponding to the next click location of user is obtained according to the key arrangement after renewal.
In one example, the input relevant parameter also includes algorithmic variable value;The input content is obtained
Unit specifically for:Using the algorithmic variable value as the input of service end algorithm, same key is restored
Disk is laid out, and the input content of user is obtained according to the click location.
In above-mentioned example, the algorithmic variable value can include timestamp;The input content acquiring unit
Can include service end random number module, service end button collection modules, service end layout sequence module and
Input content module, wherein:Service end random number module is used for the timestamp that uploads using client as pre-
Determine the seed of pseudo random number algorithm, generate service end random number k;The service end random number is integer;
Service end button collection modules are used to the button on dummy keyboard constituting button set, including N number of
Button;N is natural number;Service end layout sequence module, which is used to taking out in button set the (k%i) is individual, presses
Key, is sequentially added in layout sequence;Repeat this step and i is decremented to 0 from N;Input content
Module is used for the order according to button in layout sequence, the key arrangement of dummy keyboard is reduced, according to upload
Click location obtain user input content.
The preferred embodiment of the application is the foregoing is only, it is all at this not to limit the application
Within the spirit and principle of application, any modification, equivalent substitution and improvements done etc. should be included in
Within the scope of the application protection.
In a typical configuration, computing device includes one or more processors (CPU), input/output
Interface, network interface and internal memory.
Internal memory potentially includes the volatile memory in computer-readable medium, random access memory
And/or the form, such as read-only storage (ROM) or flash memory (flash RAM) such as Nonvolatile memory (RAM).
Internal memory is the example of computer-readable medium.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by appointing
What method or technique realizes that information is stored.Information can be computer-readable instruction, data structure, program
Module or other data.The example of the storage medium of computer include, but are not limited to phase transition internal memory (PRAM),
Static RAM (SRAM), dynamic random access memory (DRAM), it is other kinds of with
Machine access memory (RAM), read-only storage (ROM), Electrically Erasable Read Only Memory
(EEPROM), fast flash memory bank or other memory techniques, read-only optical disc read-only storage (CD-ROM),
Digital versatile disc (DVD) or other optical storages, magnetic cassette tape, tape magnetic rigid disk are stored or it
His magnetic storage apparatus or any other non-transmission medium, the letter that can be accessed by a computing device available for storage
Breath.Defined according to herein, computer-readable medium does not include temporary computer readable media (transitory
Media), such as the data-signal and carrier wave of modulation.
It should also be noted that, term " comprising ", "comprising" or its any other variant be intended to it is non-
It is exclusive to include, so that process, method, commodity or equipment including a series of key elements are not only wrapped
Include those key elements, but also other key elements including being not expressly set out, or also include for this process,
Method, commodity or the intrinsic key element of equipment.In the absence of more restrictions, by sentence " including
One ... " key element that limits, it is not excluded that in the process including the key element, method, commodity or set
Also there is other identical element in standby.
It will be understood by those skilled in the art that embodiments herein can be provided as method, system or computer journey
Sequence product.Therefore, the application can using complete hardware embodiment, complete software embodiment or combine software and
The form of the embodiment of hardware aspect.Moreover, the application can be used wherein includes calculating one or more
Machine usable program code computer-usable storage medium (include but is not limited to magnetic disk storage, CD-ROM,
Optical memory etc.) on the form of computer program product implemented.