Website management system, method and system for acquiring verification code
Technical Field
The invention relates to the field of mobile communication, in particular to a website management system, and a method and a system for acquiring a verification code.
Background
In recent years, with the explosion of electronic commerce, more and more electronic commerce websites are in operation. On one hand, in order to be able to stand up and develop a large scale in a plurality of websites, attracting customers becomes the greatest importance of the plurality of websites; on the other hand, the website with cheap and good commodity, good after-sale service and humanized purchasing interface can be welcomed and popularized by the customer. In price, in order to attract new customers and retain old customers, a lot of websites hold sales promotion and transmit coupons to the new customers and the old customers, and therefore coupons requiring verification of verification codes are produced.
In the prior art, the coupon to be verified usually needs to send a verification code to a mobile phone of a user, and the user can use the coupon by inputting the verification code into an input interface of a website after obtaining the verification code. The existing way of obtaining the verification code has the following disadvantages: firstly, the operation cost of a website is increased, when a mobile phone of a user cannot receive a short message sent by a website management system through a provider all the time, the user can continuously click a link for acquiring a verification code, the website management system needs to continuously generate a new verification code and then sends the new verification code to the mobile phone of the user through the provider, and if the short message cannot be successfully sent to the mobile phone of the user at all due to the fact that an interface of the provider for sending the short message has a problem, the website pays the cost for sending the relevant short message, and the operation cost of the website is increased; secondly, the operation speed of the website is influenced, on one hand, when the mobile phone of the user cannot receive the short message sent by the website management system through the provider all the time, the user can continuously click the link for acquiring the verification code, and on the other hand, some users can unintentionally or intentionally continuously click the link for acquiring the verification code, so that the operation speed of the website is very slow, the use of the website by other users is influenced, and the verification code sent by the website management system through the provider cannot be timely and accurately received.
Disclosure of Invention
The technical problem to be solved by the invention is to overcome the defects that the operation cost of a website is increased by a method for acquiring a verification code, the operation speed of the website is influenced, the use of a user is inconvenient and the user cannot acquire the verification code timely and accurately in the prior art, and the website management system, the method and the system for acquiring the verification code are provided, have the functions of reducing the operation cost of the website and improving the operation speed of the website, enable the user to acquire the verification code timely and accurately, improve the use experience of the user and balance the relation between the reduction of the operation cost of the website and the use of the user.
The invention solves the technical problems through the following technical scheme:
the invention provides a method for acquiring a verification code, which is characterized by comprising the following steps:
S1a website management system receives a verification code acquisition request initiated by a user;
S2the website management system generates a verification code according to the verification code acquisition request and sends a sending request message containing the verification code and the receiving number of the user to a first supplier;
S3the first supplier sends the verification code to a terminal using the receiving number;
S4judging whether the website management system receives the verification code acquisition request again, if so, entering the step S5If not, ending the process;
S5a second supplier sending step S2To the terminal.
When the website management system receives a verification code acquisition request for the first time, a verification code is generated according to the verification code acquisition request, then a first supplier sends the verification code to a terminal of a user, if the terminal receives the verification code, the verification code is directly used, if the verification code cannot be successfully sent to the terminal due to the fact that an interface of the first supplier for sending information is in a problem, the user needs to request to acquire the verification code again, namely the website management system receives the verification code acquisition request for the second time, the website management system can replace the supplier at the moment, and the verification code is sent to the terminal through a replaced second supplier.
According to the scheme, if the problem occurs in the information sending interface of the first supplier, so that the verification code cannot be successfully sent to the terminal at all, the website management system does not need to generate new verification codes continuously and sends the new verification codes to the terminal through the first supplier continuously, and only needs to select the second supplier to send the verification code identical to the verification code sent by the first supplier, so that the operation cost of the website is reduced, and the operation speed of the website is increased.
The first provider and the second provider refer to companies providing operation services, such as china mobile and china unicom.
Preferably, step S4And step S5Comprises the following steps:
ST1and a judging step S2If the time elapsed from the generation of the verification code reaches a first time period, the step S is executedT2If not, go to step S5;
ST2The website management system is based on the step S4Regenerating a verification code according to the received verification code acquisition request;
ST3the first supplier or the second supplier will step ST2The generated verification code is sent to the terminal, and the process is ended.
Preferably, the first period of time is 30 minutes. The website management system sets an effective time, namely the first time period, so that if the existence time of the verification code exceeds the first time period, the verification code is invalid, a user needs to acquire a new verification code again, the setting of the first time period cannot be too short, the user has no time to input the verification code, the verification code is invalid, the use of the user on the website is influenced, the user cannot acquire the verification code accurately in time, the setting of the first time period cannot be too long, the verification code is easily stolen, the user cannot use the verification code, and therefore the first time period is preferably 30 minutes.
Preferably, step S4When the website management system judges that the verification code acquisition request is received again, the following steps are carried out:
S6judging whether the number of times of the verification code acquisition request received by the website management system in a second time period is greater than a standard number of times, if so, entering the step S7If not, go to step S5;
S7And the website management system generates prompt information which is used for prompting the user that the request for obtaining the verification code is rejected.
Preferably, step S7The website management system sends the prompt message to the terminal through the first provider or the second provider.
In order to prevent malicious operation or erroneous operation of some users, increase the operation cost of the website and greatly reduce the operation speed of the website, an upper limit of the number of times of the verification code acquisition requests received by the website management system in the second time period, namely the standard number of times, is set, so that the operation cost of the website is favorably controlled, and the operation speed of the website is improved.
Preferably, the standard number of times is 6 times.
Preferably, the second period of time is 24 hours.
Of course, the standard number of times may be set to other reasonable number of times in addition to 6 times, and likewise, the second period of time may be set to other reasonable time in addition to 24 hours.
Preferably, step S5The method also comprises the following steps:
SR1judging whether the website management system receives the verification code acquisition request again, if so, entering the step SR2If not, ending the process;
SR2the website management system is based on the step SR1Regenerating a verification code according to the received verification code acquisition request;
SR3the first supplier or the second supplier will step SR2The generated verification code is sent to the terminal, and the process is ended.
When the website management system receives a verification code acquisition request for the first time, a verification code is generated according to the verification code acquisition request, then the first supplier sends the verification code to a terminal of a user, the verification code cannot be successfully sent to the terminal due to the fact that an interface of information sent by the first supplier is in a problem, the user needs to request to acquire the verification code again, namely the website management system receives the verification code acquisition request for the second time, the verification code is sent to the terminal of the user by the second supplier, the terminal does not receive the verification code, namely the terminal does not receive the verification code sent by the first supplier and the second supplier, the website management system receives the verification code acquisition request again, the verification code which is not successfully received by the terminal before and sent by the first supplier and the second supplier is not used, and a new verification code is generated again according to the verification code acquisition request, the verification code may then be sent to the terminal by the first vendor or the second vendor.
The invention also provides a website management system which is characterized by comprising a receiving module, a generating module, a sending module and a first judging module;
the receiving module is used for receiving a verification code acquisition request initiated by a user;
the generating module is used for generating a first verification code according to the verification code obtaining request;
the sending module is used for sending a sending request message containing the first verification code and the receiving number of the user to a first provider, and the first provider is used for sending the first verification code to a terminal using the receiving number;
the first judging module is used for judging whether the receiving module receives the verification code obtaining request again;
the sending module is further configured to send the sending request message to a second provider when the receiving module receives the verification code obtaining request again, and the second provider is configured to send the first verification code to the terminal.
Preferably, the website management system further comprises a second determining module, the second determining module is configured to determine whether the time elapsed from the generation of the first verification code reaches a first time period, and if the time elapsed from the generation of the first verification code reaches the first time period, the generating module is invoked;
the generating module is used for regenerating a second verification code according to the verification code obtaining request which is judged by the first judging module and received again;
the sending module is used for sending a sending request message containing the second verification code and the receiving number of the user to the first supplier or the second supplier, and the first supplier or the second supplier is used for sending the second verification code to the terminal.
Preferably, the first period of time is 30 minutes.
Preferably, the website management system further includes a third determining module, where the third determining module is configured to determine whether the number of times of the verification code obtaining request received in a second time period is greater than a standard number of times when the receiving module receives the verification code obtaining request again, and if the number of times of the verification code obtaining request is greater than the standard number of times, call the generating module; if not, calling the sending module;
the generation module is used for generating a prompt message, and the prompt message is used for prompting the user that the request for obtaining the verification code is refused.
Preferably, the sending module sends the prompt message to the terminal through the first provider or the second provider.
Preferably, the standard number of times is 6 times.
Preferably, the second period of time is 24 hours.
Preferably, the website management system further includes a fourth determining module, where the fourth determining module is configured to determine whether the receiving module receives the verification code obtaining request again after sending the second verification code, and if so, invoke the generating module;
the generating module is configured to regenerate a third verification code according to the verification code obtaining request received again, which is determined by the fourth determining module, and the first vendor or the second vendor is configured to send the third verification code to the terminal.
When the first supplier or the second supplier successfully sends the verification code out, feedback information indicating that the verification code has been successfully sent is fed back to the website management system, so that the website management system can know that the first supplier or the second supplier has sent the verification code to the terminal.
The invention also provides a verification code acquisition system comprising the website management system, the terminal, the first supplier and/or the second supplier.
The invention also provides a verification code obtaining system which comprises the website management system, the terminal, the first supplier and/or the second supplier using the verification code obtaining method.
The positive progress effects of the invention are as follows:
the invention provides a website management system, a method and a system for acquiring a verification code, wherein the method and the system for acquiring the verification code are realized through the website management system, a terminal, a first supplier and/or a second supplier.
Drawings
Fig. 1 is a flowchart of a method for acquiring a verification code according to embodiment 1 of the present invention.
Fig. 2 is a structural diagram of a verification code acquisition system according to embodiment 1 of the present invention.
Fig. 3 is a flowchart of a method for obtaining a verification code according to embodiment 2 of the present invention.
Fig. 4 is a structural diagram of a verification code acquisition system according to embodiment 2 of the present invention.
Detailed Description
The following description of the preferred embodiments of the present invention will be provided in conjunction with the accompanying drawings to describe the technical solutions of the present invention in detail, but not to limit the present invention to the scope of the embodiments described.
Example 1
As shown in fig. 1, the method for acquiring a verification code of the present embodiment includes the following steps:
step 101, a website management system receives a verification code acquisition request initiated by a user;
102, the website management system generates a verification code according to the verification code acquisition request and sends a sending request message containing the verification code and the receiving number of the user to a first supplier;
step 103, the first supplier sends the verification code to the terminal using the receiving number;
step 104, judging whether the website management system receives the verification code acquisition request again, if so, entering step 105, and if not, ending the process;
step 105, judging whether the time elapsed from the generation of the verification code generated in step 102 to the time counting reaches 30 minutes (namely, the valid time of the verification code), if so, entering step 106, and if not, entering step 108;
step 106, the website management system regenerates a verification code according to the verification code acquisition request received in step 104;
step 107, the first supplier or the second supplier sends the verification code generated in step 106 to the terminal, and ends the process;
step 108, a second supplier sends the verification code generated in step 102 to the terminal;
step 109, determining whether the website management system receives the verification code acquisition request again, if yes, entering step 110, and if not, ending the process;
step 110, the website management system regenerates a verification code according to the verification code acquisition request received in step 109;
and step 111, the first provider or the second provider sends the verification code generated in step 110 to the terminal, and the process is ended.
The website management system sets an effective time, so that if the existence time of the verification code exceeds the effective time, the verification code is invalid, the user needs to acquire a new verification code again, the setting of the effective time cannot be too short, the user has not yet reached to input the verification code, the verification code is invalid, the use of the user is not facilitated, the setting of the effective time cannot be too long, the verification code is easy to be stolen, and therefore the effective time in the embodiment is selected to be 30 minutes.
In addition, if the user still does not receive the verification code after the verification codes are transmitted twice, namely, the transmission of the verification codes of the two times fails, the website management system does not transmit the verification codes transmitted twice to the terminal no matter whether the verification codes transmitted twice fail or not, namely whether the verification codes exceed the valid time of the verification codes for 30 minutes or not, but regenerates a new verification code according to a verification code acquisition request of the user for the third time, and then transmits the verification code to the terminal through the first provider or the second provider.
As shown in fig. 2, the present embodiment further provides a system for obtaining a verification code, where the system for obtaining a verification code includes a website management system 1, a first provider 2, a second provider 3, and a terminal 4, where the website management system 1 includes a receiving module 11, a generating module 12, a sending module 13, a first determining module 14, a second determining module 15, and a third determining module 16;
the receiving module 11 is configured to receive an authentication code acquisition request initiated by a user;
the generating module 12 is configured to generate a first verification code according to the verification code obtaining request;
the sending module 13 is configured to send a sending request message including the first verification code and the receiving number of the user to a first provider 2, where the first provider 2 is configured to send the first verification code to the terminal 4 using the receiving number;
the first determining module 14 is configured to determine whether the receiving module 11 receives the verification code obtaining request again;
the second determining module 15 is configured to determine whether the time elapsed from the generation of the first verification code to the time counting reaches 30 minutes, and if the time elapsed from the generation of the first verification code reaches 30 minutes, the generating module 12 is invoked;
the generating module 12 is further configured to regenerate a second verification code according to the verification code obtaining request received again and judged by the first judging module 14;
the sending module 13 is further configured to send a sending request message including the second verification code and the receiving number of the user to the first provider 2 or the second provider 3, and the first provider 2 or the second provider 3 is configured to send the second verification code to the terminal 4.
The sending module 13 is further configured to send the sending request message to a second provider 3 when the receiving module 11 receives the verification code obtaining request again, where the second provider 3 is configured to send the first verification code to the terminal 4.
The third determining module 16 is configured to determine whether the receiving module 11 receives the verification code obtaining request again after sending the second verification code, and if so, invoke the generating module 12;
the generating module 12 is further configured to regenerate a third verification code according to the verification code obtaining request received again and determined by the third determining module 16, where the first provider 2 or the second provider 3 is configured to send the third verification code to the terminal 4.
Example 2
As shown in fig. 3, the method for obtaining the verification code of the present embodiment includes the following steps:
step 201, a website management system receives a verification code acquisition request initiated by a user;
step 202, the website management system generates a verification code according to the verification code acquisition request, and sends a sending request message containing the verification code and the receiving number of the user to a first supplier;
step 203, the first supplier sends the verification code to the terminal using the receiving number;
step 204, determining whether the website management system receives the verification code acquisition request again, if so, entering step 205, otherwise, ending the process;
step 205, determining whether the number of times of the verification code acquisition request received by the website management system in 24 hours of the day is greater than 6, if yes, entering step 206, and if not, entering step 207;
step 206, the website management system generates a prompt message for prompting the user that the request for obtaining the verification code is rejected.
Step 207, a second provider sends the verification code generated in step 202 to the terminal.
In step 206, the website management system may further send the prompt message to the terminal through the first provider or the second provider.
As shown in fig. 4, the present embodiment further provides a system for obtaining a verification code, where the system for obtaining a verification code includes a website management system 1, a first provider 2, a second provider 3, and a terminal 4, where the website management system 1 includes a receiving module 11, a generating module 12, a sending module 13, a first determining module 14, and a fourth determining module 17;
the receiving module 11 is configured to receive an authentication code acquisition request initiated by a user;
the generating module 12 is configured to generate a first verification code according to the verification code obtaining request;
the sending module 13 is configured to send a sending request message including the first verification code and the receiving number of the user to a first provider 2, where the first provider 2 is configured to send the first verification code to the terminal 4 using the receiving number;
the first determining module 14 is configured to determine whether the receiving module 11 receives the verification code obtaining request again;
the fourth determining module 17 is configured to determine whether the number of times of the verification code obtaining request received in 24 hours of the day is greater than 6 times when the receiving module 11 receives the verification code obtaining request again, and if the number of times of the verification code obtaining request is greater than 6 times, call the generating module 12;
the generating module 12 is configured to generate a prompt message for prompting the user that the request for obtaining the verification code is rejected.
The sending module 13 sends the prompt message to the terminal 4 through the first provider 2 or the second provider 3.
Example 3
The present embodiment is a combination of embodiment 1 and embodiment 2, that is, the method for acquiring a verification code of the present embodiment includes all the steps of the methods for acquiring a verification code of embodiments 1 and 2, and the system for acquiring a verification code of the present embodiment includes all the components of the systems for acquiring a verification code of embodiments 1 and 2.
The method for acquiring the verification code comprises the following steps: the website management system receives a verification code acquisition request for the first time and generates a verification code, then a first supplier sends the verification code for a user to use, when the user does not receive the verification code, the website management system receives the verification code acquisition request (requests to acquire the verification code for the second time) again, changes the supplier (a second supplier) and sends the verification code to a terminal, before the verification code is sent for the second time, judges whether the time elapsed from the generation of the verification code to the timing reaches 30 minutes, if the generation time of the verification code generated according to the first verification code acquisition request exceeds the effective time, for example, 30 minutes, the verification code sent by the second supplier is the verification code generated according to the second verification code acquisition request; if the valid duration is not exceeded, the verification code sent by the second supplier is still the verification code generated according to the first verification code acquisition request, and if the verification code is not received by the terminal after the supplier is replaced, namely the verification codes are failed to be sent twice, the website management system can regenerate a new verification code according to the verification code acquisition request sent by the user for the third time and judge whether the number of times of verification code acquisition requests received by the website management system in 24 hours of the day is greater than 6, and if so, the user is prompted that the number of times of verification code request of the day exceeds the upper limit; and if not, sending the verification code generated according to the verification code acquisition request sent for the third time again.
Each functional module in the present invention can be implemented by combining the existing software programming means under the existing hardware condition, and therefore, the detailed implementation method thereof is not described herein.
While specific embodiments of the invention have been described above, it will be appreciated by those skilled in the art that these are by way of example only, and that the scope of the invention is defined by the appended claims. Various changes and modifications to these embodiments may be made by those skilled in the art without departing from the spirit and scope of the invention, and these changes and modifications are within the scope of the invention.