CN110427745B - Verification code obtaining method and device, electronic equipment and computer readable medium - Google Patents

Verification code obtaining method and device, electronic equipment and computer readable medium Download PDF

Info

Publication number
CN110427745B
CN110427745B CN201910596712.7A CN201910596712A CN110427745B CN 110427745 B CN110427745 B CN 110427745B CN 201910596712 A CN201910596712 A CN 201910596712A CN 110427745 B CN110427745 B CN 110427745B
Authority
CN
China
Prior art keywords
verification code
verification
file
code
initialization file
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.)
Active
Application number
CN201910596712.7A
Other languages
Chinese (zh)
Other versions
CN110427745A (en
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.)
Wuba Co Ltd
Original Assignee
Wuba Co Ltd
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 Wuba Co Ltd filed Critical Wuba Co Ltd
Priority to CN201910596712.7A priority Critical patent/CN110427745B/en
Publication of CN110427745A publication Critical patent/CN110427745A/en
Application granted granted Critical
Publication of CN110427745B publication Critical patent/CN110427745B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/31User authentication
    • G06F21/36User authentication by graphic or iconic representation

Abstract

The embodiment of the application discloses a verification code obtaining method and device, electronic equipment and a computer readable medium. An embodiment of the method comprises: under the condition that a user is detected to execute preset operation, reading a preset initialization file, wherein attribute information of a verification code, a verification code type corresponding to a currently accessed service and a verification code showing mode corresponding to the currently accessed service are recorded in the initialization file; sending a verification code picture acquisition request; receiving a verification code picture matched with the attribute information and the verification code type; and displaying the verification code picture in a verification code display mode. This embodiment reduces redundancy of the code.

Description

Verification code obtaining method and device, electronic equipment and computer readable medium
Technical Field
The embodiment of the application relates to the technical field of computers, in particular to a verification code obtaining method, a verification code obtaining device, electronic equipment and a computer readable medium.
Background
With the development of computer technology, more and more websites and Applications (APPs) provide a function of a verification code to improve security during browsing a webpage or using an Application. Generally, after the user feeds back correct authentication information (e.g., a plurality of characters presented in a verification code picture) with respect to the verification code picture (e.g., a picture in which a plurality of characters are presented), browsing a current web page or using some functions of an application may be continued.
In the existing manner, different independent codes are generally formulated for different services (such as a house renting service, a recruitment service, a home administration service, etc.) in a website or an application respectively so as to display and verify the verification code. When the service is more, a large amount of repeated codes need to be stored in the mode, and the code redundancy is higher.
Disclosure of Invention
The embodiment of the application provides a verification code obtaining method, a verification code obtaining device, electronic equipment and a computer readable medium, so as to solve the technical problem of high code redundancy in the prior art.
In a first aspect, an embodiment of the present application provides a verification code obtaining method, which is applied to a terminal device, and includes: under the condition that a user is detected to execute a preset operation, reading a preset initialization file, wherein attribute information of a verification code, a verification code type corresponding to a currently accessed service and a verification code showing mode corresponding to the currently accessed service are recorded in the initialization file; sending a verification code picture acquisition request, wherein the verification code picture acquisition request comprises attribute information and a verification code type; receiving a verification code picture matched with the attribute information and the verification code type; and displaying the verification code picture in a verification code display mode.
In some embodiments, in the case that it is detected that the user performs the preset operation, reading a preset initialization file, including: under the condition that a user is detected to execute preset operation, calling a pre-established initialization function to acquire an address of an initialization file; determining whether the version number of the initialization file in the address is the same as the version number of the initialization file cached locally; if yes, reading an initialization file in a local cache; if not, downloading the initialization file from the address, and reading the downloaded initialization file
In some embodiments, the initialization file further records names and addresses of script files corresponding to the types of the verification codes, wherein the script files record operation instructions executed for different conditions in the verification process; and before sending the verification code picture acquisition request, the method further comprises: and taking the script file corresponding to the verification code type recorded in the initialization file as a target script file, and downloading the script file with the name of the target script file from the address of the target script file.
In some embodiments, after presenting the captcha picture in a captcha presentation manner, the method further comprises: in response to detecting the authentication information fed back by the user, sending an authentication request containing the authentication information; receiving a verification result for indicating whether the verification is passed.
In some embodiments, when the verification passes, a verification pass identifier for indicating that the verification passes is included in the verification result; and after receiving a verification result indicating whether the verification is passed, the method further comprises: and sending the verification passing identifier to a service server for providing service for the service, so that the service server verifies whether the verification passing identifier is valid.
In some embodiments, the type of the authentication code corresponding to the currently accessed service is any one of the following types: the method comprises the following steps of character identifying code class, click identifying code class, sliding identifying code class, voice identifying code class and gesture identifying code class, wherein the identifying code display mode corresponding to the currently accessed service is any one of the following modes: pop-up, trigger, embedded.
In a second aspect, an embodiment of the present application provides an apparatus for obtaining a verification code, which is applied to a terminal device, and includes: the reading unit is configured to read a preset initialization file under the condition that a user is detected to execute a preset operation, wherein attribute information of a verification code, a verification code type corresponding to a currently accessed service and a verification code showing mode corresponding to the currently accessed service are recorded in the initialization file; a first transmitting unit configured to transmit a verification code picture acquisition request, wherein the verification code picture acquisition request includes attribute information and a verification code type; a first receiving unit configured to receive a captcha picture matching the attribute information and the captcha type; and the presentation unit is configured to present the verification code picture in a verification code presentation mode.
In some embodiments, a reading unit includes: the acquisition module is configured to call a pre-created initialization function to acquire an address of an initialization file under the condition that a user is detected to execute a preset operation; a determining module configured to determine whether a version number of the initialization file in the address is the same as a version number of the initialization file of the local cache; the first reading module is configured to read the initialization file in the local cache if the first reading module is configured to read the initialization file in the local cache; and the second reading module is configured to download the initialization file from the address and read the downloaded initialization file if the address is not the address.
In some embodiments, the initialization file further records names and addresses of script files corresponding to the types of the verification codes, wherein the script files record operation instructions executed for different conditions in the verification process; and the apparatus further comprises: and the downloading unit is configured to take the script file corresponding to the verification code type recorded in the initialization file as a target script file and download the script file with the name of the target script file from the address of the target script file.
In some embodiments, the apparatus further comprises: a second transmitting unit configured to transmit an authentication request containing authentication information in response to detection of the authentication information fed back by the user; a second receiving unit configured to receive a verification result indicating whether the verification is passed.
In some embodiments, when the verification passes, a verification pass identifier for indicating that the verification passes is included in the verification result; and the apparatus further comprises: and the verification unit is configured to send the verification passing identification to a service server for providing service for the service so that the service server verifies whether the verification passing identification is valid.
In some embodiments, the type of the authentication code corresponding to the currently accessed service is any one of the following types: the method comprises the following steps of character identifying code class, click identifying code class, sliding identifying code class, voice identifying code class and gesture identifying code class, wherein the identifying code display mode corresponding to the currently accessed service is any one of the following modes: pop-up, trigger, embedded.
In a third aspect, an embodiment of the present application provides an electronic device, including: one or more processors; storage means having one or more programs stored thereon which, when executed by one or more processors, cause the one or more processors to implement a method as in any one of the embodiments of the first aspect described above.
In a fourth aspect, the present application provides a computer-readable medium, on which a computer program is stored, which when executed by a processor implements the method according to any one of the embodiments of the first aspect.
According to the verification code obtaining method, the verification code obtaining device, the electronic equipment and the computer readable medium, after the fact that the user executes the preset operation is detected, the attribute information of the verification code, the verification code type corresponding to the currently accessed service and the initialization file of the verification code showing mode are read and recorded; and then sending a picture acquisition request to obtain the verification code picture matched with the attribute information and the verification code type. And finally, displaying the verification code picture in a verification code display mode. Therefore, for different services, the verification code of the required type and the required presentation mode can be acquired only by setting the attribute information, the verification code type and the verification code presentation mode in the initialization file. The code for realizing the function of the verification code does not need to be set for each service, so that the redundancy of the code is reduced.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:
FIG. 1 is a flow diagram of one embodiment of a captcha acquisition method according to the present application;
FIG. 2 is a flow diagram of yet another embodiment of a captcha acquisition method according to the present application;
FIG. 3 is a schematic block diagram of one embodiment of a captcha obtaining apparatus according to the present application;
FIG. 4 is a block diagram of a computer system suitable for use in implementing the electronic device of an embodiment of the present application.
Detailed Description
The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant invention and not restrictive of the invention. It should be noted that, for convenience of description, only the portions related to the related invention are shown in the drawings.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
Referring to fig. 1, a flow 100 of one embodiment of a captcha acquisition method according to the present application is shown. The verification code acquisition method can be applied to terminal equipment. The verification code acquisition method comprises the following steps:
step 101, reading a preset initialization file when detecting that a user executes a preset operation.
In this embodiment, an execution subject (e.g., a terminal device) of the verification code acquisition method may read a preset initialization file when detecting that a user performs a preset operation. The initialization file may record attribute information of the verification code, a type of the verification code corresponding to the currently accessed service, and a display mode of the verification code corresponding to the currently accessed service. It should be noted that other information may be recorded in the initialization file as needed, and the present invention is not limited herein.
Here, the attribute information of the captcha may include, but is not limited to, page elements (e.g., buttons, input boxes, text, etc.) that the captcha component needs to bind, the width and height of the captcha picture, and the like. The captcha types may include, but are not limited to, a character captcha class, a click captcha class, a slide captcha class, a voice captcha class, a gesture captcha class, and the like. The authentication code presentation may include, but is not limited to, pop-up, trigger, embedded, etc.
It should be noted that the preset operation may be any preset operation, and is not limited herein. As an example, the preset operation may be a click operation on a login key. When the login key is detected to be clicked by the user, the execution main body can read the preset initialization file. As yet another example, the preset operation may be an operation of sliding to a certain page element (e.g., a picture, a certain piece of text, etc.). When the user is detected to slide to the page element, the execution main body can read the preset initialization file. As yet another example, the preset operation described above may be an operation of opening a page. When it is detected that a user opens a certain page, the execution main body can read a preset initialization file.
In this embodiment, the initialization file may be stored locally in the execution main body, or may be stored in a server communicatively connected to the execution main body. The execution subject may read the initialization file locally or from the electronic device.
In practice, different initialization files may correspond to different services (e.g., a house renting service, a recruitment service, a home administration service, etc.) in a website or application. Therefore, the verification code type and the verification code display mode can be different under different services.
In the initialization file of each service, all codes for realizing the function of the verification code do not need to be stored, and only the attribute information, the display form and other contents of the verification code customized for the verification code needed by each service need to be stored, so that the code amount is reduced for a calling party. Furthermore, since a large number of codes for implementing the function of the verification code of different services usually have the same content (for example, operation instructions executed under different conditions in the verification process, codes for performing size adjustment on a verification code picture to match attribute information, and the like), each caller does not need to write a code for implementing the function of the verification code of each service, and redundancy of the code is reduced. In some optional implementations of this embodiment, the execution main body may read the initialization file by:
in the first step, in the case that it is detected that the user performs a preset operation, a pre-created initialization function is called to obtain an address (e.g., a URL (Uniform Resource Locator)) of an initialization file. Here, the initialization function may be packaged with a method of acquiring an initialization address, and the execution body may execute the method by calling the initialization function, thereby acquiring an address of the initialization file. In practice, the address of the initialization file may be a download address of the latest version of the initialization file. The initialization file may typically be downloaded from a service server providing support for the current service.
And secondly, determining whether the version number of the initialization file in the address is the same as the version number of the initialization file cached locally. If the two files are the same, the initialization file in the local cache can be read; if not, the initialization file can be downloaded from the address, and the downloaded initialization file can be read.
It is understood that when the version number of the initialization file in the address is the same as the version number of the initialization file cached locally, it means that the current initialization file cached locally is the latest version. At this time, the initialization file in the local cache is read, and the initialization file does not need to be downloaded again. Therefore, network resources can be saved, and the verification code display speed can be improved. When the version number of the initialization file in the address is different from the version number of the initialization file cached locally, it means that the initialization file is updated. At this time, the initialization file is downloaded from the address and the downloaded initialization file is read, thereby reading the latest version of the initialization file. Meanwhile, the execution main body can also cache the downloaded initialization file to replace the original cached initialization file, so that the next reading is facilitated.
In some optional implementation manners of this embodiment, names and addresses of script files corresponding to a plurality of types of the verification codes may also be recorded in the initialization file. Here, different types of captchas may correspond to different script files. Each script file has a name and an address. The script file can record operation instructions executed for different situations in the verification process. For example, an operation instruction for popping up a reminder box can be executed when the verification fails; executing a page jump instruction when the network request is in error, and the like. The address of the script file is recorded in the initialization file, but not the code of the script file, when the script file needs to be called, the script file is obtained through the address recorded in the initialization file, and therefore the code amount pre-stored by a calling party is reduced. Further, since the script file may have the same content (for example, a plurality of services may use the same type of authentication code, and thus the same script file needs to be used), recording the address of the script file in the initialization file instead of the code of the script file can reduce redundancy of the code. In the above implementation, the execution main body may take a script file corresponding to the type of the verification code recorded in the initialization file as a target script file during the process of reading the initialization file, and download a script file with a name of the target script file from an address of the target script file, so that a corresponding operation instruction may be executed during the verification process.
In the conventional method, each service party needs to know the name and address of the script file corresponding to the required verification code type in advance, so as to call the script file according to the name and address. When the script file is updated, the business party is required to update the corresponding version number, which results in heavy development burden and high communication cost for the business party. In the above implementation manner, since the name and address of the script file corresponding to each type of the identifying code are stored in the initialization file, and the read initialization file is the file of the latest version, the name and address of each script file in the initialization file are the latest version. Therefore, the business side can directly obtain the latest name and address of the needed script file, the development difficulty is reduced, and the communication cost is reduced.
Step 102, sending a verification code picture acquisition request.
In this embodiment, the execution subject may send an authentication code picture acquisition request to a server (e.g., an authentication code server) to acquire an authentication code picture. The verification code picture acquiring request may include the attribute information and the verification code type, so that the server acquires the verification code picture matched with the attribute information and the verification code type.
In practice, the server may first search for an initial captcha picture (e.g., a character-type captcha picture) matching the type of the captcha, and then may filter or adjust the initial captcha picture based on the attribute information (e.g., height and width), so as to return a captcha picture matching the attribute information.
Since the verification code picture returned by the server is matched with the attribute information in the initialization file, the terminal equipment is not required to perform operations such as size adjustment on the verification code picture.
In some optional implementation manners of this embodiment, the request for obtaining an authentication code picture may further include, in addition to the attribute information and the authentication code type, a service identifier for indicating a currently accessed service, so that the server verifies the validity of the service identifier. After the server receives the request for obtaining the verification code picture, if the service identifier is verified to be valid, the server may return a session identifier and corresponding configuration information (for example, page configuration required in the process of displaying the verification code picture) to the execution main body. The session identifier may be used to indicate and distinguish the authentication process. Each authentication process corresponds to a different session identity. After obtaining the session identifier and the configuration information, the execution main body may perform page configuration, send a picture acquisition request including the session identifier to the server, and then the server returns a verification code picture to the execution main body.
And 103, receiving the verification code picture matched with the attribute information and the verification code type.
In this embodiment, the execution body may receive a verification code picture matching the attribute information and the verification code type. Here, since the attribute information may include information such as the width and height of the verification code picture, matching with the attribute information means matching with the information such as the width and height set in the attribute information. In addition, the content of the verification code picture is different according to different verification code types. For example, a picture of the verification code matching a character-type verification code may include characters that require user identification. The verification code picture matched with the sliding verification code class can comprise a sliding block and a path along which the sliding block needs to slide.
And 104, displaying the verification code picture in the verification code display mode.
In this embodiment, the execution body may display the verification code picture in a verification code display manner recorded in the read initialization file.
As an example, when the verification code display mode is pop-up, a dialog box may be directly popped up, and the verification code picture may be displayed in the dialog box. As another example, when the above-mentioned manner of displaying the verification code is triggered, when a user triggers a certain operation (for example, the time for reading a certain page is longer than a preset time), a verification code picture can be stacked on the page. As another example, when the verification code is embedded, the verification code picture may be presented in the information currently browsed by the user.
In the method provided by the embodiment of the application, after detecting that the user executes the preset operation, reading the initialization file in which the attribute information of the verification code, the verification code type corresponding to the currently accessed service and the verification code showing mode are recorded; and then sending a picture acquisition request to obtain the verification code picture matched with the attribute information and the verification code type. And finally, displaying the verification code picture in a verification code display mode. Therefore, for different services, the verification code of the required type and the required presentation mode can be acquired only by setting the attribute information, the verification code type and the verification code presentation mode in the initialization file. In the process, codes of different types of verification codes and implementation codes for implementing different display modes are transparent to a calling party, and the codes for implementing the verification code function do not need to be preset for each service. Because a large amount of identical contents (for example, operation instructions executed under different conditions in the verification process) generally exist in codes for realizing the verification code functions of different services, the method provided by the embodiment only needs to set the contents such as attribute information, types and the like of the verification codes for each service, and does not need to write the codes for realizing the verification code functions for each service in the application, thereby reducing the redundancy of the codes.
With further reference to FIG. 2, a flow 200 of yet another embodiment of a captcha acquisition method is shown. The process 200 of the verification code obtaining method includes the following steps:
step 201, reading a preset initialization file when detecting that a user performs a preset operation.
In this embodiment, an execution subject (e.g., a terminal device) of the verification code acquisition method may call a pre-created initialization function to acquire an address of an initialization file in a case where it is detected that a user performs a preset operation. Here, the initialization function may be packaged with a method of acquiring an initialization address, and the execution body may execute the method by calling the initialization function, thereby acquiring an address of the initialization file. Then, the execution body may determine whether the version number of the initialization file in the address is the same as the version number of the initialization file cached locally. If the two files are the same, the initialization file in the local cache can be read; if not, the initialization file can be downloaded from the address, and the downloaded initialization file can be read.
In this embodiment, the initialization file may further record names and addresses of script files corresponding to a plurality of types of the verification codes. Here, different types of captchas may correspond to different script files. Each script file has a name and an address. The script file can record operation instructions executed for different situations in the verification process. For example, an operation instruction for popping up a reminder box can be executed when the verification fails; executing a page jump instruction when the network request is in error, and the like.
The execution main body may download a script file having a name of the target script file from an address of the target script file, using the script file corresponding to the type of the verification code recorded in the initialization file as the target script file, during the process of reading the initialization file, so that a corresponding operation instruction may be executed during the verification process.
In the conventional method, each service party needs to know the name and address of the script file corresponding to the required verification code type in advance, so as to call the script file according to the name and address. When the script file is updated, the business party is required to update the corresponding version number, which results in heavy development burden and high communication cost for the business party. In the above implementation manner, since the name and address of the script file corresponding to each type of the identifying code are stored in the initialization file, and the read initialization file is the file of the latest version, the name and address of each script file in the initialization file are the latest version. Therefore, the business side can directly obtain the latest name and address of the needed script file, the development difficulty is reduced, and the communication cost is reduced.
Step 202, sending an authentication code picture acquisition request.
In this embodiment, the execution subject may send an authentication code picture acquisition request to a server (e.g., an authentication code server) to acquire an authentication code picture. The verification code picture acquiring request may include the attribute information and the verification code type, so that the server acquires the verification code picture matched with the attribute information and the verification code type.
And step 203, receiving the verification code picture matched with the attribute information and the verification code type.
In this embodiment, the execution body may receive a verification code picture matching the attribute information and the verification code type. Here, since the attribute information may include information such as the width and height of the verification code picture, matching with the attribute information may include matching with the width and height set in the attribute information. In addition, the content of the verification code picture is different according to different verification code types. For example, a picture of the verification code matching a character-type verification code may include characters that require user identification. The verification code picture matched with the sliding verification code class can comprise a sliding block and a path along which the sliding block needs to slide.
Step 204, displaying the verification code picture in the verification code display mode.
In this embodiment, the execution body may display the verification code picture in a verification code display manner recorded in the read initialization file.
As an example, when the verification code display mode is pop-up, a dialog box may be directly popped up, and the verification code picture may be displayed in the dialog box. As another example, when the above-mentioned manner of displaying the verification code is triggered, when a user triggers a certain operation (for example, the time for reading a certain page is longer than a preset time), a verification code picture can be stacked on the page. As another example, when the verification code is embedded, the verification code picture may be presented in the information currently browsed by the user.
In response to detecting the authentication information fed back by the user, an authentication request containing the authentication information is sent, step 205.
In this embodiment, in response to detecting the authentication information fed back by the user, the execution main body may send an authentication request including the authentication information to the server (e.g., an authentication code server). Here, different types of authentication codes may have different forms of authentication information.
As an example, when the type of the captcha is a click captcha, the authentication information may be coordinates clicked by the user in the captcha picture. When the type of the authenticator is a character authenticator, the authentication information may be a character string input by the user. When the verification code type is the voice verification code, the verification information may be the user voice corresponding to the character string in the verification code picture.
In step 206, a verification result indicating whether the verification is passed is received.
In this embodiment, the execution subject may receive a verification result returned by the server and indicating whether the verification is passed.
Here, when the verification passes, a verification pass identifier for indicating that the verification passes may be included in the verification result. In time, the verification result after each verification pass contains different verification pass identifiers.
Step 207, sending the verification passing identifier to a service server providing the service for the service, so that the service server verifies whether the verification passing identifier is valid.
In this embodiment, the execution main body may send the verification-passing identifier to a service server that provides a service for the service, so that the service server verifies whether the verification-passing identifier is valid. Therefore, secondary verification can be performed, and the verification accuracy is improved.
As can be seen from fig. 2, compared with the embodiment corresponding to fig. 1, the flow 200 of the verification code obtaining method in this embodiment relates to a step of verifying the verification-passed identifier. Therefore, the scheme described in the embodiment can carry out two times of verification, and the verification accuracy is improved.
With further reference to fig. 3, as an implementation of the methods shown in the above-mentioned figures, the present application provides an embodiment of an apparatus for obtaining a verification code, where the embodiment of the apparatus corresponds to the embodiment of the method shown in fig. 1, and the apparatus may be specifically applied to various electronic devices.
As shown in fig. 3, the verification code obtaining apparatus 300 according to this embodiment includes: a reading unit 301, configured to read a preset initialization file when detecting that a user performs a preset operation, where attribute information of an authentication code, an authentication code type corresponding to a currently accessed service, and an authentication code display manner corresponding to the currently accessed service are recorded in the initialization file; a first sending unit 302 configured to send a verification code picture obtaining request, wherein the verification code picture obtaining request includes the attribute information and the verification code type; a first receiving unit 303 configured to receive a verification code picture matching the attribute information and the verification code type; the display unit 304 is configured to display the verification code picture in the verification code display manner.
In some optional implementation manners of this embodiment, the reading unit may further include an obtaining module, a determining module, a first reading module, and a second reading module. The acquisition module is configured to call a pre-created initialization function to acquire an address of an initialization file when detecting that a user executes a preset operation; a determining module configured to determine whether a version number of the initialization file in the address is the same as a version number of the initialization file cached locally; the first reading module is configured to read the initialization file in the local cache if the first reading module is configured to read the initialization file in the local cache; and the second reading module is configured to download the initialization file from the address and read the downloaded initialization file if the address is not the address.
In some optional implementation manners of this embodiment, names and addresses of script files corresponding to the types of the verification codes are further recorded in the initialization file, where the script files are recorded with operation instructions executed for different situations in the verification process; and the apparatus may further comprise: and a downloading unit configured to download a script file having a name of the target script file from an address of the target script file, using the script file corresponding to the type of the authentication code recorded in the initialization file as the target script file.
In some optional implementations of this embodiment, the apparatus may further include: a second transmitting unit configured to transmit an authentication request including the authentication information in response to detection of the authentication information fed back by the user; a second receiving unit configured to receive a verification result indicating whether the verification is passed.
In some optional implementation manners of this embodiment, when the verification passes, the verification result includes a verification passing identifier for indicating that the verification passes; and the apparatus may further comprise: and the verification unit is configured to send the verification passing identifier to a service server for providing service for the service, so that the service server verifies whether the verification passing identifier is valid.
In some optional implementation manners of this embodiment, the type of the verification code corresponding to the currently accessed service may be any of the following types: the service access method comprises the following steps of character verification code class, click verification code class, sliding verification code class, voice verification code class and gesture verification code class, wherein the verification code display mode corresponding to the currently accessed service can be any one of the following modes: pop-up, trigger, embedded.
In the apparatus provided in the foregoing embodiment of the present application, after the reading unit 301 detects that the user executes the preset operation, the initialization file in which the attribute information of the identifying code, the identifying code type corresponding to the currently accessed service, and the identifying code display mode are recorded is read; then, the first sending unit 302 sends a picture obtaining request, so that the first receiving unit 303 receives the verification code picture matched with the attribute information and the verification code type. Finally, the display unit 304 displays the verification code picture in the verification code display manner. Therefore, for different services, the verification code of the required type and the required presentation mode can be acquired only by setting the attribute information, the verification code type and the verification code presentation mode in the initialization file. The code for realizing the function of the verification code does not need to be set for each service, so that the redundancy of the code is reduced.
Referring now to FIG. 4, shown is a block diagram of a computer system 400 suitable for use in implementing the electronic device of an embodiment of the present application. The electronic device shown in fig. 4 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 4, the computer system 400 includes a Central Processing Unit (CPU)401 that can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)402 or a program loaded from a storage section 408 into a Random Access Memory (RAM) 403. In the RAM 403, various programs and data necessary for the operation of the system 400 are also stored. The CPU401, ROM 402, and RAM 403 are connected to each other via a bus 404. An input/output (I/O) interface 405 is also connected to bus 404.
The following components are connected to the I/O interface 405: an input section 406 including a keyboard, a mouse, and the like; an output section 407 including a display such as a Liquid Crystal Display (LCD) and a speaker; a storage section 408 including a hard disk and the like; and a communication section 409 including a network interface card such as a LAN card, a modem, or the like. The communication section 409 performs communication processing via a network such as the internet. A driver 410 is also connected to the I/O interface 405 as needed. A removable medium 411 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 410 as necessary, so that a computer program read out therefrom is mounted into the storage section 408 as necessary.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 409, and/or installed from the removable medium 411. The computer program performs the above-described functions defined in the method of the present application when executed by a Central Processing Unit (CPU) 401. It should be noted that the computer readable medium described herein can be a computer readable signal medium or a computer readable storage medium or any combination of the two. 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 of the computer readable storage medium may include, but are not limited to: 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 present application, 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. In this application, however, 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 many 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, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present application may be implemented by software or hardware. The units described may also be provided in a processor, where the names of the units do not in some cases constitute a limitation of the units themselves.
As another aspect, the present application also provides a computer-readable medium, which may be contained in the apparatus described in the above embodiments; or may be present separately and not assembled into the device. The computer readable medium carries one or more programs which, when executed by the apparatus, cause the apparatus to: under the condition that a user is detected to execute preset operation, reading a preset initialization file, wherein attribute information of a verification code, a verification code type corresponding to a currently accessed service and a verification code showing mode corresponding to the currently accessed service are recorded in the initialization file; sending a verification code picture acquisition request; receiving a verification code picture matched with the attribute information and the verification code type; and displaying the verification code picture in a verification code display mode.
The above description is only a preferred embodiment of the application and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention herein disclosed is not limited to the particular combination of features described above, but also encompasses other arrangements formed by any combination of the above features or their equivalents without departing from the spirit of the invention. For example, the above features may be replaced with (but not limited to) features having similar functions disclosed in the present application.

Claims (12)

1. A verification code obtaining method is applied to terminal equipment and comprises the following steps:
under the condition that a user is detected to execute preset operation, reading a preset initialization file, wherein attribute information of a verification code, a verification code type corresponding to a currently accessed service and a verification code showing mode corresponding to the currently accessed service are recorded in the initialization file; the initialization file also records the name and address of the script file corresponding to each verification code type;
taking a script file corresponding to the verification code type recorded in the initialization file as a target script file, and downloading the script file with the name of the target script file from the address of the target script file, wherein the script file records operation instructions executed aiming at different conditions in the verification process; a plurality of services adopting the same type of identifying code share the same script file;
sending a verification code picture acquisition request, wherein the verification code picture acquisition request comprises the attribute information and the verification code type;
receiving a verification code picture matched with the attribute information and the verification code type, wherein the verification code picture is returned by screening or adjusting the initial verification code picture;
and displaying the verification code picture in a verification code display mode.
2. The verification code obtaining method according to claim 1, wherein the reading a preset initialization file in a case where it is detected that a user performs a preset operation includes:
under the condition that a user is detected to execute preset operation, calling a pre-established initialization function to acquire an address of an initialization file;
determining whether the version number of the initialization file in the address is the same as the version number of the initialization file cached locally;
if yes, reading an initialization file in a local cache;
if not, downloading the initialization file from the address, and reading the downloaded initialization file.
3. The method for acquiring the verification code according to claim 1, wherein after the displaying the verification code picture in the verification code display manner, the method further comprises:
in response to detecting authentication information fed back by a user, sending an authentication request containing the authentication information;
receiving a verification result for indicating whether the verification is passed.
4. The verification code acquisition method according to claim 3, wherein, when the verification is passed, a verification pass identifier for indicating that the verification is passed is included in the verification result; and
after the receiving a verification result indicating whether the verification is passed, the method further comprises:
and sending the verification passing identifier to a service server for providing service for the service, so that the service server verifies whether the verification passing identifier is valid.
5. The method for acquiring the verification code according to one of claims 1 to 4, wherein the type of the verification code corresponding to the currently accessed service is any one of the following types: the service access method comprises the following steps of character identifying code class, click identifying code class, sliding identifying code class, voice identifying code class and gesture identifying code class, wherein the identifying code display mode corresponding to the currently accessed service is any one of the following modes: pop-up, trigger, embedded.
6. The utility model provides a verification code acquisition device which characterized in that, is applied to terminal equipment, includes:
the reading unit is configured to read a preset initialization file under the condition that a user is detected to execute a preset operation, wherein attribute information of a verification code, a verification code type corresponding to a currently accessed service and a verification code showing mode corresponding to the currently accessed service are recorded in the initialization file; the initialization file also records the name and address of the script file corresponding to each verification code type;
a downloading unit configured to take a script file corresponding to the type of the verification code recorded in the initialization file as a target script file, and download the script file with the name of the target script file from the address of the target script file, wherein the script file records operation instructions executed for different conditions in the verification process; a plurality of services adopting the same type of identifying code share the same script file;
a first sending unit configured to send a verification code picture acquisition request, wherein the verification code picture acquisition request includes the attribute information and the verification code type;
a first receiving unit configured to receive a verification code picture matched with the attribute information and the verification code type, wherein the verification code picture is returned by screening or adjusting an initial verification code picture;
and the display unit is configured to display the verification code picture in a verification code display mode.
7. The apparatus according to claim 6, wherein the reading unit includes:
the acquisition module is configured to call a pre-created initialization function to acquire an address of an initialization file under the condition that a user is detected to execute a preset operation;
a determining module configured to determine whether a version number of the initialization file in the address is the same as a version number of a locally cached initialization file;
the first reading module is configured to read the initialization file in the local cache if the first reading module is configured to read the initialization file in the local cache;
and the second reading module is configured to download the initialization file from the address and read the downloaded initialization file if the address is not the address.
8. The verification code acquisition apparatus according to claim 6, further comprising:
a second transmitting unit configured to transmit an authentication request including authentication information in response to detection of the authentication information fed back by the user;
a second receiving unit configured to receive a verification result indicating whether the verification is passed.
9. The verification code obtaining device according to claim 8, wherein, when the verification is passed, a verification pass identifier for indicating that the verification is passed is included in the verification result; and
the device further comprises:
a verification unit configured to send the verification-passing identifier to a service server serving the service, so that the service server verifies whether the verification-passing identifier is valid.
10. The apparatus according to any one of claims 6 to 9, wherein the type of the authenticator corresponding to the currently accessed service is any one of the following types: the service access method comprises the following steps of character identifying code class, click identifying code class, sliding identifying code class, voice identifying code class and gesture identifying code class, wherein the identifying code display mode corresponding to the currently accessed service is any one of the following modes: pop-up, trigger, embedded.
11. An electronic device, comprising:
one or more processors;
a storage device having one or more programs stored thereon,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-5.
12. A computer-readable medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-5.
CN201910596712.7A 2019-07-02 2019-07-02 Verification code obtaining method and device, electronic equipment and computer readable medium Active CN110427745B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910596712.7A CN110427745B (en) 2019-07-02 2019-07-02 Verification code obtaining method and device, electronic equipment and computer readable medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910596712.7A CN110427745B (en) 2019-07-02 2019-07-02 Verification code obtaining method and device, electronic equipment and computer readable medium

Publications (2)

Publication Number Publication Date
CN110427745A CN110427745A (en) 2019-11-08
CN110427745B true CN110427745B (en) 2022-03-08

Family

ID=68410222

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910596712.7A Active CN110427745B (en) 2019-07-02 2019-07-02 Verification code obtaining method and device, electronic equipment and computer readable medium

Country Status (1)

Country Link
CN (1) CN110427745B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111078437B (en) * 2019-12-24 2023-07-14 五八有限公司 Remote calling method and device for verification codes, electronic equipment and readable storage medium

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101674353A (en) * 2009-09-24 2010-03-17 旭丽电子(广州)有限公司 Incoming call filter method
CN102255913A (en) * 2011-07-14 2011-11-23 北京百度网讯科技有限公司 Verification-security-level-based audio verification code provision method and equipment
CN102315955A (en) * 2010-06-30 2012-01-11 上海薄荷信息科技有限公司 Control method for setting obstruction for junk information and corresponding control device
CN102360505A (en) * 2011-08-16 2012-02-22 北京新媒传信科技有限公司 Graphical verification code generation method
CN102831568A (en) * 2012-08-03 2012-12-19 网易(杭州)网络有限公司 Method and device for generating verification code picture
CN103475483A (en) * 2013-09-10 2013-12-25 北京思特奇信息技术股份有限公司 Method and system for verification code service based on cloud service
CN104200140A (en) * 2014-09-28 2014-12-10 北京奇虎科技有限公司 Method and device providing verification code
CN105095726A (en) * 2014-05-08 2015-11-25 阿里巴巴集团控股有限公司 Method and device for generating verification code
CN106713241A (en) * 2015-11-16 2017-05-24 腾讯科技(深圳)有限公司 Identity verification method, device and system
CN106790199A (en) * 2016-12-31 2017-05-31 中国移动通信集团江苏有限公司 Identifying code processing method and processing device
CN107017989A (en) * 2015-09-29 2017-08-04 弗里塞恩公司 The generation of domain name operation demonstration code and/or checking
CN107315958A (en) * 2016-04-26 2017-11-03 北京京东尚科信息技术有限公司 The legality identification method and device of data object
CN107395647A (en) * 2017-09-05 2017-11-24 北京京东尚科信息技术有限公司 Checking system, method and apparatus
CN108989269A (en) * 2017-06-02 2018-12-11 阿里巴巴集团控股有限公司 Obtain the methods, devices and systems of identifying code

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104243155B (en) * 2013-06-18 2019-01-22 腾讯科技(深圳)有限公司 The method and device of safety verification
CN105553940A (en) * 2015-12-09 2016-05-04 北京中科云集科技有限公司 Safety protection method based on big data processing platform
CN107341384A (en) * 2016-04-28 2017-11-10 苏宁云商集团股份有限公司 A kind of service verification method and system
CN107193476B (en) * 2017-05-10 2020-08-28 北京百度网讯科技有限公司 Information input method and device, computer equipment and readable medium

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101674353A (en) * 2009-09-24 2010-03-17 旭丽电子(广州)有限公司 Incoming call filter method
CN102315955A (en) * 2010-06-30 2012-01-11 上海薄荷信息科技有限公司 Control method for setting obstruction for junk information and corresponding control device
CN102255913A (en) * 2011-07-14 2011-11-23 北京百度网讯科技有限公司 Verification-security-level-based audio verification code provision method and equipment
CN102360505A (en) * 2011-08-16 2012-02-22 北京新媒传信科技有限公司 Graphical verification code generation method
CN102831568A (en) * 2012-08-03 2012-12-19 网易(杭州)网络有限公司 Method and device for generating verification code picture
CN103475483A (en) * 2013-09-10 2013-12-25 北京思特奇信息技术股份有限公司 Method and system for verification code service based on cloud service
CN105095726A (en) * 2014-05-08 2015-11-25 阿里巴巴集团控股有限公司 Method and device for generating verification code
CN104200140A (en) * 2014-09-28 2014-12-10 北京奇虎科技有限公司 Method and device providing verification code
CN107017989A (en) * 2015-09-29 2017-08-04 弗里塞恩公司 The generation of domain name operation demonstration code and/or checking
CN106713241A (en) * 2015-11-16 2017-05-24 腾讯科技(深圳)有限公司 Identity verification method, device and system
CN107315958A (en) * 2016-04-26 2017-11-03 北京京东尚科信息技术有限公司 The legality identification method and device of data object
CN106790199A (en) * 2016-12-31 2017-05-31 中国移动通信集团江苏有限公司 Identifying code processing method and processing device
CN108989269A (en) * 2017-06-02 2018-12-11 阿里巴巴集团控股有限公司 Obtain the methods, devices and systems of identifying code
CN107395647A (en) * 2017-09-05 2017-11-24 北京京东尚科信息技术有限公司 Checking system, method and apparatus

Also Published As

Publication number Publication date
CN110427745A (en) 2019-11-08

Similar Documents

Publication Publication Date Title
US10880287B2 (en) Out of box experience application API integration
EP3085050B1 (en) Privileged static hosted web applications
US9135445B2 (en) Providing information about a web application or extension offered by website based on information about the application or extension gathered from a trusted site
US20200328932A1 (en) Timestamp-based matching of identifiers
US9762598B1 (en) Automatic dynamic vetting of browser extensions and web applications
US8935755B1 (en) Managing permissions and capabilities of web applications and browser extensions based on install location
US20150378714A1 (en) Providing Context-Specific Software Updates to Client Applications
US10776444B1 (en) Methods and systems for universal deep linking across web and mobile applications
US11704373B2 (en) Methods and systems for generating custom content using universal deep linking across web and mobile applications
US11106754B1 (en) Methods and systems for hyperlinking user-specific content on a website or mobile applications
CN108958711B (en) Method and device for realizing interface platform
US20160359989A1 (en) Recording And Triggering Web And Native Mobile Application Events With Mapped Data Fields
CN113938886B (en) Identity authentication platform testing method, device, equipment and storage medium
US11004054B2 (en) Updating account data for multiple account providers
US20140173693A1 (en) Cookie Optimization
US9355269B2 (en) Method and system for managing uniquely identifiable bookmarklets
CN110311972B (en) Detection method, device, equipment and medium for application software distribution
CN108959642A (en) Method and apparatus for information to be written
CN110427745B (en) Verification code obtaining method and device, electronic equipment and computer readable medium
CN110855718B (en) Enterprise user registration method and device, electronic equipment and computer readable medium
US20230195999A1 (en) Cross-domain storage for browsers
US9965744B1 (en) Automatic dynamic vetting of browser extensions and web applications
CN112083982A (en) Information processing method and device
CN113329028A (en) Cross-domain access method and device
CN112787989B (en) Signature method and device

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
GR01 Patent grant
GR01 Patent grant