CN111049822B - Short message verification code sending method and device, short message server and storage medium - Google Patents

Short message verification code sending method and device, short message server and storage medium Download PDF

Info

Publication number
CN111049822B
CN111049822B CN201911261655.3A CN201911261655A CN111049822B CN 111049822 B CN111049822 B CN 111049822B CN 201911261655 A CN201911261655 A CN 201911261655A CN 111049822 B CN111049822 B CN 111049822B
Authority
CN
China
Prior art keywords
short message
code
mobile phone
country code
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
CN201911261655.3A
Other languages
Chinese (zh)
Other versions
CN111049822A (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 Dajia Internet Information Technology Co Ltd
Original Assignee
Beijing Dajia Internet 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 Dajia Internet Information Technology Co Ltd filed Critical Beijing Dajia Internet Information Technology Co Ltd
Priority to CN201911261655.3A priority Critical patent/CN111049822B/en
Publication of CN111049822A publication Critical patent/CN111049822A/en
Application granted granted Critical
Publication of CN111049822B publication Critical patent/CN111049822B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/18Network architectures or network communication protocols for network security using different networks or channels, e.g. using out of band channels
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/0853Network architectures or network communication protocols for network security for authentication of entities using an additional device, e.g. smartcard, SIM or a different communication terminal
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/06Authentication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/12Detection or prevention of fraud
    • H04W12/121Wireless intrusion detection systems [WIDS]; Wireless intrusion prevention systems [WIPS]
    • H04W12/122Counter-measures against attacks; Protection against rogue devices
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/12Messaging; Mailboxes; Announcements
    • H04W4/14Short messaging services, e.g. short message services [SMS] or unstructured supplementary service data [USSD]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The invention relates to a short message verification code sending method, a short message verification code sending device, a short message server and a storage medium, relates to the field of short message verification, and is used for realizing the discrimination of the legality of mobile phone numbers of various countries. The short message verification code sending method comprises the following steps: acquiring an Internet Protocol (IP) address of equipment requesting short message verification and a mobile phone number to be verified, wherein the mobile phone number comprises a country code; determining a country code corresponding to the IP address according to the IP address; and determining whether to send the short message verification code to the terminal equipment corresponding to the mobile phone number according to the country code included in the mobile phone number, the country code corresponding to the IP address, a white list set and a blacklist set, wherein the white list set comprises at least one white list, the blacklist set comprises at least one blacklist, the white list comprises country codes allowing the short message verification code to be sent, and the blacklist comprises country codes not allowing the short message verification code to be sent.

Description

Short message verification code sending method and device, short message server and storage medium
Technical Field
The present disclosure relates to the field of short message verification, and in particular, to a method and an apparatus for sending a short message verification code, a short message server, and a storage medium.
Background
When a user performs operations such as registration and payment on a mobile phone Application (APP) and an Internet (Internet) webpage and requires real information of the user, the APP or the Internet webpage can require the user to provide a mobile phone number for short message verification.
In the short message verification process, the short message server acquires a mobile phone number of a user and an Internet Protocol (IP) address of equipment requesting short message verification, and the short message server discriminates the legality of the mobile phone number according to the mobile phone number and the IP address.
On one hand, the existing short message server is difficult to verify the mobile phone numbers of other countries. On the other hand, a plurality of IP address proxy software are arranged on the network, which can help illegal users disguise IP addresses. Therefore, if an illegal user inputs the mobile phone number of other countries and forges the IP address of the device requesting the short message verification to send the verification code, the short message server can hardly discriminate the legality of the mobile phone number.
Disclosure of Invention
The disclosure provides a short message verification code sending method, a short message verification code sending device, a short message server and a storage medium, which are used for realizing the discrimination of the legality of mobile phone numbers of various countries. The technical scheme of the disclosure is as follows:
according to a first aspect of the embodiments of the present disclosure, a method for sending a short message verification code is provided, including:
acquiring an Internet Protocol (IP) address of equipment requesting short message verification and a mobile phone number to be verified, wherein the mobile phone number comprises a country code;
determining a country code corresponding to the IP address according to the IP address;
and determining whether to send a short message verification code to terminal equipment corresponding to the mobile phone number according to a country code included in the mobile phone number, a country code corresponding to the IP address, a white list set and a blacklist set, wherein the white list set comprises at least one white list, the blacklist set comprises at least one blacklist, the white list comprises country codes allowing the short message verification codes to be sent, and the blacklist comprises country codes not allowing the short message verification codes to be sent.
According to a second aspect of the embodiments of the present disclosure, there is provided a short message verification code sending apparatus, including:
the system comprises an acquisition unit, a verification unit and a verification unit, wherein the acquisition unit is configured to execute the acquisition of an Internet Protocol (IP) address of equipment requesting short message verification and a mobile phone number to be verified, and the mobile phone number comprises a country code;
a determining unit configured to determine a country code corresponding to the IP address according to the IP address;
the communication unit is configured to execute determining whether to send a short message verification code to the terminal device corresponding to the mobile phone number according to a country code included in the mobile phone number, a country code corresponding to the IP address, a white list set and a blacklist set, wherein the white list set comprises at least one white list, the blacklist set comprises at least one blacklist, the white list comprises country codes allowing short message verification codes to be sent, and the blacklist comprises country codes not allowing short message verification codes to be sent.
According to a third aspect of the embodiments of the present disclosure, there is provided a short message server, including:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the short message verification code sending method according to the first aspect.
According to a fourth aspect of the embodiments of the present disclosure, there is provided a storage medium, where instructions executed by a processor of a short message server enable the short message server to execute the short message verification code sending method according to the first aspect.
According to a fifth aspect of the embodiments of the present disclosure, there is provided a computer program product, which, when run on a computing device, causes the computing device to execute the short message verification code sending method according to the first aspect, or causes the computing device to implement the function of the short message verification code sending apparatus according to the second aspect.
The technical scheme provided by the embodiment of the disclosure at least brings the following beneficial effects:
according to the short message verification code sending method, the short message server obtains the IP address of the equipment requesting short message verification and the mobile phone number to be verified. The mobile phone number to be verified comprises a country code, and the country code corresponding to the IP address is determined according to the IP address of the device requesting short message verification. And determining whether to send a short message verification code to the terminal equipment corresponding to the mobile phone number according to the country code included in the mobile phone number, the country code corresponding to the IP address, the white list set and the black list set. The white list set comprises at least one white list, and the white list comprises country codes allowing the short message verification codes to be sent. The blacklist set comprises at least one blacklist, and the blacklist comprises country codes which are not allowed to send the short message verification codes. That is, the white list and the black list are combined to determine whether the country code included in the mobile phone number or the country code corresponding to the IP address is an illegal country code, thereby realizing the discrimination of the legality of the mobile phone number of each country.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure and are not to be construed as limiting the disclosure.
Fig. 1 is an architecture diagram illustrating a communication system in accordance with an exemplary embodiment.
Fig. 2 is a flowchart illustrating a method for sending a short message verification code according to an exemplary embodiment.
Fig. 3 is a schematic diagram illustrating a verification process of a short message verification code according to an exemplary embodiment.
Fig. 4 is a flowchart illustrating another short message verification code sending method according to an exemplary embodiment.
Fig. 5 is a flowchart illustrating a further method for sending a short message verification code according to an exemplary embodiment.
FIG. 6 is a schematic diagram illustrating yet another process for satisfying preset conditions according to an exemplary embodiment.
Fig. 7 is a block diagram illustrating a short message authentication code transmitting apparatus according to an exemplary embodiment.
Fig. 8 is a schematic structural diagram of a short message server according to an exemplary embodiment.
Detailed Description
In order to make the technical solutions of the present disclosure better understood by those of ordinary skill in the art, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the disclosure described herein are capable of operation in sequences other than those illustrated or otherwise described herein. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
Fig. 1 is an architecture diagram illustrating a communication system in accordance with an exemplary embodiment. As shown in fig. 1, the communication system includes: terminal equipment 101, application server 102, short message server 103, provider server 104, operator server 105. Optionally, the communication system may further include a base station 106 and a core network device 107.
The application server 102, the short message server 103, the provider server 104, the operator server 105 and the core network device 107 are all connected to the internet. Optionally, the terminal device 101 (e.g., a computer) may also be connected to the internet.
The terminal device 101 may run and display APP, Internet web pages, etc. Which may include cell phones, tablets, computers, personal computers, smart watches, etc. The terminal device 101 (e.g., a mobile phone) may be installed with a Subscriber Identity Module (SIM) card or operate with a virtual SIM card, etc. for binding with a mobile phone number. When the user performs operations such as registration and payment on the APP or Internet page of the terminal device 101 that require the user to obtain real information, the APP or Internet page may require the user to provide a mobile phone number for short message authentication. The terminal device 101 may send information related to the short message verification to the application server 102, and the application server 102 forwards the information to the short message server 103, for example, the mobile phone number of the user, the IP address of the device requesting the short message verification, the short message verification code received by the terminal device 101, and the like. The present disclosure takes the terminal device 105 as a handset as an example, but is not intended to be limited thereto.
The application server 102 is configured to provide services and contents to the user through APP, Internet web page, and the like, and is further configured to forward information related to short message authentication from the terminal device 101 to the short message server 103, and obtain an authentication result from the short message server 103. When the verification result is passed, the application server 102 continues to provide services and contents for the user through the APP, the Internet webpage and the like; otherwise, refusing to provide service and content for the user through APP, Internet webpage and the like.
The short message server 103 is configured to receive information related to short message authentication from the application server 102, and request the provider server 105 to send a short message authentication code to the terminal device 101 corresponding to the mobile phone number through the provider server 104 when it is determined that the short message authentication code can be sent to the terminal device 101 according to the short message authentication code sending method of the present disclosure. The verification is performed according to the short message verification code received by the terminal device 101 and forwarded by the application server 102, and the verification result is sent to the application server 102.
The provider server 104 is a bridge between the short message server 103 and the operator server 105, and is configured to provide a short message-related interface to the short message server 103 for the short message server 102 to call, and finally send a short message verification code to the terminal device 105 corresponding to the mobile phone number by calling the operator server 105.
The operator server 105 belongs to an operator (e.g., china mobile, china unicom, china telecom, etc.), and is configured to send the short message verification code to the terminal device 105 corresponding to the mobile phone number according to the call of the provider server 103.
When the terminal apparatus 101 is a mobile phone, the terminal apparatus 101 is connected to the internet through the base station 106 and the core network apparatus 107.
As described above, if an illegal user inputs a mobile phone number of another country and forges the IP address of the device requesting the short message verification to send the verification code, it is difficult for the short message server 103 to discriminate the validity of the mobile phone number.
The short message verification code sending method includes that a short message server 103 obtains a country code included in a mobile phone number according to the mobile phone number to be verified, obtains a country code corresponding to an IP address according to an Internet protocol IP address of equipment requesting short message verification, determines a corresponding blacklist and a white list from one of the country code included in the mobile phone number or the country code corresponding to the IP address, and determines whether to send a short message verification code or not by judging whether the other one of the country code included in the mobile phone number or the country code corresponding to the IP address belongs to the blacklist and the white list, so that legality of the mobile phone number of each country is screened.
Fig. 2 is a flowchart illustrating a method for sending a short message verification code according to an exemplary embodiment. The short message verification code sending method can be executed by the short message server 103. As shown in fig. 2, the short message verification code sending method includes:
s201, the short message server 103 obtains the IP address of the device requesting short message verification and the mobile phone number to be verified.
The mobile phone number to be verified comprises a country code. A country code, also called a country code, is a set of geographic codes that are used to represent a country and foreign territories. The country code is a short string of letters or numbers, which is convenient for data processing and communication. There are many different national code standards in the world, the most widely known of which is ISO3166-1, the International organization for standardization. For example, the country code of china is 86, and the country code of the united states is 1.
The IP address is a digital label assigned to a device accessing the internet. Common IP addresses fall into two broad categories, IPv4 and IPv 6.
The device for requesting the short message verification can be a mobile phone, a computer and other terminal devices.
When a user requests short message verification on the terminal device 101, the terminal device 101 sends the IP address of the device requesting the short message verification and the mobile phone number to be verified to the application server 102, and the short message server 103 may obtain the IP address of the device requesting the short message verification and the mobile phone number to be verified from the application server 102.
This is illustrated in an exemplary scenario with reference to fig. 3. Fig. 3 is a schematic diagram illustrating a verification process of a short message verification code according to an exemplary embodiment. The schematic diagram is illustrated by taking the display interface of the APP running on the mobile phone as an example, but is not intended to be limited thereto.
Illustratively, as shown in fig. 3, (1) when a user performs operations such as registration, payment and the like on the APP of the terminal device 101 that require real information of the user, a text box 301 is displayed on the display interface of the APP, and the user inputs a mobile phone number to be verified, for example "+ 1-9287242335", where "1" is a country code in the united states, which is a country code included in the mobile phone number in the present disclosure, and "9287242335" is a personal mobile phone number of the user.
(2) After the user clicks the "send short message verification code" button 302, the APP obtains the mobile phone number from the text box 301, and obtains the IP address of the terminal device 101 as the IP address of the device requesting short message verification. The terminal device 101 sends a short message verification request message to the application server, wherein the short message verification request message includes an IP address of the device requesting short message verification and a mobile phone number to be verified. Specifically, the short message authentication request message is finally sent to the application server 102 via the base station 106, the core network device 107, and the internet.
(3) The application server 102 forwards the short message authentication request message to the short message server 103 through the internet. The short message server 103 can obtain the IP address of the device requesting short message verification and the mobile phone number to be verified from the short message verification request message.
S202, the short message server 103 determines a country code corresponding to the IP address according to the IP address of the device requesting short message verification.
To facilitate management of global IP addresses, the IP addresses of the countries are allocated in segments (i.e., IP address segments). For example, IP address fields 3.0.0.0-3.255.255.255 belong to the United states and IP address fields 24.179.140.0-24.179.150.255 belong to China. According to the IP address of the equipment requesting short message verification, the IP address field to which the equipment belongs can be inquired and obtained so as to have the country to which the IP address field belongs, and therefore the country code corresponding to the IP address can be determined.
For example, assuming that the IP address of the device requesting short message authentication is 24.179.140.122, it may be determined that the IP address belongs to the IP address fields 24.179.140.0-24.179.150.255 of china, and thus it may be determined that the country code corresponding to the IP address is "86".
S203, the short message server 103 determines whether to send the short message verification code to the terminal device corresponding to the mobile phone number according to the country code included in the mobile phone number, the country code corresponding to the IP address, the white list set and the black list set.
The white list set comprises at least one white list, and the white list comprises country codes allowing the short message verification codes to be sent. The blacklist set comprises at least one blacklist, and the blacklist comprises country codes which are not allowed to send the short message verification codes. The white list set and the black list set can be stored in an IPIP library.
Fig. 4 is a flowchart illustrating another short message verification code sending method according to an exemplary embodiment. Specifically, as shown in fig. 4, step S203 may include S2031 to S2032:
s2031, the short message server 103 determines a first white list corresponding to the first country code from the white list set according to the first country code, and determines a first blacklist corresponding to the first country code from the blacklist set.
Each country code may correspond to at least one white list or may correspond to at least one black list. The first country code is one of a country code included in the mobile phone number or a country code corresponding to the IP address. That is, the first white list corresponding to the first country code may be determined from the at least one white list according to any one of the country code corresponding to the IP address or the country code corresponding to the mobile phone number, and the first black list corresponding to the first country code may be determined from the at least one black list. According to the method and the device, corresponding white list and black list configuration is carried out on the first country code, the country code which allows the short message verification code to be sent and the country code which does not allow the short message verification code to be sent can be configured more flexibly, and the probability of accidental injury is reduced.
For example, assuming that the first country code is a country code "1" included in the mobile phone number, it may be determined that a first white list corresponding to the first country code is shown in table 1, and a first black list corresponding to the first country code is shown in table 2:
TABLE 1
Country code State of the country
82 Korea
49 Germany
33 France
TABLE 2
Figure BDA0002311752940000061
Figure BDA0002311752940000071
S2032, the short message server 103 determines whether to send the short message verification code to the terminal device corresponding to the mobile phone number according to the second country code, the first white list and the first black list.
The second country code is the other one of the country code included in the mobile phone number or the country code corresponding to the IP address. That is, when the first country code is a country code included in the mobile phone number, the second country code is a country code corresponding to the IP address; and when the first country code is the country code corresponding to the IP address, the second country code is the country code included by the mobile phone number.
For example, in the following example, assuming that the first country code is a country code "1" included in the mobile phone number, the second country code is a country code "86" corresponding to the IP address.
Fig. 5 is a flowchart illustrating a further method for sending a short message verification code according to an exemplary embodiment. Optionally, as shown in fig. 5, S2032 may include S20321:
s20321, when the preset condition is met, the short message server 103 sends a short message verification code to the terminal device corresponding to the mobile phone number.
FIG. 6 is a schematic diagram illustrating yet another process for satisfying preset conditions according to an exemplary embodiment. As shown in fig. 6, the preset condition is satisfied as one of the following conditions:
and under the first condition, the white list switch is closed, and the black list switch is closed. The white list switch is used for indicating whether the second country code is verified to belong to the first white list, and the blacklist switch is used for indicating whether the second country code is verified to belong to the first blacklist. That is, when it is not necessary to verify whether the second country code belongs to the first white list or the first black list, the short message server 103 sends the short message verification code to the terminal device corresponding to the mobile phone number.
For example, for the first white list in table 1 and the first black list in table 2, although the second country code "86" does not belong to the first white list but belongs to the first black list, if both the white list switch and the black list switch are turned off, the preset condition is met, so the short message server 103 may send the short message verification code to the terminal device corresponding to the mobile phone number.
And a second condition is that the white list switch is turned on, the black list switch is turned off, and the second country code belongs to the first white list. That is, when it is not necessary to verify whether the second country code belongs to the first blacklist, if the second country code belongs to the first whitelist, the short message server 103 may send the short message verification code to the terminal device corresponding to the mobile phone number.
Illustratively, for the first white list in table 1 and the first black list in table 2, if the white list switch is turned on and the black list switch is turned off, since the second country code "86" does not belong to the first white list, the preset condition is not satisfied. If the second country code is one of "82", "49" and "33", the second country code belongs to the first white list, and satisfies a preset condition, so the short message server 103 can send the short message verification code to the terminal device corresponding to the mobile phone number.
And a third condition is that the white list switch is closed, the black list switch is opened, and the second country code does not belong to the first black list. That is, when it is not necessary to verify whether the second country code belongs to the first white list, if the second country code does not belong to the first black list, the short message server 103 sends the short message verification code to the terminal device corresponding to the mobile phone number.
Illustratively, for the first white list in table 1 and the first black list in table 2, if the white list switch is turned off and the black list switch is turned on, since the second country code "86" belongs to the first black list, the preset condition is not satisfied. If the second country code is "25", although the second country code does not belong to the first white list shown in table 1, the second country code does not belong to the first black list, so that the preset condition is met, and the short message server 103 may send the short message verification code to the terminal device corresponding to the mobile phone number.
And a fourth condition is that the white list switch is turned on, the blacklist switch is turned on, the second country code belongs to the first white list, and the second country code does not belong to the first blacklist. That is to say, when it is required to verify whether the second country code belongs to the first white list and the first black list, if the second country code belongs to the first white list and the second country code does not belong to the first black list, the short message server 103 sends the short message verification code to the terminal device corresponding to the mobile phone number.
Illustratively, for the first white list in table 1 and the first black list in table 2, if the white list switch is turned on, the black list switch is turned on, and since the second country code "86" does not belong to the first white list and belongs to the first black list, the preset condition is not satisfied. If the second country code is one of "82", "49" and "33", the second country code belongs to the first white list and does not belong to the first black list, and the preset condition is met, so the short message server 103 can send the short message verification code to the terminal device corresponding to the mobile phone number.
For example, as shown in fig. 3, when the preset condition is met, the short message verification process may be completed through the following steps:
(4) the short message server 103 may generate a random short message authentication code (e.g., 3521) according to the mobile phone number and transmit the random short message authentication code to the operator server 105 by calling an interface of the provider server 104.
(5) The operator server 105 sends the short message verification code to the terminal device corresponding to the mobile phone number in the form of a short message through the wireless communication system (the core network device 107 and the base station 106).
(6) After filling the received short message verification code into the text box 303, the user clicks the "ok" button 304, and the terminal device 101 sends the mobile phone number to be verified and the acquired short message verification code to the short message server 103 through the application server 102 for verification. If the fed back short message verification code is consistent with the sent short message verification code, the verification is passed, otherwise, the verification is not passed, and the short message server 103 sends the verification result to the application server 102.
It should be noted that, a general white list switch may be set for all white lists, or a corresponding white list switch may be set for each white list; similarly, a total blacklist switch may be set for all blacklists, or a corresponding blacklist switch may be set for each blacklist. For setting a corresponding white list switch for each white list and setting a corresponding black list switch for each black list, it is equivalent to a filtering rule that a mobile phone number can be turned on or off for each country at any time.
In addition, the terminal device corresponding to the mobile phone number according to the present disclosure refers to a terminal device to which a SIM card corresponding to the mobile phone number is attached. The device requesting short message verification can be the same as or different from the terminal device corresponding to the mobile phone number, for example, the device requesting short message verification can be a computer, the terminal device corresponding to the mobile phone number can be a mobile phone, and the two devices are different. Or, the device requesting the short message authentication may be the first mobile phone, and the terminal device corresponding to the mobile phone number may be the second mobile phone, where the two are also different. Or, as shown in fig. 3 of the present disclosure, the device requesting short message authentication and the terminal device corresponding to the mobile phone number may be the same mobile phone, and at this time, the two devices are the same.
Optionally, as shown in fig. 5, when the preset condition is satisfied, S2032 may further include S20322:
s20322, the short message server 103 sends instruction information to the device requesting short message authentication.
The indication information is used for indicating that the short message verification code is successfully sent to the terminal equipment corresponding to the mobile phone number. The method and the device can provide better use experience for the user, so that the user can know that the short message verification code is successfully sent, and only needs to wait for a period of time without repeatedly requesting short message verification.
Optionally, as shown in fig. 5, when the preset condition is not satisfied, S2032 may further include S20323 to S20324:
s20323, the short message server 103 sends instruction information to the device requesting short message authentication.
The indication information is used for indicating that the short message verification code is successfully sent to the terminal equipment corresponding to the mobile phone number.
S20324, calculating the probability of sending the short message verification code to the terminal equipment corresponding to the mobile phone number, and determining whether to send the short message verification code to the terminal equipment corresponding to the mobile phone number according to the probability.
That is, when the preset condition is not met, if the short message verification code is not sent to the terminal device corresponding to the mobile phone number at all, and the device requesting the short message verification is not indicated to have successfully sent the short message verification code, the illegal user may change the disguised IP address or the mobile phone number to continue the attack (i.e., continue to request the short message verification). Therefore, the short message verification code is truly sent to the users which do not meet the preset conditions with a certain probability, the short message verification code is indicated to be successfully sent, and the illegal users are prevented from groping the filtering rules and the defense strategies of the short message server 103.
According to the short message verification code sending method, the short message server obtains the IP address of the equipment requesting short message verification and the mobile phone number to be verified. The mobile phone number to be verified comprises a country code, and the country code corresponding to the IP address is determined according to the IP address of the device requesting short message verification. And determining whether to send a short message verification code to the terminal equipment corresponding to the mobile phone number according to the country code included in the mobile phone number, the country code corresponding to the IP address, the white list set and the black list set. The white list set comprises at least one white list, and the white list comprises country codes allowing the short message verification codes to be sent. The blacklist set comprises at least one blacklist, and the blacklist comprises country codes which are not allowed to send the short message verification codes. That is, the white list and the black list are combined to determine whether the country code included in the mobile phone number or the country code corresponding to the IP address is an illegal country code, thereby realizing the discrimination of the legality of the mobile phone number of each country.
Fig. 7 is a block diagram illustrating a short message authentication code transmitting apparatus according to an exemplary embodiment. As shown in fig. 7, the short message verification code sending apparatus 700 includes an obtaining unit 701, a determining module 702 and a communication unit 703.
The obtaining unit 701 is configured to perform obtaining of an internet protocol IP address of the device requesting short message verification and a mobile phone number to be verified, where the mobile phone number includes a country code.
A determining unit 702 configured to perform determining a country code corresponding to the IP address according to the IP address.
The communication unit 703 is configured to perform determining whether to send the short message verification code to the terminal device corresponding to the mobile phone number according to a country code included in the mobile phone number, a country code corresponding to the IP address, a white list set and a blacklist set, wherein the white list set includes at least one white list, the blacklist set includes at least one blacklist, the white list includes country codes that allow sending the short message verification code, and the blacklist includes country codes that do not allow sending the short message verification code.
Optionally, the communication unit 703 is specifically configured to perform:
and according to the first country code, determining a first white list corresponding to the first country code from the white list set, and determining a first blacklist corresponding to the first country code from the blacklist set.
And determining whether to send a short message verification code to the terminal equipment corresponding to the mobile phone number according to the second country code, the first white list and the first black list.
The first country code is one of a country code included by the mobile phone number or a country code corresponding to the IP address, and the second country code is the other of the country code included by the mobile phone number or the country code corresponding to the IP address.
Optionally, the communication unit 703 is specifically configured to perform:
and when the preset condition is met, sending a short message verification code to the terminal equipment corresponding to the mobile phone number. Wherein, satisfying the preset condition is one of the following conditions:
the white list switch is closed, and the black list switch is closed; or the white list switch is turned on, the black list switch is turned off, and the second country code belongs to the first white list; or the white list switch is closed, the black list switch is opened, and the second country code does not belong to the first black list; or the white list switch is turned on, the black list switch is turned on, the second country code belongs to the first white list, and the second country code does not belong to the first black list.
Optionally, the communication unit 703, when a preset condition is met, is further configured to perform:
and sending indication information to the equipment requesting the short message verification, wherein the indication information is used for indicating that the short message verification code is successfully sent to the terminal equipment corresponding to the mobile phone number.
Optionally, the communication unit 703, when the preset condition is not satisfied, is further configured to perform:
and sending indication information to the equipment requesting the short message verification, wherein the indication information is used for indicating that the short message verification code is successfully sent to the terminal equipment corresponding to the mobile phone number.
And calculating the probability of sending the short message verification code to the terminal equipment corresponding to the mobile phone number, and determining whether to send the short message verification code to the terminal equipment corresponding to the mobile phone number according to the probability.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Fig. 8 is a schematic structural diagram of a short message server according to an exemplary embodiment. As shown in fig. 8, the short message server 103 includes: including a processor 1031, a communication interface 1032, volatile memory 1033, and non-volatile memory 1034.
The processor 1031 may be a chip. For example, the integrated circuit may be a Field Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), a system on chip (SoC), a Central Processing Unit (CPU), a Network Processor (NP), a digital signal processing circuit (DSP), a Microcontroller (MCU), a Programmable Logic Device (PLD), or other integrated chips.
The communication interface 1032 is used for the short message server 103 to communicate with other communication devices, for example, the communication interface 103 may include an ethernet interface, a wired or wireless network interface, and the like.
Volatile memory 1033 can include Random Access Memory (RAM), including dynamic RAM and/or static RAM, on-chip and/or off-chip cache memory, and the like.
Non-volatile memory 1034, which may be embedded and/or removable, may include, for example, read-only memory, flash memory, magnetic storage devices, such as hard disks, floppy disk drives, magnetic tape, etc., optical disk drives and/or media, non-volatile random access memory (NVRAM), and/or the like.
Similar to volatile memory 1033, non-volatile memory 1034 may include a cache area for the temporary storage of data. At least a portion of the volatile and/or nonvolatile memory may be embedded in processor 1031. The memory may store one or more software programs, instructions, information blocks, data, etc. which can be invoked by the processor 1031 to perform the functions of the sms server 103 in the present disclosure, such as the sms verification code sending method.
In an exemplary embodiment, a storage medium including instructions, for example, a memory including instructions, which can be executed by the processor 1031 of the sms server 103 to complete the sms verification code sending method is further provided. Alternatively, the storage medium may be a non-transitory computer readable storage medium, which may be, for example, a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
In an exemplary embodiment, a computer program product containing instructions is further provided, which when run on a computing device, causes the computing device to execute the provided short message verification code sending method, or causes the computing device to implement the functions of the provided short message verification code sending apparatus.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (12)

1. A method for sending a short message verification code is characterized by comprising the following steps:
acquiring an Internet Protocol (IP) address of equipment requesting short message verification and a mobile phone number to be verified, wherein the mobile phone number comprises a country code;
determining a country code corresponding to the IP address according to the IP address;
and determining whether to send a short message verification code to terminal equipment corresponding to the mobile phone number according to a country code included in the mobile phone number, a country code corresponding to the IP address, a white list set and a blacklist set, wherein the white list set comprises at least one white list, the blacklist set comprises at least one blacklist, the white list comprises country codes allowing the short message verification codes to be sent, and the blacklist comprises country codes not allowing the short message verification codes to be sent.
2. The method for sending short message authentication code according to claim 1, wherein the determining whether to send short message authentication code to the terminal device corresponding to the mobile phone number according to the country code included in the mobile phone number, the country code corresponding to the IP address, the white list set and the black list set includes:
according to the first country code, determining a first white list corresponding to the first country code from the white list set, and determining a first blacklist corresponding to the first country code from the blacklist set;
determining whether to send a short message verification code to the terminal equipment corresponding to the mobile phone number according to a second country code, the first white list and the first black list;
the first country code is one of a country code included by the mobile phone number or a country code corresponding to the IP address, and the second country code is the other of the country code included by the mobile phone number or the country code corresponding to the IP address.
3. The method for sending short message verification code according to claim 2, wherein the determining whether to send short message verification code to the terminal device corresponding to the mobile phone number according to the second country code, the first white list and the first black list includes:
when a preset condition is met, sending a short message verification code to the terminal equipment corresponding to the mobile phone number;
wherein the preset condition is one of the following conditions:
the white list switch is closed, and the black list switch is closed; the white list switch is used for indicating whether the second country code is verified to belong to the first white list, and the blacklist switch is used for indicating whether the second country code is verified to belong to the first blacklist;
or the white list switch is turned on, the black list switch is turned off, and the second country code belongs to the first white list;
or the white list switch is closed, the black list switch is opened, and the second country code does not belong to the first black list;
or, the white list switch is turned on, the black list switch is turned on, the second country code belongs to the first white list, and the second country code does not belong to the first black list.
4. The short message authentication code sending method according to claim 3, wherein when the preset condition is satisfied, the short message authentication code sending method further comprises:
and sending indication information to the equipment requesting the short message verification, wherein the indication information is used for indicating that the short message verification code is successfully sent to the terminal equipment corresponding to the mobile phone number.
5. The short message authentication code sending method according to claim 3, wherein when the preset condition is not satisfied, the short message authentication code sending method further comprises:
sending indication information to the equipment requesting short message verification, wherein the indication information is used for indicating that a short message verification code is successfully sent to the terminal equipment corresponding to the mobile phone number;
and calculating the probability of sending the short message verification code to the terminal equipment corresponding to the mobile phone number, and determining whether to send the short message verification code to the terminal equipment corresponding to the mobile phone number according to the probability.
6. A short message verification code sending device is characterized by comprising:
the system comprises an acquisition unit, a verification unit and a verification unit, wherein the acquisition unit is configured to execute the acquisition of an Internet Protocol (IP) address of equipment requesting short message verification and a mobile phone number to be verified, and the mobile phone number comprises a country code;
a determining unit configured to determine a country code corresponding to the IP address according to the IP address;
the communication unit is configured to execute determining whether to send a short message verification code to the terminal device corresponding to the mobile phone number according to a country code included in the mobile phone number, a country code corresponding to the IP address, a white list set and a blacklist set, wherein the white list set comprises at least one white list, the blacklist set comprises at least one blacklist, the white list comprises country codes allowing short message verification codes to be sent, and the blacklist comprises country codes not allowing short message verification codes to be sent.
7. The short message authentication code sending device of claim 6, wherein the communication unit is specifically configured to perform:
according to the first country code, determining a first white list corresponding to the first country code from the white list set, and determining a first blacklist corresponding to the first country code from the blacklist set;
determining whether to send a short message verification code to the terminal equipment corresponding to the mobile phone number according to a second country code, the first white list and the first black list;
the first country code is one of a country code included by the mobile phone number or a country code corresponding to the IP address, and the second country code is the other of the country code included by the mobile phone number or the country code corresponding to the IP address.
8. The sms message authentication code sending device of claim 7, wherein the communication unit is specifically configured to perform:
when a preset condition is met, sending a short message verification code to the terminal equipment corresponding to the mobile phone number;
wherein the preset condition is one of the following conditions:
the white list switch is closed, and the black list switch is closed; the white list switch is used for indicating whether the second country code is verified to belong to the first white list, and the blacklist switch is used for indicating whether the second country code is verified to belong to the first blacklist;
or the white list switch is turned on, the black list switch is turned off, and the second country code belongs to the first white list;
or the white list switch is closed, the black list switch is opened, and the second country code does not belong to the first black list;
or, the white list switch is turned on, the black list switch is turned on, the second country code belongs to the first white list, and the second country code does not belong to the first black list.
9. The apparatus according to claim 8, wherein when the preset condition is satisfied, the communication unit is further configured to perform:
and sending indication information to the equipment requesting the short message verification, wherein the indication information is used for indicating that the short message verification code is successfully sent to the terminal equipment corresponding to the mobile phone number.
10. The apparatus according to claim 8, wherein when the preset condition is not satisfied, the communication unit is further configured to perform:
sending indication information to the equipment requesting short message verification, wherein the indication information is used for indicating that a short message verification code is successfully sent to the terminal equipment corresponding to the mobile phone number;
and calculating the probability of sending the short message verification code to the terminal equipment corresponding to the mobile phone number, and determining whether to send the short message verification code to the terminal equipment corresponding to the mobile phone number according to the probability.
11. A sms server, comprising:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the short message authentication code sending method according to any one of claims 1-5.
12. A storage medium, wherein instructions in the storage medium, when executed by a processor of a short message server, enable the short message server to perform the short message verification code sending method according to any one of claims 1-5.
CN201911261655.3A 2019-12-10 2019-12-10 Short message verification code sending method and device, short message server and storage medium Active CN111049822B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911261655.3A CN111049822B (en) 2019-12-10 2019-12-10 Short message verification code sending method and device, short message server and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911261655.3A CN111049822B (en) 2019-12-10 2019-12-10 Short message verification code sending method and device, short message server and storage medium

Publications (2)

Publication Number Publication Date
CN111049822A CN111049822A (en) 2020-04-21
CN111049822B true CN111049822B (en) 2022-04-22

Family

ID=70235449

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911261655.3A Active CN111049822B (en) 2019-12-10 2019-12-10 Short message verification code sending method and device, short message server and storage medium

Country Status (1)

Country Link
CN (1) CN111049822B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111918224B (en) * 2020-07-28 2022-03-04 广州市百果园信息技术有限公司 Short message verification method, device, equipment and storage medium
CN112003846B (en) * 2020-08-13 2023-02-03 广州市百果园信息技术有限公司 Credit threshold training method, IP address detection method and related device
CN112149072A (en) * 2020-09-22 2020-12-29 北京达佳互联信息技术有限公司 Identity authentication method, device, equipment and medium for platform user

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103874065A (en) * 2012-12-17 2014-06-18 中国移动通信集团上海有限公司 Method and device for judging user position abnormity
WO2017147890A1 (en) * 2016-03-04 2017-09-08 华为技术有限公司 Verification code short message display method and mobile terminal
CN107995587A (en) * 2016-10-25 2018-05-04 中国电信股份有限公司 Authentication method, authentication platform and Verification System and service provider's platform
CN108810831A (en) * 2018-04-17 2018-11-13 平安科技(深圳)有限公司 Method for pushing, electronic device and the readable storage medium storing program for executing of short message verification code
CN110191020A (en) * 2019-05-29 2019-08-30 中国联合网络通信集团有限公司 A kind of communicating number preprocess method and device
CN110248356A (en) * 2019-06-06 2019-09-17 北京达佳互联信息技术有限公司 Information acquisition method and device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103874065A (en) * 2012-12-17 2014-06-18 中国移动通信集团上海有限公司 Method and device for judging user position abnormity
WO2017147890A1 (en) * 2016-03-04 2017-09-08 华为技术有限公司 Verification code short message display method and mobile terminal
CN107995587A (en) * 2016-10-25 2018-05-04 中国电信股份有限公司 Authentication method, authentication platform and Verification System and service provider's platform
CN108810831A (en) * 2018-04-17 2018-11-13 平安科技(深圳)有限公司 Method for pushing, electronic device and the readable storage medium storing program for executing of short message verification code
CN110191020A (en) * 2019-05-29 2019-08-30 中国联合网络通信集团有限公司 A kind of communicating number preprocess method and device
CN110248356A (en) * 2019-06-06 2019-09-17 北京达佳互联信息技术有限公司 Information acquisition method and device

Also Published As

Publication number Publication date
CN111049822A (en) 2020-04-21

Similar Documents

Publication Publication Date Title
CN108737327B (en) Method, device and system for intercepting malicious website and memory
US10462647B2 (en) Communication control method and apparatus, terminal, and network platform
CN111049822B (en) Short message verification code sending method and device, short message server and storage medium
US20160309326A1 (en) Method for Data Service Transmission and Terminal
EP3197213B1 (en) Network access method and mobile communication terminal
CN105338515B (en) Data service transmission method and mobile communication equipment
CN108449801B (en) Network connection method, device, computer device and computer readable storage medium
CN111262865B (en) Method, device and system for making access control strategy
CN107197462B (en) Wireless network type detection method and device and electronic equipment
CN108055238A (en) A kind of account verification method and system
CN113067859B (en) Communication method and device based on cloud mobile phone
CN107451488B (en) Method and device for providing personal information and mobile terminal
WO2016041171A1 (en) Method and apparatus for determining terminal roaming status, terminal and server
CN107612922A (en) User ID authentication method and device based on user operation habits and geographical position
CN108430059B (en) Method, device and system for distributing user identification card and readable storage medium
CN109218506A (en) Method and device for protecting privacy information and mobile terminal
CN105790948A (en) Identity authentication method and identity authentication device
CN108989365B (en) Information processing method, server, terminal equipment and storage medium
CN109150864B (en) Anti-cheating method and device based on secondary authentication
CN104331407A (en) Multimedia file information recommending method and multimedia file information recommending device
CN112770380A (en) Specific absorption rate parameter adjusting method, specific absorption rate parameter adjusting device, computer equipment and storage medium
CN112970276B (en) Communication processing method, device, mobile terminal and storage medium
CN108512803A (en) Remind the method and device of change account bound phone number
CN110786028A (en) Application resource processing method and related product
CN107809758B (en) SIM card information protection method and device

Legal Events

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