Password verification method and device, electronic equipment, storage medium and program product

By recording and comparing the character sequence, key order, pressing duration, and force of keyboard input during password verification, the problem of difficulty in identifying password theft and automated input in existing technologies is solved, thus improving the security and reliability of password verification.

CN123049542APending Publication Date: 2026-11-06SHANGHAI LONGCHEER TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611228018.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-13
Publication Date
2026-11-06

AI Technical Summary

Technical Problem

Existing password verification schemes for electronic devices are unable to identify repeated input after passwords have been spied on, recorded, or stolen, and cannot effectively distinguish between manual input and automated program submissions, lacking the ability to recognize the input process.

Method used

During the password setting phase, the character sequence, key sequence, press duration, and press intensity of keyboard input events are recorded and compared during the verification phase. A comprehensive judgment is made based on the input process characteristics.

Benefits of technology

It improves the ability to identify stolen input and non-human input, thereby enhancing the security and reliability of password verification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123049542A_ABST
    Figure CN123049542A_ABST
Patent Text Reader

Abstract

This application provides a password verification method, apparatus, electronic device, storage medium, and program product. The method involves receiving keyboard input events during the password setting phase, extracting character sequences and corresponding keystroke sequences based on these events, and storing these sequences as password feature data. During the password verification phase, it receives keyboard input events to be verified, extracts the character sequence to be verified and the corresponding keystroke sequence to be verified based on these events, compares the character sequence and keystroke sequence to be verified with the password feature data to obtain a first comparison result, and outputs a verification result based on the first comparison result. By incorporating the keystroke sequence as an input process feature into the authentication criteria, the method improves the ability to identify non-personal and non-human input without changing the keyboard input method, thereby enhancing the reliability and security of password verification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the fields of information security and identity authentication, and in particular to a password verification method, device, electronic device, storage medium, and program product. Background Technology

[0002] Password verification in existing electronic devices typically relies on storing and comparing character sequences entered by the user via a keyboard to complete unlocking or login authentication.

[0003] However, this type of scheme mainly judges the verification result based on the character content itself, which makes it difficult to identify repeated input after the password has been spied on, recorded or stolen, and it lacks the ability to effectively distinguish between automated program submissions and real user operations.

[0004] Therefore, improving the ability to identify stolen input and non-human input during password verification has become a technical problem that needs to be solved. Summary of the Invention

[0005] This application provides a password verification method, apparatus, electronic device, storage medium, and program product to solve the aforementioned technical problems. This solution, during the password verification process, not only focuses on the character content formed by the password input but also combines it with feature information related to the input process for comprehensive judgment. This enhances the ability to identify abnormal input behavior and improves security while ensuring the password verification function is implemented.

[0006] In a first aspect, embodiments of this application provide a password verification method, the method comprising:

[0007] During the password setting phase, keyboard input events are received, and character sequences and corresponding key presses are extracted based on the keyboard input events. The character sequences and corresponding key presses are then stored as password feature data.

[0008] During the password verification phase, the system receives keyboard input events to be verified and extracts the character sequence to be verified and the corresponding key sequence to be verified based on the keyboard input events.

[0009] The character sequence to be verified and the key sequence to be verified are compared with the password feature data to obtain the first comparison result, and the verification result is output based on the first comparison result.

[0010] In one possible embodiment, a character sequence and the corresponding key press order are extracted based on keyboard input events, and the character sequence and the corresponding key press order are stored as password feature data, including:

[0011] Extract the character sequence, the corresponding key sequence, the press duration and pressure of each key from the keyboard input events, and store the character sequence, the corresponding key sequence, the press duration and pressure of each key as password feature data;

[0012] Accordingly, the sequence of characters to be verified and the corresponding key press order to be verified are extracted based on the keyboard input events to be verified, including:

[0013] Extract the character sequence to be verified, the corresponding key sequence to be verified, the press duration and press force of each key to be verified from the keyboard input events to be verified.

[0014] The character sequence to be verified and the key sequence to be verified are compared with the password feature data to obtain the first comparison result, including:

[0015] The first comparison result is obtained by comparing the character sequence to be verified, the key sequence to be verified, the pressing duration of each key to be verified, the pressing force of each key to be verified, and the password feature data.

[0016] In one possible embodiment, the character sequence to be verified, the key sequence to be verified, the press duration for each key to be verified, and the press intensity are compared with the password feature data to obtain a first comparison result, including:

[0017] For each key to be verified, obtain the duration and force reception range corresponding to the key in the password feature data;

[0018] Match the key sequence to be verified with the key sequence in the password feature data;

[0019] For each button to be verified, the pressing duration corresponding to the button to be verified is matched with the duration receiving range; the pressing force corresponding to the button to be verified is matched with the force receiving range.

[0020] Match the character sequence to be verified with the character sequence in the password feature data;

[0021] The first comparison result is determined based on each matching result.

[0022] In one possible embodiment, the method further includes:

[0023] Receive range adjustment instructions input by the user;

[0024] The duration range parameter and force range parameter corresponding to each button are determined according to the range adjustment command;

[0025] Update the duration acceptance interval and intensity acceptance interval in the cryptographic feature data according to the duration interval parameter and intensity interval parameter.

[0026] In one possible embodiment, during the password setting phase, the method further includes:

[0027] Extract the key press interval time between adjacent keys based on keyboard input events;

[0028] Accordingly, the character sequence, the corresponding key sequence, the pressing duration and pressure of each key are stored as password feature data, including:

[0029] Store the character sequence, the corresponding key sequence, the pressing duration and pressure of each key, and the key interval as password feature data;

[0030] During the password verification phase, the method also includes:

[0031] Extract the key interval time between adjacent keys to be verified based on the keyboard input events to be verified.

[0032] The key press interval time is compared with the key press interval time to be verified to obtain the second comparison result;

[0033] Accordingly, based on the first comparison result, the verification result is output, including:

[0034] The verification results are output based on the first and second comparison results.

[0035] In one possible embodiment, the process of extracting the character sequence to be verified, the corresponding key sequence to be verified, the key press duration to be verified for each key, and the key press intensity to be verified based on the keyboard input event to be verified specifically includes:

[0036] Analyze the key trigger time and key release time in the keyboard input events to be verified;

[0037] Calculate the press duration for each button to be verified based on the button trigger time and button release time.

[0038] Read the pressure sensor data corresponding to each key to be verified in the keyboard input event to be verified, and obtain the pressing force corresponding to each key to be verified;

[0039] Generate the key sequence to be verified according to the order in which the keyboard input events to be verified occur;

[0040] Generate a character sequence to be verified based on the key value corresponding to the keyboard input event to be verified.

[0041] Secondly, embodiments of this application provide a password verification device, the device comprising:

[0042] The first receiving module is used to receive keyboard input events during the password setting stage, extract character sequences and corresponding key sequences based on the keyboard input events, and store the character sequences and corresponding key sequences as password feature data.

[0043] The second receiving module is used to receive the keyboard input event to be verified during the password verification stage, and extract the character sequence to be verified and the corresponding key sequence to be verified based on the keyboard input event to be verified.

[0044] The comparison module is used to compare the character sequence to be verified and the key sequence to be verified with the password feature data to obtain the first comparison result, and output the verification result based on the first comparison result.

[0045] Thirdly, embodiments of this application provide an electronic device, including: a memory and a processor;

[0046] The memory stores instructions that the computer executes;

[0047] The processor executes computer execution instructions stored in memory, causing the processor to perform the methods described above.

[0048] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the methods provided above.

[0049] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the method described above.

[0050] The password verification method, apparatus, electronic device, storage medium, and program product provided in this application, by storing character sequences and their corresponding key sequences during the password setting stage, and comparing the character sequence to be verified and the key sequence to be verified with password feature data during the password verification stage, can not only complete password verification based on character content, but also further combine keyboard input process features to identify the consistency between the input to be verified and the preset password features, thereby improving the ability to identify repeated input after password theft and non-human automated input, and enhancing security. Attached Figure Description

[0051] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0052] Figure 1 A flowchart illustrating a password verification method provided in an embodiment of this application;

[0053] Figure 2A button press timing diagram provided for an embodiment of this application;

[0054] Figure 3 A timing diagram of keyboard key press pressure pulses is provided for embodiments of this application;

[0055] Figure 4 This is a schematic diagram of the structure of a password verification device provided in an embodiment of this application;

[0056] Figure 5 A schematic diagram of the structure of the electronic device provided in this application.

[0057] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation

[0058] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0059] This technology relates to password verification in electronic devices, applicable to identity verification scenarios for laptops, tablets, and terminals with physical or external keyboards during power-on unlocking, system login, and local account authentication. The relevant system typically includes a keyboard input module, an operating system authentication module, and a data storage unit for storing password information. After the user enters the password via the keyboard, the authentication module parses and verifies it.

[0060] Existing password verification schemes in electronic devices typically record the character sequence entered by the user when setting the password, and then receive keyboard input again during subsequent verification. The system compares the currently entered characters with the pre-stored character sequence to determine whether to allow unlocking the device or logging into the account. This type of scheme operates on a relatively straightforward logic, primarily focusing on whether the characters themselves match. The system is concerned with the final password text content, rather than the process of inputting and forming that text.

[0061] However, in practical applications, relying solely on character sequences for verification has significant limitations. On one hand, once a password is spied on by an onlooker, recorded by a camera, or intercepted by malicious programs, others can repeatedly enter the same characters, making it difficult for the system to identify whether the input truly originates from a legitimate user. On the other hand, automated programs can quickly submit correct character sequences in a preset manner, and traditional solutions, lacking the ability to recognize the input process, struggle to distinguish between manual key-by-key input and batch submissions by programs.

[0062] Furthermore, the inventors discovered through analysis that different users often have their own fixed operating habits when entering the same password. For example, there are differences in the order in which function keys and character keys are triggered when switching between uppercase and lowercase. Existing solutions do not incorporate such differences into the verification criteria. Even if the character results are the same, it is impossible to further determine whether the input process conforms to the user's usual operating method. This weakens the security and specificity of the verification, leaving the device at risk of being impersonated even if the password has been leaked.

[0063] Therefore, improving the ability to identify unauthorized input and non-human input without abandoning the keyboard password input method has become an urgent technical problem. To address this issue, a password verification method is provided. During the password setting phase, keyboard input events are received, character sequences and corresponding keystroke sequences are extracted and stored as password feature data. During the password verification phase, keyboard input events to be verified are received, and the character sequence to be verified and its corresponding keystroke sequence are extracted. Subsequently, the character sequence and keystroke sequence to be verified are compared with the password feature data, and the verification result is output based on the comparison result. By incorporating the keystroke sequence into the password verification process, a verification dimension of the input process can be added in addition to the character content, thereby improving the reliability of the verification.

[0064] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.

[0065] Figure 1 This is a flowchart illustrating a password verification method provided in an embodiment of this application, as shown below. Figure 1 As shown in the embodiment of this application, a password verification method is provided, the method comprising:

[0066] Step 101: During the password setting stage, receive keyboard input events, extract character sequences and corresponding key press sequences based on the keyboard input events, and store the character sequences and corresponding key press sequences as password feature data.

[0067] The password setting stage in this step is the processing stage for electronic devices to establish or modify local authentication passwords. The executing entity can be an execution unit composed of a processor and authentication module in a laptop, tablet, terminal with a matching physical keyboard, or terminal connected to an external keyboard. Keyboard input events are event data generated by user key presses on the keyboard. This event data carries at least the key identifier, the order of events, and the associated information of the characters formed by that key. The character sequence is the password text content parsed from the input events, such as an ordered set of letters, numbers, and symbols arranged according to their input. The key sequence is the actual order in which the keys are triggered during the formation of this character sequence. This order is not limited to the final displayed character order but corresponds to the physical keyboard operation itself. For example, when inputting uppercase letters, the actual key press order between function keys and character keys constitutes part of the key sequence. Password feature data is the authentication baseline data generated and saved during the password setting stage. It includes at least the character sequence and the corresponding key press order, and is stored in the device's data storage unit for use in subsequent verification stages.

[0068] In this application, the process of receiving keyboard input events can be completed by the operating system input interface, the keyboard driver layer, or a dedicated listening module of the authentication interface. Specifically, when a user enters the password setting interface and begins to enter the target password, the system creates an event buffer corresponding to this setting session, continuously listens to the input event stream, and appends a sequence index to each event. If the terminal uses a built-in keyboard, the input events can come from the input data corresponding to the built-in keyboard; if the terminal uses an external keyboard, the input events can be transmitted to the input management module via the peripheral interface before entering the authentication process. To ensure subsequent comparability, the system uses fixed parsing rules to process the event stream during the setting phase, that is, first identifies the valid keys involved in password formation, then generates key sequence data according to the arrival order of the keys, and simultaneously parses the corresponding character content according to the preset parsing rules.

[0069] Furthermore, when extracting character sequences and their corresponding key press sequences, the system does not merely record the characters ultimately displayed on the screen, but establishes a mapping relationship for the formation process of each character. For example, when a user inputs a lowercase letter, a single character key forms a character node; when a user inputs an uppercase letter, the system identifies the character as being formed by both function keys and character keys based on the event flow, and writes the order of the function keys and character keys on the timeline into the key press sequence; when a user inputs a symbol, if the symbol is generated through a combination of keys, the actual order of the combination keys is also recorded. Based on the above analysis, it can be seen that even if different input processes ultimately result in the same character sequence, the generated key press sequence data will differ as long as the physical key press triggering order is different. The system can use arrays, linked lists, sequential lists, or structured records to store data related to character sequences and key press sequences, and then, after the setup is completed and a confirmation command is received, organize the event records into password feature data. The password feature data is stored in the device's data storage unit.

[0070] In one possible embodiment, the system can encapsulate the character sequence and keystroke order together into a password feature record. Based on the above processing, the system establishes not a simple character password template, but a composite feature template that includes the input result and the input process. This enables the subsequent verification stage to distinguish between different input sources of the same character content, thereby covering both the character content and the keyboard operation process as the basis for authentication.

[0071] Step 102: During the password verification phase, receive the keyboard input event to be verified, and extract the character sequence to be verified and the corresponding key sequence to be verified based on the keyboard input event.

[0072] The password verification stage in this step is the identity verification stage when the device is powered on and unlocked, the system is logged in, the local account is authenticated, or the protected function interface is accessed. The keyboard input events to be verified are the event streams generated when the user enters the current password during this stage. Their source, encoding method, and parsing rules are consistent with those of the password setting stage to ensure direct comparability between the extracted results. The character sequence to be verified is the character content formed by the input in this verification, and the key sequence to be verified is the actual triggering order of each valid key during the formation of this character content. Since this application treats the character sequence to be verified and the key sequence to be verified as parallel verification elements, the system needs to ensure that the granularity of event recording is consistent with that of the setting stage during the verification acquisition stage, and cannot simply retain the final character text while losing input process information.

[0073] In practice, when the authentication interface is triggered, the system starts the verification listening context and establishes the current verification session when the user begins to press keys. Each time a keyboard input event is received, the system writes the event to the event buffer to be verified and updates the sequence count of the current input. If the authentication module operates in a graphical operating system environment, the event can be forwarded to the authentication thread by the window message queue or the input subsystem; if the authentication module operates in the pre-boot environment, firmware authentication interface, or lightweight login interface, the event can be sent to the authentication logic by the underlying input interface. The reception of keyboard input events to be verified can be done in real-time or by unified processing after input. In real-time acquisition, the system performs a partial parsing each time a key is pressed, writing the currently formed character fragment and the determined key sequence into a temporary structure. In unified processing, the system first fully caches the event stream of the current input, and then replays and parses the events in sequence after the user presses the confirmation key or the preset input end condition is met. Both processing methods should meet the same requirement: the key filtering rules, key combination recognition rules, character mapping rules, and event sorting rules applied in the verification stage must be consistent with those in the setting stage.

[0074] Furthermore, when extracting the character sequence to be verified, the system converts the event stream into a character set according to preset parsing rules, preserving the sequential relationship between characters. When extracting the key sequence to be verified, the system generates a sequence number for each valid key that participated in forming the final password, according to the order of event arrival. If a character is formed by multiple keys, the position of each key in the overall event stream is recorded separately. For example, if the user enters the same uppercase character in the verification phase as in the setting phase, and if the function key is pressed first and then the character key, the corresponding position in the key sequence to be verified will reflect this order; if a different key triggering order is used, although the final character result may be the same under certain input mechanisms, the key sequence to be verified will be different from the setting template.

[0075] In one possible embodiment, after the user presses the confirmation key, the system organizes the verification input into a feature data structure to be verified. This structure includes the character sequence to be verified and the key press order to be verified. Based on the above processing, the output of the verification stage is not a single password text, but a verification feature consistent with the template structure of the setting stage, thus providing a basis for subsequent joint comparison.

[0076] Step 103: Compare the character sequence to be verified and the key sequence to be verified with the password feature data to obtain the first comparison result, and output the verification result based on the first comparison result.

[0077] The comparison process in this step involves the authentication module calling the password feature data in the data storage unit and comparing it with the currently unverified feature. The first comparison result is an intermediate result indicating whether the current input meets the preset consistency conditions; it at least reflects the character sequence comparison result and the key sequence comparison result. The verification result is the final processing conclusion given by the authentication module based on the first comparison result, which can be expressed as verification passed or verification failed, and may further trigger subsequent control actions such as unlocking, logging in, denying access, increasing the failure count, or returning to the re-entry interface.

[0078] In practice, after receiving the feature data to be verified, the system reads the password feature data from the data storage unit corresponding to the current user account and parses out the stored character sequence and key sequence. Then, it proceeds to the comparison process. Character sequence comparison can be performed character-by-character, comparing the consistency of the character sequence to be verified with the stored character sequence in terms of length, character values ​​at each position, and arrangement order. Key sequence comparison can be performed item-by-item, comparing the order of key presses to be verified with the stored key sequence. In one possible embodiment, the system determines the first comparison result as a match only when the character sequence to be verified is completely identical to the stored character sequence and the key sequence to be verified is completely identical to the stored key sequence. In another possible embodiment, the system can first perform character sequence comparison, directly outputting verification failure when the character sequences are inconsistent, and then continue key sequence comparison when the character sequences are consistent, to reduce unnecessary processing.

[0079] To ensure the comparison process is clearly executable, the first comparison result can be defined as a Boolean identifier or status code in this application. For example, character sequence matching is recorded as the first sub-result, and key sequence matching is recorded as the second sub-result. When both sub-results are true, the first comparison result is in a matching state; when either sub-result is false, the first comparison result is in a non-matching state. The system can also internally record the reasons for non-matching, such as inconsistent character content or consistent character content but inconsistent key sequence, for the security log module to write into the audit record. However, the externally output verification result still maintains a binary form of pass or failure. Furthermore, when outputting the verification result, if the first comparison result indicates a match, the authentication module returns a pass signal to the operating system authentication interface and releases the access permissions associated with the current account, allowing the device to enter an unlocked state, log in to the desktop, or access local protected resources; if the first comparison result indicates a non-match, the authentication module returns a failure signal, maintains the locked state, and can update the failure count and re-present the input interface.

[0080] This step incorporates both the character result and the input process into the judgment criteria, so the verification logic no longer relies solely on the final password text. If someone only knows the correct character sequence but doesn't input the keys in the order the user set up, the character sequence comparison might succeed, but the key sequence comparison will fail, and the first comparison result will be judged as a mismatch. Similarly, if an automated program attempts authentication by submitting character content in batches without generating an event sequence consistent with the individual key input, it will also fail the sequence comparison. Therefore, the authentication module establishes an additional ability to identify the input source process, enabling the verification result to simultaneously reflect whether the password content and the input behavior are consistent.

[0081] This application provides a password verification method, including receiving keyboard input events during the password setting phase, extracting character sequences and corresponding key sequences based on the keyboard input events, and storing the character sequences and corresponding key sequences as password feature data; receiving keyboard input events to be verified during the password verification phase, extracting character sequences to be verified and corresponding key sequences to be verified based on the keyboard input events to be verified; comparing the character sequences to be verified and the key sequences to be verified with the password feature data to obtain a first comparison result, and outputting a verification result based on the first comparison result. In this application, by simultaneously storing character sequences and key sequences in the password template, and extracting the character sequences to be verified and the key sequences to be verified according to the same rules for joint comparison during verification, the authentication process establishes a dual verification mechanism for the final input content and its formation path, enabling different input processes corresponding to the same character result to be distinguished. This implementation method is suitable for authentication scenarios that do not change the basic interactive form of keyboard password input, and can be directly deployed in the processes of power-on unlocking, system login, and local account authentication, and completes processing based on the keyboard events themselves, without relying on additional biometric collection components.

[0082] In one possible implementation, the process involves extracting a character sequence and its corresponding key sequence based on a keyboard input event, and storing the character sequence and its corresponding key sequence as password feature data. This includes: extracting a character sequence, its corresponding key sequence, the press duration and pressure intensity of each key based on the keyboard input event, and storing the character sequence, its corresponding key sequence, and the press duration and pressure intensity of each key as password feature data. Correspondingly, the process involves extracting a character sequence to be verified and its corresponding key sequence to be verified based on a keyboard input event to be verified. This includes: extracting a character sequence to be verified, its corresponding key sequence to be verified, the press duration and pressure intensity of each key to be verified. The process involves comparing the character sequence to be verified and the key sequence to be verified with the password feature data to obtain a first comparison result. This includes: comparing the character sequence to be verified, the key sequence to be verified, the press duration and pressure intensity of each key to be verified with the password feature data to obtain a first comparison result.

[0083] In its implementation, the keyboard input module, upon receiving key press and release events, determines the input time for each character and generates a character sequence and key sequence based on the character code and the sequence of events. Simultaneously, it calculates the press duration based on the time interval between the press and release events, and outputs the press intensity signal via pressure-sensing keycaps, a thin-film pressure array, or an external keyboard with pressure acquisition capabilities. The authentication module associates this information by character position to form password feature data. During the verification phase, the keyboard input events to be verified are repeatedly collected, generating a character sequence to be verified, a key sequence to be verified, a press duration to be verified, and a press intensity to be verified. These are then compared item by item with the password feature data, and the first comparison result is output.

[0084] During operation, the system first establishes a set of password features including text content, input order, and input behavior parameters. Then, during verification, it extracts similar features for consistency judgment. Since the comparison object includes not only character content but also key press sequence, press duration, and pressure information, the authentication module can identify whether the input process matches the registered features and form the first comparison result.

[0085] With the above implementation, password verification no longer relies solely on character text, but incorporates the rhythm and physical triggering characteristics of the input process into the judgment, making the same character sequence distinguishable under different input behaviors. This results in a higher degree of recognition of the input process in the verification results, thereby improving the integrity and reliability of keyboard password authentication.

[0086] Based on the aforementioned embodiments, the sequence of characters to be verified, the order of keys to be verified, the duration of pressing each key to be verified, the pressure intensity of pressing each key to be verified, and the password feature data are further compared to obtain a first comparison result. This includes: for each key to be verified, obtaining the duration reception interval and pressure reception interval corresponding to the key in the password feature data; matching the order of keys to be verified with the order of keys in the password feature data; for each key to be verified, matching the duration of pressing each key to be verified with the duration reception interval; matching the pressure intensity of pressing each key to be verified with the pressure reception interval; matching the sequence of characters to be verified with the sequence of characters in the password feature data; and determining the first comparison result based on each matching result.

[0087] In its implementation, upon receiving a keyboard input event to be verified, the authentication module first parses the character sequence to be verified, the key sequence to be verified, the press duration and pressure intensity corresponding to each key, and reads the password feature data from the data storage unit. For any key to be verified, the system retrieves the corresponding duration and pressure reception intervals based on its position in the key sequence. These intervals can be generated by combining the baseline values ​​recorded during the setting phase with a preset tolerance. The tolerance range can be configured based on the key type, input device model, or user's historical input habits. Subsequently, the system compares the press duration to be verified with the corresponding duration reception interval and the pressure intensity to be verified with the corresponding pressure reception interval. The comparison results for each key are then combined with the key sequence matching results and the character sequence matching results to form the first comparison result.

[0088] In practical applications, the pressure applied can be calculated by the keyboard acquisition module based on the amplitude of a pressure sensor, key travel sensor, or corresponding electrical signal. The press duration can be determined by the time difference between the key press and release. The matching results can be determined by a complete match assessment or by counting each match item by item and then comparing it with a threshold to generate the first comparison result. If the first comparison result indicates that all matches are successful, the authentication module outputs a pass signal; if any item is not within the receiving range or the order is inconsistent, a fail signal is output.

[0089] This method incorporates character content, key sequence, press duration, and press pressure into the verification process simultaneously, enabling the system to make a comprehensive judgment based on the characteristics of the input process.

[0090] In one possible implementation, the password verification method provided in this application further includes: receiving a range adjustment instruction input by a user; determining a duration range parameter and a force range parameter corresponding to each key press based on the range adjustment instruction; and updating the duration acceptance range and force acceptance range in the password feature data based on the duration range parameter and the force range parameter.

[0091] In its implementation, after receiving a range adjustment command, the system parses the command to identify the corresponding key identifier and range adjustment value, and converts the parsing result into a data item that can be written into the password feature data. The system writes or replaces the duration acceptance range in the password feature data with the duration range parameter, and writes or replaces the force acceptance range in the password feature data with the force range parameter, ensuring that the verification range corresponding to each key is consistent with the user's reset input habits. The password feature data can be stored in a local data storage unit, and the update process can be completed using an overwrite method to ensure that subsequent verifications directly call the latest range parameters. In practical applications, the processing module used to handle range adjustment command parsing and parameter updates can also be other processing units; this application does not limit this choice.

[0092] During operation, the system matches the input to be verified against the updated duration and pressure acceptance ranges. This ensures that the duration and pressure verification standards for each keystroke change synchronously with the user's adjustments, thus controlling the password verification process simultaneously with the character sequence, keystroke order, and input feature range. By adopting this method, the system can incorporate individualized keystroke habits into the verification criteria, improving its adaptability to different input habits and maintaining the password feature data within a consistent verification range.

[0093] In one possible implementation, during the password setting stage, the password verification method provided in this application embodiment further includes: extracting the key interval time between adjacent keys based on keyboard input events;

[0094] Accordingly, the character sequence, the corresponding key sequence, the pressing duration and pressure of each key are stored as password feature data, including: storing the character sequence, the corresponding key sequence, the pressing duration and pressure of each key, and the key interval time as password feature data; during the password verification stage,

[0095] The password verification method provided in this application further includes: extracting the key interval time between adjacent keys to be verified based on the keyboard input event to be verified; comparing the key interval time with the key interval time to be verified to obtain a second comparison result;

[0096] Accordingly, the verification result is output based on the first comparison result, including: outputting the verification result based on the first comparison result and the second comparison result.

[0097] Among them, the key interval time is used to characterize the input rhythm of adjacent keys, and the second comparison result is used to indicate the consistency judgment conclusion between the stored key interval time and the key interval time to be verified.

[0098] In practical implementation, keyboard input events are generated by the keyboard controller using timestamps and pressure sampling values ​​when keys are pressed and released, respectively. The authentication module determines the key interval time based on the difference between the timestamps of two adjacent key presses and writes it along with the character sequence, key order, press duration, and pressure intensity into the password feature data. During the verification phase, the authentication module performs the same timestamp extraction and difference calculation on the keyboard input events to be verified. After obtaining the key interval time to be verified, it compares it item by item with the stored key interval time according to a preset tolerance range, and uses the result of whether the comparison is consistent as the second comparison result. Finally, the authentication module combines the first comparison result and the second comparison result to output the verification result. If both meet the matching conditions, a pass result is output; otherwise, a failure result is output.

[0099] By incorporating key press intervals into password feature data and participating in verification, the system can simultaneously constrain input content, input order, and input rhythm, thereby enabling the verification results to reflect both character consistency and input process consistency. This enhances the ability to recognize human input features and improves the accuracy and reliability of password verification.

[0100] Building upon the aforementioned embodiments, the method further extracts the character sequence to be verified, the corresponding key sequence to be verified, the key press duration to be verified for each key, and the key pressure intensity to be verified based on the keyboard input events to be verified. Specifically, this includes: parsing the key trigger time and key release time in the keyboard input events to be verified; calculating the key press duration to be verified for each key based on the key trigger time and key release time; reading the pressure sensor data corresponding to each key to be verified in the keyboard input events to be verified to obtain the key pressure intensity to be verified for each key; generating the key sequence to be verified according to the occurrence order of the keyboard input events to be verified; and generating the character sequence to be verified based on the key values ​​corresponding to the keyboard input events to be verified.

[0101] The key trigger time characterizes the moment a key is pressed, and the key release time characterizes the moment a key is released. Both can be timestamped and written to the event log by the keyboard controller upon receiving a key interruption. Pressure sensor data characterizes the pressure state of the key and can be acquired by a thin-film pressure sensor, strain gauge pressure unit, or capacitive pressure detection unit located below the key, and stored in association with the corresponding key identifier.

[0102] In practical implementation, after receiving a keyboard input event to be verified, the system first extracts the trigger and release times of each key from the event log, and performs a difference calculation on the two timestamps of the same key to obtain the key's press duration to be verified. Subsequently, the system reads the raw value of the pressure sensor corresponding to that key, performs zero-point calibration, noise filtering, and quantization mapping on the raw value to form the press force corresponding to that key. The system also sorts the events according to the order in which the keys are triggered to determine the order of the keys to be verified; then, based on the key values ​​recorded in the events, it restores the characters corresponding to the number keys, letter keys, and function toggle keys to the character sequence to be verified. When the same key is triggered multiple times in an input event, the system generates corresponding records according to the trigger times of each event, thus ensuring a one-to-one correspondence between the press duration, press force, key sequence, and character sequence.

[0103] This processing method simultaneously extracts the content of the character to be verified, the order of key presses, the duration of pressure application, and the force characteristics, which are then used as the basis for subsequent comparison and input into the authentication module. By incorporating the time and pressure information during keyboard input into the data to be verified, the verification results can simultaneously reflect both character content and input behavior characteristics, thereby enhancing the recognition accuracy and consistency judgment capability of the keyboard input events to be verified.

[0104] In this application, the application scenario is a device unlocking scenario in public places, including cafes, airports, and shared office areas, where users unlock their devices using laptops or tablets. In this scenario, users may face the risk of their passwords being spied on, screenshotted, or stolen by malware. For example, when user A uses a laptop in a cafe, there are many people around, making it impossible to completely avoid others observing the password input process, or the device automatically recording the password after being infected with malware. During the password setting phase, the terminal receives keyboard input events generated by the user via the keyboard, collects and parses each key event, generates a character sequence from the key value corresponding to the event, generates the corresponding key sequence according to the order of keyboard input events, and records the key trigger time and key release time of each key. Based on the key trigger time and key release time, the press duration corresponding to each key is calculated, and the pressure sensor data corresponding to each key is read to obtain the press intensity corresponding to each key. For two adjacent key events, the key interval time between them is also extracted.

[0105] In one possible implementation, when user A sets an unlock password on a laptop in a coffee shop, they input the character sequence "Admin123" via the laptop's keyboard. The terminal simultaneously collects input behavior characteristics; the character sequence is generated from corresponding key values, and the key press order is determined according to the sequence of keyboard input events: Caps Lock, a, Caps Lock, d, m, i, n, 1, 2, 3 keys. The terminal records the key trigger time and key release time of each key and calculates the press duration for each key, where the press durations are 0.5s, 0.4s, 0.5s, 0.5s, 0.5s, 0.3s, 0.3s, and 0.3s respectively. The terminal also collects the pressure intensity of each key press via a pressure sensor at the bottom of the keyboard; for example, the pressure intensity of the a key is 75cN, the d key is 78cN, and the m key is 80cN.

[0106] In this implementation, the terminal also collects the pressure distribution of different areas of each key using a multi-point pressure sensor array on the keyboard, and fuses it into a more accurate pressure value using a weighted average algorithm. This ensures that the pressure value corresponding to each key includes not only the result of a single reading but also the result of fusion of pressure data from different areas. For two adjacent key press events, the terminal extracts the key press interval and writes it into password feature data. For example, the interval from Caps Lock to the 'a' key is 0.5s. The terminal stores the character sequence "Admin123", the key sequence, the press duration of each key, the pressure of each key, and the key press interval between adjacent keys as password feature data, and sets adjustable acceptance interval parameters. The duration acceptance interval parameter is set to the 80%-120% range. The duration acceptance interval and pressure acceptance interval for each key are generated based on the interval parameters. For example, the press duration of the 'a' key corresponds to a duration acceptance interval of 0.4s-0.6s, and the pressure of the 'a' key corresponds to a pressure acceptance interval of 60cN-90cN.

[0107] During the password verification phase, the terminal receives keyboard input events to be verified. User A again enters the character sequence "Admin123" on a laptop in a coffee shop to unlock the device. The terminal parses the keyboard input events to be verified, extracts the key trigger time and key release time of each key to be verified, calculates the press duration corresponding to each key to be verified based on the key trigger time and key release time, reads the pressure sensor data corresponding to each key to be verified in the keyboard input events to obtain the press intensity corresponding to each key to be verified, generates the key sequence to be verified according to the occurrence order of the keyboard input events, and obtains the character sequence to be verified based on the key value corresponding to the keyboard input events. At the same time, it extracts the key interval time between adjacent keys to be verified. The character sequence to be verified must be consistent with the stored character sequence "Admin123", and the key sequence to be verified must be consistent with Caps Lock, a, Caps Lock, d, m, i, n, 1, 2, 3.

[0108] During the specific comparison, for each key to be verified, the terminal obtains the duration and force reception range corresponding to that key from the password feature data. First, the order of the keys to be verified is matched with the key order in the password feature data. Then, the press duration corresponding to each key to be verified is matched with the corresponding duration reception range, and the press force corresponding to each key to be verified is matched with the corresponding force reception range. Simultaneously, the character sequence to be verified is matched with the character sequence in the password feature data. The first comparison result is determined based on the key order matching result, duration matching result, force matching result, and character sequence matching result. The press duration matching includes verifying whether the input press duration falls within the stored duration reception range, such as 0.4s-0.6s for the 'a' key. The press force matching includes verifying whether the input press force falls within the stored force reception range, such as 60cN-90cN for the 'a' key.

[0109] The terminal also compares the key interval time to be verified with the key interval time in the password feature data to obtain a second comparison result. The interval time between adjacent keys is used as IKI for verification. For example, the key interval time from Caps Lock to key 'a' during the verification phase is compared with the stored 0.5s. If user A's adjacent key interval time during the verification phase is significantly shorter than the stored data, for example, 0.1s, the terminal determines this input as abnormal and reflects this abnormality in the second comparison result. The terminal outputs the verification result based on the first and second comparison results. When the character sequence matches, the key sequence matches, the press duration matches, the press pressure matches, and the key interval time matches, the verification is considered successful and the device is unlocked. If any condition is not met, the password input is considered incorrect.

[0110] In one possible implementation, the acquisition of the pressure intensity to be verified involves not only reading the pressure sensor data corresponding to each key to be verified, but also collecting the pressure intensity distribution of different areas of each key to be verified through a multi-point pressure sensor array, and fusing it into a more accurate pressure intensity value through a weighted average algorithm. For example, if user A presses key 'a' during the verification phase and the sensor data at a certain point is abnormally high, the terminal detects that this abnormally high value is inconsistent with the pressure distribution in other areas based on the differences in multi-point pressure data, determines it as a non-normal user input, and records it as a mismatch in the force matching result. Based on this, the terminal identifies the single abnormal point pressure input situation and outputs the verification result by combining the character sequence, key sequence, press duration, and key interval time.

[0111] In one possible implementation, the terminal also receives a range adjustment command input by the user. User A adjusts the acceptance range parameters through the settings interface. For example, if User A finds that the input duration fluctuates significantly, they adjust the duration acceptance range from 80%-120% to 90%-110%. The terminal parses the user-input range adjustment command, determines the duration and pressure range parameters corresponding to each key press based on the command, and updates the duration and pressure acceptance ranges in the password feature data accordingly. The updated acceptance range parameters take effect in subsequent verification phases. Afterward, when the terminal receives another keyboard input event to be verified, it compares the verification press duration, verification press pressure, key sequence, character sequence, and key interval time for each key press according to the updated 90%-110% duration acceptance range and the synchronously updated pressure acceptance range.

[0112] The password verification method of this application will be further illustrated below through several specific embodiments:

[0113] Example 1

[0114] When a user sets a password:

[0115] 1) The keys to be pressed are: Caps Lock, a, Caps Lock, d, m, i, n, 1, 2, 3.

[0116] 2) The final generated string is Admin123.

[0117] When unlocking the laptop:

[0118] 1) The keys to be pressed are: left Shift+a, d, m, i, n, 1, 2, 3.

[0119] 2) The final generated string is Admin123.

[0120] Since the data entered by the user (1) is inconsistent with the saved data (1), it is determined that the password was entered incorrectly.

[0121] Regarding the input of uppercase letters: some users are accustomed to pressing the Caps Lock key to switch to uppercase, and then pressing the Caps Lock key again to switch back to lowercase; some users are accustomed to using a fixed side (e.g., the right side) Shift + a letter key to temporarily input uppercase letters; and still others are accustomed to using the Shift + a letter key near the letter key to temporarily input uppercase letters. By verifying user input habits, this approach does not intentionally increase the user's memory burden, but it enhances password protection.

[0122] Example 2

[0123] When a user sets a password:

[0124] 1) The keys to be pressed in sequence are: CapsLK, a, CapsLK, d, m, i, n, 1, Backspace, 1, 2, 3.

[0125] 2) The final generated string is Admin123.

[0126] When unlocking the laptop:

[0127] 1) The keys to be pressed are: Caps Lock, a, Caps Lock, d, m, i, n, 1, 2, 3.

[0128] 2) The final generated string is Admin123.

[0129] Since the data entered by the user (1) is inconsistent with the saved data (1), it is determined that the password was entered incorrectly.

[0130] When setting a password, users may intentionally configure one or more characters to be entered, deleted, and then re-entered in a specific order. By synchronously verifying this order, the password protection can be enhanced.

[0131] Example 3

[0132] When a user sets a password:

[0133] 1) The keys pressed and the duration of each key press are as follows: a (0.5s), d (0.4s), m (0.5s), i (0.5s), n (0.5s), 1 (0.3s), 2 (0.3s), 3 (0.3s).

[0134] 2) The final generated string is admin123.

[0135] Figure 2 A button press timing diagram provided for an embodiment of this application, such as Figure 2As shown, assume that after each button is pressed, the next button is pressed 0.5 seconds later.

[0136] The acceptable intervals for data 1) are: a (0.4s~0.6s), d (0.32s~0.48s), m (0.4s~0.6s), i (0.4s~0.6s), n (0.4s~0.6s), 1 (0.24s~0.36s), 2 (0.24s~0.36s), 3 (0.24s~0.36s); that is, the acceptable interval for the pressing duration is 80%~120%.

[0137] Note that the maximum acceptable interval for a single press duration does not exceed the "repeat delay" set on the laptop. When a laptop key is pressed for a long time, the waiting time from the appearance of the first character to the start of continuous output of subsequent characters is called "repeat delay" in technical terms. In most operating systems, the default repeat delay is usually between 250 milliseconds and 1000 milliseconds. In this embodiment, the "repeat delay" is 1 second, which is more in line with the operating habits of the elderly.

[0138] When unlocking the laptop:

[0139] 1) The keys pressed and the duration of each key press are as follows: a (0.15s), d (0.15s), m (0.13s), i (0.15s), n (0.2s), 1 (0.14s), 2 (0.15s), 3 (0.15s).

[0140] 2) The final generated string is admin123

[0141] Since the data entered by the user (1) is not within the acceptable range of the saved data (1), it is determined that the password input is incorrect. In this embodiment, when unlocking the laptop, the keyboard input speed is significantly faster than the key input speed when setting the password, which does not conform to the user's operating habits, therefore it is determined that the password input is incorrect.

[0142] Users can adjust the acceptable range of key press duration. The wider the acceptable range (e.g., 50% to 150% of the saved duration), the lower the requirement for key press duration and the weaker the password protection. The narrower the acceptable range (e.g., 90% to 110% of the saved duration), the higher the requirement for password input and the stronger the password protection.

[0143] Example 4

[0144] When a user sets a password

[0145] 1) The keys to be pressed and the pressure applied are as follows: a (75cN), d (78cN), m (80cN), i (75cN), n (85cN), 1 (90cN), 2 (80cN), 3 (90cN);

[0146] 2) The final generated string is admin123

[0147] Figure 3 A keyboard key press pressure pulse timing diagram provided for embodiments of this application, such as... Figure 3 As shown, assuming that after each button is pressed, the next button is pressed 0.5 seconds later, the pulse spike in the figure represents the pressing force.

[0148] The acceptable range for data 1) is: a (60cN~90cN), d (62.4cN~93.6cN), m (64cN~96cN), i (60cN~90cN), n (68cN~102cN), 1 (72cN~108cN), 2 (64cN~96cN), 3 (72cN~108cN); that is, the acceptable range for pressure is 80%~120%.

[0149] The actuation pressure of mainstream membrane keyboards is 50~70 cN (centine Newtons), and the actuation pressure of laptop (scissor-switch) keyboards is 50~65 cN. The lower limit of the acceptable range of actuation pressure needs to be higher than the actuation pressure of the keyboard; otherwise, the keyboard cannot be detected as being pressed, and the actuation pressure cannot be obtained.

[0150] When unlocking the laptop,

[0151] 1) The keypads and their pressure values ​​are as follows: a (100cN), d (100cN), m (110cN), i (105cN), n (98cN), 1 (100cN), 2 (102s), 3 (105s)

[0152] 2) The final generated string is admin123

[0153] Since the data entered by the user (1) is not within the acceptable range of the saved data (1), it is determined that the password input is incorrect. In this embodiment, when unlocking the laptop, the force required to press the keyboard is significantly greater than the force required to press the keys when setting the password, which does not conform to the user's operating habits, therefore it is determined that the password input is incorrect.

[0154] If the laptop does not detect keyboard input pressure when unlocking and directly generates the characters "admin123", it is highly likely that the computer is infected with a virus and the password has been cracked (not manually entered), thus being judged as an incorrect password.

[0155] Users can adjust the acceptable range of key pressure. The wider the acceptable range (e.g., 50% to 150% of the storage time), the lower the required key pressure time and the weaker the password protection. The narrower the acceptable range (e.g., 90% to 110% of the storage time), the higher the requirements for password input and the stronger the password protection.

[0156] Corresponding to the above-described password verification method, this application also provides a password verification device. Figure 4 This is a schematic diagram of the structure of a password verification device provided in an embodiment of this application, as shown below. Figure 4 As shown in the figure, this embodiment provides a password verification device, which includes:

[0157] The first receiving module 401 is used to receive keyboard input events during the password setting stage, extract character sequences and corresponding key sequences based on the keyboard input events, and store the character sequences and corresponding key sequences as password feature data.

[0158] The second receiving module 402 is used to receive the keyboard input event to be verified during the password verification stage, and extract the character sequence to be verified and the corresponding key sequence to be verified based on the keyboard input event to be verified.

[0159] The comparison module 403 is used to compare the character sequence to be verified, the key sequence to be verified, and the password feature data to obtain the first comparison result, and output the verification result based on the first comparison result.

[0160] In one possible embodiment, when the first receiving module 401 extracts the character sequence and the corresponding key sequence based on the keyboard input event and stores the character sequence and the corresponding key sequence as password feature data, it is specifically used for:

[0161] Extract the character sequence, the corresponding key sequence, the press duration and pressure of each key from the keyboard input events, and store the character sequence, the corresponding key sequence, the press duration and pressure of each key as password feature data;

[0162] Accordingly, when the second receiving module 402 extracts the character sequence to be verified and the corresponding key sequence to be verified based on the keyboard input event to be verified, it is specifically used for:

[0163] Extract the character sequence to be verified, the corresponding key sequence to be verified, the press duration and press force of each key to be verified from the keyboard input events to be verified.

[0164] When the comparison module 403 compares the character sequence to be verified and the key sequence to be verified with the password feature data to obtain the first comparison result, it is specifically used for:

[0165] The first comparison result is obtained by comparing the character sequence to be verified, the key sequence to be verified, the pressing duration of each key to be verified, the pressing force of each key to be verified, and the password feature data.

[0166] In one possible embodiment, when the comparison module 403 compares the character sequence to be verified, the key sequence to be verified, the pressing duration of each key to be verified, and the pressing force of each key to be verified with the password feature data to obtain a first comparison result, it is specifically used for:

[0167] For each key to be verified, obtain the duration and force reception range corresponding to the key in the password feature data;

[0168] Match the key sequence to be verified with the key sequence in the password feature data;

[0169] For each button to be verified, the pressing duration corresponding to the button to be verified is matched with the duration receiving range; the pressing force corresponding to the button to be verified is matched with the force receiving range.

[0170] Match the character sequence to be verified with the character sequence in the password feature data;

[0171] The first comparison result is determined based on each matching result.

[0172] In one possible embodiment, the first receiving module 401 is further configured to:

[0173] Receive range adjustment instructions input by the user;

[0174] The duration range parameter and force range parameter corresponding to each button are determined according to the range adjustment command;

[0175] Update the duration acceptance interval and intensity acceptance interval in the cryptographic feature data according to the duration interval parameter and intensity interval parameter.

[0176] In one possible embodiment, during the password setting phase, the first receiving module 401 is further configured to:

[0177] Extract the key press interval time between adjacent keys based on keyboard input events;

[0178] Accordingly, when storing the character sequence, the corresponding key sequence, the pressing duration and pressure of each key as password feature data, the first receiving module 401 is specifically used for:

[0179] Store the character sequence, the corresponding key sequence, the pressing duration and pressure of each key, and the key interval as password feature data;

[0180] During the password verification phase, the second receiving module 402 is also used for:

[0181] Extract the key interval time between adjacent keys to be verified based on the keyboard input events to be verified.

[0182] The key press interval time is compared with the key press interval time to be verified to obtain the second comparison result;

[0183] Accordingly, when the comparison module 403 outputs the verification result based on the first comparison result, it is specifically used for:

[0184] The verification results are output based on the first and second comparison results.

[0185] In one possible embodiment, when the second receiving module 402 extracts the character sequence to be verified, the corresponding key sequence to be verified, the key press duration to be verified for each key, and the key press intensity to be verified based on the keyboard input event to be verified, it is specifically used for:

[0186] Analyze the key trigger time and key release time in the keyboard input events to be verified;

[0187] Calculate the press duration for each button to be verified based on the button trigger time and button release time.

[0188] Read the pressure sensor data corresponding to each key to be verified in the keyboard input event to be verified, and obtain the pressing force corresponding to each key to be verified;

[0189] Generate the key sequence to be verified according to the order in which the keyboard input events to be verified occur;

[0190] Generate a character sequence to be verified based on the key value corresponding to the keyboard input event to be verified.

[0191] The password verification device provided in this embodiment can execute the method provided in the above method embodiment. Its implementation principle and technical effect are similar, and will not be described in detail here.

[0192] Figure 5 A schematic diagram of the structure of the electronic device provided in this application. Figure 5 As shown, the electronic device 50 provided in this embodiment includes at least one processor 501 and a memory 502. Optionally, the device 50 further includes a communication component 503. The processor 501, memory 502, and communication component 503 are connected via a bus 504.

[0193] In a specific implementation, at least one processor 501 executes computer execution instructions stored in memory 502, causing at least one processor 501 to perform the above-described method.

[0194] The specific implementation process of processor 501 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.

[0195] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.

[0196] The memory may include high-speed memory (Random Access Memory, RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.

[0197] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.

[0198] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.

[0199] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the above-described method.

[0200] The aforementioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium can be any available medium accessible to a general-purpose or special-purpose computer.

[0201] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can reside in application-specific integrated circuits (ASICs). Alternatively, the processor and the readable storage medium can exist as discrete components in the device.

[0202] The division of units is merely a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.

[0203] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0204] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0205] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0206] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.

[0207] Finally, it should be noted that other embodiments of this application will readily conceive of by those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein, and is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and alterations may be made without departing from its scope. The scope of this application is limited only by the appended claims.

Claims

1. A password verification method, characterized in that, The method includes: During the password setting phase, keyboard input events are received, and character sequences and corresponding key press sequences are extracted based on the keyboard input events. The character sequences and corresponding key press sequences are then stored as password feature data. During the password verification phase, a keyboard input event to be verified is received, and the character sequence to be verified and the corresponding key sequence to be verified are extracted based on the keyboard input event to be verified. The character sequence to be verified and the key sequence to be verified are compared with the password feature data to obtain a first comparison result, and the verification result is output based on the first comparison result.

2. The method according to claim 1, characterized in that, Based on the keyboard input events, character sequences and corresponding key press sequences are extracted, and these sequences are stored as password feature data, including: Extract the character sequence, the corresponding key sequence, the press duration and pressure of each key according to the keyboard input event, and store the character sequence, the corresponding key sequence, the press duration and pressure of each key as password feature data; Accordingly, the sequence of characters to be verified and the corresponding sequence of keys to be verified are extracted based on the keyboard input events to be verified, including: Extract the character sequence to be verified, the corresponding key sequence to be verified, the press duration and press force of each key to be verified based on the keyboard input event to be verified. The sequence of characters to be verified and the order of keystrokes to be verified are compared with the password feature data to obtain a first comparison result, including: The sequence of characters to be verified, the order of keys to be verified, the duration of each key press to be verified, and the pressure applied to be verified are compared with the password feature data to obtain the first comparison result.

3. The method according to claim 2, characterized in that, The sequence of characters to be verified, the order of keys to be verified, the duration of each key press, and the pressure applied during verification are compared with the password feature data to obtain a first comparison result, including: For each key to be verified, obtain the duration reception interval and force reception interval corresponding to the key in the password feature data; The sequence of keys to be verified is matched with the sequence of keys in the password feature data; For each button to be verified, the pressing duration corresponding to the button to be verified is matched with the duration receiving range; the pressing force corresponding to the button to be verified is matched with the force receiving range. Match the character sequence to be verified with the character sequence in the password feature data; The first comparison result is determined based on each matching result.

4. The password verification method according to claim 1, characterized in that, The method further includes: Receive range adjustment instructions input by the user; The duration range parameter and force range parameter corresponding to each button are determined according to the range adjustment command; The duration acceptance interval and the intensity acceptance interval in the cryptographic feature data are updated according to the duration interval parameter and the intensity interval parameter.

5. The password verification method according to claim 2, characterized in that, During the password setting phase, the method further includes: Extract the key press interval time between adjacent keys based on the keyboard input events; Accordingly, the character sequence, the corresponding key sequence, the pressing duration and pressure of each key are stored as password feature data, including: The character sequence, the corresponding key sequence, the pressing duration and pressure of each key, and the key interval time are stored as password feature data. During the password verification phase, the method further includes: Extract the key interval time between adjacent keys to be verified based on the keyboard input events to be verified. The key interval time is compared with the key interval time to be verified to obtain a second comparison result; Accordingly, based on the first comparison result, a verification result is output, including: The verification result is output based on the first comparison result and the second comparison result.

6. The password verification method according to claim 2, characterized in that, Based on the keyboard input events to be verified, the sequence of characters to be verified, the corresponding key sequence to be verified, the press duration and press intensity of each key to be verified are extracted, specifically including: Analyze the key trigger time and key release time in the keyboard input event to be verified; Calculate the press duration for each button to be verified based on the button trigger time and the button release time. Read the pressure sensor data corresponding to each key to be verified in the keyboard input event to be verified, and obtain the pressing force corresponding to each key to be verified. The key sequence to be verified is generated according to the order in which the keyboard input events to be verified occur; The character sequence to be verified is generated based on the key value corresponding to the keyboard input event to be verified.

7. A password verification device, characterized in that, include: The first receiving module is used to receive keyboard input events during the password setting stage, extract character sequences and corresponding key sequences based on the keyboard input events, and store the character sequences and corresponding key sequences as password feature data. The second receiving module is used to receive the keyboard input event to be verified during the password verification stage, and extract the character sequence to be verified and the corresponding key sequence to be verified based on the keyboard input event to be verified. The comparison module is used to compare the character sequence to be verified and the key sequence to be verified with the password feature data to obtain a first comparison result, and output a verification result based on the first comparison result.

8. An electronic device, characterized in that, include: Memory, processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory, causing the processor to perform the method as described in any one of claims 1-6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1-6.

10. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method described in any one of claims 1-6.