CN112395584A - Verification mode switching method and device, computer equipment and storage medium - Google Patents
Verification mode switching method and device, computer equipment and storage medium Download PDFInfo
- Publication number
- CN112395584A CN112395584A CN202011362383.9A CN202011362383A CN112395584A CN 112395584 A CN112395584 A CN 112395584A CN 202011362383 A CN202011362383 A CN 202011362383A CN 112395584 A CN112395584 A CN 112395584A
- Authority
- CN
- China
- Prior art keywords
- verification
- parameter
- mode
- parameter value
- code
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/30—Authentication, i.e. establishing the identity or authorisation of security principals
- G06F21/31—User authentication
- G06F21/36—User authentication by graphic or iconic representation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/30—Authentication, i.e. establishing the identity or authorisation of security principals
- G06F21/305—Authentication, i.e. establishing the identity or authorisation of security principals by remotely controlling device operation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/64—Protecting data integrity, e.g. using checksums, certificates or signatures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2221/00—Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F2221/21—Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F2221/2133—Verifying human interaction, e.g., Captcha
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Health & Medical Sciences (AREA)
- Bioethics (AREA)
- General Health & Medical Sciences (AREA)
- Telephone Function (AREA)
Abstract
The invention discloses a switching method of verification modes, which is applied to the technical field of computers and is used for solving the problems that the traditional verification mode is complex in switching logic, so that the code quantity is large and excessive network resources are occupied. The method provided by the invention comprises the following steps: when receiving a verification code of an initial verification mode input by a user, verifying the verification code; when the verification of the verification code fails, receiving the verification code of the initial verification mode input by the user again and verifying the verification code; determining a parameter value of a verification parameter transmitted through a back-parameter interface according to the number of times of continuous verification errors of the verification code, and sending the changed parameter value of the verification parameter to a server through the back-parameter interface when the parameter value changes; receiving a verification instruction of a second verification mode returned by the server; and updating the second verification mode into an initial verification mode according to the verification instruction, and circularly verifying the verification code input by the user until a preset condition for stopping verification is met.
Description
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and an apparatus for switching authentication modes, a computer device, and a storage medium.
Background
At present, verification codes are needed to be used by a plurality of applications on a mobile terminal, for example, APP applications on an Android system need to have the verification codes to log in, or the APP applications need to have the functions of obtaining the verification codes, in order to prevent malicious software from refreshing the verification codes, safety verification can be conducted on the verification codes, when the number of times of refreshing the verification codes reaches a specified number, verification needs to be conducted through the graphic verification codes, when the verification passes, it is confirmed that the malicious software does not exist at present, and the application belongs to the normal operation range of users.
Based on the malicious anti-brush logic, the design principle of the current scheme is that a server provides an interface for acquiring the verification code and an interface for acquiring the graphic verification code, and a client calls different interfaces to acquire the corresponding verification code. When the number of times of the information returned by the common verification code interface reaches the upper limit, the client calls the graphic verification code interface to acquire the graphic, and then calls the common verification code interface to realize the interactive logic after the graphic is verified.
The design has the defects that a plurality of verification code interfaces are required to be provided, the logic of the client is complex, the code amount is relatively large, the network request times are also large, and the design is not suitable for the condition that a large number of users need to verify through the verification codes.
Disclosure of Invention
The embodiment of the invention provides a verification mode switching method and device, computer equipment and a storage medium, and aims to solve the technical problems that the existing verification mode switching logic is complex, so that the code amount is large and excessive network resources are occupied.
A switching method of verification modes is applied to terminal equipment and comprises the following steps:
when receiving a verification code of an initial verification mode input by a user, verifying the verification code;
when the verification of the verification code fails, receiving the verification code of the initial verification mode input by the user again and verifying the verification code;
determining a parameter value of a verification parameter transmitted through a back-parameter interface according to the number of times of continuous verification errors of the verification code, and sending the changed parameter value of the verification parameter to a server through the back-parameter interface when the parameter value changes;
receiving a verification instruction of a second verification mode returned by the server according to the parameter value;
and updating the second verification mode to the initial verification mode according to the verification instruction, and circulating the steps of verifying the verification code input by the user to update the second verification mode to the initial verification mode according to the verification instruction until a preset condition for stopping verification is met.
A switching method of verification modes is applied to a server and comprises the following steps:
receiving a parameter value of a verification parameter sent by terminal equipment through a parameter access interface;
determining the value of the verification parameter in the access interface according to the received parameter value;
acquiring a second verification mode mapped with the value of the verification parameter in the access interface;
and sending a verification instruction which is verified through the second verification mode to the terminal equipment, so that the terminal equipment updates the second verification mode into the initial verification mode according to the verification instruction.
A first switching device of an authentication method, comprising:
the first verification module is used for verifying the verification code when the verification code of the initial verification mode input by a user is received;
the second verification module is used for receiving the verification code of the initial verification mode input by the user again and verifying the verification code when the verification of the verification code fails;
the parameter sending module is used for determining the parameter value of the verification parameter transmitted through the back parameter interface according to the number of the continuous verification errors of the verification code, and sending the changed parameter value of the verification parameter to the server through the back parameter interface when the parameter value changes;
the instruction receiving module is used for receiving a verification instruction of a second verification mode returned by the server according to the parameter value;
and the updating module is used for updating the second verification mode to the initial verification mode according to the verification instruction, and circularly verifying the verification code input by the user to update the second verification mode to the initial verification mode according to the verification instruction until a preset condition for stopping verification is met.
A second switching device of an authentication method, comprising:
the parameter receiving module is used for receiving the parameter value of the verification parameter sent by the terminal equipment through the parameter input interface;
a value determination module, configured to determine a value of the verification parameter in the access interface according to the received parameter value;
the mapping module is used for acquiring a second verification mode mapped with the selected value of the verification parameter in the access interface;
and the instruction sending module is used for sending a verification instruction which is verified through the second verification mode to the terminal equipment, so that the terminal equipment can update the second verification mode into the initial verification mode according to the verification instruction.
A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the steps of the method for switching between authentication modes when executing the computer program.
A computer-readable storage medium, which stores a computer program that, when executed by a processor, implements the steps of the above-described authentication mode switching method.
The switching method, the device, the computer equipment and the storage medium of the verification mode provided by the invention continuously verify the verification code input by a user, determine the parameter value of the verification parameter transmitted by the back parameter interface according to the continuous verification error times of the verification code, send the changed parameter value of the verification parameter to the server through the back parameter interface when the parameter value changes, update the initial verification mode through the received verification instruction of the second verification mode returned by the server according to the parameter value, realize the switching of the verification mode only through one back parameter interface without making a large amount of logic judgment and switching and calling various verification code interfaces in the process of switching the verification request mode, greatly reduce the code amount, and only when the parameter value changes in the network interaction with the server, the changed parameter values are sent to the server to request for switching of verification modes, instead of interacting with the server when a user inputs a verification code once, so that the request pressure of the server is reduced, the network request times are reduced, the electric quantity of the mobile phone and the network are optimized to a certain extent, and the effect of saving network resources becomes obvious in a scene that a large number of users need to verify the verification codes.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments of the present invention will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without inventive labor.
Fig. 1 is a schematic diagram of an application environment of a method for switching authentication modes according to an embodiment of the present invention;
fig. 2 is a flowchart of a handover method of the authentication method applied to the terminal device according to an embodiment of the present invention;
FIG. 3 is a flowchart of a method for switching authentication modes applied to a server according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a first switching device in an authentication mode according to an embodiment of the present invention;
FIG. 5 is a schematic structural diagram of a second switching device of an authentication mode according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of a computer device in accordance with an embodiment of the present invention;
FIG. 7 is a schematic diagram of another computer apparatus in an embodiment of the invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The switching method of the verification mode provided by the application can be applied to the application environment shown in fig. 1, wherein the terminal device communicates with the server through the network. The terminal devices include, but are not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices. The server may be implemented as a stand-alone server or as a server cluster consisting of a plurality of servers.
In an embodiment, as shown in fig. 2, a method for switching an authentication mode is provided, which is described by taking the method as an example applied to the terminal device in fig. 1, and includes the following steps S101 to S105.
S101, when the verification code of the initial verification mode input by the user is received, the verification code is verified.
In one embodiment, the initial verification mode may be a default verification mode for the user to verify for the first time, including but not limited to verification by a digital verification code, verification by an alphabetic verification code, verification by mixed characters, and the like; in other embodiments, the initial verification may also be an updated verification manner according to a verification instruction sent by the server, and the updated initial verification manner may be, for example, verification by a graphic verification code, verification by a short message verification code, and the like.
And S102, when the verification of the verification code fails, receiving the verification code of the initial verification mode input by the user again and verifying the verification code.
The condition that the verification of the verification code fails includes, but is not limited to, that the verification code input by the user is different from the verification code displayed on the page, or that the verification code input by the user is different from the verification code sent to the mobile phone short message of the user.
S103, determining the parameter value of the verification parameter transmitted through the back parameter interface according to the number of the continuous verification errors of the verification code, and sending the changed parameter value of the verification parameter to the server through the back parameter interface when the parameter value changes.
In one embodiment, the back-reference interface passes an authentication parameter such as isImage.
The parameter value of the verification parameter can be set to correspond to a certain interval of the continuous failure times, when different continuous failure times are in the same interval, the parameter value of the corresponding verification parameter is the same, and when different continuous failure times are in different intervals, the parameter value of the corresponding verification parameter is different.
Further, the step of determining the parameter value of the verification parameter transmitted through the back reference interface according to the number of the verification code continuous check errors in the step includes:
determining the number of times of continuous verification errors of the verification code;
and determining the parameter value of the verification parameter according to the mapping relation between the times of the continuous verification errors and the parameter value.
In one embodiment, the mapping relationship between the number of consecutive verification errors and the parameter value is, for example:
0-5 times: false;
6-10 times: true.
Optionally, the step of determining the parameter value of the verification parameter according to the mapping relationship between the number of consecutive verification errors and the parameter value includes:
judging whether the number of continuous verification errors of the verification code is within a preset first threshold range, if so, determining the parameter value of the verification parameter as false;
and judging whether the number of times of continuous verification errors of the verification code is within a preset second threshold range, and if so, determining that the parameter value of the verification parameter is true.
Wherein the first threshold range is, for example, 0-5 times, and the second threshold range is, for example, 6-10 times.
And S104, receiving a verification instruction of a second verification mode returned by the server according to the parameter value.
Further, the step S104 specifically includes:
when the parameter value of the verification parameter is false, receiving a verification instruction of character verification returned by the server according to the parameter value;
and when the parameter value of the verification parameter is true, receiving a verification instruction of the graph verification returned by the server according to the parameter value.
And S105, updating the second verification mode to the initial verification mode according to the verification instruction, and circulating the steps from verification of the verification code input by the user to updating the second verification mode to the initial verification mode according to the verification instruction until a preset condition for stopping verification is met.
In one embodiment, when the verification mode indicated by the verification instruction is character verification, the home terminal displays a common verification code interface, and a user can verify through a digital or alphabetical verification mode; and when the verification mode indicated by the verification instruction is graphical verification, the home terminal is used for the user to verify through a graphical verification interface displaying the response.
In one embodiment, the preset condition for stopping verification includes but is not limited to:
verifying that the verification code of the initial verification mode input by the user passes;
the number of continuous verification errors of the verification code exceeds a preset maximum value;
and receiving the verification code of the initial verification mode, which is not input by the user.
According to a usage scenario of this embodiment, for example, when the number of times of consecutive verification errors of the verification code is within five times, it is determined that a parameter value of the verification parameter is false; and when the number of the continuous verification errors of the verification code is within six to ten, determining that the parameter value of the verification parameter is true, and when the number of the continuous verification errors of the verification code is more than ten, judging that the condition of stopping verification is met.
The switching method of the verification mode applied to the terminal equipment provided by the embodiment transmits the request information for switching the verification mode to the server through different parameter values of the verification parameters in a back-reference interface, does not need to make a great deal of logic judgment in the process of switching the verification request mode, does not need to switch and call various verification code interfaces, can realize the switching of the verification mode only through one back-reference interface, greatly reduces the code amount, only needs to send the changed parameter values to the server to request the switching of the verification mode when the parameter values are changed in the network interaction with the server instead of interacting with the server when a user inputs the verification code once, reduces the request pressure of the server, reduces the network request times, optimizes the electric quantity of a mobile phone and the network to a certain extent, and in a scene that a large number of users need to verify the verification code, the effect of saving network resources becomes obvious.
In an embodiment, as shown in fig. 3, a method for switching authentication modes is provided, which is described by taking the method as an example applied to the server in fig. 1, and includes the following steps S301 to S304.
S301, receiving parameter values of the verification parameters sent by the terminal equipment through the parameter access interface.
In one embodiment, the parameter values of the verification parameters include, but are not limited to, true and false. In other embodiments, the parameter value of the verification parameter may also be a number, a character, or the like.
S302, determining the value of the verification parameter in the access interface according to the received parameter value.
In one embodiment, the verification parameters in the parameter entry interface are the same as the verification parameters used by the parameter reversal interface in the terminal device for transmission, and are isImage, and the verification parameters of the parameter reversal interface in the terminal device are used for transmitting the parameter values to the verification parameters of the parameter entry interface in the server through the network.
S303, acquiring a second verification mode mapped with the verification parameter value in the access interface.
Further, step S303 specifically includes:
when the parameter value of the verification parameter is false, acquiring a character verification mode corresponding to the value of the verification parameter;
and when the parameter value of the verification parameter is true, acquiring a graph verification mode corresponding to the value of the verification parameter.
S304, sending a verification instruction which is verified through the second verification mode to the terminal equipment, so that the terminal equipment updates the second verification mode to the initial verification mode according to the verification instruction.
In one embodiment, the second verification method includes, but is not limited to, verification by a numeric verification code, verification by an alphabetic verification code, verification by a mixed character, verification by a graphic verification code, verification by a short message verification code, and the like.
According to the switching method of the verification mode applied to the server, by matching with the switching method of the verification mode applied to the terminal equipment, the request information of the verification mode can be switched by only one access interface at the server, the workload of designing and developing the interface at the server is reduced, only one interface needs to be developed, the follow-up maintenance and the expansion are more convenient, which verification mode is returned is controlled by the parameter value of the verification parameter, the terminal equipment can display the corresponding verification code combination interface according to the corresponding verification mode, and the design and the development are more flexible.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
In an embodiment, a first switching device of an authentication method is provided, where the first switching device of the authentication method is in one-to-one correspondence with the switching method of the authentication method applied to the terminal device in the foregoing embodiment. As shown in fig. 4, the first switching device 100 of the verification method includes a first verification module 11, a second verification module 12, a parameter sending module 13, an instruction receiving module 14, and an updating module 15. The functional modules are explained in detail as follows:
the first verification module 11 is configured to verify a verification code of an initial verification manner, which is input by a user, when the verification code is received;
the second verification module 12 is configured to receive the verification code of the initial verification method input by the user again and perform verification when the verification of the verification code fails;
the parameter sending module 13 is configured to determine a parameter value of the verification parameter transmitted through the anti-reference interface according to the number of times of the continuous verification error of the verification code, and send the changed parameter value of the verification parameter to the server through the anti-reference interface when the parameter value changes;
the instruction receiving module 14 is configured to receive a verification instruction of the second verification manner returned by the server according to the parameter value;
and the updating module 15 is configured to update the second verification manner to the initial verification manner according to the verification instruction, and circulate the step of verifying the verification code input by the user to update the second verification manner to the initial verification manner according to the verification instruction until a preset condition for stopping verification is met.
In one embodiment, the parameter sending module 13 further includes:
the number determining module is used for determining the number of continuous verification errors of the verification code;
and the parameter value determining module is used for determining the parameter value of the verification parameter according to the mapping relation between the times of the continuous verification errors and the parameter value.
Further, the parameter value determining module specifically includes:
the first judging unit is used for judging whether the number of times of continuous verification errors of the verification code is within a preset first threshold range, and if so, determining that the parameter value of the verification parameter is false;
and the second judging unit is used for judging whether the number of times of continuous verification errors of the verification code is within a preset second threshold range, and if so, determining that the parameter value of the verification parameter is true.
Further, the instruction receiving module 14 specifically includes:
a first instruction receiving unit, configured to receive, when a parameter value of the verification parameter is false, a verification instruction for character verification returned by the server according to the parameter value;
and the second instruction receiving unit is used for receiving the verification instruction of the graphic verification returned by the server according to the parameter value when the parameter value of the verification parameter is true.
Wherein the meaning of "first" and "second" in the above modules/units is only to distinguish different modules/units, and is not used to define which module/unit has higher priority or other defining meaning. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or modules is not necessarily limited to those steps or modules explicitly listed, but may include other steps or modules not explicitly listed or inherent to such process, method, article, or apparatus, and such that a division of modules presented in this application is merely a logical division and may be implemented in a practical application in a further manner.
For the specific limitation of the first switching device of the authentication manner, reference may be made to the above limitation on the switching method of the authentication manner applied to the terminal device, and details are not described herein again. The modules in the first switching device of the above-described authentication manner may be implemented in whole or in part by software, hardware, and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a terminal device, and its internal structure diagram may be as shown in fig. 6. The computer device includes a processor, a memory, a network interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The network interface of the computer device is used for communicating with an external server through a network connection. The computer program is executed by a processor to implement a handover method of an authentication scheme applied to a terminal device.
In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, which when executed by a processor implements the steps of the method for switching authentication modes applied to a terminal device in the above-described embodiments, such as the steps 101 to 105 shown in fig. 2 and extensions of other extensions and related steps of the method. Alternatively, the computer program, when executed by the processor, implements the functions of the modules/units of the first switching device in the authentication manner in the above-described embodiments, such as the functions of the modules 11 to 15 shown in fig. 4. To avoid repetition, further description is omitted here.
In an embodiment, a second switching device of the authentication method is provided, and the second switching device of the authentication method is in one-to-one correspondence with the switching method of the authentication method applied to the server in the above embodiment. As shown in fig. 5, the second switching device 200 of the verification method includes a parameter receiving module 21, a value determining module 22, a mapping module 23, and an instruction sending module 24. The functional modules are explained in detail as follows:
the parameter receiving module 21 is configured to receive a parameter value of a verification parameter sent by the terminal device through the parameter entry interface;
a value determining module 22, configured to determine a value of the verification parameter in the access interface according to the received parameter value;
the mapping module 23 is configured to obtain a second verification manner mapped with the value of the verification parameter in the reference interface;
the instruction sending module 24 is configured to send a verification instruction for performing verification in the second verification manner to the terminal device, so that the terminal device updates the second verification manner to the initial verification manner according to the verification instruction.
In one embodiment, the mapping module 23 further includes:
a character verification mode obtaining unit, configured to obtain a character verification mode corresponding to a value of the verification parameter when the parameter value of the verification parameter is false;
and the figure verification mode acquisition unit is used for acquiring the figure verification mode corresponding to the value of the verification parameter when the parameter value of the verification parameter is true.
In one embodiment, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 7. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer device is used for storing data involved in the switching method of the verification mode applied to the server. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a handover method of an authentication scheme applied to a server.
In one embodiment, a computer device is provided, which may be a server, and includes a memory, a processor and a computer program stored on the memory and executable on the processor, and when the processor executes the computer program, the processor implements the steps of the method for switching the authentication mode applied to the server in the above embodiments, such as steps 301 to 304 and other extensions of the method and extensions of related steps shown in fig. 3. Alternatively, the processor, when executing the computer program, implements the functions of the modules/units of the second switching device of the authentication method in the above-described embodiment, for example, the functions of the modules 21 to 24 shown in fig. 5. To avoid repetition, further description is omitted here.
The Processor may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, etc. The general purpose processor may be a microprocessor or the processor may be any conventional processor or the like which is the control center for the computer device and which connects the various parts of the overall computer device using various interfaces and lines.
The memory may be used to store the computer programs and/or modules, and the processor may implement various functions of the computer device by running or executing the computer programs and/or modules stored in the memory and invoking data stored in the memory. The memory may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, video data, etc.) created according to the use of the cellular phone, etc.
The memory may be integrated in the processor or may be provided separately from the processor.
In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, which when executed by a processor implements the steps of the authentication mode switching method applied to the server in the above-described embodiments, such as the steps 301 to 304 shown in fig. 3 and extensions of other extensions and related steps of the method. Alternatively, the computer program, when executed by the processor, implements the functions of the modules/units of the second switching device of the authentication method in the above-described embodiment, for example, the functions of the modules 21 to 24 shown in fig. 5. To avoid repetition, further description is omitted here.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The method, apparatus, computer device and storage medium for switching validation modes provided in this embodiment continuously verify a validation code input by a user, determine a parameter value of a validation parameter transmitted through a back-reference interface according to the number of continuous verification errors of the validation code, and when the parameter value changes, send the changed parameter value of the validation parameter to a server through the back-reference interface, update the initial validation mode through a received validation instruction of a second validation mode returned by the server according to the parameter value, do not need to make a large number of logic judgments in the process of switching validation request modes, and switch and call various validation code interfaces, and can realize the switching of validation modes only through one back-reference interface, thereby greatly reducing the code amount, and in network interaction with the server, only when the parameter value changes, the changed parameter values are sent to the server to request for switching of verification modes, instead of interacting with the server when a user inputs a verification code once, so that the request pressure of the server is reduced, the network request times are reduced, the electric quantity of the mobile phone and the network are optimized to a certain extent, and the effect of saving network resources becomes obvious in a scene that a large number of users need to verify the verification codes.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present invention, and are intended to be included within the scope of the present invention.
Claims (10)
1. A switching method of verification modes is applied to terminal equipment and is characterized by comprising the following steps:
when receiving a verification code of an initial verification mode input by a user, verifying the verification code;
when the verification of the verification code fails, receiving the verification code of the initial verification mode input by the user again and verifying the verification code;
determining a parameter value of a verification parameter transmitted through a back-parameter interface according to the number of times of continuous verification errors of the verification code, and sending the changed parameter value of the verification parameter to a server through the back-parameter interface when the parameter value changes;
receiving a verification instruction of a second verification mode returned by the server according to the parameter value;
and updating the second verification mode to the initial verification mode according to the verification instruction, and circularly verifying the verification code input by the user to update the second verification mode to the initial verification mode according to the verification instruction until a preset condition for stopping verification is met.
2. The method according to claim 1, wherein the step of determining the parameter value of the verification parameter transmitted through the anti-reference interface according to the number of the verification code continuously checking errors comprises:
determining the number of times of continuous verification errors of the verification code;
and determining the parameter value of the verification parameter according to the mapping relation between the times of the continuous verification errors and the parameter value.
3. The method according to claim 2, wherein the step of determining the parameter value of the verification parameter according to the mapping relationship between the number of consecutive verification errors and the parameter value comprises:
judging whether the number of continuous verification errors of the verification code is within a preset first threshold range, if so, determining that the parameter value of the verification parameter is false;
and judging whether the number of times of continuous verification errors of the verification code is within a preset second threshold range, and if so, determining that the parameter value of the verification parameter is true.
4. The method for switching authentication modes according to claim 1, wherein the step of receiving the authentication instruction of the second authentication mode returned by the server according to the parameter value comprises:
when the parameter value of the verification parameter is false, receiving a verification instruction of character verification returned by the server according to the parameter value;
and when the parameter value of the verification parameter is true, receiving a verification instruction of the graphic verification returned by the server according to the parameter value.
5. A switching method of verification modes is applied to a server, and is characterized by comprising the following steps:
receiving a parameter value of a verification parameter sent by terminal equipment through a parameter access interface;
determining the value of the verification parameter in the access interface according to the received parameter value;
acquiring a second verification mode mapped with the selected value of the verification parameter in the access interface;
and sending a verification instruction which is verified through the second verification mode to the terminal equipment, so that the terminal equipment updates the second verification mode to an initial verification mode according to the verification instruction.
6. The authentication mode switching method according to claim 5, wherein the step of obtaining the second authentication mode mapped to the extracted value of the authentication parameter in the participating interface comprises:
when the parameter value of the verification parameter is false, acquiring a character verification mode corresponding to the value of the verification parameter;
and when the parameter value of the verification parameter is true, acquiring a graph verification mode corresponding to the value of the verification parameter.
7. A first switching apparatus of an authentication method, comprising:
the first verification module is used for verifying the verification code when the verification code of the initial verification mode input by a user is received;
the second verification module is used for receiving the verification code of the initial verification mode input by the user again and verifying the verification code when the verification of the verification code fails;
the parameter sending module is used for determining a parameter value of the verification parameter transmitted through the back parameter interface according to the number of times of continuous verification errors of the verification code, and sending the changed parameter value of the verification parameter to the server through the back parameter interface when the parameter value changes;
the instruction receiving module is used for receiving a verification instruction of a second verification mode returned by the server according to the parameter value;
and the updating module is used for updating the second verification mode to the initial verification mode according to the verification instruction, and circularly verifying the verification code input by the user to update the second verification mode to the initial verification mode according to the verification instruction until a preset condition for stopping verification is met.
8. A second switching apparatus of an authentication method, comprising:
the parameter receiving module is used for receiving the parameter value of the verification parameter sent by the terminal equipment through the parameter input interface;
a value determination module, configured to determine a value of the verification parameter in the access interface according to the received parameter value;
the mapping module is used for acquiring a second verification mode mapped with the selected value of the verification parameter in the access interface;
and the instruction sending module is used for sending a verification instruction which is verified through the second verification mode to the terminal equipment, so that the terminal equipment can update the second verification mode to an initial verification mode according to the verification instruction.
9. A computer arrangement comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the method for switching authentication modes according to any one of claims 1 to 6 when executing the computer program.
10. A computer-readable storage medium, in which a computer program is stored, which, when being executed by a processor, carries out the steps of the method for switching authentication modes according to any one of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011362383.9A CN112395584A (en) | 2020-11-27 | 2020-11-27 | Verification mode switching method and device, computer equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011362383.9A CN112395584A (en) | 2020-11-27 | 2020-11-27 | Verification mode switching method and device, computer equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112395584A true CN112395584A (en) | 2021-02-23 |
Family
ID=74604643
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011362383.9A Pending CN112395584A (en) | 2020-11-27 | 2020-11-27 | Verification mode switching method and device, computer equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112395584A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113687635A (en) * | 2021-08-23 | 2021-11-23 | 明度智云(浙江)科技有限公司 | Method, system and storage medium for managing state of equipment based on complete object |
CN113992373A (en) * | 2021-10-20 | 2022-01-28 | 平安普惠企业管理有限公司 | Verification method and device based on verification code, computer equipment and storage medium |
CN114257451A (en) * | 2021-12-22 | 2022-03-29 | 广州品唯软件有限公司 | Verification interface replacing method and device, storage medium and computer equipment |
CN117234996A (en) * | 2023-11-10 | 2023-12-15 | 广州翼辉信息技术有限公司 | Automatic calibration method for communication between GMAC and FPGA |
-
2020
- 2020-11-27 CN CN202011362383.9A patent/CN112395584A/en active Pending
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113687635A (en) * | 2021-08-23 | 2021-11-23 | 明度智云(浙江)科技有限公司 | Method, system and storage medium for managing state of equipment based on complete object |
CN113992373A (en) * | 2021-10-20 | 2022-01-28 | 平安普惠企业管理有限公司 | Verification method and device based on verification code, computer equipment and storage medium |
CN114257451A (en) * | 2021-12-22 | 2022-03-29 | 广州品唯软件有限公司 | Verification interface replacing method and device, storage medium and computer equipment |
CN114257451B (en) * | 2021-12-22 | 2023-10-27 | 广州品唯软件有限公司 | Verification interface replacement method and device, storage medium and computer equipment |
CN117234996A (en) * | 2023-11-10 | 2023-12-15 | 广州翼辉信息技术有限公司 | Automatic calibration method for communication between GMAC and FPGA |
CN117234996B (en) * | 2023-11-10 | 2024-01-30 | 广州翼辉信息技术有限公司 | Automatic calibration method for communication between GMAC and FPGA |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112395584A (en) | Verification mode switching method and device, computer equipment and storage medium | |
CN113067859B (en) | Communication method and device based on cloud mobile phone | |
US20200201673A1 (en) | View switching | |
CN109933960B (en) | Service calling control method, service calling method, device and terminal | |
CN114397997B (en) | Control method for interactive operation and multi-screen interactive system | |
CN113438264B (en) | Wearable massager connection method, device, computer equipment and storage medium | |
CN113940037A (en) | Resource subscription method and device, computer equipment and storage medium | |
CN112527835A (en) | Authentication request processing method and device based on cache and related equipment | |
CN107786729A (en) | A kind of operating system update method and terminal | |
CN110379051B (en) | Unlocking method, device, terminal and storage medium | |
KR20090034140A (en) | Mobile phone having multi-port memory and booting control method thereof | |
CN108984238B (en) | Gesture processing method and device of application program and electronic equipment | |
CN113286349B (en) | Personal hot spot connection method, device, terminal and storage medium | |
CN114301715A (en) | Alliance link data security auditing method and device, computer equipment and storage medium | |
US20150172464A1 (en) | Call processing method and device | |
CN112788101A (en) | Control method, device, terminal and storage medium of server cluster | |
CN115103053A (en) | Call establishment method, device, terminal, system and readable storage medium | |
CN114025358B (en) | Data desensitization method, device, equipment and storage medium | |
CN113360809A (en) | Page data updating method and device, computer equipment and storage medium | |
CN112989323A (en) | Process detection method, device, terminal and storage medium | |
CN109725966B (en) | Mode conversion method, device, terminal equipment and storage medium | |
CN112948817A (en) | Permission control method and device of application program, computer equipment and medium | |
CN105407218B (en) | A kind of SMS processing method and terminal | |
CN104516742B (en) | A kind of information processing method and electronic equipment | |
CN114866611B (en) | Message callback method, device, storage medium and computer equipment |
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 |