CN115866542B - Short message verification code application and verification method, device, equipment and storage medium - Google Patents

Short message verification code application and verification method, device, equipment and storage medium Download PDF

Info

Publication number
CN115866542B
CN115866542B CN202310177639.6A CN202310177639A CN115866542B CN 115866542 B CN115866542 B CN 115866542B CN 202310177639 A CN202310177639 A CN 202310177639A CN 115866542 B CN115866542 B CN 115866542B
Authority
CN
China
Prior art keywords
short message
verification code
message verification
mobile phone
phone number
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
CN202310177639.6A
Other languages
Chinese (zh)
Other versions
CN115866542A (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.)
Beijing Murong Information Technology Co ltd
Original Assignee
Beijing Murong Information Technology 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 Beijing Murong Information Technology Co ltd filed Critical Beijing Murong Information Technology Co ltd
Priority to CN202310177639.6A priority Critical patent/CN115866542B/en
Publication of CN115866542A publication Critical patent/CN115866542A/en
Application granted granted Critical
Publication of CN115866542B publication Critical patent/CN115866542B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Mobile Radio Communication Systems (AREA)

Abstract

The application relates to a short message verification code application and verification method, device, equipment and storage medium, and relates to the field of communication, wherein the application method comprises the following steps: responding to a short message verification code application request sent by first self-service terminal equipment, and acquiring an application date, a first equipment ID and a mobile phone number; judging whether a short message verification code record corresponding to the mobile phone number is empty or not; if the first short message verification code is empty, a first check code and a first short message verification code are generated; if the first preset condition is not satisfied, judging whether the first preset condition is satisfied; if yes, generating a first check code and a first short message verification code; calculating a mobile phone number, a first equipment ID, an application date, a first short message verification code and a first verification code to generate first verification information; updating and storing the short message verification code record; controlling a first self-service terminal device to prompt a first check code; and sending the first short message verification code and the first verification code to the mobile terminal to which the mobile phone number belongs. The method and the device can reduce the condition that the user inputs the short message verification code continuously for many times.

Description

Short message verification code application and verification method, device, equipment and storage medium
Technical Field
The present invention relates to the field of communications, and in particular, to a method, an apparatus, a device, and a storage medium for applying and verifying a short message verification code.
Background
The self-service terminal equipment is equipment which is completely handled by a user through a human-computer interface in an intelligent way. Currently, the system is widely applied to industries such as communication, finance, government, transportation, medical treatment, industry and commerce, tax and the like, for example, self-service terminals of banks, self-service government terminals of government halls, medical service self-service terminals of hospitals and the like.
When some business is handled through the self-service terminal equipment, a user is required to input a mobile phone number to apply for a short message verification code to a background server of the self-service terminal equipment, the background server sends the short message verification code to the mobile phone of the user through a special short message platform, and then the user identity is verified according to the short message verification code input by the user, and after the verification is passed, the business can be handled continuously.
In the process of applying and verifying the short message verification code, the problems that the system card is slow and the user cannot timely receive the short message verification code due to overtime communication between a background server and a short message platform and overlarge flow of the short message platform may exist, and if the user continues to apply for the short message verification code, the situation that the user receives the short message verification code applied before or receives a large number of short message verification codes in a concentrated manner is likely to occur. At this time, the user does not know which short message verification code is the most recently applied short message verification code, if a plurality of received short message verification codes are verified one by one, the short message verification code is likely to be successfully verified by continuous multiple inputs, so that the efficiency of short message verification is affected, and further the business handling efficiency is affected.
Disclosure of Invention
In order to solve the technical problems, the application provides a short message verification code application and verification method, device and equipment and a storage medium.
In a first aspect, the present application provides a method for applying a short message verification code, which adopts the following technical scheme:
a short message verification code application method comprises the following steps:
responding to a short message verification code application request sent by first self-service terminal equipment, and acquiring an application date, a first equipment ID of the first self-service terminal equipment and a mobile phone number input by a user;
judging whether the short message verification code record corresponding to the mobile phone number is empty or not;
if the first short message verification code is empty, a first check code and a first short message verification code are generated;
if the first preset condition is not satisfied, judging whether the first preset condition is satisfied;
if the first preset condition is met, a first check code and a first short message verification code are generated;
calculating the mobile phone number, the first equipment ID, the application date, the first short message verification code and the first verification code according to a preset algorithm to generate first verification information;
updating and storing a short message verification code record corresponding to the mobile phone number, wherein the short message verification code record comprises the first verification information, the application date and the first verification code;
controlling the first self-service terminal equipment to prompt the first check code;
and sending the first short message verification code and the first check code to the mobile terminal to which the mobile phone number belongs through a short message platform.
Optionally, the first preset condition is:
the application date is inconsistent with the current system date; or alternatively, the process may be performed,
and the application date is consistent with the current system date, and the continuous verification failure times in the short message verification code record corresponding to the mobile phone number do not exceed the maximum times.
Optionally, the calculating the mobile phone number, the first device ID, the application date, the first short message verification code and the first verification code according to a preset algorithm, and generating the first verification information includes:
forming a first N digit based on the first short message verification code, the first check code and the application date;
constructing a second N number of bits based on the mobile phone number and the first device ID;
performing exclusive-or operation on the first N bits and the second N bits to generate a first exclusive-or value;
and encrypting the first exclusive-or value to generate the first verification information.
In a second aspect, the present application provides a method for verifying a short message verification code, which adopts the following technical scheme:
a short message verification code verification method comprises the following steps:
responding to a short message verification code verification request sent by second self-service terminal equipment, and acquiring a second equipment ID of the second self-service terminal equipment, a mobile phone number input by a user and a second short message verification code;
judging whether the short message verification code record corresponding to the mobile phone number is empty or not;
if not, judging whether a second preset condition is met;
if the second preset condition is met, acquiring an application date, a first check code and first verification information in a short message verification code record corresponding to the mobile phone number;
calculating the mobile phone number, the second equipment ID, the application date, the second short message verification code and the first verification code according to a preset algorithm to generate second verification information;
comparing the second verification information with the first verification information;
if the comparison is consistent, the verification is successful, and the short message verification code record corresponding to the mobile phone number is reset;
if the comparison is inconsistent, the verification fails.
Optionally, the second preset condition is:
the application date is consistent with the current system date, the number of continuous verification failures in the short message verification code record corresponding to the mobile phone number does not exceed the maximum number, and the first verification information is not overtime; or alternatively, the process may be performed,
the application date is inconsistent with the current system date, and the first verification information is not overtime.
Optionally, the calculating the mobile phone number, the second device ID, the application date, the second short message verification code, and the first verification code according to a preset algorithm, and generating the second verification information includes:
forming a third N digit based on the second short message verification code, the first verification code and the application date;
forming a fourth N number of bits based on the mobile phone number and the second device ID;
performing exclusive-or operation on the third N bit number and the fourth N bit number to generate a second exclusive-or value;
and encrypting the second exclusive-or value to generate the second verification information.
In a third aspect, the present application provides a device for applying a short message verification code, which adopts the following technical scheme:
a short message verification code application device comprises:
the first acquisition module is used for responding to a short message verification code application request sent by the first self-service terminal equipment and acquiring an application date, a first equipment ID of the first self-service terminal equipment and a mobile phone number input by a user;
the first judging module is used for judging whether the short message verification code record corresponding to the mobile phone number is empty or not; if the first generation module is empty, transferring to the first generation module; if not, transferring to a second judging module;
the first generation module is used for generating a first check code and a first short message verification code;
the second judging module is used for judging whether the first preset condition is met or not; if the first preset condition is met, transferring to the first generation module;
the first calculation module is used for calculating the mobile phone number, the first equipment ID, the application date, the first short message verification code and the first verification code according to a preset algorithm to generate first verification information;
the updating storage module is used for updating and storing the short message verification code record corresponding to the mobile phone number, wherein the short message verification code record comprises the first verification information, the application date and the first verification code;
the control prompt module is used for controlling the first self-service terminal equipment to prompt the first check code;
and the sending module is used for sending the first short message verification code and the first check code to the mobile terminal to which the mobile phone number belongs through a short message platform.
In a fourth aspect, the present application provides a short message verification code verification device, which adopts the following technical scheme:
a short message verification code verification device comprises:
the second acquisition module is used for responding to a short message verification code verification request sent by second self-service terminal equipment and acquiring a second equipment ID of the second self-service terminal equipment, a mobile phone number input by a user and a second short message verification code;
the third judging module is used for judging whether the short message verification code record corresponding to the mobile phone number is empty or not; if not, transferring to a fourth judging module;
the fourth judging module is used for judging whether a second preset condition is met or not; if the second preset condition is met, transferring to a third acquisition module;
the third acquisition module is used for acquiring the application date, the first check code and the first verification information in the short message verification code record corresponding to the mobile phone number;
the second calculation module is used for calculating the mobile phone number, the second equipment ID, the application date, the second short message verification code and the first verification code according to a preset algorithm to generate second verification information;
the comparison module is used for comparing the second verification information with the first verification information; if the comparison is consistent, the verification is successful, and the short message verification code record corresponding to the mobile phone number is reset; if the comparison is inconsistent, the verification fails.
In a fifth aspect, the present application provides an electronic device, which adopts the following technical scheme:
an electronic device includes a memory and a processor; the memory has stored thereon a computer program capable of being loaded by the processor and performing the method of any of the first and/or second aspects.
In a sixth aspect, the present application provides a computer readable storage medium, which adopts the following technical scheme:
a computer readable storage medium storing a computer program capable of being loaded by a processor and performing the method of any one of the first and/or second aspects.
By adopting the technical scheme, the self-service terminal equipment can be specified to apply for and verify the short message verification code, the continuous verification failure times are controlled, meanwhile, a client can accurately know the verification code needing to be verified through the verification code in the short message, the condition that the user continuously inputs the short message verification code for many times due to the fact that the short message verification code is sent before or is received intensively is reduced, the waste of system resources can be reduced, and the verification accuracy and safety are improved.
Drawings
Fig. 1 is a block diagram of a short message authentication system according to an embodiment of the present application.
Fig. 2 is a flow chart of a method for applying a short message verification code according to an embodiment of the present application.
Fig. 3 is a flow chart of a short message verification code verification method according to an embodiment of the present application.
Fig. 4 is a block diagram of a device for applying a short message verification code according to an embodiment of the present application.
Fig. 5 is a block diagram of a short message verification code verification device according to an embodiment of the present application.
Fig. 6 is a block diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application more clear, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application.
Fig. 1 shows a block diagram of a short message verification code verification system based on self-service terminal equipment. As shown in fig. 1, the system includes a self-service terminal device 101, a background server 102, a mobile terminal 103, and a short message platform 104.
When a user handles related business through the self-service terminal equipment 101, a short message verification code application page and a short message verification code verification page displayed by the self-service terminal equipment 101 are operated to respectively initiate a short message verification code application request and a short message verification code verification request to the background server 102, and the background server 102 responds to the request to realize application and verification service of the short message verification code. The user receives information such as the short message verification code sent by the background server 102 through the short message platform 104 at the short message verification code application page and the mobile terminal 103 to which the mobile phone number input by the short message verification code verification page belongs.
In this embodiment, the mobile terminal 103 includes, but is not limited to, a mobile phone, a tablet computer, and an intelligent wearable device, as long as the portable electronic device has a short message receiving and sending function, and the embodiment is not specifically limited.
Fig. 2 is a flow chart of a method for applying a short message verification code according to the present embodiment. As shown in fig. 2, the main flow of the method is described as follows (steps S201 to S208):
step S201, responding to a short message verification code application request sent by a first self-service terminal device, and acquiring an application date, a first device ID of the first self-service terminal device and a mobile phone number input by a user;
the method comprises the steps that a first self-service terminal device displays a short message verification code application page to a user, after the user inputs a mobile phone number and clicks an application key, the short message verification code application flow is triggered, the first self-service terminal device generates a short message verification code application request containing information such as an application date, an application time, a first device ID of the first self-service terminal device, a mobile phone number input by the user and the like, and the short message verification code application request is uploaded to a background server.
And the background server responds to the short message verification code application request to analyze the information such as the first equipment ID, the application date, the mobile phone number and the like.
Step S202, judging whether a short message verification code record corresponding to the mobile phone number is empty or not; if the signal is empty, executing step S203; if not, executing step S204;
in this embodiment, after obtaining the mobile phone number, the background server first needs to query whether the short message verification code record corresponding to the mobile phone number is stored locally, that is, whether the short message verification code is successfully applied before the mobile phone number. If the record is empty, the short message verification code flow can be continuously applied, namely, the step S204 is executed; if the record is not empty, step S203 is required to be performed first.
Step S203, judging whether a first preset condition is met; if the first preset condition is satisfied, step S204 is executed;
in some embodiments, after the background server queries that the short message verification code record corresponding to the mobile phone number input by the user is not empty, it needs to determine whether the application date of the short message verification code application request is consistent with the current system date.
If the application date is consistent with the current system date, the user is indicated to repeatedly submit the short message verification code application request in the same day, if the continuous verification failure times in the inquired short message verification code record exceeds the maximum threshold value, the user is not allowed to submit the short message verification code application request again in the same day, and the short message verification code application process is ended, namely, if the continuous verification failure times in one day are excessive, the short message verification code application process is locked; if the number of continuous verification failures does not exceed the maximum threshold, the user is allowed to submit the short message verification code application request again on the same day, and the current short message verification code application process is continued, namely, step S204 is executed.
If the application date is inconsistent with the current system date, it indicates that the user does not repeatedly submit the short message verification code application request on the same day, at this time, the user is allowed to apply for the short message verification code again, and the current short message verification code application process is continued, that is, step S204 is executed, but the queried short message verification code record needs to be reset.
Through the setting of the continuous verification failure times, malicious verification can be prevented, and meanwhile, even if the continuous verification failure times of a user in the same day exceed a maximum threshold value, the short message verification code application function can be automatically unlocked in the next day without manual intervention.
Thus, the first preset condition includes the following two cases:
(1) The application date is inconsistent with the current system date;
(2) The application date is consistent with the current system date, and the continuous verification failure times in the short message verification code record corresponding to the mobile phone number do not exceed the maximum times.
In this embodiment, one mobile phone number can only correspond to one short message verification code record. If a mobile phone number applies for a short message verification code to a background server through a first self-service terminal device and succeeds, the background server stores a short message verification code record corresponding to the mobile phone number, and the mobile phone number applies for the short message verification code to the background server through another first self-service terminal device on the same day, the short message verification code application process can only be continued under the condition that the number of continuous verification failures in the stored short message verification record does not exceed the maximum threshold value, and otherwise, the short message verification code application process can only be ended.
That is, the background server does not store the short message verification code record generated by applying for the short message verification code by the same mobile phone number through different first self-service terminal devices at the same time.
Step S204, a first check code and a first short message verification code are generated;
step S205, calculating a mobile phone number, a first equipment ID, an application date, a first short message verification code and a first verification code according to a preset algorithm to generate first verification information;
step S206, updating and storing a short message verification code record corresponding to the mobile phone number, wherein the short message verification code record comprises first verification information, an application date and a first verification code;
in step S206, if the short message verification code record corresponding to the mobile phone number is not empty, updating and resetting the data such as the first device ID, the first short message verification code, the first verification code, the application date, the application time, the failure time and the like in the short message verification code record; if the short message verification code record corresponding to the mobile phone number is empty, directly writing data such as the mobile phone number, the first equipment ID, the first short message verification code, the first verification code, the application date, the application time, the failure time and the like, and establishing the short message verification code record corresponding to the mobile phone number.
It should be noted that, except the first verification information, the application date, the first verification code and the mobile phone number, the information is stored in the background server, the background server also stores the application time of the short message verification code application request, calculates the expiration time according to the application date, and then writes the expiration time into the short message verification code record.
Step S207, controlling a first self-service terminal device to prompt a first check code;
in this embodiment, the first self-service terminal device prompts the first check code returned by the background server to the user. For example, after receiving the first check code, the first self-service terminal device updates the short message verification code application page to a short message verification code verification page, where the short message verification code verification page displays information such as "please input a 6-bit digital verification code with a check code of 2351"; for another example, after receiving the first check code, the first self-service terminal device generates and plays a voice message of "please input a 6-bit digital verification code with the check code of 2351". Of course, the manner in which the first self-service terminal device prompts the user for the first check code includes not only the two manners, and this embodiment is not limited specifically.
Step S208, the first short message verification code and the first verification code are sent to the mobile terminal to which the mobile phone number belongs through the short message platform.
In this embodiment, the background server sends a short message request to the short message platform, and the short message platform forwards a short message with a 6-bit digital verification code of "your verification code 2351" to the mobile terminal to which the mobile phone number input by the user belongs, for example. The mobile terminal to which the mobile phone number input by the user belongs generally means that the mobile terminal is provided with a SIM card corresponding to the mobile phone number.
It should be noted that, for the background server, in order to facilitate the user to distinguish which short message verification code is to be verified, the same mobile phone number should not have two identical first verification codes, so after the first verification code is generated, the background server needs to perform a duplicate judgment process on the first verification code, and if the first verification code is repeated, the first verification code is regenerated.
In some embodiments, a first N number of digits may be first formed based on the first sms verification code, the first check code, and the application date, and a second N number of digits may be formed based on the mobile phone number and the first device ID; then performing exclusive-or operation on the first N bits and the second N bits to generate a first exclusive-or value; encrypting the first exclusive-or value to generate first verification information; wherein N is a positive integer.
Fig. 3 is a flow chart of a short message verification code verification method provided in this embodiment. As shown in fig. 3, the main flow of the method is described as follows (steps S301 to S306):
step S301, a second equipment ID of a second self-service terminal device, a mobile phone number input by a user and a second short message verification code are obtained in response to a short message verification code verification request sent by the second self-service terminal device;
the user searches the short message with the second check code from the short message received by the mobile terminal to which the mobile phone number belongs according to the second check code prompted by the second self-service terminal device, acquires the second short message check code from the short message, inputs the second short message check code through a short message check code check page, triggers a short message check code check flow after clicking a check key, generates a short message check code check request containing the second device ID of the second self-service terminal device, the mobile phone number input by the user and other information, and uploads the short message check code check request to a background server.
Step S302, judging whether a short message verification code record corresponding to the mobile phone number is empty or not; if not, executing step S303;
the background server searches whether the short message verification code record corresponding to the mobile phone number is stored locally. If the short message verification code is not found, the short message verification code cannot be verified continuously, and the short message verification code verification process can only be ended at the moment.
Step S303, judging whether a second preset condition is met; if the second preset condition is satisfied, executing step S304;
in some embodiments, after the short message verification code record corresponding to the mobile phone number is found, it is required to determine whether the application date in the stored short message verification code record is consistent with the current system date.
If the application date is consistent with the current system date, the user is stated to submit a short message verification code application request and a short message verification code verification request in the same day, whether the number of continuous verification failures in the stored short message verification code records exceeds a maximum threshold value is needed to be judged at the moment, if yes, the user is not allowed to submit the short message verification code application request again in the same day, and the short message verification code application flow is ended; if the first verification information in the stored short message verification code record is overtime, the verification operation cannot be executed, and the short message verification code verification process is required to be ended.
If the application date is inconsistent with the current system date, judging whether the first verification information in the stored short message verification code record is overtime or not, if so, executing verification operation is not possible, and ending the short message verification code verification flow at the moment.
The first verification information overtime means that the current system time exceeds the failure time.
Thus, the second preset condition includes the following two cases:
(1) The application date is consistent with the current system date, the continuous verification failure times in the short message verification code record corresponding to the mobile phone number do not exceed the maximum times, and the first verification information does not timeout; or alternatively, the process may be performed,
(2) The application date is inconsistent with the current system date, and the first verification information does not timeout.
Step S304, acquiring an application date, a first check code and first verification information in a short message verification code record corresponding to the mobile phone number;
step S305, calculating the mobile phone number, the second equipment ID, the application date, the second short message verification code and the first verification code according to a preset algorithm to generate second verification information;
in this embodiment, the preset algorithm adopted by the second verification information and the first verification information is the same.
Step S306, comparing the second verification information with the first verification information; if the comparison is consistent, the verification is successful, and the short message verification code record corresponding to the mobile phone number is reset; if the comparison is inconsistent, the verification fails.
In this embodiment, the short message verification code record corresponding to the mobile phone number is cleared as long as the short message verification code is successfully verified. If the verification fails, adding 1 to the continuous verification failure times, and writing the updated continuous verification failure times into a short message verification code record corresponding to the mobile phone number.
In some embodiments, a third N number of digits is first formed based on the second sms verification code, the first verification code, and the application date, and a fourth N number of digits is formed based on the mobile phone number and the second device ID; then performing exclusive-or operation on the third N bit and the fourth N bit to generate a second exclusive-or value; and finally, encrypting the second exclusive-or value to generate second verification information.
In this embodiment, the short message verification code and the check code are random numbers, two values with the same digits are generated according to the short message verification code, the check code, the application date, the mobile phone number and the equipment ID, and then are subjected to exclusive-or operation, and then are encrypted, so that the security of the verification information can be improved, and the verification information is not easy to obtain and maliciously cracked.
In this embodiment, for the same mobile phone number, the second verification information is generated by the second device ID of the second self-service terminal device that initiates the request for verifying the short message verification code, the second short message verification code read by the user, and the first verification code and the application date generated by the background server in response to the request for applying the short message verification code initiated by the first self-service terminal device, so that only if the second self-service terminal device and the first self-service terminal device are the same self-service terminal device, the second verification code is the same as the first verification code, and the comparison of the first verification information and the second verification information can be successful.
Therefore, only the appointed self-service terminal equipment can verify successfully, and by additionally arranging the check code, a user can clearly know which short message check code should be input, so that the condition that the user continuously inputs the short message check code for many times due to the fact that the short message check code is sent before the short message check code is received or is received intensively can be reduced, and the short message verification efficiency is improved.
It should be noted that, for the first short message verification code, once the short message verification is successful, the short message verification code record stored by the background server is cleared, so that the same mobile phone number does not have a repeated condition, and the generated first short message verification code does not need to be subjected to duplicate judgment.
In addition, compared with the method for verifying the short message verification code by calling the short message verification platform, the method for verifying the short message verification code is high in controllability, can customize the generation rules of the short message verification code and the verification code, and is convenient to maintain.
Fig. 4 is a block diagram of a device 400 for applying a short message verification code according to an embodiment of the present application. As shown in fig. 4, the short message verification code application apparatus 400 is applied to a background server, and mainly includes:
a first obtaining module 401, configured to obtain an application date, a first device ID of the first self-service terminal device, and a mobile phone number input by a user in response to a short message verification code application request sent by the first self-service terminal device;
a first judging module 402, configured to judge whether a short message verification code record corresponding to a mobile phone number is empty; if the first generation module 403 is empty, the first generation module is shifted to; if not, the process proceeds to a second determination module 404;
a first generating module 403, configured to generate a first check code and a first short message verification code;
a second judging module 404, configured to judge whether the first preset condition is satisfied; if the first preset condition is satisfied, the process proceeds to a first generation module 403;
the first calculation module 405 is configured to calculate, according to a preset algorithm, a mobile phone number, a first device ID, an application date, a first short message verification code, and a first verification code, and generate first verification information;
the update storage module 406 is configured to update and store a short message verification code record corresponding to the mobile phone number, where the short message verification code record includes first verification information, an application date and a first verification code;
a control prompt module 407, configured to control the first self-service terminal device to prompt the first check code;
the sending module 408 is configured to send the first short message verification code and the first check code to a mobile terminal to which the mobile phone number belongs through the short message platform.
In some embodiments, the first preset condition is:
the application date is inconsistent with the current system date; or alternatively, the process may be performed,
the application date is consistent with the current system date, and the continuous verification failure times in the short message verification code record corresponding to the mobile phone number do not exceed the maximum times.
In some embodiments, the first calculation module 405 is specifically configured to form a first N number of bits based on the first sms verification code, the first check code, and the application date; constructing a second N number of bits based on the mobile phone number and the first device ID; performing exclusive-or operation on the first N bits and the second N bits to generate a first exclusive-or value; and encrypting the first exclusive OR value to generate first verification information.
Fig. 5 is a block diagram of a short message verification code verification device 500 according to an embodiment of the present application. As shown in fig. 5, the short message verification code verification device 500 is applied to a background server, and mainly includes:
a second obtaining module 501, configured to obtain a second device ID of the second self-service terminal device, and a mobile phone number and a second short message verification code input by a user, in response to a short message verification code verification request sent by the second self-service terminal device;
a third judging module 502, configured to judge whether a short message verification code record corresponding to the mobile phone number is empty; if not, the fourth judging module 503 is executed;
a fourth determining module 503, configured to determine whether a second preset condition is satisfied; if the second preset condition is satisfied, the third obtaining module 504 is shifted to;
a third obtaining module 504, configured to obtain an application date, a first check code, and first verification information in a short message verification code record corresponding to the mobile phone number;
the second calculation module 505 is configured to calculate, according to a preset algorithm, the mobile phone number, the second device ID, the application date, the second short message verification code, and the first verification code, and generate second verification information;
a comparison module 506, configured to compare the second verification information with the first verification information; if the comparison is consistent, the verification is successful, and the short message verification code record corresponding to the mobile phone number is reset; if the comparison is inconsistent, the verification fails.
In some embodiments, the second preset condition is:
the application date is consistent with the current system date, the continuous verification failure times in the short message verification code record corresponding to the mobile phone number do not exceed the maximum times, and the first verification information does not timeout; or alternatively, the process may be performed,
the application date is inconsistent with the current system date, and the first verification information does not timeout.
In some embodiments, the second calculating module 505 is specifically configured to form a third N-bit based on the second sms identifying code, the first check code, and the application date; forming a fourth N number based on the mobile phone number and the second device ID; performing exclusive-or operation on the third N bit and the fourth N bit to generate a second exclusive-or value; and encrypting the second exclusive-or value to generate second verification information.
The functional modules in the embodiments of the present application may be integrated together to form a single unit, for example, integrated in a processing unit, or each module may exist alone physically, or two or more modules may be integrated to form a single unit. The integrated units may be implemented in hardware or in software functional units. The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored on a computer readable storage medium. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing an electronic device (which may be a personal computer, a server, a network device, or the like) or a processor (processor) to perform all or part of the steps of the methods of the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a U disk, a mobile hard disk, a read-only memory, a random access memory, a magnetic disk or an optical disk.
Various changes and specific examples in the method provided in the embodiment of the present application are also applicable to a short message verification code application and verification device provided in the embodiment, and by the foregoing detailed description of the short message verification code application and verification method, those skilled in the art may clearly know the implementation method of the short message verification code application and verification device in the embodiment, which is not described in detail herein for brevity of description.
Fig. 6 is a block diagram of an electronic device 600 according to an embodiment of the present application. As shown in fig. 6, the electronic device 600 includes a memory 601, a processor 602, a communication bus 603; the memory 601 and the processor 602 are connected via a communication bus 603.
The memory 601 may be used to store instructions, programs, code, sets of codes, or sets of instructions. The memory 601 may include a storage program area and a storage data area, wherein the storage program area may store instructions for implementing an operating system, instructions for at least one function, instructions for implementing the short message authentication code application and the authentication method provided in the above embodiments, and the like; the data storage area may store data and the like involved in the short message verification code application and the verification method provided in the foregoing embodiments.
The processor 602 may include one or more processing cores. The processor 602 performs various functions of the present application and processes data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 601, invoking data stored in the memory 601. The processor 602 may be at least one of an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a digital signal processor (Digital Signal Processor, DSP), a digital signal processing device (Digital Signal Processing Device, DSPD), a programmable logic device (Programmable Logic Device, PLD), a field programmable gate array (Field Programmable Gate Array, FPGA), a central processing unit (Central Processing Unit, CPU), a controller, a microcontroller, and a microprocessor. It will be appreciated that the electronics for implementing the functions of the processor 602 described above may be other for different devices, and embodiments of the present application are not specifically limited.
The communication bus 603 may include a path to transfer information between the above components. The communication bus 603 may be a PCI (Peripheral Component Interconnect, peripheral component interconnect standard) bus or an EISA (Extended Industry Standard Architecture ) bus, or the like. The communication bus 603 may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one double arrow is shown in FIG. 6, but not only one bus or one type of bus. And the electronic device shown in fig. 6 is only an example and should not impose any limitation on the functionality and scope of use of the embodiments of the present application.
The embodiment of the application provides a computer readable storage medium, which stores a computer program capable of being loaded by a processor and executing the short message verification code application and verification method provided by the embodiment.
In this embodiment, the computer-readable storage medium may be a tangible device that holds and stores instructions for use by the instruction execution device. The computer readable storage medium may be, but is not limited to, an electronic storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any combination of the preceding. In particular, the computer readable storage medium may be a portable computer disk, hard disk, USB flash disk, random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), podium random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital Versatile Disk (DVD), memory stick, floppy disk, optical disk, magnetic disk, mechanical coding device, and any combination of the foregoing.
The computer program in this embodiment contains program code for executing the method shown in fig. 2 and 3, and the program code may include instructions corresponding to executing the steps of the method provided in the above embodiment. The computer program may be downloaded from a computer readable storage medium to the respective computing/processing device or to an external computer or external storage device via a network (e.g., the internet, a local area network, a wide area network, and/or a wireless network). The computer program may execute entirely on the user's computer and as a stand-alone software package.
In the embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of modules or units is merely a logical functional division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection between the illustrated or discussed elements may be an indirect coupling or communication connection via interfaces, devices or elements, which may be in electrical, mechanical, or other forms.
In addition, it is to be understood that relational terms such as first and second are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. The terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus.
The foregoing is merely a preferred embodiment of the present application and is not intended to limit the present application, and various modifications and variations may be made to the present application by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.

Claims (10)

1. The short message verification code application method is characterized by comprising the following steps of:
responding to a short message verification code application request sent by first self-service terminal equipment, and acquiring an application date, a first equipment ID of the first self-service terminal equipment and a mobile phone number input by a user;
judging whether the short message verification code record corresponding to the mobile phone number is empty or not;
if the first short message verification code is empty, a first check code and a first short message verification code are generated;
if the first preset condition is not satisfied, judging whether the first preset condition is satisfied;
if the first preset condition is met, a first check code and a first short message verification code are generated;
calculating the mobile phone number, the first equipment ID, the application date, the first short message verification code and the first verification code according to a preset algorithm to generate first verification information;
updating and storing a short message verification code record corresponding to the mobile phone number, wherein the short message verification code record comprises the first verification information, the application date and the first verification code;
controlling the first self-service terminal equipment to prompt the first check code;
and sending the first short message verification code and the first check code to the mobile terminal to which the mobile phone number belongs through a short message platform.
2. The method according to claim 1, wherein the first preset condition is:
the application date is inconsistent with the current system date; or alternatively, the process may be performed,
and the application date is consistent with the current system date, and the continuous verification failure times in the short message verification code record corresponding to the mobile phone number do not exceed the maximum times.
3. The method according to claim 1 or 2, wherein the calculating the mobile phone number, the first device ID, the application date, the first short message verification code, and the first check code according to a preset algorithm, and generating the first verification information includes:
forming a first N digit based on the first short message verification code, the first check code and the application date;
constructing a second N number of bits based on the mobile phone number and the first device ID;
performing exclusive-or operation on the first N bits and the second N bits to generate a first exclusive-or value;
and encrypting the first exclusive-or value to generate the first verification information.
4. The short message verification code verification method is characterized by comprising the following steps of:
responding to a short message verification code verification request sent by second self-service terminal equipment, and acquiring a second equipment ID of the second self-service terminal equipment, a mobile phone number input by a user and a second short message verification code;
judging whether the short message verification code record corresponding to the mobile phone number is empty or not;
if not, judging whether a second preset condition is met;
if the second preset condition is met, acquiring an application date, a first check code and first verification information in a short message verification code record corresponding to the mobile phone number;
calculating the mobile phone number, the second equipment ID, the application date, the second short message verification code and the first verification code according to a preset algorithm to generate second verification information;
comparing the second verification information with the first verification information;
if the comparison is consistent, the verification is successful, and the short message verification code record corresponding to the mobile phone number is reset;
if the comparison is inconsistent, the verification fails.
5. The method of claim 4, wherein the second preset condition is:
the application date is consistent with the current system date, the number of continuous verification failures in the short message verification code record corresponding to the mobile phone number does not exceed the maximum number, and the first verification information is not overtime; or alternatively, the process may be performed,
the application date is inconsistent with the current system date, and the first verification information is not overtime.
6. The method according to claim 4 or 5, wherein the calculating the mobile phone number, the second device ID, the application date, the second sms verification code, and the first verification code according to a preset algorithm, and generating second verification information includes:
forming a third N digit based on the second short message verification code, the first verification code and the application date;
forming a fourth N number of bits based on the mobile phone number and the second device ID;
performing exclusive-or operation on the third N bit number and the fourth N bit number to generate a second exclusive-or value;
and encrypting the second exclusive-or value to generate the second verification information.
7. The utility model provides a short message verification code application device which characterized in that includes:
the first acquisition module is used for responding to a short message verification code application request sent by the first self-service terminal equipment and acquiring an application date, a first equipment ID of the first self-service terminal equipment and a mobile phone number input by a user;
the first judging module is used for judging whether the short message verification code record corresponding to the mobile phone number is empty or not; if the first generation module is empty, transferring to the first generation module; if not, transferring to a second judging module;
the first generation module is used for generating a first check code and a first short message verification code;
the second judging module is used for judging whether the first preset condition is met or not; if the first preset condition is met, transferring to the first generation module;
the first calculation module is used for calculating the mobile phone number, the first equipment ID, the application date, the first short message verification code and the first verification code according to a preset algorithm to generate first verification information;
the updating storage module is used for updating and storing the short message verification code record corresponding to the mobile phone number, wherein the short message verification code record comprises the first verification information, the application date and the first verification code;
the control prompt module is used for controlling the first self-service terminal equipment to prompt the first check code;
and the sending module is used for sending the first short message verification code and the first check code to the mobile terminal to which the mobile phone number belongs through a short message platform.
8. The utility model provides a short message verification code verifying attachment which characterized in that includes:
the second acquisition module is used for responding to a short message verification code verification request sent by second self-service terminal equipment and acquiring a second equipment ID of the second self-service terminal equipment, a mobile phone number input by a user and a second short message verification code;
the third judging module is used for judging whether the short message verification code record corresponding to the mobile phone number is empty or not; if not, transferring to a fourth judging module;
the fourth judging module is used for judging whether a second preset condition is met or not; if the second preset condition is met, transferring to a third acquisition module;
the third acquisition module is used for acquiring the application date, the first check code and the first verification information in the short message verification code record corresponding to the mobile phone number;
the second calculation module is used for calculating the mobile phone number, the second equipment ID, the application date, the second short message verification code and the first verification code according to a preset algorithm to generate second verification information;
the comparison module is used for comparing the second verification information with the first verification information; if the comparison is consistent, the verification is successful, and the short message verification code record corresponding to the mobile phone number is reset; if the comparison is inconsistent, the verification fails.
9. An electronic device comprising a memory and a processor; the memory has stored thereon a computer program that can be loaded by the processor and that performs the method according to any of claims 1 to 6.
10. A computer readable storage medium, characterized in that a computer program is stored which can be loaded by a processor and which performs the method according to any of claims 1 to 6.
CN202310177639.6A 2023-02-28 2023-02-28 Short message verification code application and verification method, device, equipment and storage medium Active CN115866542B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310177639.6A CN115866542B (en) 2023-02-28 2023-02-28 Short message verification code application and verification method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310177639.6A CN115866542B (en) 2023-02-28 2023-02-28 Short message verification code application and verification method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN115866542A CN115866542A (en) 2023-03-28
CN115866542B true CN115866542B (en) 2023-04-25

Family

ID=85659383

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310177639.6A Active CN115866542B (en) 2023-02-28 2023-02-28 Short message verification code application and verification method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115866542B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105100022A (en) * 2014-05-20 2015-11-25 阿里巴巴集团控股有限公司 Cipher processing method, server and system
WO2019028783A1 (en) * 2017-08-10 2019-02-14 深圳益创信息科技有限公司 Self-service deposit and withdrawal machine notification method, server and computer storage medium
CN110322235A (en) * 2019-07-05 2019-10-11 中国工商银行股份有限公司 It is a kind of based on mark realize inter-bank without card enchashment processing method and processing device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105100022A (en) * 2014-05-20 2015-11-25 阿里巴巴集团控股有限公司 Cipher processing method, server and system
WO2019028783A1 (en) * 2017-08-10 2019-02-14 深圳益创信息科技有限公司 Self-service deposit and withdrawal machine notification method, server and computer storage medium
CN110322235A (en) * 2019-07-05 2019-10-11 中国工商银行股份有限公司 It is a kind of based on mark realize inter-bank without card enchashment processing method and processing device

Also Published As

Publication number Publication date
CN115866542A (en) 2023-03-28

Similar Documents

Publication Publication Date Title
KR102151862B1 (en) Service processing method and device
CN108494557B (en) Social security digital certificate management method, computer readable storage medium and terminal device
CN111163182B (en) Block chain-based device registration method and apparatus, electronic device, and storage medium
WO2017028630A1 (en) Verification method and server
CN112165379B (en) User secure login method and device and terminal equipment
CN109766479B (en) Data processing method and device, electronic equipment and storage medium
CN109325349A (en) A kind of method for managing security, terminal device and computer readable storage medium
CN108959407B (en) Strong consistency writing method of data and terminal equipment
CN109145651B (en) Data processing method and device
CN111597537A (en) Block chain network-based certificate issuing method, related equipment and medium
CN115866542B (en) Short message verification code application and verification method, device, equipment and storage medium
CN112600864A (en) Verification code verification method, device, server and medium
CN110618989B (en) Information processing method, information processing device and related products
US20170315843A1 (en) Accessing data in accordance with an execution deadline
CN113674083A (en) Internet financial platform credit risk monitoring method, device and computer system
CN111756749B (en) Secure access method, device, equipment and storage medium
CN113660205A (en) Software authorization code encryption method
CN113706131A (en) Block chain transaction method, device and equipment based on encryption card
CN116136844A (en) Entity identification information generation method, device, medium and electronic equipment
CN108959405B (en) Strong consistency reading method of data and terminal equipment
CN107704557B (en) Processing method and device for operating mutually exclusive data, computer equipment and storage medium
CN106453388B (en) The method and device of Website login
CN114785585B (en) Information verification method, device, equipment and storage medium
CN114362960B (en) Resource account data supervision method and device, computer equipment and medium
CN111917556B (en) Interactive file detection method, device, terminal and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant