CN110752933A - Verification code input method and device, electronic equipment and storage medium - Google Patents

Verification code input method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN110752933A
CN110752933A CN201911025044.9A CN201911025044A CN110752933A CN 110752933 A CN110752933 A CN 110752933A CN 201911025044 A CN201911025044 A CN 201911025044A CN 110752933 A CN110752933 A CN 110752933A
Authority
CN
China
Prior art keywords
verification code
image
character
mobile phone
absolute position
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201911025044.9A
Other languages
Chinese (zh)
Inventor
邓小志
张彦春
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Bo Hongyuan Data Polytron Technologies Inc
Original Assignee
Beijing Bo Hongyuan Data Polytron Technologies Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Bo Hongyuan Data Polytron Technologies Inc filed Critical Beijing Bo Hongyuan Data Polytron Technologies Inc
Priority to CN201911025044.9A priority Critical patent/CN110752933A/en
Publication of CN110752933A publication Critical patent/CN110752933A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3226Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using a predetermined code, e.g. password, passphrase or PIN
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/12Messaging; Mailboxes; Announcements
    • H04W4/14Short messaging services, e.g. short message services [SMS] or unstructured supplementary service data [USSD]

Abstract

The embodiment of the invention discloses a verification code input method, a verification code input device, electronic equipment and a storage medium, wherein the method comprises the following steps: inputting a mobile phone number of a local machine through a functional interface of an application program, and triggering the operation of acquiring a verification code; when receiving the short message content through the subscriber identity module SIM card corresponding to the mobile phone number, analyzing the short message content to obtain a verification code; acquiring feature images corresponding to all characters in the verification code from pre-stored feature images; intercepting a current screen image to obtain a screen shot image, and determining an absolute position area corresponding to the characteristic image in the screen shot image; inputting characters of a verification code based on the absolute position area. The technical scheme provided by the embodiment of the invention can ensure the safe input of the verification code, can automatically input the verification code by bypassing the limitation of a safety keyboard without manual assistance, and improves the efficiency.

Description

Verification code input method and device, electronic equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of information, in particular to a verification code input method and device, electronic equipment and a storage medium.
Background
With the development of smart phones, users may implement various functions, such as login, transfer, etc., through an application installed on a smart phone, or may test an application, etc. The user often needs to verify the user's identity when using the application. At present, the main verification method is to acquire a verification code sent by a server corresponding to an application program and then input the verification code, thereby completing verification.
Currently, the way of inputting the verification code can be as follows: the first method is that the user inputs the verification code manually, the second method is that the verification code content is obtained through a short message transfer platform, and the verification code is automatically input, and the third method is that the verification code is automatically input after the current short message is identified and verified. However, the method of inputting the verification code manually needs human eyes to identify the verification code, so that the identification is inconvenient and the efficiency is low. The method for acquiring the verification code content through the short message transfer platform and automatically inputting the verification code cannot solve the problem that the input mobile phone number and the mobile phone are bound for verification, and the method for automatically identifying the short message verification code and automatically inputting the verification code cannot realize automatic input through the verification of a safety keyboard.
Disclosure of Invention
The embodiment of the invention provides a verification code input method, a verification code input device, electronic equipment and a storage medium, which can ensure the safe input of a verification code, can automatically input the verification code by bypassing the limitation of a safety keyboard without manual assistance, and improve the efficiency.
In a first aspect, an embodiment of the present invention provides a verification code input method, including:
inputting a mobile phone number of a local machine through a functional interface of an application program, and triggering the operation of acquiring a verification code;
when receiving the short message content through the subscriber identity module SIM card corresponding to the mobile phone number, analyzing the short message content to obtain a verification code;
acquiring feature images corresponding to all characters in the verification code from pre-stored feature images;
intercepting a current screen image to obtain a screen shot image, and determining an absolute position area corresponding to the characteristic image in the screen shot image;
inputting characters of a verification code based on the absolute position area.
In a second aspect, an embodiment of the present invention further provides a verification code input device, including:
the trigger module is used for inputting the mobile phone number of the mobile phone through the functional interface of the application program and triggering the operation of acquiring the verification code;
the analysis module is used for analyzing the short message content to obtain a verification code when the short message content is received through the subscriber identity module SIM card corresponding to the mobile phone number;
the acquisition module is used for acquiring characteristic images corresponding to all characters in the verification code from pre-stored characteristic images;
the determining module is used for intercepting the current screen image to obtain a screen shot image and determining an absolute position area corresponding to the characteristic image in the screen shot image;
and the verification code input module is used for inputting characters of the verification code based on the absolute position area.
In a third aspect, an embodiment of the present invention further provides an electronic device, including:
one or more processors;
a memory for storing one or more programs,
when the one or more programs are executed by the one or more processors, the one or more processors implement a verification code input method as provided by an embodiment of the invention.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements a verification code input method provided by an embodiment of the present invention.
According to the technical scheme provided by the embodiment of the invention, the verification code is obtained by analyzing the content of the short message, the current screen image is intercepted, the absolute position area corresponding to the characteristic image is determined in the screenshot image, and the verification code is input based on the absolute position area; the screen image is intercepted, the feature images of the characters of the verification code are compared with the screenshot image, the absolute area positions corresponding to the feature images of the characters in the verification code are obtained, the verification code is input based on the absolute area positions, the verification code can be safely input, manual assistance is not needed, the verification code can be automatically input by automatically bypassing the limitation of a safety keyboard, and the efficiency is improved.
Drawings
FIG. 1 is a flowchart of a verification code input method according to an embodiment of the present invention;
FIG. 2 is a flowchart of a verification code input method according to an embodiment of the present invention;
FIG. 3a is a flowchart of a verification code input method according to an embodiment of the present invention;
FIG. 3b is a flowchart of a verification code input method according to an embodiment of the present invention;
3c-3f are flow interface diagrams for automatically entering a passcode for transfer as provided by embodiments of the present invention;
FIG. 4 is a block diagram of an exemplary verification code input device;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Fig. 1 is a flowchart of a verification code input method according to an embodiment of the present invention, where the method may be executed by a verification code input device, where the device may be implemented by software and/or hardware, the device is configured in a terminal such as a smart phone, the method may be applied in a login scenario, a transfer scenario, and the like in any situation, and the method may also be applied in a secure login scenario when an application program in the smart phone is tested.
As shown in fig. 1, the technical solution provided by the embodiment of the present invention includes:
s110: and inputting the mobile phone number of the mobile phone through a functional interface of the application program, and triggering the operation of acquiring the verification code.
In the embodiment of the invention, the functional interface of the application program can be a login interface of the application program, a transfer interface and the like. When a user logs in the application program, the mobile phone number information input into the mobile phone can be displayed through a login interface of the application program so as to obtain the short message verification code, and the user identity is verified. Or when the user transfers money through the application program, the information of the mobile phone number input into the mobile phone can be displayed through the transfer interface of the application program so as to obtain the short message verification code and realize the verification of the user identity.
In the embodiment of the invention, the mobile phone number of the mobile phone can be automatically input in the function interface of the application program. The mobile phone number of the local machine can be sent by the management platform or can be acquired from the information stored in the local machine. When the mobile phone number of the mobile phone is input, the operation of acquiring the verification code can be automatically triggered, so that a request for acquiring the verification code is sent to the server, and the short message content containing the verification code is sent by the server.
S120: and when the short message content is received through the subscriber identity module SIM card corresponding to the mobile phone number, analyzing the short message content to obtain a verification code.
In the embodiment of the invention, the SIM card corresponding to the input mobile phone number is installed in the mobile phone, and when the short message content is received through the SIM card corresponding to the mobile phone number, the verification code in the short message content is analyzed to obtain the verification code. The verification code can be in a form formed by combining 0-9 numbers, or can also be in a form formed by combining numbers and letters, or can also be formed by combining other characters.
S130: and acquiring a characteristic image corresponding to each character in the verification code from the pre-stored characteristic images.
In this step, when the method provided by the embodiment of the present invention is applied to a test scenario of an application program, the application program is tested through a test script, and the test script prestores feature images corresponding to each character in the security keyboard. When the method provided by the embodiment of the invention is applied to an application scene of an application program, the characteristic images corresponding to the characters in the security keyboard can be stored in the related file of the application program.
Wherein the feature image of each character may include at least one sheet, and a style of the character in each feature image may be different. For example, the feature image of the character 1 may include a plurality of pieces, and the characters 1 in the plurality of feature images may be respectively in a song style, a simulated song style, a black body style, or the like, or in other styles and the like.
S140: and intercepting the current screen image to obtain a screen shot image, and determining an absolute position area corresponding to the characteristic image in the screen shot image.
In the embodiment of the invention, the application program can have the authority of intercepting the screen image, namely the application program can be not set by the screen safety and can call the function of intercepting the screen image in the system so as to intercept the current screen image.
In an embodiment of the present invention, a security keyboard may be included in the current screen image. The style or arrangement order of each character presented each time by the security keyboard presented in the screen may be different each time the authentication code is entered. For example, when the user performs the first login verification, the numbers in the security keyboard displayed when the verification code is input can be arranged in the order of 0-9; when the user performs the second login verification, the numbers in the security keyboard displayed when the verification code is input can be arranged in a reverse order according to 0-9.
In the embodiment of the invention, when the screenshot image is obtained, the characteristic image corresponding to the character of the verification code is compared with the screenshot image, the key matched with the characteristic image is determined in the screenshot image, and the absolute position area of the matched key in the screenshot image is used as the absolute position area corresponding to the characteristic image. For example, one character in the verification code is 1, and the feature image corresponding to the character 1 may include a song body image of the character 1 and a black body image of the character 1. Comparing the characteristic image corresponding to the character 1 with the screen capture image; if the safety keyboard is provided with the black body key 1, the black body key 1 matched with the black body image of the character 1 can be determined through image comparison; and taking the absolute position area of the black body key 1 in the screenshot image as the absolute position area corresponding to the black body image of the character 1, so as to trigger the black body key 1 in the absolute position area, thereby realizing the input of the character 1 in the verification code. Wherein, the input of each character in the verification code can be according to the input method.
S150: inputting characters of a verification code based on the absolute position area.
In an implementation manner of the embodiment of the present invention, optionally, inputting characters of a verification code based on the absolute area position includes: determining the central coordinate position of the absolute position area; and triggering the operation of the central coordinate position in the action screen to trigger the action of the key positioned at the central coordinate position so as to input the character corresponding to the verification code. The absolute position area can be a position area where a key corresponding to the feature image of the character is located, and the central coordinate position in the screen is automatically clicked to click the key at the central position, so that the corresponding character in the feature code can be input.
According to the technical scheme provided by the embodiment of the invention, the verification code is obtained by analyzing the content of the short message, the current screen image is intercepted, the absolute position area corresponding to the characteristic image is determined in the screenshot image, and the verification code is input based on the absolute position area; the screen image is intercepted, the feature images of the characters of the verification code are compared with the screenshot image, the absolute area positions corresponding to the feature images of the characters of the verification code are obtained, the verification code is input based on the absolute area positions, the safe input of the verification code can be guaranteed, manual assistance is not needed, the verification code can be automatically input by automatically bypassing the limitation of a safety keyboard, and the efficiency is improved.
Fig. 2 is a flowchart of a verification code input method provided in an embodiment of the present invention, where optionally, in the embodiment, the obtaining a feature image corresponding to each character in the verification code includes:
aiming at each character in the verification code, acquiring a characteristic image which corresponds to the character and contains the character; the character image corresponding to the character comprises at least one character, and the style of the character in each character image is different;
the intercepting of the current screen image to obtain a screen shot image and the determination of the absolute position area of the characteristic image in the screen shot image comprise:
intercepting a current screen image to obtain a screen shot image containing a safety keyboard;
comparing the characteristic image with the screen capture image, and determining a key matched with the characteristic image in the screen capture image;
and taking the absolute position area of the matched key in the screen capture image as the absolute position area corresponding to the characteristic image.
As shown in fig. 2, the technical solution provided by the embodiment of the present invention includes:
s210: and inputting the mobile phone number of the mobile phone through a functional interface of the application program, and triggering the operation of acquiring the verification code.
S220: and when receiving the short message content based on the mobile phone number, analyzing the short message content to obtain a verification code.
S230: in a pre-stored characteristic image, aiming at each character in a verification code, acquiring a characteristic image which corresponds to the character and contains the character; the character image corresponding to the character comprises at least one character, and the style of the character in each character image is different.
In the embodiment of the present invention, for each character in the verification code, the style of the character in the feature image corresponding to the character may be different, the style of the character may be a song style, an imitation song style, a black body style, or other styles, and the style of the character is not limited.
S240: and intercepting the current screen image to obtain a screen shot image containing the safety keyboard.
In an embodiment of the present invention, a security keyboard may be included in the current screen image. The style or arrangement order of each character presented each time by the security keyboard presented in the screen may be different each time the authentication code is entered. For example, when the user performs the first login verification, the numbers in the security keyboard displayed when the verification code is input may be arranged in the order of 0-9, and when the user performs the second login verification, the numbers in the security keyboard displayed when the verification code is input may be arranged in the reverse order of 0-9.
S250: and comparing the characteristic image with the screen capture image, and determining a key matched with the characteristic image in the screen capture image.
In the embodiment of the present invention, the feature image may be moved on the screen capture image according to the set moving direction, so as to compare the feature image with the screen capture image, and thereby determine the key matched with the feature image in the screen capture image. Wherein the keys are keys in a security keyboard.
S260: and taking the absolute position area of the matched key in the screen capture image as the absolute position area corresponding to the characteristic image.
In the embodiment of the invention, as the matched key needs to be triggered to realize the input of the characters in the verification code, the absolute position area of the matched key in the screenshot image needs to be determined and is used as the absolute position area corresponding to the characteristic image, so that the absolute position area is automatically triggered to realize the input of the characters in the verification code.
For example, one character in the verification code is 1, and the feature image corresponding to the character 1 may include a song body image of the character 1 and a black body image of the character 1. Comparing the characteristic image corresponding to the character 1 with the screen capture image; if the safety keyboard is provided with the black body key 1, the black body key 1 matched with the black body image of the character 1 can be determined through image comparison, the absolute position area of the black body key 1 in the screen capture image is used as the absolute position area corresponding to the black body image of the character 1, and therefore the black body key 1 in the absolute position area is triggered, and input of the character 1 in the verification code is achieved. Wherein, the input of each character in the verification code can be according to the input method.
S270: determining the central coordinate position of the absolute position area; and triggering the operation of the central coordinate position in the action screen to trigger the action of the key positioned at the central coordinate position so as to input the character corresponding to the verification code.
Therefore, the screen image is intercepted, the feature images of the characters of the verification code are compared with the screenshot image, the absolute area positions corresponding to the feature images of the characters of the verification code are obtained, the verification code is input based on the absolute area positions, the verification code can be safely input, manual assistance is not needed, the verification code can be automatically input by automatically bypassing the limit of a safety keyboard, and the efficiency is improved.
Fig. 3a is a flowchart of a verification code input method according to an embodiment of the present invention, where the method according to the embodiment of the present invention is applied to a secure login scenario for testing an application program.
As shown in fig. 3a, the technical solution provided by the embodiment of the present invention includes:
s310: and receiving a task to be tested, wherein the task to be tested comprises a mobile phone number of the mobile phone.
In the embodiment of the invention, the task to be tested can be sent to the appointed mobile phone by the management platform, wherein the task to be tested comprises the mobile phone number of the mobile phone, so that the mobile phone inputs the mobile phone number during verification.
S320: and inputting the mobile phone number of the mobile phone through a login interface of the application program, and triggering the operation of acquiring the verification code.
In the embodiment of the invention, the mobile phone number of the mobile phone is consistent with the input mobile phone number.
S330: and when the short message content is received through the SIM card corresponding to the mobile phone number, analyzing the short message content to obtain a verification code.
S340: and acquiring a characteristic image corresponding to each character in the verification code from the pre-stored characteristic images.
S350: and intercepting the current screen image to obtain a screen shot image, and determining an absolute position area corresponding to the characteristic image in the screen shot image.
S360: inputting characters of a verification code based on the absolute position area.
In the embodiment of the present invention, the descriptions of S320 to S350 may refer to the descriptions of the corresponding steps in the above embodiments.
S370: and triggering the operation of submitting the verification code, and carrying out function test on the application program when the verification code is successfully verified.
The functional test of the application program may be a performance test, a compatibility test, and the like of the application program.
In the related art, in the automatic testing process of the application program APP, the login function is a necessary process for completing the comprehensive coverage test of the whole APP function. How to complete the automatic identification and the automatic input of the short message verification code under the condition of black box automatic test is the key for solving the problem. The current common login schemes are as follows: the first method is that a user manually inputs a verification code, the second method is that the verification code content is obtained through a short message transfer platform, the verification code is automatically input, specifically, a fixed mobile phone is used for receiving the verification code, the verification code is sent to a cloud server, and a test mobile phone sends a request to the cloud server to obtain the verification code; the third method is to identify the current mobile phone short message and automatically input the verification code after verification.
However, the method of inputting the verification code manually needs human eyes to identify the verification code, so that the identification is inconvenient and the efficiency is low. The method for acquiring the verification code content through the short message transfer platform and automatically inputting the verification code can realize login verification and the like only when the input mobile phone number is the same as the mobile phone number of the mobile phone, but the mobile phone number of the short message transfer platform is not consistent with the mobile phone number of the test mobile phone, an application program may not support the mobile phone number of the short message transfer platform, and the problem of verification by binding the input mobile phone number and the test mobile phone cannot be solved; the method for automatically inputting the verification code by automatically identifying the short message verification code cannot realize automatic input through the verification of a safety keyboard.
By the method provided by the embodiment of the invention, the problem that the verification can be automatically input in the APP automatic test process is solved, the input efficiency is improved, the input mobile phone number and the test mobile phone have the same mobile phone number, and the normal login of the application program is realized; according to the method provided by the embodiment of the invention, for safety consideration, the safety input check is added in the verification code login function, the verification code is input through the safety keyboard of the APP, so that the verification code input is realized without manual assistance and by automatically bypassing the safety keyboard limit, and the function test is realized.
The method provided by the embodiment of the present invention may also refer to fig. 3b, as shown in fig. 3b, the technical solution provided by the embodiment of the present invention includes: recording a test script, recording a login flow, and storing possible related image characteristics of the short message verification code; a testing machine is assigned, and automatic operation is performed according to the flow of the test script; inputting a mobile phone number of the mobile phone, and clicking to acquire a verification code; receiving the short message content, and analyzing the verification code in the content; decomposing the short message into character arrays according to the content of the short message; traversing the character array, sequentially finding the characteristic image corresponding to the character in the test script, finding the specific position of the image on the current screen image by using the characteristic image in an image contrast mode, and then sending a click. And after the click is finished in sequence, other operations after the verification code is input are continued. Wherein the test script runs in the tester.
The method provided by the embodiment of the invention can also be applied to a transfer scene, and the interface diagram for automatically inputting the verification code to transfer based on the method provided by the embodiment of the invention can refer to fig. 3c-3 f. As shown in fig. 3c, when the phone number of the mobile phone is input, the operation of acquiring the verification code is automatically triggered. As shown in fig. 3d, after the content of the received short message is analyzed to obtain the verification code, the verification code is automatically input through the security keyboard. As shown in fig. 3e, after the input of the verification code is completed, the operation of submitting the verification code is automatically triggered, and the transfer operation is executed. As shown in fig. 3f, a prompt message indicating that the transfer was successful is displayed.
Fig. 4 is a block diagram of a structure of an authentication code input device according to an embodiment of the present invention, and as shown in fig. 4, the device according to the embodiment of the present invention includes: a triggering module 410, a parsing module 420, an obtaining module 430, a determining module 440, and a verification code input module 450.
The triggering module 410 is configured to input a mobile phone number of the mobile phone through a functional interface of an application program, and trigger an operation of acquiring a verification code;
the analysis module 420 is configured to, when receiving a short message content through a subscriber identity module SIM card corresponding to the mobile phone number, analyze the short message content to obtain a verification code;
an obtaining module 430, configured to obtain, from pre-stored feature images, feature images corresponding to each character in the verification code;
the determining module 440 is configured to intercept a current screen image to obtain a screen capture image, and determine an absolute position area corresponding to the feature image in the screen capture image;
and a verification code input module 450 for inputting characters of a verification code based on the absolute position area.
Optionally, the obtaining module 430 is configured to, for each character in the verification code, obtain a feature image that includes the character and corresponds to the character; the character image corresponding to the character comprises at least one character, and the style of the character in each character image is different;
accordingly, the determining module 440 is configured to:
intercepting a current screen image to obtain a screen shot image containing a safety keyboard;
comparing the characteristic image with the screen capture image, and determining a key matched with the characteristic image in the screen capture image;
and taking the absolute position area of the matched key in the screen capture image as the absolute position area of the characteristic image in the screen capture image.
Optionally, the verification code input module 450 is configured to:
determining the central coordinate position of the absolute position area;
and triggering the operation of the central coordinate position in the action screen to trigger the action of the key positioned at the central coordinate position so as to input the character corresponding to the verification code.
Optionally, the apparatus further includes a receiving module, configured to receive a task to be tested before an operation of inputting a mobile phone number of the local machine through a functional interface of the application and triggering obtaining of the verification code is performed, where the task to be tested includes the mobile phone number of the local machine.
Optionally, the apparatus further includes a test module, configured to trigger an operation of submitting the verification code, and perform a functional test on the application program when the verification code is successfully verified.
Optionally, the apparatus further includes an execution module, configured to trigger an operation of submitting the verification code, and execute a login operation or a transfer operation when the verification of the verification code is successful.
The device can execute the method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
Fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present invention, where the electronic device may be a terminal such as a smart phone equipped with a SIM card. As shown in fig. 5, the apparatus includes:
one or more processors 510, one processor 510 being illustrated in FIG. 5;
a memory 520;
the apparatus may further include: an input device 530 and an output device 540.
The processor 510, the memory 520, the input device 530 and the output device 540 of the apparatus may be connected by a bus or other means, and fig. 5 illustrates the connection by a bus as an example.
The memory 520, which is a non-transitory computer-readable storage medium, may be used to store software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to a verification code input method in the embodiment of the present invention (for example, the triggering module 410, the parsing module 420, the obtaining module 430, the determining module 440, and the verification code input module 450 shown in fig. 4). The processor 510 executes various functional applications and data processing of the computer device by executing the software programs, instructions and modules stored in the memory 520, namely, implementing an authentication code input method of the above method embodiment, namely:
inputting a mobile phone number of a local machine through a functional interface of an application program, and triggering the operation of acquiring a verification code;
when receiving the short message content through the subscriber identity module SIM card corresponding to the mobile phone number, analyzing the short message content to obtain a verification code;
acquiring feature images corresponding to all characters in the verification code from pre-stored feature images;
intercepting a current screen image to obtain a screen shot image, and determining an absolute position area corresponding to the characteristic image in the screen shot image;
inputting characters of a verification code based on the absolute position area.
The memory 520 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to use of the computer device, and the like. Further, the memory 520 may include high speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, memory 520 may optionally include memory located remotely from processor 510, which may be connected to a terminal device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 530 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the computer apparatus. The output device 540 may include a display device such as a display screen.
An embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements a verification code input method according to an embodiment of the present invention:
inputting a mobile phone number of a local machine through a functional interface of an application program, and triggering the operation of acquiring a verification code;
when receiving the short message content through the subscriber identity module SIM card corresponding to the mobile phone number, analyzing the short message content to obtain a verification code;
acquiring feature images corresponding to all characters in the verification code from pre-stored feature images;
intercepting a current screen image to obtain a screen shot image, and determining an absolute position area corresponding to the characteristic image in the screen shot image;
inputting characters of a verification code based on the absolute position area.
Any combination of one or more computer-readable media may be employed. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. A method for inputting a verification code, comprising:
inputting a mobile phone number of a local machine through a functional interface of an application program, and triggering the operation of acquiring a verification code;
when receiving the short message content through the subscriber identity module SIM card corresponding to the mobile phone number, analyzing the short message content to obtain a verification code;
acquiring feature images corresponding to all characters in the verification code from pre-stored feature images;
intercepting a current screen image to obtain a screen shot image, and determining an absolute position area corresponding to the characteristic image in the screen shot image;
inputting characters of a verification code based on the absolute position area.
2. The method of claim 1, wherein the obtaining feature images corresponding to respective characters in the validation code comprises:
for each character in the verification code, acquiring a characteristic image which corresponds to the character and contains the character; the character image corresponding to the character comprises at least one character, and the style of the character in each character image is different;
the intercepting of the current screen image to obtain a screen shot image and the determination of the absolute position area of the characteristic image in the screen shot image comprise:
intercepting a current screen image to obtain a screen shot image containing a safety keyboard;
comparing the characteristic image with the screen capture image, and determining a key matched with the characteristic image in the screen capture image;
and taking the absolute position area of the matched key in the screen capture image as the absolute position area corresponding to the characteristic image.
3. The method of claim 1 or 2, wherein entering characters of a validation code based on the absolute region location comprises:
determining the central coordinate position of the absolute position area;
and triggering the operation of the central coordinate position in the action screen to trigger the action of the key positioned at the central coordinate position so as to input the character corresponding to the verification code.
4. The method of claim 1, before the operation of obtaining the verification code is triggered by inputting a phone number of the mobile phone through a function interface of the application program, further comprising:
and receiving a task to be tested, wherein the task to be tested comprises a mobile phone number of the mobile phone.
5. The method of claim 4, further comprising:
and triggering the operation of submitting the verification code, and carrying out function test on the application program when the verification code is successfully verified.
6. The method of claim 1, further comprising:
and triggering the operation of submitting the verification code, and executing login operation or transfer operation when the verification code is successfully verified.
7. An authentication code input apparatus, comprising:
the trigger module is used for inputting the mobile phone number of the mobile phone through the functional interface of the application program and triggering the operation of acquiring the verification code;
the analysis module is used for analyzing the short message content to obtain a verification code when the short message content is received through the subscriber identity module SIM card corresponding to the mobile phone number;
the acquisition module is used for acquiring characteristic images corresponding to all characters in the verification code from pre-stored characteristic images;
the determining module is used for intercepting the current screen image to obtain a screen shot image and determining an absolute position area corresponding to the characteristic image in the screen shot image;
and the verification code input module is used for inputting characters of the verification code based on the absolute position area.
8. The apparatus according to claim 7, wherein the obtaining module is configured to obtain, for each character in the verification code, a feature image corresponding to the character and containing the character; the character image corresponding to the character comprises at least one character, and the style of the character in each character image is different;
accordingly, the determining module is configured to:
intercepting a current screen image to obtain a screen shot image containing a safety keyboard;
comparing the characteristic image with the screen capture image, and determining a key matched with the characteristic image in the screen capture image;
and taking the absolute position area of the matched key in the screen capture image as the absolute position area of the characteristic image in the screen capture image.
9. An electronic device, comprising:
one or more processors;
a memory for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement a captcha entry method as claimed in any one of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out a captcha input method as claimed in any one of claims 1 to 7.
CN201911025044.9A 2019-10-25 2019-10-25 Verification code input method and device, electronic equipment and storage medium Pending CN110752933A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911025044.9A CN110752933A (en) 2019-10-25 2019-10-25 Verification code input method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911025044.9A CN110752933A (en) 2019-10-25 2019-10-25 Verification code input method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN110752933A true CN110752933A (en) 2020-02-04

Family

ID=69280093

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911025044.9A Pending CN110752933A (en) 2019-10-25 2019-10-25 Verification code input method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110752933A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112417419A (en) * 2020-11-20 2021-02-26 北京字节跳动网络技术有限公司 Verification code processing method, device, equipment and storage medium
CN113378140A (en) * 2021-06-16 2021-09-10 深圳市云速易连科技有限公司 Low-code technology platform system based on cloud data

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20010086518A (en) * 2000-03-02 2001-09-13 윤종용 An automatic security code verifying method of a computer system operated by a remote controller
CN102958022A (en) * 2012-11-23 2013-03-06 深圳市朗科科技股份有限公司 Short message verification method, device and system
CN103902740A (en) * 2014-04-22 2014-07-02 锤子科技(北京)有限公司 Short message authentication code residing method and device
CN105101122A (en) * 2015-06-29 2015-11-25 安一恒通(北京)科技有限公司 Verification code inputting method and device
CN105553663A (en) * 2015-12-09 2016-05-04 小米科技有限责任公司 Verification code input method and device
CN109033772A (en) * 2018-08-09 2018-12-18 北京云测信息技术有限公司 A kind of input method and device of verification information

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20010086518A (en) * 2000-03-02 2001-09-13 윤종용 An automatic security code verifying method of a computer system operated by a remote controller
CN102958022A (en) * 2012-11-23 2013-03-06 深圳市朗科科技股份有限公司 Short message verification method, device and system
CN103902740A (en) * 2014-04-22 2014-07-02 锤子科技(北京)有限公司 Short message authentication code residing method and device
CN105101122A (en) * 2015-06-29 2015-11-25 安一恒通(北京)科技有限公司 Verification code inputting method and device
CN105553663A (en) * 2015-12-09 2016-05-04 小米科技有限责任公司 Verification code input method and device
CN109033772A (en) * 2018-08-09 2018-12-18 北京云测信息技术有限公司 A kind of input method and device of verification information

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
XXXSS: "OpenCV-Python教程:28.模板匹配", 《简书》 *
互联网极客: "appium通过图像识别技术opencv解决密码键盘的模拟输入密码问题", 《CSDN》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112417419A (en) * 2020-11-20 2021-02-26 北京字节跳动网络技术有限公司 Verification code processing method, device, equipment and storage medium
CN112417419B (en) * 2020-11-20 2022-12-13 北京字节跳动网络技术有限公司 Verification code processing method, device, equipment and storage medium
CN113378140A (en) * 2021-06-16 2021-09-10 深圳市云速易连科技有限公司 Low-code technology platform system based on cloud data

Similar Documents

Publication Publication Date Title
CN107908485B (en) Interface parameter transmission method, device, equipment and computer readable storage medium
US20160210632A1 (en) Secured payment method and relevant device and system
CN104125485B (en) A kind of user profile shared method, equipment and system
CN104967586B (en) A kind of user ID authentication method, apparatus and system
CN106130998A (en) A kind of identifying code transmission method and device
CN109194689B (en) Abnormal behavior recognition method, device, server and storage medium
CN109639719B (en) Identity verification method and device based on temporary identifier
CN112394864B (en) Information acquisition method and device, computer equipment and storage medium
CN105245489B (en) Verification method and device
CN109547426B (en) Service response method and server
CN110247898B (en) Identity verification method, identity verification device, identity verification medium and electronic equipment
CN104618316A (en) Method, device and system of safety verification
CN110659569A (en) Electronic signature method, device, storage medium and electronic equipment
CN106330458A (en) Method and device for processing verification code
CN112738046B (en) One-key login method, terminal and system server
CN110752933A (en) Verification code input method and device, electronic equipment and storage medium
CN106230702B (en) Identity information verification method, apparatus and system
CN113961836A (en) Page jump method and device, electronic equipment and storage medium
CN104079527A (en) Information processing method and electronic equipment
CN111090849A (en) Memory, verification code implementation method, device and equipment
CN108769059B (en) Verification method, device, medium and computing equipment
CN110113346B (en) Network verification method, user terminal and server
CN106888207A (en) Authentication method, system and SIM
CN110688632A (en) Application program login method, device, equipment and storage medium
EP4310407A1 (en) Control right switching method and apparatus for virtual remote control, device, and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20200204

RJ01 Rejection of invention patent application after publication