Keyboard stroke-based user registration and login method

By combining a small model architecture with a heuristic confidence enhancement algorithm, the complexity and cross-device adaptability issues of user authentication based on keyboard behavior recognition in existing technologies are resolved, enabling an efficient and secure user registration and login process.

CN120611368BActive Publication Date: 2025-10-17JILIN INIAI TECHNOLOGY CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202511105744.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-08-08
Publication Date
2025-10-17
Estimated Expiration
2045-08-08

AI Technical Summary

Technical Problem

Existing user identity authentication technology based on keyboard behavior recognition has problems such as complex model training and deployment, high computing resource consumption, high risk of user privacy leakage, and insufficient cross-device adaptability.

Method used

A small model architecture is adopted, and the Tensorflow framework is used to train and verify user keyboard tapping event data. A heuristic confidence enhancement algorithm is combined for login judgment, avoiding the storage of data with user identification and adapting to changes in keystroke habits on different devices.

Benefits of technology

It reduces the time and computing cost of new user registration, protects user privacy, improves login speed and cross-device adaptability, and reduces the negative impact on existing users.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120611368B_ABST
    Figure CN120611368B_ABST
Patent Text Reader

Abstract

The application discloses a keyboard stroke-based user registration and login method, relates to the technical field of user identity recognition and verification, and solves the problems of the prior art in practicability, deployment efficiency, user data security and cross-device adaptability, and the like.The method comprises the following steps: step S1, collecting a user keyboard stroke event data set; step S2, after randomly selecting part of the data from the collected user keyboard stroke event data set, preprocessing the part of data to form preprocessed data; step S3, inputting the preprocessed data into a Tensorflow framework to perform training and verification operations, and determining whether the verification result reaches an expected result; if yes, performing the operation of step S4, otherwise, performing the operation of step S2; and step S4, binding the trained Tensorflow framework with the user and the current device.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of user identity recognition and verification, and particularly relates to a user registration and login method based on keyboard typing. BACKGROUND

[0002] With the rapid development of information technology, user identity recognition technology is increasingly widely used in network security, electronic commerce, financial payment and other fields. Traditional identity authentication methods mainly include knowledge-based authentication (such as username and password), physical device-based authentication (such as smart card, USB Key (hardware security device based on USB interface)) and biometric-based authentication (such as fingerprint, face recognition, etc.). Although these methods can guarantee the security of the system to some extent, there are still risks and deficiencies such as password leakage, biometric feature forgery, device loss, etc.

[0003] Therefore, user behavior-based identity recognition technology has gradually attracted attention, and Keystroke Dynamics (keyboard behavior recognition) as a kind of soft biometric technology has the advantages of no additional hardware support and no user awareness. By analyzing the rhythm, speed, key interval and other characteristics of the user in the keyboard input process, different users can be effectively identified and distinguished.

[0004] In the prior art, Chinese patent 202511080019.6 discloses a method for constructing a user identity recognition model and a method for judging user identity, which models the keyboard input event sequence using an LSTM recurrent neural network (Long Short Term Memory recurrent neural network), thereby realizing a method for user identity discrimination. This method learns the user's time sequence input and other features, achieves good classification results, and verifies the feasibility of this direction.

[0005] However, the prior art still faces many limitations and challenges in practical application: first, the model training and deployment process is complex and difficult to directly embed into standardized processes such as user registration and login, limiting its operability in real business scenarios; second, this method lacks a fusion path with the general user identity authentication mechanism, and cannot achieve seamless integration with existing systems, which has obvious shortcomings in compatibility and system coupling; then, each new user must retrain the model, not only bringing repeated computational overhead, but also requiring long-term storage of user-bound keystroke behavior data for training, which will significantly increase the risk of user privacy leakage. With the growth of user scale, the training resource overhead increases linearly. According to our estimates, when the user volume reaches 10,000 and is trained using a 1024 batch size (batch size), the training time will be further extended when the batch size is reduced), a Nvidia 4090 24GB video card will be close to full load. Incremental training of the model may have a negative impact on existing users, such as decreased recognition accuracy and increased false recognition rate, making it difficult to ensure the stability of the overall performance of the model; finally, users have different operation habits on different devices (such as keyboard layout, key feedback, etc.), and this behavior offset between devices may reduce the recognition accuracy of the model for the same user, affecting the reliability of the system and user experience.

[0006] In summary, the prior art still has a lot of room for improvement in terms of practicality, deployment efficiency, user data security, and cross-device adaptability. SUMMARY

[0007] The present application solves the problems of the prior art in practicality, deployment efficiency, user data security, and cross-device adaptability.

[0008] The user registration method based on keyboard typing according to the present application comprises the following steps:

[0009] Step S1, collect a user keyboard typing event data set;

[0010] Step S2, randomly select part of the data from the collected user keyboard typing event data set, and pre-process the part of the data to form pre-processed data;

[0011] Step S3, input the pre-processed data into the Tensorflow framework for training and verification operations, and determine whether the verification result meets the expected result. If yes, perform the operation of step S4, otherwise, perform the operation of step S2;

[0012] Step S4, bind the trained Tensorflow framework with the user and the current device.

[0013] Furthermore, in one embodiment of the present invention, in step S1, the user keyboard tapping event dataset is a user keyboard tapping event dataset with user identifiers removed.

[0014] Furthermore, in one embodiment of the present invention, the Tensorflow framework consists of an input layer, a mask layer, an LSTM recurrent neural network, a fully connected layer, and an output layer;

[0015] The output dimensions of the LSTM recurrent neural network and the fully connected layer are both 32;

[0016] The output dimension of the output layer is 1, and a sigmoid activation function is used for nonlinear transformation.

[0017] The keyboard-tap-based user login method of the present invention is implemented by using any of the keyboard-tap-based user registration methods described above, and includes the following steps:

[0018] Step S5: Determine whether the user and the current device have been bound to the trained TensorFlow framework. If not, the user needs to register. Otherwise, execute the operation of step S6.

[0019] Step S6: Load the trained Tensorflow framework and collect the user's keyboard tapping event dataset;

[0020] Step S7: Call the trained TensorFlow framework to perform inference on the collected user keyboard tapping event dataset in the form of a sliding window, aggregate the multiple inference results obtained into an overall result, and use a heuristic confidence enhancement algorithm to process the overall result to obtain a confidence score;

[0021] Step S8, respectively determining whether the number of rounds and the overall confidence score reach a threshold value. If so, the login is successful. Otherwise, the operation of step S9 is executed;

[0022] In step S9, it is considered that the user login has failed.

[0023] Furthermore, in one embodiment of the present invention, in step S7, the sliding window is in the form of collecting at least 4 user keyboard tapping events every 2 seconds or more.

[0024] Furthermore, in one embodiment of the present invention, in step S7, the heuristic confidence enhancement algorithm adopts a multi-stage scoring logic, combined with confidence threshold interval determination and a dynamic enhancement mechanism.

[0025] Further, in one embodiment of the present application, in step S7, the heuristic confidence boosting algorithm is specifically:

[0026] inputting a confidence score sequence;

[0027] initializing an accumulated score , initializing an amplification factor ;

[0028] traversing the confidence score sequence , then for

[0029] confidence score < 0.3, accumulated score , amplification factor ;

[0030] 0.3 ≤ confidence score < 0.7, accumulated score , amplification factor ;

[0031] 0.7 ≤ confidence score, accumulated score , amplification factor , wherein is the minimum value;

[0032] outputting an overall confidence score .

[0033] The present application solves the problems of the prior art in practicality, deployment efficiency, user data security, and cross-device adaptability. Specific beneficial effects include:

[0034] 1. The user registration method based on keyboard typing according to the present application greatly reduces the time and calculation cost of single training (the reduced value increases significantly with the increase of the total number of users) when a new user registers; the training model for new user registration does not affect the use experience of existing users; avoids storing keyboard data with user identification (protects user privacy); and the data of a single user can be collected and retrained at any time.

[0035] 2. The user login method based on keyboard typing according to the present application is faster in model inference during login; and the inference result does not leak irrelevant user information (for example, the keyboard typing habits of the current user may be similar to those of a certain user (in the case of a very large total number of users)). BRIEF DESCRIPTION OF DRAWINGS

[0036] The above and / or additional aspects and advantages of the present application will become apparent and more readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings, in which:

[0037] Figure 1is the keyboard stroke-based user registration method flowchart of the embodiment one;

[0038] Figure 2 is the keyboard stroke-based user login method flowchart of the embodiment two;

[0039] Figure 3 is the heuristic confidence enhancement algorithm diagram of the embodiment two. DETAILED DESCRIPTION

[0040] Various embodiments of the present application will be described in detail below with reference to the accompanying drawings. The embodiments described by reference to the accompanying drawings are exemplary and are intended to explain the present application, and cannot be understood as limiting the present application.

[0041] The keyboard stroke-based user registration method of the embodiment one comprises the following steps:

[0042] Step S1, collect a user keyboard stroke event data set;

[0043] Step S2, after randomly selecting part of the data from the collected user keyboard stroke event data set, pre-process the part of data to form pre-processed data;

[0044] Step S3, input the pre-processed data into the Tensorflow framework for training, and determine whether the training result reaches the expected result. If yes, execute the operation of step S4, otherwise, execute the operation of step S2;

[0045] Step S4, bind the trained Tensorflow framework with the user and the current device.

[0046] In the embodiment, in step S1, the user keyboard stroke event data set is a user keyboard stroke event data set without identification.

[0047] In the embodiment, the Tensorflow framework is composed of an input layer, a mask layer, an LSTM recurrent neural network, a fully connected layer and an output layer;

[0048] The output dimension of the LSTM recurrent neural network and the fully connected layer is 32;

[0049] The output dimension of the output layer is 1, and a sigmoid activation function is used for nonlinear transformation.

[0050] In the embodiment, in order to solve the technical problems existing in the prior art, such as Figure 1 The keyboard stroke-based user registration method is shown in the figure, which comprises the following steps:

[0051] Collect a user keyboard stroke event dataset (≥100 users, and ≥1000 records). Remove the user identification in the user keyboard stroke event dataset;

[0052] The user keyboard stroke event dataset removed by the user identification cannot be found by the existing stroke event backtracking to find the corresponding input user.

[0053] Step S1, when a new user registers or a registered user registers a new device, collect the event dataset of the user typing the keyboard;

[0054] Step S2, in the pre-collected dataset, randomly select a part of the data (5%);

[0055] Step S3, mark the dataset collected in step S1 as True, and mark the dataset selected in step S2 as False. After mixing, pre-processing is performed. Use 95% of the pre-processed data as training, and 5% of the pre-processed data as verification. 95% of the pre-processed data is input into the Tensorflow framework (an open source machine learning framework) for training, and 5% of the pre-processed data is input into the Tensorflow framework for verification. Respectively judge whether the accuracy and loss function reach the expected result, if yes, execute the operation of step S4, otherwise, execute the operation of step S2;

[0056] The present embodiment finds that the application of the existing technology Tensorflow framework in the method will produce the following technical problems: first, with the increase of registered users, the physical size of the Tensorflow framework increases linearly, and the training time and cost also increase accordingly. Under a certain computing power, this way has a theoretical upper limit of the number of users that can be accommodated; second, the model trained for new users will affect the accuracy of existing users at a certain probability, thereby causing a certain negative impact on the login process of the latter; third, in order to train the data of new users at any time, the existing technology must save the data with user identification for a long time, which may lead to user privacy leakage to some extent; finally, the key habit of the user is different on different devices, and at the same time, with the extension of the time dimension (for example, after becoming more and more familiar with the keyboard), its own habits are also changing.

[0057] Therefore, the problems to be solved are: 1) reduce the time and calculation cost of single training; 2) training new users does not affect the use experience of existing users; 3) avoid storing keyboard data with user identification (protect user privacy); 4) can collect and retrain the data of a single user at any time.

[0058] In order to solve the above technical problems, the embodiment improves the Tensorflow framework in the prior art, specifically: the Tensorflow framework is composed of an input layer, a mask layer, an LSTM recurrent neural network, a full connection layer and an output layer;

[0059] The output dimensions of the LSTM recurrent neural network and the full connection layer are both 32.

[0060] The output dimension of the output layer is 1, and a sigmoid activation function (nonlinear activation function) is used for nonlinear transformation.

[0061] Therefore, the embodiment adjusts the target of model framework reasoning and improves the Tensorflow framework in the prior art, thereby solving the technical problems existing in the prior art. 1) The prior art uses a large model to reason and determine who the current user is (returns the user identifier); and the improved technology trains a small model for each device of each user. The small model is only used to determine whether the current key event is the user (returns true (correct) or false (incorrect)). The improvement of this design idea reduces the dimension of the output layer from N users to 1 (the model size is no longer related to the number of users); 2) Through experiments, it can be determined that reducing the dimensions of the LSTM recurrent neural network and the full connection layer from 64 to 32 has limited negative impact on the model accuracy and loss value, but it further reduces the physical size of the model; 3) No long-term storage of keyboard stroke events with user identifiers; 4) This eliminates the risk of misuse after the user's keyboard stroke habits are leaked; 5) Each device of each user corresponds to a small model, which eliminates the negative impact between users.

[0062] Step S4, binding the trained Tensorflow framework with the user and the current device.

[0063] Embodiment two, the keyboard stroke-based user login method described in the embodiment is implemented by using the keyboard stroke-based user registration method described in embodiment one, and includes the following steps:

[0064] Step S5, determining whether the user and the current device have both been bound with the trained Tensorflow framework, if not, the user needs to be registered, otherwise, the operation of step S6 is performed;

[0065] Step S6, loading the trained Tensorflow framework and collecting the keyboard stroke event dataset of the user.

[0066] Step S7, calling the trained Tensorflow framework to infer the collected user keyboard typing event data set in the form of a sliding window, respectively, and obtaining a plurality of inference results, and processing the overall result by using a heuristic confidence enhancement algorithm to obtain a confidence score;

[0067] Step S8, respectively, whether the number of rounds and the confidence score reaches the threshold value, if yes, the login is successful, otherwise, the operation of step S9 is executed;

[0068] Step S9, the user login is considered to fail.

[0069] In the embodiment, in step S7, the sliding window form is every 2 seconds or more, and at least 4 user keyboard typing events are collected.

[0070] In the embodiment, in step S7, the heuristic confidence enhancement algorithm uses a multi-stage scoring logic combined with confidence threshold interval determination and dynamic enhancement mechanism.

[0071] In the embodiment, in step S7, the heuristic confidence enhancement algorithm is specifically:

[0072] Input the confidence score sequence;

[0073] Initialize the cumulative score , and initialize the amplification factor ;

[0074] Traverse the confidence score sequence , for

[0075] If the confidence score is less than 0.3, the cumulative score is , and the amplification factor is ;

[0076] If the confidence score is between 0.3 and 0.7, the cumulative score is , and the amplification factor is ;

[0077] If the confidence score is greater than or equal to 0.7, the cumulative score is , and the amplification factor is , wherein is the minimum value;

[0078] Output the overall confidence score .

[0079] Similarly, in order to solve the technical problems existing in the prior art, as shown in Figure 2 , a user login method based on keyboard typing is proposed, including the following steps:

[0080] Step S5, judge whether the user and the current device have all bound the trained Tensorflow framework, if not, execute the operation of step S6, otherwise, execute the operation of step S7.

[0081] Step S6, if the trained Tensorflow framework is not bound, guide the user to register a new device.

[0082] Step S7, if the trained Tensorflow framework is bound, load the trained Tensorflow framework, and guide the user to input a piece of text using the keyboard, collect multiple user keyboard typing event data, in this process, every 2 seconds or more, and at least 4 user keyboard typing events are collected, the latest 20 key events are called to train the trained Tensorflow framework to infer 20 key events respectively, and multiple inference results are obtained.

[0083] Step S8, multiple inference results respectively obtain an estimated value of [0, 1]. The closer this estimated value is to 1, the more likely the collected key behavior is the target user.

[0084] The technical problem of the existing Tensorflow framework in the first embodiment is improved by adjusting the dimension and activation function of the output layer respectively to judge whether the input belongs to the current user {0 or 1}, so that the improved Tensorflow framework is applicable to the keyboard typing-based user login method.

[0085] Step S9, record multiple inference results, and aggregate multiple inference results into an overall result, and then use a heuristic confidence enhancement algorithm to judge the overall result to obtain an overall confidence score.

[0086] As shown in Figure 3 , the heuristic confidence enhancement algorithm uses a multi-stage scoring logic, combines confidence threshold interval judgment and dynamic enhancement mechanism, effectively enhances the recognition ability of "high confidence continuous fragments", and has tolerance to occasional abnormal noise points, specifically:

[0087] 1. Input definition:

[0088] Let the input be a confidence score sequence: ;

[0089] Initialize the cumulative score , and initialize the amplification factor .

[0090] 2. Update rule:

[0091] For each , the accumulated score is processed according to the following rules:

[0092] Low confidence score (0 ), then the accumulated score is , the amplification factor is ;

[0093] Medium confidence score (0 ), then the accumulated score is , the amplification factor is ;

[0094] High confidence score (0 ), then the accumulated score is , the amplification factor is , wherein, is the minimum value;

[0095] The final output is the overall confidence score .

[0096] Step S10, respectively, whether the number of rounds and overall confidence score reaches the threshold value (for example, to determine the number of rounds ≥ 8, and the overall confidence score ≥ 0.6), then consider the login success. When the number of rounds to reach the set upper limit (such as 20 rounds) and the confidence score is still lower than the threshold value, then consider the user login failure.

[0097] The above describes in detail the user registration and login method based on keyboard typing according to the present application. The principles and implementation modes of the present application are described by applying specific examples. The above examples are only used to help understand the method of the present application and its core idea. Meanwhile, for those skilled in the art, according to the idea of the present application, the specific implementation mode and application range will be changed. In summary, the content of the present application should not be understood as a limitation of the present application.

Claims

1. A user login method based on keyboard tapping, wherein the method is implemented by using a user registration method based on keyboard tapping, the user registration method based on keyboard tapping is characterized in that: The following steps are involved: Step S1, collecting a user keyboard tapping event data set; Step S2, randomly selecting part of the data from the collected user keyboard tapping event data set, and preprocessing the part of the data to form preprocessed data; Step S3: The pre-processed data is input into the TensorFlow framework for training and verification operations respectively, and whether the verification results meet the expected results is determined. If so, the operation of step S4 is executed; otherwise, the operation of step S2 is executed; Step S4: Bind the trained Tensorflow framework to the user and the current device; The following steps are involved: Step S5: Determine whether the user and the current device have been bound to the trained TensorFlow framework. If not, the user needs to register. Otherwise, execute the operation of step S6. Step S6: Load the trained Tensorflow framework and collect the user's keyboard tapping event dataset; Step S7: Call the trained TensorFlow framework to perform inference on the collected user keyboard tapping event dataset in the form of a sliding window, aggregate the multiple inference results obtained into an overall result, and use a heuristic confidence enhancement algorithm to process the overall result to obtain a confidence score; Step S8, respectively determining whether the number of rounds and the overall confidence score reach a threshold value. If so, the login is successful. Otherwise, the operation of step S9 is executed; Step S9: It is considered that the user login has failed; In step S7, the heuristic confidence enhancement algorithm is specifically: Input confidence score sequence; Initialize cumulative score , initialize the amplification factor ; Iterate over the confidence score sequence , then for If the confidence score is less than 0.3, the cumulative score , amplification factor ; 0.3≤Confidence score<0.7, then the cumulative score , amplification factor ; 0.7≤confidence score, then the cumulative score , amplification factor ,in, is the minimum value; Output overall confidence score .

2. The user login method based on keyboard tapping according to claim 1, characterized in that: In the step S1, the user keyboard tapping event data set is a user keyboard tapping event data set without the user identifier.

3. The user login method based on keyboard tapping according to claim 1, characterized in that: The Tensorflow framework consists of an input layer, a mask layer, an LSTM recurrent neural network, a fully connected layer, and an output layer; The output dimensions of the LSTM recurrent neural network and the fully connected layer are both 32; The output dimension of the output layer is 1, and a sigmoid activation function is used for nonlinear transformation.

4. The user login method based on keyboard tapping according to claim 1, characterized in that: In step S7, the sliding window is in the form of collecting at least 4 user keyboard tapping events every 2 seconds or more.

5. The user login method based on keyboard tapping according to claim 1, characterized in that: In step S7, the heuristic confidence enhancement algorithm adopts a multi-stage scoring logic, combined with confidence threshold interval determination and dynamic enhancement mechanism.

Citation Information

Patent Citations

  • Method for constructing user identity recognition model and method for judging user identity

    CN120560560A

  • Modeling and analysis system for user keyboard key pressing activity mode and identity identification method thereof

    CN104318136A

  • Identification method and device for login authentication through mouse and keyboard tapping rhythm

    CN112100598A