Verification method and device, electronic equipment and computer readable storage medium

By verifying the consistency of the number of keystrokes and the number of characters input by the input device, the verification process is simplified, solving the problems of high complexity and low efficiency in existing technologies, and improving both security and efficiency.

CN117009934BActive Publication Date: 2026-07-14KINGDEE SOFTWARE(CHINA) CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
KINGDEE SOFTWARE(CHINA) CO LTD
Filing Date
2023-08-04
Publication Date
2026-07-14

AI Technical Summary

Technical Problem

In existing technologies, verification methods such as image verification codes or text verification codes are complex, resulting in low operational efficiency and poor user experience, and making it difficult to effectively distinguish between real people and robots.

Method used

By verifying the consistency of the number of keystrokes and characters entered on the input device, if the consistency verification passes, the target operation is responded to directly; otherwise, a verification prompt message is output for further verification.

Benefits of technology

It simplifies the verification process, improves operational efficiency, ensures security, reduces operational complexity, effectively distinguishes between real people and robots, and enhances the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117009934B_ABST
    Figure CN117009934B_ABST
Patent Text Reader

Abstract

The application relates to a verification method and device, electronic equipment and a computer readable storage medium. The method comprises determining the number of times of typing an input box in an operation interface of a target operation by an input device; determining the number of characters input in the input box; performing consistency verification on the number of times of typing and the number of characters; and responding to the target operation if the consistency verification is passed. The method can improve verification efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a verification method, apparatus, electronic device, and computer-readable storage medium. Background Technology

[0002] In scenarios involving user identity security, such as registering accounts, logging into systems, or purchasing tickets, it's generally necessary to verify whether the operator is a real person or a bot to enhance security. For example, verification might involve users entering graphic or text CAPTCHAs. Only if the verification result is a real person will the operation be responded to, ensuring security. However, some CAPTCHAs are complex and difficult to recognize, and entering them often requires switching input methods, leading to cumbersome and inefficient operations. Summary of the Invention

[0003] Therefore, it is necessary to provide a verification method, apparatus, electronic device, computer-readable storage medium, and computer program product that can improve efficiency in response to the above-mentioned technical problems.

[0004] Firstly, this application provides a verification method. The method includes:

[0005] Determine the number of times the input device enters the input box in the user interface for the target operation;

[0006] Determine the number of characters entered in the input box;

[0007] Perform consistency verification on the number of keystrokes and the number of characters;

[0008] If the consistency verification passes, then respond to the target operation.

[0009] Secondly, this application also provides a verification device. The device includes:

[0010] The keystroke count determination module is used to determine the number of times the input device types into the input boxes in the operation interface for the target operation.

[0011] A character count determination module is used to determine the number of characters entered in the input box;

[0012] A consistency verification module is used to verify the consistency between the number of keystrokes and the number of characters.

[0013] The target operation response module is used to respond to the target operation if the consistency verification passes.

[0014] In one embodiment, the device further includes:

[0015] The verification module is used to output a verification message if the consistency verification fails.

[0016] The target operation response module is also used to respond to the target operation if the verification of the information to be verified input according to the verification prompt information is successful.

[0017] In one embodiment, the number of keystrokes is the difference between the number of times an input-type key on the input device is pressed and the number of times a delete-type key is pressed.

[0018] In one embodiment, the keystroke count determination module is further configured to monitor keystroke events in the input boxes of the input device's operation interface for the target operation; each time a keystroke event is detected, the module identifies the type of key pressed corresponding to the keystroke event; if the type of key pressed is an input key, the keystroke count is incremented by 1; if the type of key pressed is a delete key, the keystroke count is decremented by 1.

[0019] In one embodiment, the keystroke count determination module is further configured to, when the pressed key is an input key, increment the keystroke count by 1 if the character indicated by the pressed key is a allowed input character; otherwise, do not perform any processing.

[0020] In one embodiment, the device further includes:

[0021] A random code generation module is used to initialize and generate a target random code corresponding to the input device; the target random code is used to enable the input device to synchronously input the target random code each time a character is input;

[0022] The random code matching module is used to obtain the actual random code that is synchronously input with the characters entered in the input box; and to match the actual random code with the target random code.

[0023] The target operation response module is also used to respond to the target operation if the random code matches and the consistency verification passes.

[0024] In one embodiment, the input device includes at least one of a hardware input device or a virtual input device provided by the electronic device on which the user interface is located.

[0025] Thirdly, this application also provides an electronic device. The electronic device includes a memory and a processor, the memory storing a computer program, which, when executed by the processor, causes the processor to perform the steps of the verification methods described in the embodiments of this application.

[0026] Fourthly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, causes the processor to perform the steps of the verification methods described in the embodiments of this application.

[0027] Fifthly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, causes the processor to perform the steps of the verification methods described in the embodiments of this application.

[0028] The aforementioned verification method, apparatus, electronic device, storage medium, and computer program product determine the number of times the input box in the operation interface of the input device is entered for the target operation, determine the number of characters entered in the input box, and perform consistency verification on the number of times the input is entered and the number of characters. If the consistency verification passes, it indicates that the operating entity is reliable and can directly respond to the target operation without having to verify the reliability of the operating entity through traditional verification methods such as image verification codes or text verification codes. Therefore, while ensuring security, it reduces the complexity of operation and improves the verification efficiency. Attached Figure Description

[0029] Figure 1 This is a diagram illustrating the application environment of the verification method in one embodiment;

[0030] Figure 2 This is a flowchart illustrating the verification method in one embodiment;

[0031] Figure 3 This is a schematic diagram of the actual application process of the verification method in one embodiment;

[0032] Figure 4 This is a schematic diagram of the overall process of the verification method in one embodiment;

[0033] Figure 5 This is a structural block diagram of the verification device in one embodiment;

[0034] Figure 6 This is a structural block diagram of the verification device in another embodiment;

[0035] Figure 7 This is a diagram of the internal structure of an electronic device in one embodiment. Detailed Implementation

[0036] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0037] The verification method provided in this application embodiment can be applied to, for example... Figure 1 In the application environment shown, electronic device 102 is equipped with an input device 104. Electronic device 102 can display an operation interface, determine the number of times the input device 104 enters the input box in the operation interface for the target operation, and determine the number of characters entered in the input box. It performs a consistency verification on the number of entries and the number of characters. If the consistency verification passes, electronic device 102 can respond to the target operation. Electronic device 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, or portable wearable devices. IoT devices can be smart speakers, smart TVs, smart air conditioners, smart vehicle devices, or smart door locks, etc. Portable wearable devices can be smartwatches, smart bracelets, or head-mounted devices, etc. Input device 104 can be an external hardware device of electronic device 102, such as a computer keyboard, or a built-in hardware device, such as a button on a smart door lock. Input device 104 can also be a virtual device built into electronic device 102, such as a soft keyboard on a computer. When the input device 104 is an external hardware device, the input device 104 communicates with the electronic device 102.

[0038] In some embodiments, such as Figure 2 As shown, a verification method is provided, which is applied to... Figure 1 Taking electronic device 102 as an example, the following steps are included:

[0039] Step 202: Determine the number of times the input device enters the input box in the operation interface for the target operation.

[0040] An input device is a hardware or virtual device used for inputting information. An electronic device may have one or more input devices. Users can input information by pressing buttons on the input device. The target operation can be any operation involving user identity security. For example, a target operation could be registering an account, logging into a system, or purchasing tickets online. The user interface is the interface used to perform the target operation. The user interface may include at least one input field. The number of keystrokes refers to the number of times a button on the input device is pressed.

[0041] In some embodiments, the electronic device may display an interface for the target operation and determine the number of times the input device types in the input boxes of the interface by listening to the typing events of the input device in the input boxes of the interface.

[0042] In some embodiments, an electronic device can listen for keystrokes from an input device to an input field when the input field in the user interface is active.

[0043] In some embodiments, the electronic device may determine the number of times each input field in the user interface is typed.

[0044] In other embodiments, the electronic device can determine the number of times keystrokes are typed into a target input box in the user interface. The target input box is a subset of the input boxes in the user interface. In some embodiments, the target input box may be an input box for entering identity-related information. For example, the target input box may be an account input box and a password input box.

[0045] Step 204: Determine the number of characters entered in the input box.

[0046] In some embodiments, the electronic device can acquire the characters entered in the input box and determine the number of characters based on the acquired characters.

[0047] In some embodiments, an electronic device can obtain the input character from the input box corresponding to the specified input box's identifier (ID).

[0048] In some embodiments, an electronic device can use document.getElementById() to get the input box element corresponding to the identifier of a specified input box, and then use the value property of the input box element to get the value in the input box and obtain the character in the input box.

[0049] Step 206: Perform consistency verification on the number of keystrokes and the number of characters.

[0050] Among them, consistency verification refers to verifying whether the number of keystrokes and the number of characters are consistent.

[0051] In some embodiments, the electronic device can compare the number of keystrokes with the number of characters. If the numbers match, the consistency verification passes; if the numbers do not match, the consistency verification fails.

[0052] In some embodiments, the electronic device may execute steps 202 to 204 before triggering the submission operation, and perform consistency verification on the number of keystrokes and the number of characters after triggering the submission operation. The submission operation is used to submit the characters entered in the input box. For example, clicking the "Login" option when logging into the system is a submission operation. Clicking the "Register" option when registering an account is also a submission operation.

[0053] In other embodiments, the electronic device can execute steps 202 to 204. If the input characters meet the preset length, it can directly execute step 206 and subsequent steps without triggering a submission operation. For example, when logging into the system, if the entered password meets the password length corresponding to the account, a consistency verification is performed directly, and the login operation is responded to directly after the consistency verification is passed, without needing to click the "Login" option.

[0054] Step 208: If the consistency verification passes, respond to the target operation.

[0055] In some embodiments, if the conformance verification passes, the electronic device can respond to the target operation without further verification.

[0056] In some embodiments, if the consistency verification fails, no response is given to the target operation. In other embodiments, if the consistency verification fails, a verification prompt message is output for further verification. This further verification verifies the reliability of the operating entity, i.e., whether the operating entity is a real person or a robot. For example, further verification can be performed using image verification codes, text verification codes, or SMS verification codes. In other embodiments, if the consistency verification fails, further verification can be performed using facial recognition or fingerprint recognition.

[0057] For example, in the account registration scenario, if the consistency verification passes, the electronic device can directly submit the registration information to register an account after triggering the instruction to submit registration information, without needing to perform further verification.

[0058] The aforementioned verification method determines the number of times the input device enters the input box in the target operation interface, and the number of characters entered in the input box. It then performs a consistency verification on the number of keystrokes and the number of characters. If the consistency verification passes, it indicates that the operator is reliable and can directly respond to the target operation without needing to use traditional verification methods such as image or text CAPTCHAs. Therefore, it reduces operational complexity and improves verification efficiency while ensuring security. Furthermore, it not only verifies whether the operator is a real person or a robot but also prevents hacking, enhancing security. During user input, once the consistency comparison passes, it directly responds to the target operation without needing verification methods such as image codes, avoiding unnecessary operations. Users are completely unaware of the verification process, resulting in a smooth user experience, improved verification efficiency, and reduced user churn.

[0059] The verification method of this application can be applied not only to common scenarios such as registering accounts, logging into systems, and purchasing tickets online, but also to various devices with physical buttons, whether connected to the internet or not. It can prevent software from cracking during login or verification. For example, in the scenario of unlocking a smart door lock, security can be achieved by comparing the number of times the smart door lock button is pressed with the number of characters actually entered into the smart door lock.

[0060] In some embodiments, after verifying the consistency of the number of keystrokes and the number of characters, the method further includes: if the consistency verification fails, outputting a verification prompt message; and if the verification of the information to be verified based on the verification prompt message passes, responding to the target operation.

[0061] Among them, the verification prompt message is a prompt message used for advanced verification.

[0062] In some embodiments, the verification prompt information may be any one of the following: graphic verification code prompt information, text verification code prompt information, or SMS verification code prompt information.

[0063] In some embodiments, if the consistency verification fails, the electronic device can output a verification prompt, obtain the information to be verified input according to the verification prompt, and then verify the information to be verified according to the verification prompt. If the information to be verified passes the verification, the electronic device can respond to the target operation; if the information to be verified fails the verification, the electronic device will not respond to the target operation.

[0064] In some embodiments, the electronic device can compare the information to be verified with the information represented by the verification prompt. If the comparison matches, the verification of the information to be verified is successful; if the comparison does not match, the verification of the information to be verified fails.

[0065] In the above embodiments, if the consistency verification fails, a verification prompt message is output. If the verification of the information to be verified based on the verification prompt message passes, the target operation is responded to. This allows for advanced verification even if the consistency verification fails, ensuring the reliability of the operating entity and thus improving security.

[0066] like Figure 3As shown, taking login as an example, the login interface has input boxes for entering the username and password. While the user is entering information using their input device, the electronic device can count the number of keystrokes and determine the actual number of characters entered. After the login option is triggered, the electronic device can perform a consistency check on the number of keystrokes and the number of characters. If the consistency check passes, it directly proceeds to the subsequent steps of verifying the username and password to respond to the login operation. If the consistency check fails, a verification prompt (graphical verification, text verification, or SMS verification, etc.) is displayed for advanced verification. Only after the advanced verification passes will the login operation be responded to.

[0067] In some embodiments, the number of keystrokes is the difference between the number of times an input-type key on an input device is pressed and the number of times a delete-type key is pressed.

[0068] Input keys are used to input characters into input boxes. Examples include letter keys, number keys, and symbol keys on a keyboard. Delete keys are used to delete characters from input boxes. Examples include the delete key (Delete key) and backspace key (Backspace key) on a keyboard.

[0069] In some embodiments, the electronic device can identify the type of key pressed each time, determine the number of times an input key is pressed and the number of times a delete key is pressed, and determine the number of keystrokes based on the difference between the number of times an input key is pressed and the number of times a delete key is pressed.

[0070] In other embodiments, the electronic device may initialize the keystroke count to 0, and then identify the type of each keystroke. If the keystroke is an input key, the keystroke count is incremented by 1; if the keystroke is a delete key, the keystroke count is decremented by 1.

[0071] In the above embodiments, the number of keystrokes is the difference between the number of times the input type keys of the input device are pressed and the number of times the delete type keys are pressed. This avoids the problem of the number of keystrokes not matching the actual number of characters entered when the number of times the delete type keys are pressed is included in the number of keystrokes, thus improving the accuracy of the number of keystrokes and consequently improving the accuracy of the verification results.

[0072] In some embodiments, determining the number of times an input box in the operation interface of the input device is typed for the target operation includes: listening to the input event of the input box in the operation interface of the input device for the target operation; identifying the type of key pressed corresponding to the input event each time a key press is detected; if the type of key pressed is an input key, then incrementing the number of key presses by 1; if the type of key pressed is a delete key, then decrementing the number of key presses by 1.

[0073] In some embodiments, electronic devices can use the `document.addEventListener` method to globally listen for keydown events (i.e., keydown events) in the input fields of the interface for the target operation. Each time a keydown event is detected, a callback function for the keydown event is triggered. The callback function identifies the type of key pressed corresponding to the keydown event. If the key pressed is an input key, the callback function increments the keydown count recorded by the counter by 1; if the key pressed is a delete key, the callback function decrements the keydown count recorded by the counter by 1. The final keydown count is the number of keydowns in the input fields of the interface for the target operation.

[0074] In some embodiments, if the pressed key is neither an input key nor a delete key, the electronic device may not perform any processing (i.e., it does not increase or decrease the number of keystrokes). For example, a key that is neither an input key nor a delete key could be a control key (Ctrl key) or a shift key on a keyboard.

[0075] In the above embodiments, each time a key input event is detected, the type of key pressed corresponding to the key input event is identified. If the key pressed is an input key, the key input count is incremented by 1. If the key pressed is a delete key, the key input count is decremented by 1. This allows for efficient and accurate determination of the key input count, thereby improving the efficiency and accuracy of the verification.

[0076] In some embodiments, if the pressed key is an input key, incrementing the keystroke count by 1 includes: if the character indicated by the pressed key is an input key and is a allowed input character, then incrementing the keystroke count by 1; if the character indicated by the pressed key is a prohibited input character, then no action is taken.

[0077] The characters indicated by the keys are the characters that will be entered after the keys are pressed. Allowed characters are the characters that are permitted to be entered in the input box. Prohibited characters are the characters that are prohibited from being entered in the input box. For example, some input boxes only allow letter and number characters, and prohibit spaces or special symbols.

[0078] It's understandable that if the pressed key indicates a character that is prohibited from being entered, then that character cannot be entered into the input box. If the pressed key indicates a character that is allowed from being entered, then that character will be entered into the input box.

[0079] If the character indicated by the pressed key is a prohibited character, no action is taken; that is, the number of keystrokes is neither increased nor decreased.

[0080] In the above embodiments, when the pressed key is an input key, if the character indicated by the pressed key is a prohibited input character, no processing is performed. This avoids the problem of counting the number of times the key corresponding to the prohibited input character is pressed into the number of keystrokes when the input box has prohibited input characters, which would make it difficult to match the number of characters in the input box. This improves the accuracy of the number of keystrokes and thus improves the accuracy of the verification results.

[0081] like Figure 4 The diagram shows the overall flow of the verification method in the above embodiment, which includes the following steps: determining the number of characters entered in the input box, and listening to the input device's input events in response to the input box. Each time an input event is detected, the type of key pressed corresponding to the input event is identified. If the pressed key is a delete key, the key count is decremented by 1. If the pressed key is an input key and the character indicated by the key is a allowed input character, the key count is incremented by 1. The number of key presses in response to the input box is obtained. The key count and the number of characters are verified for consistency. If the consistency verification passes, the target operation is responded to directly. If the consistency verification fails, a verification prompt message is output. If the verification of the information to be verified according to the verification prompt message passes, the target operation is responded to.

[0082] In some embodiments, the method further includes: initializing and generating a target random code corresponding to the input device; the target random code is used to enable the input device to synchronously input the target random code each time a character is input; obtaining an actual random code that is synchronously input with the character entered in the input box; matching the actual random code with the target random code; and responding to the target operation if the consistency verification passes, including: responding to the target operation if the random codes match and the consistency verification passes.

[0083] In some embodiments, after opening the operation interface, the electronic device can initialize and generate a target random code corresponding to the input device, and assign the target random code to the input device. When the input device inputs characters, it synchronously inputs the target random code to the electronic device. The electronic device can obtain the actual random code that is synchronously input with the characters entered in the input box, match the actual random code with the target random code, and if the random codes match and the consistency verification of the number of keystrokes and the number of characters passes, it will respond to the target operation.

[0084] In some embodiments, if the consistency verification passes but the random code does not match, no response is given to the target operation. In other embodiments, if the consistency verification passes but the random code does not match, an advanced verification is performed.

[0085] In some embodiments, the electronic device may initialize and generate a target random code corresponding to the input device each time the operation interface is opened.

[0086] In some embodiments, the input device synchronously inputs a target random code to the electronic device each time a character is input.

[0087] For example, an electronic device has input device A as its input device. The electronic device assigns a target random code of 123 to input device A. When input device A inputs characters, it simultaneously inputs 123 to the electronic device. If the actual random code obtained by the electronic device is also 123, then the random codes match, indicating that the actual input device used is input device A, and the input device is reliable. If the actual random code obtained by the electronic device is not 123 or the random code is empty (i.e., no random code was obtained), then the random codes do not match, indicating that the actual input device used is not input device A, and the input device is unreliable.

[0088] In the above embodiments, a target random code is generated for the input device. By matching the target random code with the actual random code, the reliability of the input device can be ensured, and security can be further improved.

[0089] In some embodiments, the input device includes at least one of a hardware input device or a virtual input device provided by the electronic device on which the user interface is located.

[0090] Hardware input devices can be physical devices such as keyboards. Virtual input devices can be virtual devices such as soft keyboards built into electronic devices.

[0091] In the above embodiments, the input device can be either a hardware input device or a virtual input device, thereby improving the applicability of the method.

[0092] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0093] Based on the same inventive concept, this application also provides a verification apparatus for implementing the verification method described above. The solution provided by this apparatus is similar to the implementation scheme described in the above method; therefore, the specific limitations in one or more verification apparatus embodiments provided below can be found in the limitations of the verification method described above, and will not be repeated here.

[0094] In some embodiments, such as Figure 5 As shown, a verification device 500 is provided, including: a keystroke count determination module 502, a character count determination module 504, a consistency verification module 506, and a target operation response module 508, wherein:

[0095] The keystroke count determination module 502 is used to determine the number of times the input device enters the input box in the operation interface of the target operation.

[0096] The character count determination module 504 is used to determine the number of characters entered in the input box.

[0097] The consistency verification module 506 is used to verify the consistency of the number of keystrokes and the number of characters.

[0098] The target operation response module 508 is used to respond to the target operation if the consistency verification passes.

[0099] In some embodiments, such as Figure 6 As shown, the device 500 also includes:

[0100] The verification module 510 is used to output a verification prompt message if the consistency verification fails.

[0101] The target operation response module 508 is also used to respond to the target operation if the verification of the information to be verified entered according to the verification prompt information is successful.

[0102] In some embodiments, the number of keystrokes is the difference between the number of times an input-type key on an input device is pressed and the number of times a delete-type key is pressed.

[0103] In some embodiments, the keystroke count determination module 502 is further configured to listen to keystroke events in the input boxes of the operation interface of the input device for the target operation; each time a keystroke event is listened to, the type of key pressed corresponding to the keystroke event is identified; if the type of key pressed is an input key, the keystroke count is incremented by 1; if the type of key pressed is a delete key, the keystroke count is decremented by 1.

[0104] In some embodiments, the keystroke count determination module 502 is further configured to, when the type of the pressed key is an input key, increment the keystroke count by 1 if the character indicated by the pressed key is a character that is allowed to be input; and do not perform any processing if the character indicated by the pressed key is a character that is prohibited from being input.

[0105] In some embodiments, such as Figure 6 As shown, the device 500 also includes:

[0106] The random code generation module 512 is used to initialize and generate the target random code corresponding to the input device; the target random code is used to enable the input device to synchronously input the target random code each time a character is input.

[0107] The random code matching module 514 is used to obtain the actual random code that is synchronously input with the characters entered in the input box; and to match the actual random code with the target random code.

[0108] The target operation response module 508 is also used to respond to the target operation if the random code matches and the consistency verification passes.

[0109] In some embodiments, the input device includes at least one of a hardware input device or a virtual input device provided by the electronic device on which the user interface is located.

[0110] The aforementioned verification device determines the number of times the input box in the operation interface of the input device is entered for the target operation, determines the number of characters entered in the input box, and performs consistency verification on the number of times the input is entered and the number of characters. If the consistency verification passes, it indicates that the operating entity is reliable and can directly respond to the target operation without having to verify the reliability of the operating entity through traditional verification methods such as image verification codes or text verification codes. Therefore, it reduces the complexity of operation and improves the verification efficiency while ensuring security.

[0111] Each module in the aforementioned verification device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of the electronic device in hardware form or independent of it, or stored in the memory of the electronic device in software form, so that the processor can call and execute the operations corresponding to each module.

[0112] In one embodiment, an electronic device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 7 As shown, the electronic device includes a processor, memory, communication interface, display screen, and input device connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage medium. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements a verification method. The display screen can be an LCD screen or an e-ink screen. The input device can be a touch layer covering the display screen, buttons, a trackball, or a touchpad mounted on the device's casing, or an external keyboard, touchpad, or mouse.

[0113] Those skilled in the art will understand that Figure 7 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the electronic device to which the present application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.

[0114] In one embodiment, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.

[0115] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.

[0116] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.

[0117] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.

[0118] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0119] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0120] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A verification method, characterized in that, The method includes: Determine the number of times the input device enters the input box in the user interface for the target operation; Determine the number of characters entered in the input box; Perform consistency verification on the number of keystrokes and the number of characters; If the consistency verification passes, then respond to the target operation; The method further includes: Initialize and generate the target code corresponding to the input device; the target code is used to enable the input device to synchronously input the target code each time a character is input; Obtain the actual code that was entered synchronously with the character entered in the input box; Match the actual code with the target code; If the consistency verification passes, the response to the target operation includes: If the actual code matches the target code and the consistency verification passes, then a response is given to the target operation.

2. The method according to claim 1, characterized in that, After verifying the consistency of the number of keystrokes and the number of characters, the method further includes: If the consistency verification fails, a verification error message will be output. If the verification of the information to be verified based on the verification prompt is successful, the target operation will be responded to.

3. The method according to claim 1, characterized in that, The number of keystrokes is the difference between the number of times the input-type keys on the input device are pressed and the number of times the delete-type keys are pressed.

4. The method according to claim 3, characterized in that, The determination of the number of times the input box in the operation interface of the input device is entered for the target operation includes: Listen for keystroke events in the input fields of the user interface in response to the target operation. Each time a keystroke event is detected, the type of key pressed corresponding to the keystroke event is identified; If the pressed key is an input key, the keystroke count will be increased by 1. If the pressed key is a delete key, the number of keystrokes will be reduced by 1.

5. The method according to claim 4, characterized in that, The statement that if the pressed key is an input key, the keystroke count will be increased by 1 includes: If the pressed key is an input key, and the character indicated by the pressed key is a character that is allowed to be input, then the number of keystrokes is increased by 1. If the character indicated by the pressed key is a prohibited input character, no action will be taken.

6. The method according to any one of claims 1 to 5, characterized in that, The input device includes at least one of the hardware input device or virtual input device provided by the electronic device on which the operating interface is located.

7. A verification device, characterized in that, The device includes: The keystroke count determination module is used to determine the number of times the input device types into the input boxes in the operation interface for the target operation. A character count determination module is used to determine the number of characters entered in the input box; A consistency verification module is used to verify the consistency between the number of keystrokes and the number of characters. The target operation response module is used to respond to the target operation if the consistency verification passes. The device further includes: A code generation module is used to initialize and generate a target code corresponding to the input device; the target code is used to enable the input device to synchronously input the target code each time a character is input; The code matching module is used to obtain the actual code that is synchronously input with the character entered in the input box; and to match the actual code with the target code. The target operation response module is further configured to respond to the target operation if the actual code matches the target code and the consistency verification passes.

8. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.