CN109167759B - Mobile phone number acquisition method and device - Google Patents

Mobile phone number acquisition method and device Download PDF

Info

Publication number
CN109167759B
CN109167759B CN201810905050.2A CN201810905050A CN109167759B CN 109167759 B CN109167759 B CN 109167759B CN 201810905050 A CN201810905050 A CN 201810905050A CN 109167759 B CN109167759 B CN 109167759B
Authority
CN
China
Prior art keywords
mobile phone
hash value
phone number
random number
application program
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
CN201810905050.2A
Other languages
Chinese (zh)
Other versions
CN109167759A (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.)
China United Network Communications Group Co Ltd
Original Assignee
China United Network Communications Group 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 China United Network Communications Group Co Ltd filed Critical China United Network Communications Group Co Ltd
Priority to CN201810905050.2A priority Critical patent/CN109167759B/en
Publication of CN109167759A publication Critical patent/CN109167759A/en
Application granted granted Critical
Publication of CN109167759B publication Critical patent/CN109167759B/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/08Network architectures or network communication protocols for network security for authentication of entities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/45Network directories; Name-to-address mapping
    • H04L61/4557Directories for hybrid networks, e.g. including telephone numbers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0407Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the identity of one or more communicating identities is hidden
    • H04L63/0414Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the identity of one or more communicating identities is hidden during transmission, i.e. party's identity is protected against eavesdropping, e.g. by using temporary identifiers, but is known to the other party or parties involved in the communication

Abstract

The embodiment of the application discloses a mobile phone number obtaining method and a mobile phone number obtaining device, relates to the technical field of communication, and solves the problem that network safety and information safety of a user cannot be guaranteed when an application program or an application server obtains a mobile phone number of the user at present. The specific scheme is as follows: receiving an ID and a first random number of an application program sent by a terminal; sending a second random number to the terminal according to the ID of the application program; receiving a first hash value sent by a terminal; generating a second hash value by adopting a hash algorithm according to the ID of the application program, the first random number and the second random number; if the first hash value is the same as the second hash value, the first server sends the first hash value or the second hash value, the user private network IP address and the user mobile phone number to the national mobile phone number acquisition system, so that the application server queries the national mobile phone number acquisition system according to the third hash value to acquire the user mobile phone number.

Description

Mobile phone number acquisition method and device
Technical Field
The embodiment of the application relates to the technical field of communication, in particular to a method and a device for acquiring a mobile phone number.
Background
At present, the number of chinese mobile phone users and the number of mobile Internet users are huge, and the number of public Network IPv4 addresses owned by chinese telecom operators is far from meeting the demand, so in actual networking, private Network IPv4 addresses are allocated to users, and there are overlapping and multiplexing of private Network IPv4 addresses of different provinces or cities, when a mobile phone user accesses a mobile Internet, a packet gateway of a mobile communication Network (for example, GGSN of a 3G Network, P-GW of a 4G Network, SMF of a 5G Network) maps a private Network Protocol (Internet Protocol, IP) Address to a public Network IP Address through technologies such as Network Address Translation (NAT), and the like, so there are two situations in the mobile communication Network: in one case, two mobile phone users in different provinces or in different cities of the same province may be assigned two identical private network IPV4 addresses; alternatively, multiple mobile phone users in the same province or the same city access mobile internet services using the same public network IPV4 address.
For a mobile phone APP or an application server of mobile internet service, the mobile phone number of a mobile internet user is obtained, so that the service quality of the user can be improved, and service innovation can be assisted. The existing mode for acquiring the mobile phone number of a mobile internet user is to initiate a mobile phone number acquisition request to a national mobile phone number acquisition system through the internet by carrying a public network IP and a private network IP of the user through a mobile phone APP. However, the private network IP may be intercepted or stolen by the acquisition method, so that great potential safety hazards exist in network security and user information security.
Disclosure of Invention
The embodiment of the application provides a method and a device for acquiring a mobile phone number, which can hide network topology and configuration of an operator and guarantee network security and user information security.
In order to achieve the above purpose, the embodiment of the present application adopts the following technical solutions:
in a first aspect of the embodiments of the present application, a method for acquiring a mobile phone number is provided, where the method includes: the method comprises the steps that a mobile phone number acquisition server receives an ID and a first random number of an application program sent by a terminal; the application program is an application program running on a terminal, and the first random number is generated by the application program randomly; sending a second random number to the terminal according to the ID of the application program, wherein the second random number is generated randomly by the mobile phone number acquisition server; receiving a first hash value sent by a terminal, wherein the first hash value is generated by the terminal according to the ID of an application program, a first random number and a second random number by adopting a preset hash algorithm; generating a second hash value by adopting the hash algorithm according to the ID of the application program, the first random number and the second random number; if the first hash value is the same as the second hash value, the mobile phone number acquisition server sends the first hash value or the second hash value, the user private network IP address and the user mobile phone number to a national mobile phone number acquisition system, and a database of the national mobile phone number acquisition system comprises corresponding relations among user attributions of at least two users, the user mobile phone numbers, the user private network IP addresses and the first hash value or the second hash value. Based on the scheme, the application program and the application server are respectively authenticated, and the hash value generated by the random number is used as a parameter to initiate a mobile phone number acquisition request to a national mobile phone number acquisition system, so that the private network IP address of the user does not need to be transmitted in the mobile communication network like the prior art, and the network security and the user information security can be guaranteed.
With reference to the first aspect, in a first possible implementation manner, the first hash value or the second hash value stored in the national mobile phone number obtaining system is provided with a validity period, and the first hash value or the second hash value exceeds the validity period or is invalidated after one query. Based on the scheme, the validity period and the query times of the hash value stored in the database of the national mobile phone number system are set, so that the situation that the hash value is intercepted and falsely used can be effectively prevented, and the security of acquiring the mobile phone number of the user is further improved.
In a second aspect of the embodiments of the present application, a method for acquiring a mobile phone number is provided, where the method includes: a national mobile phone number acquisition system receives a mobile phone number acquisition request sent by an application server; the mobile phone number acquisition request carries a third hash value, the third hash value is generated by the application server according to the ID of the application program, a first random number and a second random number by adopting a preset hash algorithm, the first random number is generated by the application program at random, and the second random number is generated by the mobile phone number acquisition server at random; and according to the third hash value, if the database of the national mobile phone number acquisition system contains the third hash value, transmitting the user mobile phone number corresponding to the third hash value to the application server. Based on the scheme, the mobile phone number acquisition request is initiated to the national mobile phone number acquisition system by taking the hash value generated by the random number as a parameter, so that the network security and the user information security can be guaranteed.
With reference to the second aspect and the foregoing possible implementation manners, in another possible implementation manner, before the national mobile phone number obtaining system receives a mobile phone number obtaining request sent by an application server, the method further includes: receiving a first hash value or a second hash value, a user private network IP address and a user mobile phone number sent by a mobile phone number acquisition server; the first hash value is generated by the terminal according to the ID of the application program, the first random number and the second random number by adopting the hash algorithm; the second hash value is generated by the mobile phone number acquisition server according to the ID of the application program, the first random number and the second random number by adopting the hash algorithm; the national mobile phone number acquisition system stores the corresponding relation between the first hash value or the second hash value, the user private network IP address and the user mobile phone number in a database, and sets an expiration date and query times for the first hash value or the second hash value. Based on the scheme, the validity period and the query times of the hash value stored in the database of the national mobile phone number system are set, so that the situation that the hash value is intercepted and falsely used can be effectively prevented, and the security of acquiring the mobile phone number of the user is further improved.
With reference to the second aspect and the foregoing possible implementation manners, in another possible implementation manner, the method further includes: if the storage time of the first hash value or the second hash value exceeds the validity period or the first hash value or the second hash value is inquired once, the national mobile phone number acquisition system deletes the first hash value or the second hash value. According to the scheme, the first hash value or the second hash value with the expiration date or after being queried once is deleted, so that the situation that the hash value is intercepted and then is falsely used is prevented.
In a third aspect of the embodiments of the present application, a method for acquiring a mobile phone number is provided, where the method includes: the terminal sends the ID and the first random number of the application program to a mobile phone number acquisition server; the application program is an application program running on a terminal, and the first random number is generated by the application program randomly; receiving a second random number sent by the mobile phone number acquisition server, wherein the second random number is randomly generated by the mobile phone number acquisition server; generating a first hash value by adopting a preset hash algorithm according to the ID of the application program, the first random number and the second random number; sending the first hash value to a mobile phone number acquisition server so that the mobile phone number acquisition service determines whether the first hash value and the second hash value are the same; if the first hash value is the same as the second hash value, the terminal sends the first random number and the second random number to an application server; the second hash value is generated by the first server using the hash algorithm based on the ID of the application, the first random number, and the second random number. Based on the scheme, the first random number and the second random number are sent to the application server, and the private network IP address of the user does not need to be transmitted in the mobile communication network like the prior art, so that the network safety and the user information safety can be guaranteed.
In a fourth aspect of the embodiments of the present application, a method for acquiring a mobile phone number is provided, where the method includes: the method comprises the steps that an application server receives a first random number and a second random number sent by a terminal, wherein the first random number is generated by an application program running on the terminal at random, and the second random number is generated by a mobile phone number acquisition server at random; generating a third hash value by adopting a preset hash algorithm according to the ID of the application program, the first random number and the second random number; sending a mobile phone number acquisition request to a national mobile phone number acquisition system, wherein the mobile phone number acquisition request carries a third hashed value; and if the database of the national mobile phone number acquisition system contains the third hash value, the application server receives the user mobile phone number sent by the national mobile phone number acquisition system. Based on the scheme, the third hash value generated by the random number is used as a parameter to initiate a mobile phone number acquisition request to a national mobile phone number acquisition system, so that the network security and the user information security can be guaranteed.
In a fifth aspect of the embodiments of the present application, a mobile phone number obtaining server is provided, where the mobile phone number obtaining server includes: a receiving unit, configured to receive an ID of an application and a first random number transmitted by a terminal; the application program is an application program running on the terminal, and the first random number is generated by the application program randomly; a sending unit, configured to send a second random number to the terminal according to the ID of the application, where the second random number is generated by acquiring the mobile phone number randomly; the receiving unit is further configured to receive a first hash value sent by the terminal, where the first hash value is generated by the terminal according to the ID of the application program, the first random number, and the second random number by using a preset hash algorithm; the processing unit is used for generating a second hash value by adopting the hash algorithm according to the ID of the application program, the first random number and the second random number; if the first hash value is the same as the second hash value, the sending unit is further configured to send the first hash value or the second hash value, the user private network IP address, and the user mobile phone number to a national mobile phone number acquisition system, where a database of the national mobile phone number acquisition system includes a correspondence between user attributions of at least two users, the user mobile phone numbers, the user private network IP addresses, and the first hash value or the second hash value.
With reference to the fifth aspect and the possible implementation manners, in another possible implementation manner, the first hash value or the second hash value stored in the national mobile phone number obtaining system is provided with a validity period, and the first hash value or the second hash value is invalidated after the validity period is exceeded or a query is performed.
A sixth aspect of the embodiments of the present application provides a national mobile phone number acquisition system, including: the receiving unit is used for receiving a mobile phone number acquisition request sent by the application server; the mobile phone number obtaining request carries a third hash value, the third hash value is generated by the application server according to the ID of the application program, a first random number and a second random number by adopting a preset hash algorithm, the first random number is generated by the application program at random, and the second random number is generated by the mobile phone number obtaining server at random; the processing unit is used for determining that the database of the national mobile phone number acquisition system contains the third hash value; and the sending unit is used for sending the user mobile phone number corresponding to the third hash value to the application server.
With reference to the sixth aspect and the foregoing possible implementation manner, in another possible implementation manner, the receiving unit is further configured to receive the first hash value or the second hash value, the user private network IP address, and the user mobile phone number sent by the mobile phone number obtaining server; the first hash value is generated by the terminal according to the ID of the application program, the first random number and the second random number by adopting the hash algorithm; the second hash value is generated by the mobile phone number acquisition server according to the ID of the application program, the first random number and the second random number by adopting the hash algorithm; and the storage unit is used for storing the corresponding relation among the first hash value or the second hash value, the IP address of the private network of the user and the mobile phone number of the user in the database, and setting an expiration date and query times for the first hash value or the second hash value.
With reference to the sixth aspect and the foregoing possible implementation manners, in another possible implementation manner, if the storage time of the first hash value or the second hash value exceeds the validity period or the first hash value or the second hash value is queried once, the processing unit is further configured to delete the first hash value or the second hash value.
A seventh aspect of the embodiments of the present application provides a terminal device, where the terminal device includes: a sending unit, configured to send the ID of the application program and the first random number to the mobile phone number acquisition server; the application program is an application program running on the terminal equipment, and the first random number is generated by the application program randomly; a receiving unit, configured to receive a second random number sent by the mobile phone number obtaining server, where the second random number is generated by the mobile phone number obtaining server randomly; the processing unit is used for generating a first hash value by adopting a preset hash algorithm according to the ID of the application program, the first random number and the second random number; the sending unit is further configured to send the first hash value to the mobile phone number acquisition server, so that the mobile phone number acquisition service determines whether the first hash value and the second hash value are the same; if the first hash value is the same as the second hash value, the sending unit is further configured to send the first random number and the second random number to the application server; the second hash value is generated by the first server using the hash algorithm based on the ID of the application, the first random number, and the second random number.
In an eighth aspect of embodiments of the present application, an application server is provided, where the application server includes: the mobile phone number acquisition server comprises a receiving unit, a processing unit and a processing unit, wherein the receiving unit is used for receiving a first random number and a second random number sent by a terminal, the first random number is generated by an application program running on the terminal at random, and the second random number is generated by a mobile phone number acquisition server at random; the processing unit is used for generating a third hash value by adopting a preset hash algorithm according to the ID of the application program, the first random number and the second random number; a sending unit, configured to send a mobile phone number acquisition request to a national mobile phone number acquisition system, where the mobile phone number acquisition request carries the third hash value; if the database of the national mobile phone number acquisition system contains the third hash value, the receiving unit is further configured to receive the user mobile phone number sent by the national mobile phone number acquisition system.
The description of the effects of the fifth aspect and various implementations of the fifth aspect may refer to the description of the corresponding effects of the first aspect, the description of the effects of the sixth aspect and various implementations of the sixth aspect may refer to the description of the corresponding effects of the second aspect, the description of the effects of the seventh aspect and various implementations of the seventh aspect may refer to the description of the corresponding effects of the third aspect, and the description of the effects of the eighth aspect and various implementations of the eighth aspect may refer to the description of the corresponding effects of the fourth aspect, which is not repeated herein.
In a ninth aspect of the embodiments of the present application, a server is provided, where the server includes a processor and a memory, the memory is configured to be coupled with the processor and store necessary program instructions and data of the server, and the processor is configured to execute the program instructions stored in the memory, so that the server executes the method described above.
In a tenth aspect of the embodiments of the present application, there is provided a computer storage medium having computer program code stored therein, which, when run on a processor, causes the processor to execute the above method.
In an eleventh aspect of the embodiments of the present application, there is provided a computer program product storing computer software instructions executed by the processor, the computer software instructions including a program for executing the aspects of the above aspects.
In a twelfth aspect of the embodiments of the present application, an apparatus is provided, where the apparatus exists in a product form of a chip, and the apparatus includes a processor and a memory, where the memory is configured to be coupled to the processor and store necessary program instructions and data of the apparatus, and the processor is configured to execute the program instructions stored in the memory, so that the apparatus performs functions of the apparatus corresponding to the above method.
Drawings
Fig. 1 is a schematic diagram of a system architecture according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of a mobile phone number obtaining server according to an embodiment of the present application;
fig. 3 is a flowchart of a method for acquiring a mobile phone number according to an embodiment of the present application;
fig. 4 is a schematic diagram illustrating a mobile phone number obtaining server according to an embodiment of the present disclosure;
fig. 5 is a schematic diagram illustrating a national mobile phone number obtaining system according to an embodiment of the present application;
fig. 6 is a schematic composition diagram of a terminal device according to an embodiment of the present application;
fig. 7 is a schematic composition diagram of an application server according to an embodiment of the present application.
Detailed Description
The embodiment of the present application provides a mobile phone number obtaining method, which may be applied to the system architecture shown in fig. 1 by way of example, where the system architecture 100 includes a terminal 101, a mobile communication base station 102, a gateway device 103, a PS online charging system 104, a mobile phone number obtaining server 105, a national mobile phone number obtaining system 106, a firewall 107, an internet application server 108, and the like.
A plurality of applications are running on the terminal 101, each application having its corresponding application ID. The terminal 101 establishes a mobile internet connection with the mobile communication base station 102.
The Gateway device 103 may include a Gateway GSN (Gateway GPRS Support Node, GGSN) of 2/3G, or a 4G PDN Gateway (PDN Gateway, P-GW), or a 5G Session Management Function (SMF) responsible for controlling a plane, where after the mobile user establishes a mobile internet connection, the Gateway device 103 is configured to allocate a private network IP address to the mobile internet user and report charging information to the PS online charging system 104, where the charging information carries a mobile phone number of the user and the private network IP address of the user. For example, the cell phone number 1560001234 assigns a private network IP address 172.16.12.13.
And the PS online charging system 104 is configured to receive the charging information reported by the gateway device, extract the mobile phone number of the user and the user private network IP address in the charging information, and send the extracted mobile phone number and user private network IP address to the mobile phone number obtaining server 105.
The mobile phone number obtaining server 105 is configured to receive the mobile phone number of the user and the private network IP address of the user sent by the PS online charging system 104, and report the mobile phone number of the user and the private network IP address of the user to the national mobile phone number obtaining system 106, where the mobile phone number obtaining server 105 can isolate the PS online charging system 104 from the national mobile phone number obtaining system 106, so as to prevent a malicious user from intercepting private information of the user in the PS online charging system. In the mobile internet, each mobile phone number acquisition server 105 sets an identifier corresponding to the province and city to which the mobile phone number acquisition server 105 belongs.
The national mobile phone number acquiring system 106 is configured to identify the identifier of the mobile phone number acquiring server 105, determine the province and the prefecture corresponding to the identifier, receive the mobile phone number of the user and the private network IP address of the user, which are sent by the mobile phone number acquiring server 105, and store the corresponding relationship between the mobile phone number of the user and the private network IP address of the user in the province and the prefecture in the database. For example, as shown in table 1 below, the correspondence between the home location, the private network IP address, and the mobile phone number of the user of each user is stored.
TABLE 1
Province and prefecture of province Private network IP address Mobile phone number
City of A province and B city 172.16.12.13 15600001234
X province and Y city 172.16.12.13 15611115678
The firewall 107 is configured to isolate the intranet from the internet of the mobile communication network, the private network IP address pools of the gateway devices 103 in the same firewall cannot be overlapped and multiplexed, and the private network IP address pools of the gateway devices 103 in different firewalls can be overlapped and multiplexed. It is understood that, in one implementation, the mobile phone number obtaining server 105 may correspond to the firewall 107 one-to-one, so that the province and the city to which the same private network IP address belongs may be determined by distinguishing the identifier of the mobile phone number obtaining server; in another implementation, the mobile phone number obtaining server 105 may be configured in a centralized manner, and at this time, the province and the city where the private network IP address segment is located may be obtained according to the host identifier of the gateway device 103 of the private network IP address in the charging information.
The internet application server 108 may initiate a mobile phone number acquisition request to the national mobile phone number acquisition system via the internet to acquire a mobile phone number. The internet application server 108 is an application server corresponding to the terminal application 101.
Fig. 2 is a schematic structural diagram of a mobile phone number obtaining server according to an embodiment of the present application. As shown in fig. 2, the mobile phone number obtaining server 200 includes: a hardware layer including a processor 201, a memory 202, a bus 203, etc., and a software layer including an operating system 204.
The processor 201: is a core component of the mobile phone number obtaining server 200, and is used for running an operating system of the mobile phone number obtaining server and application programs (including system application programs and third party application programs) on the mobile phone number obtaining server.
In this embodiment, the processor 201 may be specifically a Central Processing Unit (CPU), a general purpose processor, a Digital Signal Processor (DSP), an application-specific integrated circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof, which may implement or execute various exemplary logic blocks, modules, and circuits described in connection with the disclosure of the embodiment of the present application; a processor may also be a combination of computing functions, e.g., comprising one or more microprocessors, a DSP and a microprocessor, or the like.
The memory 202: can be used for storing software programs and modules, and the processor 201 executes various functional applications and data processing of the mobile phone number acquisition server by running the software programs and modules stored in the memory 202. Memory 202 may include one or more computer-readable storage media. The memory 202 includes a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function, and the like, for example, a program implementing the data processing method provided by the embodiment of the present application. The storage data area can store data created by the mobile phone number acquisition server and the like. For example, the received private network IP address of the user and the mobile phone number of the user may be stored in the process of executing the mobile phone number obtaining method.
In this embodiment, the memory 202 may specifically include a volatile memory (volatile memory), such as a random-access memory (RAM); the memory may also include a non-volatile memory (non-volatile memory), a flash memory (flash memory), a hard disk (HDD) or a solid-state drive (SSD); the memory may also comprise a combination of memories of the kind described above.
Bus 203: the bus of the computer can be divided into a data bus, an address bus and a control bus according to the types of information transmitted by the computer, and the data bus, the address bus and the control bus are respectively used for transmitting data, data addresses and control signals.
The Operating System 204(Operating System, abbreviated as OS) is a computer program for managing and controlling hardware and software resources of a computer, and is the most basic System software directly running on a "bare computer" for supporting the running of other software, such as various application programs. The operating system in the embodiment of the present application may be various operating systems, for example, a Windows operating system, a Linux operating system, an iOS operating system, an Android open source operating system, and the like.
It is understood that fig. 2 is only an exemplary illustration, and in practical applications, the mobile phone number obtaining server 200 may include more or fewer components than those shown in fig. 2, for example, a user interface for supporting interaction and information exchange between the system and the user, or a communication interface for supporting communication between the terminal and other terminals, servers, and networks; the structure shown in fig. 2 does not set any limit to the data management server provided in the embodiment of the present application.
In order to solve the problem that network security and user information security cannot be guaranteed when an application program or an application server obtains a mobile phone number of a user in the background art, embodiments of the present application provide a mobile phone number obtaining method, which can hide network topology and configuration of an operator, and guarantee network security and user information security. For example, the application server of a certain mobile game finds that the time delay of a certain game account is increased, the performance is reduced, and the mobile phone number of the user needs to be acquired, so that the bandwidth and the performance of the user are applied to an operator in a payment mode for the operator.
With reference to fig. 1 and fig. 2, as shown in fig. 3, the data processing method provided in the embodiment of the present application may include S301 to S320:
s301, the terminal sends the ID and the first random number of the application program to the mobile phone number acquisition server.
The application is an application running on the terminal, and the first random number is generated randomly by the application and can be recorded as key 1.
For example, the ID of the application may be pre-negotiated between the operator and the terminal application, and the IDs of different applications may be different. The terminal application program sends the ID of the application program to the mobile phone number acquisition server so as to clarify the specific application program on the terminal.
S302, the mobile phone number acquisition server receives the ID and the first random number of the application program.
For example, the mobile phone number obtaining server may determine a specific application program according to the ID of the received application program.
S303, the mobile phone number acquisition server sends a second random number to the application program according to the application ID of the application program.
The second random number is randomly generated by the mobile phone number obtaining server and is recorded as key 2.
Illustratively, the mobile phone number obtaining server randomly generates a random number key2, and sends the random number key2 to the application program corresponding to the ID.
S304, the terminal receives the second random number.
S305, the terminal generates a first hash value by adopting a preset hash algorithm according to the ID of the application program, the first random number and the second random number.
Illustratively, the predetermined hashing algorithm may be any one of a number of hashing algorithms, such as MD5, SHA-1, SHA-2, and the like. The embodiment of the present application does not limit the specific algorithm used in the preset hash algorithm. The first hash value may be denoted unikey1, and when a hash algorithm is used, the unikey1 is hash { the ID of the application, key1, key2 }.
S306, the terminal sends the first hash value to a mobile phone number acquisition server.
S307, the mobile phone number obtaining server receives the first hash value sent by the application program.
S308, the mobile phone number acquisition server generates a second hash value by adopting the hash algorithm according to the ID of the application program, the first random number and the second random number.
It can be understood that the hash algorithm used when the terminal generates the first hash value in the embodiment of the present application is the same as the hash algorithm used when the mobile phone number obtaining server generates the second hash value, and is a preconfigured hash algorithm.
For example, if the predetermined hash algorithm is a hash algorithm, the second hash value may be denoted as unikey2, and when the hash algorithm is used, the unikey2 is hash { the ID of the application, key1, key2 }.
S309, the mobile phone number acquisition server judges whether the first hash value and the second hash value are the same.
For example, since the first hash value and the second hash value are both generated by using the same hash algorithm according to the application ID, the first random number, and the second random number, the first hash value and the second hash value should be the same.
For example, if the first hash value and the second hash value are not the same, one possible reason is that the pseudo base station intercepts the first random number transmitted by the terminal, but since it does not know the preset hash algorithm, the second hash value generated by the pseudo base station is different from the first hash value generated by the application program. The embodiment of the present application is not limited to the specific case where the first hash value and the second hash value are different, and this is only an exemplary description made to help understanding the scheme of the embodiment of the present application.
If the mobile phone number obtaining server determines that the first hash value is the same as the second hash value, the mobile phone number obtaining server continues to execute the steps S310-S318; and if the mobile phone number acquisition server determines that the first hash value is different from the second hash value, returning a rejection response to the terminal application program.
It is understood that the above steps S301 to S309 perform mutual authentication between the terminal and the mobile phone number obtaining server, and the purpose of the mutual authentication is to determine the validity of the network and the validity of the terminal, so that the terminal will not access the disguised server, and the disguised terminal will not be accessed by the server.
S310, if the first hash value is the same as the second hash value, the mobile phone number acquisition server sends the first hash value or the second hash value, the user private network IP address and the user mobile phone number to the national mobile phone number acquisition system.
For example, since the first hash value and the second hash value are the same, the hash value sent by the cell phone number acquisition server to the national cell phone number acquisition system may be the first hash value or the second hash value.
S311, the national mobile phone number obtaining system receives the first hash value or the second hash value, the user private network IP address and the user mobile phone number.
S312, the national mobile phone number obtaining system stores the first hash value or the second hash value, the user private network IP address and the user mobile phone number in a database, and sets an expiration date and query times for the first hash value or the second hash value.
For example, the mobile phone number obtaining system stores the corresponding relationship between the hash value, the user private network IP address and the user mobile phone number in the database, as shown in table 2 below.
TABLE 2
Figure BDA0001760405930000101
For example, in the embodiment of the present application, the national mobile phone number obtaining system may set an expiration date and a number of times of query for the stored hash value. When the valid period of the hash value exceeds a preset threshold value, the hash value is invalid, and the national mobile phone number acquisition system deletes the hash value stored in the database; alternatively, when the number of times of inquiry of the hash value exceeds the preset number of times of inquiry, the hash value is invalidated, and the national mobile phone number acquisition system deletes the hash value. Generally, the query times of the hash values can be set to be one time, namely, each hash value is invalid after one query, so that the hash values can be prevented from being leaked and falsely used, and the safety of network information and user information is ensured.
It should be noted that, in the embodiment of the present application, specific time set for the validity period of the hash value may be configured and set, for example, as shown in table 3 below, taking 2 minutes as an example of the validity period, the national mobile phone number acquiring system starts to count time after storing the first hash value or the second hash value, and after the count time exceeds 2 minutes, the hash value is invalidated, and the national mobile phone number acquiring system deletes the hash value from the database. It can be understood that, in the embodiment of the present application, the time of the validity period set by different hash values in the national mobile phone number obtaining system may be the same or different, and this is not limited in the embodiment of the present application.
TABLE 3
Figure BDA0001760405930000111
And S313, the terminal sends the first random number and the second random number to an application server.
Illustratively, the application server is a server corresponding to an application program running on the terminal. The terminal uses the public network IP address to access the application server, and transmits the first random number and the second random number to the application server, without transmitting the private network IP address of the user in the mobile communication network, so that the information security of the user can be ensured.
S314, the application server receives the first random number and the second random number.
And S315, the application server generates a third hash value by adopting the hash algorithm according to the ID of the application program, the first random number and the second random number.
For example, in the embodiment of the present application, a hash algorithm used when the terminal generates the first hash value, a hash algorithm used when the mobile phone number obtaining server generates the second hash value, and a hash algorithm used when the application server generates the third hash value are the same hash algorithm agreed in advance.
For example, if the predetermined hash algorithm is a hash algorithm, the third hash value may be denoted as unikey3, and when the hash algorithm is used, the unikey3 is hash { the ID of the application, key1, key2 }.
S316, the application server sends a mobile phone number acquisition request to a national mobile phone number acquisition system.
Wherein, the mobile phone number acquisition request carries the third hash value.
And S317, the national mobile phone number acquisition system receives the mobile phone number acquisition request sent by the application server.
And S318, the national mobile phone number acquisition system queries the database according to the third hash value carried in the mobile phone number acquisition request.
For example, since the first hash value, the second hash value, and the third hash value are generated by using the same hash algorithm according to the ID of the application program, the first random number, and the second random number, the first hash value, the second hash value, and the third hash value should be the same. When the national mobile phone number acquisition system queries the database of the national mobile phone number acquisition system according to the third hash value carried in the mobile phone number acquisition request, the third hash value should be queried.
For example, if the third hash value is not queried in the database of the national mobile phone number acquisition system, one possible reason is that the pseudo base station intercepts the first random number and the second random number sent by the application program, but because the pseudo base station does not know the preset hash algorithm, the third hash value generated by the pseudo base station is different from the hash value stored in the database of the national mobile phone number acquisition system; it is also possible that the validity period of the third hash value exceeds a preset threshold and has been deleted by the national mobile phone number acquisition system. The embodiment of the present application is not limited to the specific case where the third hash value is not queried in the database of the national mobile phone number obtaining system, and is only an exemplary description made to help understanding the scheme of the embodiment of the present application.
For example, the method for querying the database of the national mobile phone number obtaining system according to the third hash value may be to query whether the third hash value exists in the database according to the third hash value, and if the third hash value exists in the database, obtain the mobile phone number of the user corresponding to the third hash value. The specific query method for querying the database of the national mobile phone number acquisition system according to the third hash value is not limited in the embodiment of the present application, and is merely an exemplary description.
If the national mobile phone number acquisition system inquires the third hash value in the database of the national mobile phone number acquisition system, continuing to execute the steps S319 to S320; and if the national mobile phone number acquisition system does not inquire the third hash value in the database of the national mobile phone number acquisition system, returning a refusal response to the application server.
And S319, if the national mobile phone number acquisition system comprises the third hash value, transmitting the mobile phone number corresponding to the third hash value to an application server.
Illustratively, the national mobile phone number obtaining system obtains the user mobile phone number corresponding to the third hash value from the data of the national mobile phone number obtaining system, and sends the user mobile phone number to the application server.
For example, if the number of times of querying the third hash value is 1, step S319 may further include, if the national mobile phone number obtaining system includes the third hash value, determining that the third hash value has been queried once, and the hash value will be invalidated, and the national mobile phone number obtaining system may delete the third hash value stored in the database, at this time, even if the hash value is intercepted by another malicious user or a server, since the third hash value does not exist in the database, the other malicious user or server cannot know the mobile phone number of the user.
And S320, the application server receives the mobile phone number of the user.
For example, after receiving the mobile phone number of the user, the application server can improve the service quality of the user and assist in service innovation according to the mobile phone number of the user. For example, the bandwidth and performance of the user can be improved by paying the operator according to the mobile phone number of the user.
It can be understood that, in the embodiment of the present application, when acquiring the mobile phone number of the user, the application server initiates a mobile phone number acquisition request to the national mobile phone number acquisition system by using a hash value (third hash value) as a parameter, and the hash value is generated by using a pre-negotiated hash algorithm according to the random number randomly generated by the application program and the mobile phone number acquisition server, so that even if the random number is intercepted during transmission, the pseudo base station does not know the specific hash algorithm, and therefore, the generated hash value is not the same as the hash value stored in the national mobile phone number acquisition system; in addition, the validity period and the query times are set for each hash value, so that the hash value can be effectively prevented from being falsely used after being intercepted.
According to the method for acquiring the mobile phone number, the mobile phone number acquisition server receives the application ID and the first random number of the application program sent by the application program of the user terminal; the mobile phone number acquisition server sends a second random number to the application program according to the application ID of the application program; receiving a first hash value sent by the application program; generating a second hash value by adopting the hash algorithm according to the application ID of the application program, the first random number and the second random number; if the first hash value is the same as the second hash value, the mobile phone number acquisition server sends the first hash value or the second hash value, the user private network IP address and the user mobile phone number to the national mobile phone number acquisition system, so that the application server queries the national mobile phone number acquisition system according to the third hash value to acquire the user mobile phone number. The application respectively authenticates the application program and the application server, and takes the hash value generated by the random number as a parameter to initiate a mobile phone number acquisition request to a national mobile phone number acquisition system, so that the private network IP address of the user does not need to be transmitted in the mobile communication network like the prior art, and the network safety and the user information safety can be guaranteed; in addition, the validity period and the query frequency of the hash value stored in the database of the national mobile phone number system are set, so that the situation that the hash value is intercepted and falsely used can be effectively prevented, and the security of acquiring the mobile phone number of the user is further improved.
In an embodiment of the present application, a mobile phone number obtaining server is further provided, where each functional module is divided according to each function, and fig. 4 shows a schematic diagram of a possible structure of the mobile phone number obtaining server 400 in the foregoing embodiment, where the mobile phone number obtaining server 400 includes: a receiving unit 401, a transmitting unit 402 and a processing unit 403.
The receiving unit 401 is configured to receive an ID of an application and a first random number sent by a terminal; the application program is an application program running on the terminal, and the first random number is generated by the application program randomly.
The sending unit 402 is configured to send a second random number to the terminal according to the ID of the application, where the second random number is generated by acquiring the mobile phone number at random.
The receiving unit 401 is further configured to receive a first hash value sent by the terminal, where the first hash value is generated by the terminal according to the ID of the application program, the first random number, and the second random number by using a preset hash algorithm.
A processing unit 403, configured to generate a second hash value by using the hash algorithm according to the ID of the application program, the first random number, and the second random number.
If the first hash value is the same as the second hash value, the sending unit 402 is further configured to send the first hash value or the second hash value, the user private network IP address, and the user mobile phone number to a national mobile phone number obtaining system, where a database of the national mobile phone number obtaining system includes a correspondence between user attributions of at least two users, the user mobile phone numbers, the user private network IP addresses, and the first hash value or the second hash value. The first hash value or the second hash value stored in the national mobile phone number acquisition system is provided with a validity period, and the first hash value or the second hash value is invalid after exceeding the validity period or after one inquiry.
The mobile phone number obtaining server provided by the embodiment of the application adopts the two random numbers and the ID of the application program to generate the hash value to carry out mutual authentication with the terminal, so that the legality of the network and the legality of the terminal can be determined, the terminal cannot be accessed into a disguised server, the disguised terminal cannot be accessed into the server, and the network safety and the user information safety are ensured.
In an embodiment of the present application, a national mobile phone number obtaining system is further provided, where in a case that each functional module is divided according to each function, fig. 5 shows a possible structural diagram of the national mobile phone number obtaining system 500 according to the foregoing embodiment, where the national mobile phone number obtaining system 500 includes: a receiving unit 501, a processing unit 502 and a transmitting unit 503.
The receiving unit 501 is configured to receive a mobile phone number acquisition request sent by an application server; the mobile phone number obtaining request carries a third hash value, the third hash value is generated by the application server according to the ID of the application program, a first random number and a second random number by adopting a preset hash algorithm, the first random number is generated by the application program randomly, and the second random number is generated by the mobile phone number obtaining server randomly.
A processing unit 502, configured to determine that the database of the national mobile phone number obtaining system includes the third hash value.
A sending unit 503, configured to send the user phone number corresponding to the third hash value to the application server.
The receiving unit 501 is further configured to receive the first hash value or the second hash value, the user private network IP address, and the user mobile phone number sent by the mobile phone number obtaining server; the first hash value is generated by the terminal according to the ID of the application program, the first random number and the second random number by adopting the hash algorithm; the second hash value is generated by the mobile phone number acquisition server according to the ID of the application program, the first random number and the second random number by adopting the hash algorithm.
And the storage unit is used for storing the corresponding relation among the first hash value or the second hash value, the IP address of the private network of the user and the mobile phone number of the user in the database, and setting an expiration date and query times for the first hash value or the second hash value.
The processing unit 502 is further configured to delete the first hash value or the second hash value if the storage time of the first hash value or the second hash value exceeds the validity period or the first hash value or the second hash value is queried once.
The national mobile phone number acquisition system provided by the embodiment of the application stores the corresponding relation among the hash value, the user private network IP address and the user mobile phone number, and can send the user mobile phone number to the application server by inquiring the hash value; and each hash value is provided with a validity period and query times, so that the hash value can be prevented from being leaked and falsely used, and the safety of network information and user information is ensured.
In an embodiment of the present application, a terminal device is further provided, where each functional module is divided according to each function, and fig. 6 shows a schematic diagram of a possible structure of the terminal device 600 according to the foregoing embodiment, where the terminal device 600 includes: a transmitting unit 601, a receiving unit 602, and a processing unit 603.
The sending unit 601 is configured to send an ID of an application program and a first random number to a mobile phone number obtaining server; the application program is an application program running on the terminal equipment, and the first random number is generated by the application program randomly.
A receiving unit 602, configured to receive a second random number sent by the mobile phone number obtaining server, where the second random number is generated by the mobile phone number obtaining server randomly.
The processing unit 603 is configured to generate a first hash value by using a preset hash algorithm according to the ID of the application program, the first random number, and the second random number.
The sending unit 601 is further configured to send the first hash value to the mobile phone number obtaining server, so that the mobile phone number obtaining service determines whether the first hash value and the second hash value are the same.
If the first hash value is the same as the second hash value, the sending unit 601 is further configured to send the first random number and the second random number to the application server; the second hash value is generated by the first server using the hash algorithm based on the ID of the application, the first random number, and the second random number.
According to the terminal equipment provided by the embodiment of the application, the mobile phone number acquisition server and the mobile phone number acquisition server respectively adopt the two random numbers and the ID of the application program to generate the hash value for mutual authentication, the legality of the network and the legality of the terminal can be determined, so that the terminal cannot be accessed into a disguised server, the disguised terminal cannot be accessed into the server, and the network safety and the user information safety are ensured.
In an embodiment of the present application, an application server is further provided, and in a case that each function module is divided according to each function, fig. 7 shows a schematic diagram of a possible structure of an application server 700 related in the foregoing embodiment, where the application server 700 includes: a receiving unit 701, a processing unit 702 and a transmitting unit 703.
The receiving unit 701 is configured to receive a first random number and a second random number sent by a terminal, where the first random number is randomly generated by an application running on the terminal, and the second random number is randomly generated by a mobile phone number obtaining server.
A processing unit 702, configured to generate a third hash value by using a preset hash algorithm according to the ID of the application program, the first random number, and the second random number.
A sending unit 703, configured to send a mobile phone number obtaining request to a national mobile phone number obtaining system, where the mobile phone number obtaining request carries the third hash value.
If the database of the national mobile phone number obtaining system includes the third hash value, the receiving unit 701 is further configured to receive the user mobile phone number sent by the national mobile phone number obtaining system.
The application server provided by the embodiment of the application server can generate a new hash value by adopting a predetermined hash algorithm according to the received two random numbers and the application program ID, and query the national mobile phone number acquisition system according to the hash value to acquire the mobile phone number of the user, so that the operator is paid according to the mobile phone number of the user to improve the bandwidth and the performance of the user.
The present application further provides a computer-readable storage medium, where one or more programs are stored in the computer-readable storage medium, where the one or more programs include instructions, and when the processor of the data management server executes the instructions, the data management server executes the steps performed by the data management server in the method flow shown in the foregoing method embodiment.
The steps of a method or algorithm described in connection with the disclosure herein may be embodied in hardware or in software instructions executed by a processor. The software instructions may be comprised of corresponding software modules that may be stored in Random Access Memory (RAM), flash Memory, Erasable Programmable read-only Memory (EPROM), Electrically Erasable Programmable read-only Memory (EEPROM), registers, a hard disk, a removable disk, a compact disc read-only Memory (CD-ROM), or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium. Of course, the storage medium may also be integral to the processor. The processor and the storage medium may reside in an ASIC. Additionally, the ASIC may reside in a core network interface device. Of course, the processor and the storage medium may reside as discrete components in a core network interface device.
Those skilled in the art will recognize that, in one or more of the examples described above, the functions described in this invention may be implemented in hardware, software, firmware, or any combination thereof. When implemented in software, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage media may be any available media that can be accessed by a general purpose or special purpose computer.
The above-mentioned embodiments, objects, technical solutions and advantages of the present invention are further described in detail, it should be understood that the above-mentioned embodiments are only exemplary embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made on the basis of the technical solutions of the present invention should be included in the scope of the present invention.

Claims (15)

1. A method for acquiring a mobile phone number is characterized by comprising the following steps:
the method comprises the steps that a mobile phone number acquisition server receives an ID and a first random number of an application program sent by a terminal; the application program is an application program running on the terminal, and the first random number is generated by the application program randomly;
sending a second random number to the terminal according to the ID of the application program, wherein the second random number is generated randomly by the mobile phone number acquisition server;
receiving a first hash value sent by the terminal, wherein the first hash value is generated by the terminal according to the ID of the application program, the first random number and the second random number by adopting a preset hash algorithm;
generating a second hash value by adopting the hash algorithm according to the ID of the application program, the first random number and the second random number;
if the first hash value is the same as the second hash value, the mobile phone number acquisition server sends the first hash value or the second hash value, the user private network IP address and the user mobile phone number to a national mobile phone number acquisition system, and a database of the national mobile phone number acquisition system comprises corresponding relations among user attributions of at least two users, the user mobile phone numbers, the user private network IP addresses and the first hash value or the second hash value.
2. The method for acquiring a mobile phone number according to claim 1, wherein the first hash value or the second hash value stored in the national mobile phone number acquisition system has a validity period, and the first hash value or the second hash value is invalidated after the validity period or a single inquiry.
3. A method for acquiring a mobile phone number is characterized by comprising the following steps:
a national mobile phone number acquisition system receives a mobile phone number acquisition request sent by an application server; the mobile phone number obtaining request carries a third hash value, the third hash value is generated by the application server according to the ID of the application program, a first random number and a second random number by adopting a preset hash algorithm, the first random number is generated by the application program at random, and the second random number is generated by the mobile phone number obtaining server at random;
and according to the third hash value, if the third hash value is determined to be contained in the database of the national mobile phone number acquisition system, sending the user mobile phone number corresponding to the third hash value to the application server.
4. The method for acquiring a mobile phone number according to claim 3, wherein before the national mobile phone number acquisition system receives the mobile phone number acquisition request sent by the application server, the method further comprises:
receiving a first hash value or a second hash value, a user private network IP address and a user mobile phone number sent by the mobile phone number acquisition server; the first hash value is generated by the terminal according to the ID of the application program, the first random number and the second random number by adopting the hash algorithm; the second hash value is generated by the mobile phone number acquisition server according to the ID of the application program, the first random number and the second random number by adopting the hash algorithm;
the national mobile phone number acquisition system stores the corresponding relation between the first hash value or the second hash value, the user private network IP address and the user mobile phone number in a database, and sets an expiration date and query times for the first hash value or the second hash value.
5. The method for acquiring mobile phone number according to claim 3 or 4, wherein the method further comprises:
and if the storage time of the first hash value or the second hash value exceeds the validity period or the first hash value or the second hash value is inquired once, the national mobile phone number acquisition system deletes the first hash value or the second hash value.
6. A method for acquiring a mobile phone number is characterized by comprising the following steps:
the terminal sends the ID and the first random number of the application program to a mobile phone number acquisition server; the application program is an application program running on the terminal, and the first random number is generated by the application program randomly;
receiving a second random number sent by the mobile phone number acquisition server, wherein the second random number is generated by the mobile phone number acquisition server randomly;
generating a first hash value by adopting a preset hash algorithm according to the ID of the application program, the first random number and the second random number;
sending the first hash value to the mobile phone number acquisition server so that the mobile phone number acquisition service determines whether the first hash value and the second hash value are the same;
if the first hash value is the same as the second hash value, the terminal sends the first random number and the second random number to an application server; the second hash value is generated by the first server using the hash algorithm based on the ID of the application, the first random number, and the second random number.
7. A method for acquiring a mobile phone number is characterized by comprising the following steps:
the method comprises the steps that an application server receives a first random number and a second random number sent by a terminal, wherein the first random number is generated by an application program running on the terminal at random, and the second random number is generated by a mobile phone number acquisition server at random;
generating a third hash value by adopting a preset hash algorithm according to the ID of the application program, the first random number and the second random number;
sending a mobile phone number acquisition request to a national mobile phone number acquisition system, wherein the mobile phone number acquisition request carries the third hashed value;
and if the database of the national mobile phone number acquisition system contains the third hash value, the application server receives the user mobile phone number sent by the national mobile phone number acquisition system.
8. A mobile phone number acquisition server, comprising:
a receiving unit, configured to receive an ID of an application and a first random number transmitted by a terminal; the application program is an application program running on the terminal, and the first random number is generated by the application program randomly;
a sending unit, configured to send a second random number to the terminal according to the ID of the application, where the second random number is generated by acquiring the mobile phone number randomly;
the receiving unit is further configured to receive a first hash value sent by the terminal, where the first hash value is generated by the terminal according to the ID of the application program, the first random number, and the second random number by using a preset hash algorithm;
the processing unit is used for generating a second hash value by adopting the hash algorithm according to the ID of the application program, the first random number and the second random number;
if the first hash value is the same as the second hash value, the sending unit is further configured to send the first hash value or the second hash value, the user private network IP address, and the user mobile phone number to a national mobile phone number acquisition system, where a database of the national mobile phone number acquisition system includes a correspondence between user attributions of at least two users, the user mobile phone numbers, the user private network IP addresses, and the first hash value or the second hash value.
9. The server according to claim 8, wherein the first hash value or the second hash value stored in the national mobile phone number acquisition system has a validity period, and the first hash value or the second hash value is invalidated after the validity period is exceeded or a query is passed.
10. A national mobile phone number acquisition system, the system comprising:
the receiving unit is used for receiving a mobile phone number acquisition request sent by the application server; the mobile phone number obtaining request carries a third hash value, the third hash value is generated by the application server according to the ID of the application program, a first random number and a second random number by adopting a preset hash algorithm, the first random number is generated by the application program at random, and the second random number is generated by the mobile phone number obtaining server at random;
the processing unit is used for determining that the database of the national mobile phone number acquisition system contains the third hash value;
and the sending unit is used for sending the user mobile phone number corresponding to the third hash value to the application server.
11. The national mobile phone number acquisition system as claimed in claim 10,
the receiving unit is also used for receiving the first hash value or the second hash value, the user private network IP address and the user mobile phone number which are sent by the mobile phone number acquisition server; the first hash value is generated by the terminal according to the ID of the application program, the first random number and the second random number by adopting the hash algorithm; the second hash value is generated by the mobile phone number acquisition server according to the ID of the application program, the first random number and the second random number by adopting the hash algorithm;
and the storage unit is used for storing the corresponding relation among the first hash value or the second hash value, the IP address of the private network of the user and the mobile phone number of the user in the database, and setting an expiration date and query times for the first hash value or the second hash value.
12. The national mobile phone number acquisition system according to claim 10 or 11,
the processing unit is further configured to delete the first hash value or the second hash value if the storage time of the first hash value or the second hash value exceeds the validity period or the first hash value or the second hash value is queried once.
13. A terminal device, characterized in that the terminal device comprises:
a sending unit, configured to send the ID of the application program and the first random number to the mobile phone number acquisition server; the application program is an application program running on the terminal equipment, and the first random number is generated by the application program randomly;
a receiving unit, configured to receive a second random number sent by the mobile phone number obtaining server, where the second random number is generated by the mobile phone number obtaining server randomly;
the processing unit is used for generating a first hash value by adopting a preset hash algorithm according to the ID of the application program, the first random number and the second random number;
the sending unit is further configured to send the first hash value to the mobile phone number acquisition server, so that the mobile phone number acquisition service determines whether the first hash value and the second hash value are the same;
if the first hash value is the same as the second hash value, the sending unit is further configured to send the first random number and the second random number to an application server; the second hash value is generated by the first server using the hash algorithm based on the ID of the application, the first random number, and the second random number.
14. An application server, characterized in that the application server comprises:
the mobile phone number acquisition server comprises a receiving unit, a processing unit and a processing unit, wherein the receiving unit is used for receiving a first random number and a second random number sent by a terminal, the first random number is generated by an application program running on the terminal at random, and the second random number is generated by a mobile phone number acquisition server at random;
the processing unit is used for generating a third hash value by adopting a preset hash algorithm according to the ID of the application program, the first random number and the second random number;
a sending unit, configured to send a mobile phone number acquisition request to a national mobile phone number acquisition system, where the mobile phone number acquisition request carries the third hash value;
if the database of the national mobile phone number acquisition system contains the third hash value, the receiving unit is further configured to receive the user mobile phone number sent by the national mobile phone number acquisition system.
15. A computer storage medium having computer program code stored therein, which when run on a processor causes the processor to perform a cell phone number acquisition method according to any one of claims 1-7.
CN201810905050.2A 2018-08-09 2018-08-09 Mobile phone number acquisition method and device Active CN109167759B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810905050.2A CN109167759B (en) 2018-08-09 2018-08-09 Mobile phone number acquisition method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810905050.2A CN109167759B (en) 2018-08-09 2018-08-09 Mobile phone number acquisition method and device

Publications (2)

Publication Number Publication Date
CN109167759A CN109167759A (en) 2019-01-08
CN109167759B true CN109167759B (en) 2021-03-30

Family

ID=64895333

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810905050.2A Active CN109167759B (en) 2018-08-09 2018-08-09 Mobile phone number acquisition method and device

Country Status (1)

Country Link
CN (1) CN109167759B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112562145B (en) * 2020-10-29 2023-05-23 重庆恢恢信息技术有限公司 Construction personnel investigation working method for intelligent construction site
US20230195707A1 (en) * 2021-12-16 2023-06-22 WizRocket Inc. Method and system for creating efficient data structure of users and communication devices

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5917911A (en) * 1997-01-23 1999-06-29 Motorola, Inc. Method and system for hierarchical key access and recovery
CN103581881A (en) * 2013-11-22 2014-02-12 中国联合网络通信集团有限公司 Comprehensive number-obtaining device as well as system and method for obtaining cell phone number of user on network side
CN103716763A (en) * 2012-09-29 2014-04-09 卓望数码技术(深圳)有限公司 Billing point verification method and system
CN103841123A (en) * 2012-11-20 2014-06-04 中国电信股份有限公司 Number information obtaining method and obtaining system, and cloud number information system
CN104618120A (en) * 2015-03-04 2015-05-13 青岛微智慧信息有限公司 Digital signature method for escrowing private key of mobile terminal

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5917911A (en) * 1997-01-23 1999-06-29 Motorola, Inc. Method and system for hierarchical key access and recovery
CN103716763A (en) * 2012-09-29 2014-04-09 卓望数码技术(深圳)有限公司 Billing point verification method and system
CN103841123A (en) * 2012-11-20 2014-06-04 中国电信股份有限公司 Number information obtaining method and obtaining system, and cloud number information system
CN103581881A (en) * 2013-11-22 2014-02-12 中国联合网络通信集团有限公司 Comprehensive number-obtaining device as well as system and method for obtaining cell phone number of user on network side
CN104618120A (en) * 2015-03-04 2015-05-13 青岛微智慧信息有限公司 Digital signature method for escrowing private key of mobile terminal

Also Published As

Publication number Publication date
CN109167759A (en) 2019-01-08

Similar Documents

Publication Publication Date Title
CN110800331B (en) Network verification method, related equipment and system
JP6651096B1 (en) Data processing method, apparatus, terminal, and access point computer
US11503469B2 (en) User authentication method and apparatus
US20090070474A1 (en) Dynamic Host Configuration Protocol
CN109981633B (en) Method, apparatus and computer-readable storage medium for accessing server
WO2020083288A1 (en) Safety defense method and apparatus for dns server, and communication device and storage medium
WO2019214623A1 (en) Authentication method, related equipment, and system
US20160344562A1 (en) Certificate generation method, certificate generation apparatus, information processing apparatus, and communication device
CN107872445B (en) Access authentication method, device and authentication system
WO2017219748A1 (en) Method and device for access permission determination and page access
WO2020224341A1 (en) Method and apparatus for identifying tls encrypted traffic
WO2017080231A1 (en) Method of accessing wireless network and device utilizing same
CN109167759B (en) Mobile phone number acquisition method and device
WO2014206152A1 (en) Network safety monitoring method and system
CN101945053B (en) Method and device for transmitting message
TW201818699A (en) Data transmission method, equipment, device and system
WO2014201783A1 (en) Encryption and authentication method, system and terminal for ad hoc network
CN115277138B (en) Forced access control method and device
CN115941192A (en) IPv6 address prefix coding method and device, storage medium and electronic equipment
KR101683013B1 (en) System and method for allocating ip address using dhcp option 60, 61 and 82
WO2014175796A1 (en) Methods and arrangement for adapting quality of service for a private channel based on service awareness
CN114710302A (en) Internet access control method and control device thereof
JP2004240819A (en) Packet communication device with authentication function, network authentication access control server, application authentication access control server and distributed authentication access control system
WO2022270228A1 (en) Device and method for providing communication service for accessing ip network, and program therefor
WO2014094223A1 (en) Charging 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