CN114302349A - Method and system for extracting number by client - Google Patents

Method and system for extracting number by client Download PDF

Info

Publication number
CN114302349A
CN114302349A CN202111485936.4A CN202111485936A CN114302349A CN 114302349 A CN114302349 A CN 114302349A CN 202111485936 A CN202111485936 A CN 202111485936A CN 114302349 A CN114302349 A CN 114302349A
Authority
CN
China
Prior art keywords
client
short message
mobile phone
phone number
sim card
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.)
Granted
Application number
CN202111485936.4A
Other languages
Chinese (zh)
Other versions
CN114302349B (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 Yulore Innovation Technology Co ltd
Original Assignee
Beijing Yulore Innovation 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 Yulore Innovation Technology Co ltd filed Critical Beijing Yulore Innovation Technology Co ltd
Priority to CN202111485936.4A priority Critical patent/CN114302349B/en
Publication of CN114302349A publication Critical patent/CN114302349A/en
Application granted granted Critical
Publication of CN114302349B publication Critical patent/CN114302349B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

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

Landscapes

  • Mobile Radio Communication Systems (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The disclosure relates to a method and a system for extracting numbers by a client, and relates to the technical field of communication. The method comprises the following steps: the client receives a network short message opening request, then acquires a unique identifier of a sim card of the client and sends the unique identifier to the server; the server inquires whether a mobile phone number corresponding to the unique identifier of the sim card of the client side is locally recorded; if the server inquires the mobile phone number corresponding to the unique identifier of the sim card at the client, the mobile phone number corresponding to the unique identifier of the sim card at the client is sent to the client so as to open the network short message function of the client; and if the server cannot inquire the mobile phone number corresponding to the unique identifier of the sim card at the client, the client and the server acquire the mobile phone number corresponding to the unique identifier of the sim card at the client through the matching of the contents of the uplink short message and/or the downlink verification code short message and/or the short message so as to open the network short message function of the client. The invention can effectively improve the extraction success rate of the client number.

Description

Method and system for extracting number by client
Technical Field
The present disclosure relates to the field of communications technologies, and in particular, to a method and a system for extracting a number by a client.
Background
With the popularization and the updating of smart phones, network short messages are rapidly developed, wherein the network short messages mainly take the end-to-end sending and receiving of the mobile phones and the sending and receiving between the mobile phones and the internet as the main points. The network short message is a message transmission process from the mobile phone terminal to the internet or from the internet to the mobile phone terminal, which is completed through the internet when the user receives or transmits the short message. Because the cost is low, the success rate is gradually increased, and the network short message and the traditional short message are not sensed and have the same effect as the experience for the user, the short message (namely the network short message) sent by the network environment is more favored by the short message operator.
However, the network short message function can be activated only when the mobile phone number of the client is acquired, and the currently common mode for the client to acquire the mobile phone number and activate the network short message function is that the client transmits a request short message for acquiring the mobile phone number to the server, and the server returns the mobile phone number of the client. Because the number taking mode is to send a short message upwards, the user needs to deduct the fee independently, the user is not in a short message bag, and the user will fail under the condition of insufficient balance of the user card, so that the failure rate of obtaining the mobile phone number of the client is higher.
Disclosure of Invention
The invention aims to provide a method and a system for extracting a number by a client, which are used for solving the problem of high failure rate of acquiring the mobile phone number of the client in the existing scheme for acquiring the mobile phone number of the client. The technical scheme provided by the invention is as follows:
according to a first aspect of the embodiments of the present disclosure, a method for extracting a number by a client is provided, which includes:
a client receives a network short message opening request;
the client acquires the unique identifier of the sim card of the client and sends the unique identifier to the server;
the server records the unique identification of the sim card of the client and inquires whether a mobile phone number corresponding to the unique identification of the sim card of the client is locally recorded;
if the server inquires the mobile phone number corresponding to the unique identifier of the sim card at the client, the mobile phone number corresponding to the unique identifier of the sim card at the client is sent to the client so as to open the network short message function of the client;
and if the server cannot inquire the mobile phone number corresponding to the unique identifier of the sim card of the client, the client and the server acquire the mobile phone number corresponding to the unique identifier of the sim card of the client through the matching of the contents of the uplink short message and/or the downlink verification code short message and/or the short message so as to activate the network short message function of the client.
In the method for extracting a number by a client, the client sends the unique sim card identifier to the server to obtain the mobile phone number corresponding to the unique identifier, and if the obtaining fails, the client and the server obtain the mobile phone number corresponding to the unique sim card identifier through the uplink short message and/or the downlink verification code short message and/or the short message content matching, so as to activate the network short message function of the client, thereby effectively improving the success rate of extracting the mobile phone number of the client. Through practical application, the success rate of extracting the mobile phone number can reach 99.9%.
With reference to the first aspect, in a first implementation manner of the first aspect, the execution priority of the matching of the uplink short message, the downlink verification code short message, and the short message content is from high to low: and matching the contents of the uplink short message, the downlink verification code short message and the short message.
In the method for extracting the number by the client, after the client fails to acquire the mobile phone number corresponding to the sim card of the client from the server, the mobile phone number corresponding to the sim card of the client is acquired in a manner of matching the contents of the uplink short message, the downlink verification code short message and the final short message, that is, the acquisition is performed in a manner of first being simple and then being difficult, and the efficiency of acquiring the mobile phone number of the client is ensured.
With reference to the first implementation manner of the first aspect, in a second implementation manner of the first aspect, the enabling the client and the server to obtain the mobile phone number corresponding to the unique identifier of the sim card of the client through the uplink short message includes:
the client sends an uplink short message to an operator corresponding to the sim card of the client; the uplink short message at least comprises the unique identifier of the sim card of the client;
the operator locally acquires a mobile phone number corresponding to the unique identifier of the client sim card in the uplink short message, and sends the unique identifier of the client sim card and the mobile phone number corresponding to the unique identifier of the client sim card to the server;
the server records the received corresponding relation between the unique identification of the client sim card and the mobile phone number;
after the client sends the uplink short message to the operator corresponding to the sim card of the client, the method further comprises the following steps:
when a preset inquiry period expires, the client judges whether the current repeated inquiry frequency N reaches a first preset frequency; the initial value of N is 0;
if the current repeated inquiry frequency N does not reach a first preset frequency, the client sends a mobile phone number inquiry request to the server, and then N is made to be N + 1; the mobile phone number inquiry request comprises the unique identifier of the sim card of the client;
the server inquires whether the mobile phone number corresponding to the unique identifier of the sim card of the client side is recorded locally or not again according to the mobile phone number inquiry request;
if the server inquires that the mobile phone number corresponding to the unique identifier of the sim card of the client is recorded locally again, the mobile phone number corresponding to the unique identifier of the sim card of the client is sent to the client, and the process is ended;
if the server cannot inquire the mobile phone number which is locally recorded and corresponds to the unique identifier of the sim card of the client, the client repeatedly executes the step that the client judges whether the current repeated inquiry frequency N reaches a first preset frequency when the preset inquiry period expires;
and if the current repeated inquiry times N reach a first preset time, continuing to execute the step of enabling the client and the server to acquire the mobile phone number corresponding to the unique identifier of the sim card of the client through the downlink verification code short message.
In the method for extracting a number by a client, after the client fails to acquire the mobile phone number corresponding to the sim card of the client from the server, an uplink short message may be sent to an operator corresponding to the sim card of the client, then the operator locally acquires the mobile phone number and returns the mobile phone number to the server, and finally when an inquiry period expires, the client sends a mobile phone number inquiry request to the server, so that the mobile phone number corresponding to the sim card of the client can be successfully acquired, thereby ensuring that the mobile phone number of the client can be acquired in an uplink short message manner after the client directly fails to acquire the mobile phone number from the server, and further improving the success rate of acquiring the mobile phone number of the client.
With reference to the first implementation manner of the first aspect, in a third implementation manner of the first aspect, the enabling the client and the server to obtain the mobile phone number corresponding to the unique identifier of the sim card of the client by using the downlink verification code short message includes:
the client provides a mobile phone number input window for the user;
the client acquires the mobile phone number input by the user through the mobile phone number input window;
the client generates a first verification code and sends a verification code request to the server;
the server generates a second verification code according to the verification code request and sends the second verification code to an operator corresponding to the sim card of the client;
the operator issues a downlink verification code short message comprising the second verification code to the client;
the client receives the downlink verification code short message;
the client judges whether the first verification code and the second verification code can be successfully matched;
if the local verification code and the second verification code can be successfully matched, the client records the mobile phone number input by the user, sends the corresponding relation between the unique identifier of the sim card of the client and the mobile phone number input by the user to the server for storage, and ends the process;
and if the local verification code and the second verification code cannot be successfully matched, continuing to execute the step of matching the contents of the short message to enable the client and the server to obtain the mobile phone number corresponding to the unique identifier of the sim card of the client.
In the method for extracting numbers by the client, the user provides the mobile phone number after the client fails to acquire the mobile phone number corresponding to the sim card of the client in a mode of sending the uplink short message to the server, then the client generates a verification code request sending server corresponding to the first verification code according to the mobile phone number provided by the user, then the server generates a second verification code according to the verification code request and sends the second verification code to the operator, then the operator generates a downlink identifying code short message according to the second identifying code and sends the message to the client, and finally the client judges whether the first identifying code and the second identifying code can be matched, if so, the mobile phone number input by the user is correct, meanwhile, the mobile phone number input by the user and the unique identifier of the sim card are sent to the server, so that the mobile phone number of the client can be conveniently inquired next time, and meanwhile, the success rate of acquiring the mobile phone number of the client is effectively improved.
With reference to the first implementation manner of the first aspect, in a fourth implementation manner of the first aspect, the enabling the client and the server to obtain the mobile phone number corresponding to the unique identifier of the sim card of the client through short message content matching includes:
the client acquires a registered short message service business number list recorded by the server;
the client acquires a client short message log corresponding to the short message service business number list according to the short message service business number list and sends the client short message log to the server; the client short message log comprises a unique identifier of a client sim card, a short message service provider number and short message related information;
the server forwards the received client short message log to a corresponding short message service provider according to the number of the short message service provider;
matching the received client short message log with a local short message log by the short message service provider; the local short message log of the short message service provider at least comprises a target user mobile phone number, a short message service provider number and short message related information;
the short message service provider extracts the unique identification of the client sim card in the successfully matched client short message log and the target user mobile phone number in the local short message log and sends the unique identification and the target user mobile phone number to the server;
the server records the corresponding relation between the received unique identification of the client sim card and the mobile phone number;
and the server sends the recorded mobile phone number to the client.
In the method for extracting a number by a client, after failing to acquire a mobile phone number corresponding to a sim card of the client by requesting, sending an uplink short message, and a downlink verification code short message from the server, the client may send a request for acquiring a mobile phone number corresponding to the sim card to a short message service provider through the server, and then the short message service provider may send the mobile phone number corresponding to the inquired sim card to the server and the client, so that the client successfully acquires the mobile phone number corresponding to the sim card.
With reference to the fourth implementation manner of the first aspect, in a fifth implementation manner of the first aspect, the short message related information includes: HASH value, short message length and short message timestamp of the short message content;
the short message service provider matches the received client short message log with the local short message log, and the method comprises the following steps:
the short message service provider obtains all local short message logs of which the time difference between a time stamp in the local short message log and a short message time stamp in the client short message log is within 3 seconds to obtain a short message log set to be matched;
matching the client short message log with the ith short message log in the short message log set to be matched; i ═ 1,2, …, I; i is the total number of the short message logs in the short message log set to be matched;
if the client short message log is successfully matched with the ith short message log in the short message log set to be matched, enabling the matching success frequency M to be M + 1; the initial value of M is 0;
judging whether the current M reaches a second preset number of times;
if the current M reaches a second preset number, determining that the matching is successful, and ending the short message content matching process;
if the matching of the client short message log and the ith short message log in the short message log set to be matched is unsuccessful or the current M does not reach a second preset number of times, judging whether I is equal to I or not;
if I is not equal to I, returning to execute the step of matching the client short message log with the ith short message log in the short message log set to be matched after I is equal to I + 1;
and if the I is equal to the I, the short message service provider determines that the received short message log of the client is unsuccessfully matched with the local short message log.
In the method for extracting a number by a client according to this embodiment, the client obtains a mobile phone number corresponding to sim in a short message content matching manner, and a short message service provider finds out the number of matched local short message logs according to short message related information and must not be less than a second preset number of times, if the number of matched local short message logs is less than the second preset number of times, the mobile phone number corresponding to sim is not found, and if the number of matched local short message logs is not less than the second preset number of times, the mobile phone number corresponding to sim is found, so that the correctness of the found mobile phone number corresponding to sim is ensured.
According to a second aspect of the embodiments of the present disclosure, there is provided a system for extracting a number by a client, including: a client and a server;
the client is used for receiving a network short message opening request, acquiring a unique identifier of a sim card of the client and sending the unique identifier to the server;
the server is used for recording the unique identifier of the sim card of the client, inquiring whether a mobile phone number corresponding to the unique identifier of the sim card of the client is locally recorded, and if the mobile phone number corresponding to the unique identifier of the sim card of the client is inquired, sending the mobile phone number corresponding to the unique identifier of the sim card of the client to the client so as to open the network short message function of the client;
and the client is also used for enabling the client and the server to acquire the mobile phone number corresponding to the unique identifier of the sim card of the client by sending an uplink short message and/or receiving a downlink verification code short message and/or performing short message content matching when the server does not inquire the mobile phone number corresponding to the unique identifier of the sim card of the client so as to open the network short message function of the client.
With reference to the second aspect, in a first implementation manner of the second aspect, the system for extracting a number by a client further includes an operator corresponding to a sim card of the client;
the client is specifically configured to send an uplink short message to the operator when the server does not inquire the mobile phone number corresponding to the unique identifier of the sim card of the client, and then periodically send a mobile phone number inquiry request to the server according to a preset inquiry period until the mobile phone number corresponding to the unique identifier of the sim card of the client, which is fed back by the server according to the mobile phone number inquiry request, is received, or when the number of repeated inquiries of the mobile phone number inquiry request sent to the server reaches a first preset number; the uplink short message at least comprises the unique identifier of the sim card of the client, and the mobile phone number inquiry request comprises the unique identifier of the sim card of the client;
the operator is used for locally acquiring the mobile phone number corresponding to the unique identifier of the client sim card in the uplink short message and sending the unique identifier of the client sim card and the mobile phone number corresponding to the unique identifier of the client sim card to the server;
the server is also used for recording the corresponding relation between the received unique identifier of the client sim card and the mobile phone number; and the mobile phone number inquiry module is further used for inquiring whether the mobile phone number corresponding to the unique identifier of the sim card of the client side is recorded locally or not again according to the mobile phone number inquiry request, and if so, sending the mobile phone number corresponding to the unique identifier of the sim card of the client side to the client side.
With reference to the first implementation manner of the second aspect, in a second implementation manner of the second aspect, the system for extracting a number by a client further includes an operator corresponding to a sim card of the client;
the client is also used for providing a mobile phone number input window for a user when the mobile phone number corresponding to the unique identifier of the sim card of the client cannot be acquired through the uplink short message, acquiring the mobile phone number input by the user through the mobile phone number input window, and then generating a first verification code and sending a verification code request to the server; the client is also used for receiving a downlink verification code short message sent by the operator, judging whether the first verification code and the second verification code can be successfully matched, if so, recording the mobile phone number input by the user, and sending the corresponding relation between the unique identifier of the sim card of the client and the mobile phone number input by the user to the server;
the server is further used for generating a second verification code according to the verification code request and sending the second verification code to an operator corresponding to the client sim card, and is also used for receiving and storing the corresponding relation between the unique identifier of the client sim card and the mobile phone number sent by the client;
and the operator is used for issuing a downlink verification code short message comprising the second verification code to the client when receiving the second verification code sent by the server.
With reference to the first implementation manner of the second aspect, in a third implementation manner of the second aspect, the system for extracting a number by a client further includes: a short message service provider;
the client is also used for acquiring a registered short message service business number list recorded by the server when the mobile phone number corresponding to the unique identifier of the sim card of the client cannot be acquired through a downlink verification code short message, acquiring a client short message log corresponding to the short message service business number list according to the short message service business number list and sending the client short message log to the server; the client short message log comprises a client sim card unique identifier, a short message service provider number and short message related information;
the server is also used for forwarding the received client short message log to a corresponding short message service provider according to the number of the short message service provider; the server is also used for recording the corresponding relation between the unique identifier of the sim card of the client and the mobile phone number sent by the short message service provider and sending the recorded mobile phone number to the client;
the short message service provider comprises: a matching module and an extraction module;
the matching module is used for matching the received client short message log with the local short message log; the local short message log of the short message service provider at least comprises a target user mobile phone number, a short message service provider number and short message related information;
and the extraction module is used for extracting the unique identification of the client sim card in the client short message log successfully matched by the matching module and the target user mobile phone number in the local short message log, and sending the unique identification to the server.
With reference to the third implementation manner of the second aspect, in a fourth implementation manner of the second aspect, the short message related information includes: HASH value, short message length and short message timestamp of the short message content;
the matching module comprises: the device comprises an acquisition unit, a matching unit, a counting unit, a first judgment unit, a determination unit and a second judgment unit;
the acquisition unit is used for acquiring all local short message logs of which the time difference between the time stamp in the local short message log and the short message time stamp in the client short message log is within 3 seconds to obtain a short message log set to be matched;
the matching unit is used for matching the client short message log with the ith short message log in the short message log set to be matched; the second judging unit is used for judging whether the short message log to be matched is the ith short message log in the short message log set to be matched or not according to the short message log to be matched, wherein the short message log to be matched is the ith short message log in the short message log set to be matched; wherein I is 1,2, …, I; i is the total number of the short message logs in the short message log set to be matched;
the counting unit is used for enabling the matching success frequency M to be M +1 when the matching unit successfully matches the client short message log with the ith short message log in the short message log set to be matched; the initial value of M is 0;
the first judging unit is used for judging whether the current M reaches a second preset number of times,
the determining unit is used for determining that the matching between the client short message log and the local short message log is successful when the judgment result of the first judging unit is yes; and is further used for determining that the matching between the client short message log and the local short message log is unsuccessful when the judgment result of the second judgment unit is yes,
the second judging unit is configured to judge whether I is equal to I or not when the matching unit unsuccessfully matches the client short message log with the ith short message log in the set of short message logs to be matched, or when the judgment result of the first judging unit is negative.
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.
Fig. 1 is a flowchart of a method for extracting a number by a client according to the present invention;
FIG. 2 is a flowchart of obtaining a mobile phone number of a client in an uplink short message manner;
FIG. 3 is a flow chart of obtaining a mobile phone number of a client in a downlink verification code short message manner;
FIG. 4 is a flow chart of obtaining a mobile phone number of a client in a short message content matching manner;
FIG. 5 is a flow chart of matching a client SMS log with an SMS log of an SMS provider;
fig. 6 is a schematic structural diagram of an embodiment of a system for extracting a number by a client according to the present invention;
fig. 7 is a schematic structural diagram of a second embodiment of a system for extracting a number by a client according to the present invention;
fig. 8 is a schematic structural diagram of a third embodiment of a system for extracting a number by a client according to the present invention;
fig. 9 is a schematic structural diagram of a fourth embodiment of a system for extracting a number by a client according to the present invention;
fig. 10 is a schematic structural diagram of a fifth embodiment of a system for extracting a number by a client according to the present invention.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. 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 systems and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
In a first aspect, an embodiment of the present invention provides a method for extracting a number by a client. Fig. 1 is a flowchart of a method for extracting a number by a client according to the present invention. As shown in fig. 1, the method includes S101-S106:
s101: the client receives a network short message opening request.
In this embodiment, if the client user needs to activate the network short message function, the user may initiate a network short message activation request through a preset network short message activation interface at the front end of the client, for example: the network short message opening interface can explain the network short message function, privacy policy, information prompt for possible charge of an operator in the opening process, confirmation of opening or cancellation of a key and the like.
S102: and the client acquires the unique identifier of the sim card of the client and sends the unique identifier to the server.
In the embodiment, after receiving the network short message opening request of the user, the client needs to check whether the local sim card is available or not, and on the premise that the local sim card is available, the client acquires the unique identifier of the local sim card and sends the unique identifier to the server corresponding to the network short message function, so that the unavailable sim card is prevented from sending the request to the server, and the load processed by the server is effectively reduced.
Preferably, before the client sends the unique sim card identifier to the server, the client may also send a user name and a password of the client to the server for verification, and then after the verification is passed, the server returns a token with a signature to the client, the client stores the token, and in the subsequent communication process, the client sends the token to the server, the server verifies the token, returns the request data if the verification is successful, and returns an error code if the verification is failed, so that not only is the communication efficiency effectively improved, but also the client can be effectively verified, and the access of an illegal client is prevented.
S103: and the server records the unique identifier of the sim card of the client and inquires whether a mobile phone number corresponding to the unique identifier of the sim card of the client is locally recorded, if so, S105 is executed, and otherwise, S104 is executed.
In the embodiment, when the network short message function is opened by the client, the client inquires the server whether the local machine has a corresponding mobile phone number, if so, the server returns the mobile phone number to the client, and the network short message function is directly and successfully opened. Because a large number of sim card unique identifiers and mobile phone numbers corresponding to the sim card unique identifiers are generally recorded in the local storage space of the server, if the sim card unique identifiers sent by the client exist, the sim card unique identifiers can be retrieved from the local storage space, and if the sim card unique identifiers exist, the mobile phone numbers corresponding to the sim card unique identifiers of the client exist, and if the sim card unique identifiers exist, the mobile phone numbers are sent to the client, otherwise, the mobile phone numbers are obtained in other modes, so that the client can be ensured to normally open the network short message function.
S104: and matching the contents of the uplink short message and/or the downlink verification code short message and/or the short message to enable the client and the server to acquire the mobile phone number corresponding to the unique identifier of the sim card of the client, and then executing the step S106.
In this embodiment, when there is no mobile phone number corresponding to the unique identifier of the sim card at the client in the local storage space of the server, the client and the server acquire the mobile phone number corresponding to the unique identifier of the sim card at the client in a manner of matching the contents of the uplink short message and/or the downlink verification code short message and/or the short message.
S105: and the server sends the mobile phone number corresponding to the unique identifier of the sim card of the client to the client.
S106: and opening the network short message function of the client and ending the process.
As an optional embodiment, the execution priority of the matching of the uplink short message, the downlink verification code short message and the short message content is from high to low: and matching the contents of the uplink short message, the downlink verification code short message and the short message. Namely: firstly, enabling a client and a server to acquire a mobile phone number corresponding to the unique identifier of the sim card of the client in a mode of sending an uplink short message, if the client and the server cannot both acquire the mobile phone number corresponding to the unique identifier of the sim card of the client in the mode of sending the uplink short message, attempting to acquire the mobile phone number corresponding to the unique identifier of the sim card of the client by the client and the server in the mode of sending a downlink verification code short message, and if the client and the server cannot both acquire the mobile phone number corresponding to the unique identifier of the sim card of the client in the mode of sending the downlink verification code short message, attempting to acquire the mobile phone number corresponding to the unique identifier of the sim card of the client by the client and the server in a short message content matching mode.
In this embodiment, three schemes for fetching a telephone number are: the uplink short message, the downlink verification code short message and the short message content matching can be carried out simultaneously, the uplink short message and the downlink verification code are executed in turn, and when one is successful, the other is not executed any more, so that the conflict does not occur. Because the matching of the short message content is pushed back to the server after the matching is successful on the client side, the acquisition of the result is delayed and the degree of confidence is low, so the priority is the lowest. After the client fails to acquire the mobile phone number corresponding to the sim card of the client from the server, the mobile phone number corresponding to the sim card of the client is acquired in a mode of first uplink short message, then downlink verification code short message and finally short message content matching, namely, the method of first simple and then difficult acquisition, first high precision and then low precision is achieved, the efficiency of acquiring the mobile phone number of the client is ensured, and the accuracy of the acquired mobile phone number is also ensured.
In the method for extracting a number by a client, the client sends the unique sim card identifier to the server to obtain the mobile phone number corresponding to the unique identifier, and if the obtaining fails, the client and the server obtain the mobile phone number corresponding to the unique sim card identifier through the uplink short message and/or the downlink verification code short message and/or the short message content matching, so as to activate the network short message function of the client, thereby effectively improving the success rate of extracting the mobile phone number of the client. Through practical application, the extraction success rate can reach 99.9%.
As an optional embodiment, in step S104, the method for enabling the client and the server to obtain the mobile phone number corresponding to the unique identifier of the sim card of the client through the uplink short message includes, as shown in fig. 2, S201 to S209:
s201: and the client sends the uplink short message to an operator corresponding to the sim card of the client.
And the uplink short message at least comprises the unique identifier of the sim card of the client.
In this embodiment, the current domestic operators mainly include: if the user is a telephone card purchased by the mobile operator, the client can send the unique identifier of the sim card to the mobile operator to acquire the mobile phone number corresponding to the sim card.
S202: and the operator locally acquires the mobile phone number corresponding to the unique identifier of the client sim card in the uplink short message.
In this embodiment, the operator stores the corresponding relationship between the sim card and the mobile phone number, so that the operator can obtain the corresponding mobile phone number through the unique sim card identifier.
S203: and the operator sends the unique identifier of the sim card of the client side and the corresponding mobile phone number to the server.
In this embodiment, if the operator can acquire the mobile phone number corresponding to the sim card unique identifier, the mobile phone number can be sent to the server for storage, so that a subsequent client can acquire the mobile phone number corresponding to the sim card unique identifier from the server conveniently, and if the operator cannot acquire the mobile phone number corresponding to the sim card unique identifier, the operator does not reply the message.
S204: and the server records the received corresponding relation between the unique identification of the client sim card and the mobile phone number.
In this embodiment, the server may store the correspondence between the sim card unique identifier received from the operator and the mobile phone number, and when the mobile phone client opens the network short message function next time/the client sends a mobile phone number inquiry request, the server may quickly perform an inquiry in the local storage resource, and return the mobile phone number corresponding to the sim card unique identifier as soon as possible, thereby effectively improving the execution efficiency.
In this embodiment, after the client sends the uplink short message to the operator corresponding to the sim card of the client, the method further includes:
s205: and when the preset inquiry period expires, judging whether the current repeated inquiry frequency N reaches a first preset frequency by the client, if so, ending the process, and otherwise, executing S206.
Wherein the initial value of N is 0.
In this embodiment, the preset inquiry period duration may be set according to the communication time from the client to the operator, or from the operator to the server plus the time for the operator to retrieve the mobile phone number, so that the client is not required to frequently send an inquiry request to the server, the network communication pressure is reduced, and the mobile phone number is ensured to be timely acquired. In addition, whether the current repeated inquiry times N reach a first preset time is judged, if the current repeated inquiry times N reach the first preset time, the mobile phone number acquisition by the uplink short message mode fails, and the downlink verification code short message can be started to acquire the mobile phone number. Thereby ensuring that the mobile phone number can be successfully acquired.
S206: the client sends a mobile phone number inquiry request to the server, and then makes N equal to N + 1.
In this embodiment, in an uplink short message manner, after acquiring the mobile phone number corresponding to the sim card unique identifier locally, the operator sends the mobile phone number to the server, so that the client needs to send a mobile phone number inquiry request to the server to obtain the mobile phone number corresponding to the sim card unique identifier of the client.
In this embodiment, after the client sends the uplink short message to the operator corresponding to the sim card of the client, the client periodically queries whether the server matches the mobile phone number corresponding to the sim card unique identifier of the client according to a preset query, and in order to prevent that the mobile phone number corresponding to the sim card unique identifier of the client cannot be obtained through the uplink short message and the client does not stop repeatedly querying the server, the maximum repeated query frequency is preset to be the first preset frequency. S205, when the preset query period expires each time, first determines whether the current repeated query number N reaches a first preset number, and if the current repeated query number N reaches the first preset number, it indicates that the mobile phone number corresponding to the unique identifier of the sim card of the client is not obtained from the server for N times before, the uplink short message method fails, and ends the process of obtaining the mobile phone number corresponding to the unique identifier of the sim card of the client through the uplink short message shown in fig. 2, and then continues to execute the process of obtaining the mobile phone number corresponding to the unique identifier of the sim card of the client by the client and the server through the downlink verification code short message. It should be noted that, in the present embodiment, step S205 is not executed after S204, but executed after S201.
S207: and the server inquires whether the mobile phone number corresponding to the unique identifier of the sim card of the client side is recorded locally or not again according to the mobile phone number inquiry request, and if so, S208 is executed.
In this embodiment, if the server does not inquire the mobile phone number corresponding to the unique identifier of the sim card of the local client, the local search process is exited. Because it is possible that the operator is still executing step S202, and has not yet executed to S203, when the client does not receive the mobile phone number corresponding to the unique identifier of the sim card of the client returned by the server, and when the predetermined period expires, the client continues to execute S205, and waits for the next time when the client sends an inquiry request to the server, so as to effectively improve the success rate of acquiring the mobile phone number.
S208: and the server sends the inquired mobile phone number corresponding to the unique identifier of the sim card of the client to the client.
S209: and the client records the corresponding relation between the unique identifier of the sim card of the client and the mobile phone number, and ends the process.
In this embodiment, when N does not exceed the first preset number of times, if the client acquires and records the correspondence between the unique identifier of the sim card of the client and the mobile phone number, the network short message function is successfully enabled, the process of acquiring the unique identifier of the sim card of the client and the mobile phone number through the uplink short message is completed, and the client does not repeatedly execute S205. After the network short message function is successfully opened, a request for obtaining the mobile phone number does not need to be sent to the server when the network is communicated next time, and the efficiency of obtaining the mobile phone number is effectively improved.
In the method for extracting a number by a client, after the client fails to acquire the mobile phone number corresponding to the sim card of the client from the server, an uplink short message may be sent to an operator corresponding to the sim card of the client, then the operator locally acquires the mobile phone number and returns the mobile phone number to the server, and finally when an inquiry period expires, the client sends a mobile phone number inquiry request to the server, so that the mobile phone number corresponding to the sim card of the client can be successfully acquired, thereby ensuring that the mobile phone number of the client can be acquired in an uplink short message manner after the client directly fails to acquire the mobile phone number from the server, and improving the success rate of acquiring the mobile phone number of the client.
As an optional embodiment, in step S104, the method for enabling the client and the server to obtain the mobile phone number corresponding to the unique identifier of the sim card of the client through the downlink verification code short message includes, as shown in fig. 3, the following steps S301 to S310:
s301: the client provides a mobile phone number input window to the user.
S302: and the client acquires the mobile phone number input by the user through the mobile phone number input window.
S303: the client generates a first verification code and sends a verification code request to the server.
In this embodiment, the client guides the user to input the mobile phone number in the mobile phone number input window, the client generates the first verification code and sends the first verification code to the server, and the server triggers the operator corresponding to the sim to send the verification code short message to the mobile phone number of the client.
S304: and the server generates a second verification code according to the verification code request and sends the second verification code to an operator corresponding to the sim card of the client.
S305: and the operator issues a downlink verification code short message comprising the second verification code to the client.
In this embodiment, the downlink verification code is a verification code (random number, i.e., a second verification code) generated by the server, the server submits the short message content with the verification code to the operator, and the operator issues the verification code short message to the client.
S306: and the client receives the downlink verification code short message.
S307: the client judges whether the first verification code and the second verification code can be successfully matched; if yes, go to step S308, otherwise, end the process.
In this embodiment, the client needs to determine whether the first verification code and the second verification code can be successfully matched, if the matching is successful, it indicates that the mobile phone number input by the user is correct, and the mobile phone number input by the user belongs to the mobile phone number corresponding to the sim card unique identifier of the current client, otherwise, it indicates that the mobile phone number input by the user is not the mobile phone number corresponding to the sim card unique identifier of the current client, and the matching of the mobile phone number by the downlink verification code short message fails, and the flow of the method for enabling the client and the server to obtain the mobile phone number corresponding to the sim card unique identifier of the client through the downlink verification code short message shown in fig. 3 is ended.
S308: and the client records the corresponding relation between the unique identification of the sim card of the client and the mobile phone number input by the user.
In this embodiment, if the first verification code and the second verification code are successfully matched, the client records the mobile phone number input by the user, and uses the mobile phone number as the mobile phone number corresponding to the unique identifier of the sim card of the client.
S309: and the client sends the corresponding relation between the unique identifier of the sim card of the client and the mobile phone number input by the user to the server.
S310: and the server stores the corresponding relation between the unique identifier of the sim card and the mobile phone number input by the user, and the process is ended.
In the method for extracting numbers by the client, the user provides the mobile phone number after the client fails to acquire the mobile phone number corresponding to the sim card of the client in a mode of sending the uplink short message to the server, then the client generates a verification code request sending server corresponding to the first verification code according to the mobile phone number provided by the user, then the server generates a second verification code according to the verification code request and sends the second verification code to the operator, then the operator generates a downlink identifying code short message according to the second identifying code and sends the message to the client, and finally the client judges whether the first identifying code and the second identifying code can be matched, if so, the mobile phone number input by the user is correct, meanwhile, the mobile phone number input by the user and the unique identifier of the sim card are sent to the server, so that the mobile phone number of the client can be inquired next time, and the success rate of acquiring the mobile phone number of the client is effectively improved.
As an optional embodiment, in step S104, the method for enabling the client and the server to obtain the mobile phone number corresponding to the unique identifier of the sim card of the client through short message content matching includes, as shown in fig. 4, the following steps S401 to S409:
s401: and the client acquires the registered short message service business number list recorded by the server.
In this example, the sms is different from the operator, and is an intermediary sending sms, and such a company is called sp in the industry, for example: the enterprises communicate and are in the form of clouds, Aliyun, Tengchongyun, etc.
S402: and the client acquires a client short message log corresponding to the short message service business number list according to the short message service business number list and sends the client short message log to the server.
The client short message log comprises a client sim card unique identifier, a short message service provider number and short message related information.
For example: in this step, for the short message service provider with the number "12345", the client obtains all the short message logs corresponding to the number "12345" from all the local short message logs and sends the obtained logs to the server.
S403: and the server forwards the received short message log of the client to the corresponding short message service provider according to the number of the short message service provider.
S404: and the short message service provider matches the received short message log of the client with the local short message log.
The local short message log of the short message service provider at least comprises a target user mobile phone number, a short message service provider number and short message related information.
S405: and the short message service provider extracts the unique identification of the sim card of the client in the short message log of the client which is successfully matched and the mobile phone number of the target user in the local short message log.
S406: and the short message service provider sends the unique identifier of the sim card and the corresponding mobile phone number to the server.
S407: and the server records the received corresponding relation between the unique identifier of the client sim card and the mobile phone number.
S408: and the server sends the recorded mobile phone number to the client.
S409: the client records the corresponding relation between the unique identification of the sim card of the client and the currently received mobile phone number, and then the process is ended.
In the method for extracting a number by a client, after failing to acquire a mobile phone number corresponding to a sim card of the client by requesting, sending an uplink short message, and a downlink verification code short message from the server, the client may send a request for acquiring the mobile phone number corresponding to the sim card to a short message service provider through the server, and then the short message service provider may send the mobile phone number corresponding to the sim card to the server and the client, so that the client successfully acquires the mobile phone number corresponding to the sim card.
As an alternative embodiment, as shown in fig. 5, step S404 includes the following steps S501-S508:
s501: and the short message service provider acquires all local short message logs of which the time difference between the time stamp in the local short message log and the short message time stamp in the client short message log is within 3 seconds, and obtains a short message log set to be matched.
Wherein, the related information of the short message comprises: HASH value of the short message content, short message length and short message timestamp.
In this embodiment, the HASH value of the short message content is calculated by using sha256, the length of the short message is the length of the short message content, and the time of the short message timestamp is utc timestamp. Meanwhile, according to the content matching method, in order to ensure the matching efficiency, the uniqueness of the short message content needs to be ensured as much as possible, the marketing short message is eliminated, the short message content with higher uniqueness, such as the notification class, the verification code and the like, is screened for matching and number taking, and only all local short message logs with the time difference of the short message timestamp in the client short message log within 3 seconds are taken, so that the accuracy is ensured, and the execution efficiency is improved.
S502: judging whether the client short message log and the ith short message log in the short message log set to be matched can be successfully matched or not; if yes, go to step S503, otherwise go to step S506.
Wherein I is 1,2, …, I; and I is the total number of the short message logs in the short message log set to be matched.
In this embodiment, the matching between the short message log at the client and the short message log to be matched is mainly performed by verifying whether the length (short message length) & HASH value (encrypted short message content) & senderID (short message service provider number) are the same, and if so, recording the number of successful matching times plus 1, and when the value reaches a certain value (e.g. 3) or more, determining that the number extraction is successful once.
Preferably, the short message content matching algorithm is as follows: calculating an MD5 value of the number of the short message service provider, the content of the short message and the length of the short message in the log of the client as a first key1, taking the sim card unique identifier and the short message timestamp in the log of the client as a first value1, calculating an MD5 value of the number of the short message service provider, the content of the short message and the length of the short message in the log of the short message service provider as a second key2, taking the mobile phone number and the timestamp in the log of the short message service provider as a second value2, and performing handle parallel aggregation on the sim card unique identifier and the mobile phone number in the value of the same key when the client short message log of which the comparison timestamp meets the configuration condition (for example, within a timestamp interval of 3 s) and the short message log of the short message service provider are compared to obtain the corresponding relation between the sim card unique identifier and the mobile phone number.
S503: making the matching success frequency M equal to M + 1;
wherein the initial value of M is 0;
s504: and judging whether the current M reaches a second preset number of times, if so, executing the step S505, otherwise, executing the step S506.
Preferably, the second preset number is 3. Namely: and when the matching success frequency M is 3, determining that the mobile phone number corresponding to the unique identifier of the sim card of the client side is found.
S505: and determining that the matching is successful, and ending the short message content matching process.
In this embodiment, after the matching is determined to be successful, the HASH value (including phone: phone number) and simid need to be sent to the client.
S506: judging whether I is equal to I; if yes, S507 is executed, otherwise S508 is executed.
S507: and the short message service provider determines that the received short message log of the client is unsuccessfully matched with the local short message log.
S508: let i be i +1, and return to execution S502.
In the method for extracting a number by a client according to this embodiment, the client obtains a mobile phone number corresponding to sim in a short message content matching manner, where the short message related information includes: the HASH value, the short message length and the short message timestamp of the short message content, the number of local short message logs matched by a short message service provider according to the short message related information is required to be not less than a second preset number, if the number of local short message logs matched by the short message service provider is less than the second preset number, a mobile phone number corresponding to the sim is not found, if the number of local short message logs matched by the short message service provider is not less than the second preset number, a mobile phone number corresponding to the sim is found, and therefore the correctness of the found mobile phone number corresponding to the sim is guaranteed.
Corresponding to the method for extracting numbers by a client provided by the embodiment of the present invention, the embodiment of the present invention further provides a system for extracting numbers by a client, as shown in fig. 6, the system includes a client 1 and a server 2;
and the client 1 is used for receiving a network short message opening request, acquiring the unique identifier of the sim card of the client and sending the unique identifier to the server 2.
And the server 2 is used for recording the unique identifier of the sim card at the client, inquiring whether a mobile phone number corresponding to the unique identifier of the sim card at the client is locally recorded, and if the mobile phone number corresponding to the unique identifier of the sim card at the client is inquired, sending the mobile phone number corresponding to the unique identifier of the sim card at the client to the client 1 so as to open the network short message function of the client 1.
The client 1 is further configured to, when the server 2 does not inquire the mobile phone number corresponding to the unique identifier of the sim card of the client, enable the client 1 and the server 2 to acquire the mobile phone number corresponding to the unique identifier of the sim card of the client by sending an uplink short message and/or receiving a downlink verification code short message and/or performing short message content matching, so as to activate the network short message function of the client 1.
Fig. 7 is a schematic structural diagram of a second embodiment of a system for extracting a number by a client according to the present invention. Referring to fig. 7, the present embodiment is based on the structure of the first embodiment of the system for extracting numbers by a client, and further, the system further includes a first operator 3 corresponding to a sim card of the client;
the client 1 is specifically configured to send an uplink short message to the first operator 3 when the server 2 does not inquire the mobile phone number corresponding to the unique identifier of the sim card at the client, and then periodically send a mobile phone number inquiry request to the server 2 according to a preset inquiry period until the mobile phone number corresponding to the unique identifier of the sim card at the client, which is fed back by the server 2 according to the mobile phone number inquiry request, is received, or when the number of repeated inquiries of sending the mobile phone number inquiry request to the server 2 reaches a first preset number; the uplink short message at least comprises the unique identifier of the sim card of the client, and the mobile phone number inquiry request comprises the unique identifier of the sim card of the client.
And the first operator 3 is configured to locally acquire a mobile phone number corresponding to the unique identifier of the sim card at the client in the uplink short message, and send the unique identifier of the sim card at the client and the mobile phone number corresponding to the unique identifier of the sim card at the client to the server 2.
The server 2 is also used for recording the corresponding relation between the received unique identifier of the client sim card and the mobile phone number; and the mobile phone number inquiry module is further used for inquiring whether the mobile phone number corresponding to the unique identifier of the sim card of the client side is recorded locally or not again according to the mobile phone number inquiry request, and if so, sending the mobile phone number corresponding to the unique identifier of the sim card of the client side to the client side 1.
Fig. 8 is a schematic structural diagram of a third embodiment of a system for extracting a number by a client according to the present invention. Referring to fig. 8, the present embodiment is based on the structure of the first embodiment of the system for extracting numbers by a client, and further, the system further includes a second operator 4 corresponding to a sim card of the client;
the client 1 is also used for providing a mobile phone number input window for a user when the mobile phone number corresponding to the unique identifier of the sim card of the client cannot be acquired through the uplink short message, acquiring the mobile phone number input by the user through the mobile phone number input window, and then generating a first verification code and sending a verification code request to the server 2; the client 1 is further configured to receive a downlink verification code short message sent by a second operator 4, determine whether the first verification code and the second verification code can be successfully matched, record the mobile phone number input by the user if the first verification code and the second verification code can be successfully matched, and send the corresponding relationship between the unique identifier of the sim card at the client and the mobile phone number input by the user to the server 2.
The server 2 is further used for generating a second verification code according to the verification code request and sending the second verification code to a second operator 4 corresponding to the client sim card, and is further used for receiving and storing the corresponding relation between the unique identifier of the client sim card and the mobile phone number sent by the client 1;
and the second operator 4 is configured to issue a downlink verification code short message including the second verification code to the client 1 when receiving the second verification code sent by the server 2.
In fig. 7 and 8, the first operator 3 and the second operator 4 corresponding to the same sim card are the same.
Fig. 9 is a schematic structural diagram of a fourth embodiment of a system for extracting a number by a client according to the present invention. Referring to fig. 9, the present embodiment is based on the structure of the first embodiment of the system for extracting numbers by a client, and further, the system further includes a short message service provider 5;
the client 1 is further used for acquiring a registered short message service business number list recorded by the server 2 when the mobile phone number corresponding to the unique identifier of the sim card of the client cannot be acquired through a downlink verification code short message, acquiring a client short message log corresponding to the short message service business number list according to the short message service business number list and sending the client short message log to the server 2; the client short message log comprises a unique identifier of a client sim card, a short message service provider number and short message related information.
The server 2 is also used for forwarding the received client short message log to a corresponding short message service provider 5 according to the number of the short message service provider; the server 2 is also used for recording the corresponding relation between the unique identifier of the sim card of the client and the mobile phone number sent by the short message service provider 5, and sending the recorded mobile phone number to the client 1.
The short message service provider 5 comprises: a matching module 51 and an extraction module 52;
a matching module 51, configured to match the received client short message log with the local short message log; the local short message log of the short message service provider 5 at least comprises a target user mobile phone number, a short message service provider number and short message related information;
and the extracting module 52 is configured to extract the unique identifier of the client sim card in the client short message log successfully matched by the matching module 51 and the mobile phone number of the target user in the local short message log, and send the unique identifier and the mobile phone number to the server 2.
Fig. 10 is a schematic structural diagram of a fifth embodiment of a system for extracting a number by a client according to the present invention. Referring to fig. 10, the present embodiment is based on the structure of the fourth embodiment of the system for extracting numbers by a client, and further, the matching module 51 includes: an acquisition unit 511, a matching unit 512, a counting unit 513, a first judgment unit 514, a determination unit 515, and a second judgment unit 516;
the acquiring unit 511 is configured to acquire all local short message logs of which the time difference between the time stamp in the local short message log and the short message time stamp in the client short message log is within 3 seconds, and obtain a short message log set to be matched; wherein, the related information of the short message comprises: HASH value of the short message content, short message length and short message timestamp.
A matching unit 512, configured to match the client short message log with an ith short message log in the set of short message logs to be matched; the second judging unit 516 is further configured to, if the judgment result is negative, continue to match the client short message log with the ith short message log in the set of short message logs to be matched after i is set to i + 1; wherein I is 1,2, …, I; and I is the total number of the short message logs in the short message log set to be matched.
A counting unit 513, configured to make the matching success frequency M equal to M +1 when the matching unit 512 successfully matches the client short message log with the ith short message log in the to-be-matched short message log set; the initial value of M is 0.
A first determining unit 514, configured to determine whether the current M reaches a second preset number.
A determining unit 515, configured to determine that the client short message log and the local short message log are successfully matched when the determination result of the first determining unit 514 is yes; and is further configured to determine that the matching between the client short message log and the local short message log is unsuccessful when the determination result of the second determining unit 516 is yes.
A second judging unit 516, configured to judge whether I is equal to I when the matching unit 512 unsuccessfully matches the client short message log with the ith short message log in the set of short message logs to be matched, or when the judgment result of the first judging unit 514 is no.
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 (11)

1. A method for extracting numbers by a client is characterized by comprising the following steps:
a client receives a network short message opening request;
the client acquires the unique identifier of the sim card of the client and sends the unique identifier to the server;
the server records the unique identification of the sim card of the client and inquires whether a mobile phone number corresponding to the unique identification of the sim card of the client is locally recorded;
if the server inquires the mobile phone number corresponding to the unique identifier of the sim card at the client, the mobile phone number corresponding to the unique identifier of the sim card at the client is sent to the client so as to open the network short message function of the client;
and if the server cannot inquire the mobile phone number corresponding to the unique identifier of the sim card of the client, the client and the server acquire the mobile phone number corresponding to the unique identifier of the sim card of the client through the matching of the contents of the uplink short message and/or the downlink verification code short message and/or the short message so as to activate the network short message function of the client.
2. The method for extracting numbers by a client as claimed in claim 1, wherein the priority of executing the matching of the uplink short message, the downlink verification code short message and the short message content is from high to low: and matching the contents of the uplink short message, the downlink verification code short message and the short message.
3. The method for extracting numbers by a client according to claim 2, wherein the step of enabling the client and the server to obtain the mobile phone number corresponding to the unique identifier of the sim card of the client through an uplink short message comprises the following steps:
the client sends an uplink short message to an operator corresponding to the sim card of the client; the uplink short message at least comprises the unique identifier of the sim card of the client;
the operator locally acquires a mobile phone number corresponding to the unique identifier of the client sim card in the uplink short message, and sends the unique identifier of the client sim card and the mobile phone number corresponding to the unique identifier of the client sim card to the server;
the server records the received corresponding relation between the unique identification of the client sim card and the mobile phone number;
after the client sends the uplink short message to the operator corresponding to the sim card of the client, the method further comprises the following steps:
when a preset inquiry period expires, the client judges whether the current repeated inquiry frequency N reaches a first preset frequency; the initial value of N is 0;
if the current repeated inquiry frequency N does not reach a first preset frequency, the client sends a mobile phone number inquiry request to the server, and then N is made to be N + 1; the mobile phone number inquiry request comprises the unique identifier of the sim card of the client;
the server inquires whether the mobile phone number corresponding to the unique identifier of the sim card of the client side is recorded locally or not again according to the mobile phone number inquiry request;
if the server inquires that the mobile phone number corresponding to the unique identifier of the sim card of the client is recorded locally again, the mobile phone number corresponding to the unique identifier of the sim card of the client is sent to the client, and the process is ended;
if the server cannot inquire the mobile phone number which is locally recorded and corresponds to the unique identifier of the sim card of the client, the client repeatedly executes the step that the client judges whether the current repeated inquiry frequency N reaches a first preset frequency when the preset inquiry period expires;
and if the current repeated inquiry times N reach a first preset time, continuing to execute the step of enabling the client and the server to acquire the mobile phone number corresponding to the unique identifier of the sim card of the client through the downlink verification code short message.
4. The method for extracting a number by a client according to claim 2, wherein the step of enabling the client and the server to obtain the mobile phone number corresponding to the unique identifier of the sim card of the client by a downlink verification code short message comprises the following steps:
the client provides a mobile phone number input window for the user;
the client acquires the mobile phone number input by the user through the mobile phone number input window;
the client generates a first verification code and sends a verification code request to the server;
the server generates a second verification code according to the verification code request and sends the second verification code to an operator corresponding to the sim card of the client;
the operator issues a downlink verification code short message comprising the second verification code to the client;
the client receives the downlink verification code short message;
the client judges whether the first verification code and the second verification code can be successfully matched;
if the local verification code and the second verification code can be successfully matched, the client records the mobile phone number input by the user, sends the corresponding relation between the unique identifier of the sim card of the client and the mobile phone number input by the user to the server for storage, and ends the process;
and if the local verification code and the second verification code cannot be successfully matched, continuing to execute the step of matching the contents of the short message to enable the client and the server to obtain the mobile phone number corresponding to the unique identifier of the sim card of the client.
5. The method for extracting numbers by a client according to claim 2, wherein the step of enabling the client and a server to obtain the mobile phone number corresponding to the unique identifier of the sim card of the client through short message content matching comprises the following steps:
the client acquires a registered short message service business number list recorded by the server;
the client acquires a client short message log corresponding to the short message service business number list according to the short message service business number list and sends the client short message log to the server; the client short message log comprises a unique identifier of a client sim card, a short message service provider number and short message related information;
the server forwards the received client short message log to a corresponding short message service provider according to the number of the short message service provider;
matching the received client short message log with a local short message log by the short message service provider; the local short message log of the short message service provider at least comprises a target user mobile phone number, a short message service provider number and short message related information;
the short message service provider extracts the unique identification of the client sim card in the successfully matched client short message log and the target user mobile phone number in the local short message log and sends the unique identification and the target user mobile phone number to the server;
the server records the corresponding relation between the received unique identification of the client sim card and the mobile phone number;
and the server sends the recorded mobile phone number to the client.
6. The method for extracting numbers by a client as claimed in claim 5, wherein the short message related information comprises: HASH value, short message length and short message timestamp of the short message content;
the short message service provider matches the received client short message log with the local short message log, and the method comprises the following steps:
the short message service provider obtains all local short message logs of which the time difference between a time stamp in the local short message log and a short message time stamp in the client short message log is within 3 seconds to obtain a short message log set to be matched;
matching the client short message log with the ith short message log in the short message log set to be matched; i ═ 1,2, …, I; i is the total number of the short message logs in the short message log set to be matched;
if the client short message log is successfully matched with the ith short message log in the short message log set to be matched, enabling the matching success frequency M to be M + 1; the initial value of M is 0;
judging whether the current M reaches a second preset number of times;
if the current M reaches a second preset number, determining that the matching is successful, and ending the short message content matching process;
if the matching of the client short message log and the ith short message log in the short message log set to be matched is unsuccessful or the current M does not reach a second preset number of times, judging whether I is equal to I or not;
if I is not equal to I, returning to execute the step of matching the client short message log with the ith short message log in the short message log set to be matched after I is equal to I + 1;
and if the I is equal to the I, the short message service provider determines that the received short message log of the client is unsuccessfully matched with the local short message log.
7. A system for extracting a number by a client, comprising: a client and a server;
the client is used for receiving a network short message opening request, acquiring a unique identifier of a sim card of the client and sending the unique identifier to the server;
the server is used for recording the unique identifier of the sim card of the client, inquiring whether a mobile phone number corresponding to the unique identifier of the sim card of the client is locally recorded, and if the mobile phone number corresponding to the unique identifier of the sim card of the client is inquired, sending the mobile phone number corresponding to the unique identifier of the sim card of the client to the client so as to open the network short message function of the client;
and the client is also used for enabling the client and the server to acquire the mobile phone number corresponding to the unique identifier of the sim card of the client by sending an uplink short message and/or receiving a downlink verification code short message and/or performing short message content matching when the server does not inquire the mobile phone number corresponding to the unique identifier of the sim card of the client so as to open the network short message function of the client.
8. The system for extracting numbers by a client as claimed in claim 7, further comprising an operator corresponding to the sim card of the client;
the client is specifically configured to send an uplink short message to the operator when the server does not inquire the mobile phone number corresponding to the unique identifier of the sim card of the client, and then periodically send a mobile phone number inquiry request to the server according to a preset inquiry period until the mobile phone number corresponding to the unique identifier of the sim card of the client, which is fed back by the server according to the mobile phone number inquiry request, is received, or when the number of repeated inquiries of the mobile phone number inquiry request sent to the server reaches a first preset number; the uplink short message at least comprises the unique identifier of the sim card of the client, and the mobile phone number inquiry request comprises the unique identifier of the sim card of the client;
the operator is used for locally acquiring the mobile phone number corresponding to the unique identifier of the client sim card in the uplink short message and sending the unique identifier of the client sim card and the mobile phone number corresponding to the unique identifier of the client sim card to the server;
the server is also used for recording the corresponding relation between the received unique identifier of the client sim card and the mobile phone number; and the mobile phone number inquiry module is further used for inquiring whether the mobile phone number corresponding to the unique identifier of the sim card of the client side is recorded locally or not again according to the mobile phone number inquiry request, and if so, sending the mobile phone number corresponding to the unique identifier of the sim card of the client side to the client side.
9. The system for extracting numbers by a client as claimed in claim 7, further comprising an operator corresponding to the sim card of the client;
the client is also used for providing a mobile phone number input window for a user when the mobile phone number corresponding to the unique identifier of the sim card of the client cannot be acquired through the uplink short message, acquiring the mobile phone number input by the user through the mobile phone number input window, and then generating a first verification code and sending a verification code request to the server; the client is also used for receiving a downlink verification code short message sent by the operator, judging whether the first verification code and the second verification code can be successfully matched, if so, recording the mobile phone number input by the user, and sending the corresponding relation between the unique identifier of the sim card of the client and the mobile phone number input by the user to the server;
the server is further used for generating a second verification code according to the verification code request and sending the second verification code to an operator corresponding to the client sim card, and is also used for receiving and storing the corresponding relation between the unique identifier of the client sim card and the mobile phone number sent by the client;
and the operator is used for issuing a downlink verification code short message comprising the second verification code to the client when receiving the second verification code sent by the server.
10. The system for extracting a number by a client as claimed in claim 7, further comprising: a short message service provider;
the client is also used for acquiring a registered short message service business number list recorded by the server when the mobile phone number corresponding to the unique identifier of the sim card of the client cannot be acquired through a downlink verification code short message, acquiring a client short message log corresponding to the short message service business number list according to the short message service business number list and sending the client short message log to the server; the client short message log comprises a client sim card unique identifier, a short message service provider number and short message related information;
the server is also used for forwarding the received client short message log to a corresponding short message service provider according to the number of the short message service provider; the server is also used for recording the corresponding relation between the unique identifier of the sim card of the client and the mobile phone number sent by the short message service provider and sending the recorded mobile phone number to the client;
the short message service provider comprises: a matching module and an extraction module;
the matching module is used for matching the received client short message log with the local short message log; the local short message log of the short message service provider at least comprises a target user mobile phone number, a short message service provider number and short message related information;
and the extraction module is used for extracting the unique identification of the client sim card in the client short message log successfully matched by the matching module and the target user mobile phone number in the local short message log, and sending the unique identification to the server.
11. The system for extracting a number by a client as claimed in claim 10, wherein the short message related information comprises: HASH value, short message length and short message timestamp of the short message content;
the matching module comprises: the device comprises an acquisition unit, a matching unit, a counting unit, a first judgment unit, a determination unit and a second judgment unit;
the acquisition unit is used for acquiring all local short message logs of which the time difference between the time stamp in the local short message log and the short message time stamp in the client short message log is within 3 seconds to obtain a short message log set to be matched;
the matching unit is used for matching the client short message log with the ith short message log in the short message log set to be matched; the second judging unit is used for judging whether the short message log to be matched is the ith short message log in the short message log set to be matched or not according to the short message log to be matched, wherein the short message log to be matched is the ith short message log in the short message log set to be matched; wherein I is 1,2, …, I; i is the total number of the short message logs in the short message log set to be matched;
the counting unit is used for enabling the matching success frequency M to be M +1 when the matching unit successfully matches the client short message log with the ith short message log in the short message log set to be matched; the initial value of M is 0;
the first judging unit is used for judging whether the current M reaches a second preset number of times;
the determining unit is used for determining that the matching between the client short message log and the local short message log is successful when the judgment result of the first judging unit is yes; the second judging unit is used for judging whether the short message log of the client is matched with the local short message log or not according to the judgment result of the first judging unit;
the second judging unit is configured to judge whether I is equal to I or not when the matching unit unsuccessfully matches the client short message log with the ith short message log in the set of short message logs to be matched, or when the judgment result of the first judging unit is negative.
CN202111485936.4A 2021-12-07 2021-12-07 Method and system for extracting number by client Active CN114302349B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111485936.4A CN114302349B (en) 2021-12-07 2021-12-07 Method and system for extracting number by client

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111485936.4A CN114302349B (en) 2021-12-07 2021-12-07 Method and system for extracting number by client

Publications (2)

Publication Number Publication Date
CN114302349A true CN114302349A (en) 2022-04-08
CN114302349B CN114302349B (en) 2023-05-30

Family

ID=80964678

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111485936.4A Active CN114302349B (en) 2021-12-07 2021-12-07 Method and system for extracting number by client

Country Status (1)

Country Link
CN (1) CN114302349B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101075996A (en) * 2007-07-12 2007-11-21 中兴通讯股份有限公司 Comprehensive access gate device and its telecommunication
CN101207579A (en) * 2007-08-15 2008-06-25 杨汉民 Server for implementing network note service and communication method among client machines
CN101841780A (en) * 2010-04-09 2010-09-22 彭浩明 Method and system for sending network short message
CN102202010A (en) * 2011-05-09 2011-09-28 韩平亮 Message transmission client and communication method with combination of short message and network
CN103167444A (en) * 2011-12-19 2013-06-19 中国电信股份有限公司 Method, system, client and server of acquiring user cell phone number from website
WO2021233262A1 (en) * 2020-05-21 2021-11-25 北京三快在线科技有限公司 Communication control

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101075996A (en) * 2007-07-12 2007-11-21 中兴通讯股份有限公司 Comprehensive access gate device and its telecommunication
CN101207579A (en) * 2007-08-15 2008-06-25 杨汉民 Server for implementing network note service and communication method among client machines
CN101841780A (en) * 2010-04-09 2010-09-22 彭浩明 Method and system for sending network short message
CN102202010A (en) * 2011-05-09 2011-09-28 韩平亮 Message transmission client and communication method with combination of short message and network
CN103167444A (en) * 2011-12-19 2013-06-19 中国电信股份有限公司 Method, system, client and server of acquiring user cell phone number from website
WO2021233262A1 (en) * 2020-05-21 2021-11-25 北京三快在线科技有限公司 Communication control

Also Published As

Publication number Publication date
CN114302349B (en) 2023-05-30

Similar Documents

Publication Publication Date Title
US10198229B2 (en) Method of sharing cloud printer in a cloud print system, cloud server, and cloud print system
JP5693575B2 (en) Method and apparatus for verification of telephone numbers
CN103037312B (en) Information push method and device
KR102646565B1 (en) Processing electronic tokens
CN107426711B (en) Method, device and system for binding or unbinding mobile phone number
EP2611226A1 (en) Processing method and system for over-the-air bootstrap
CN108933789B (en) Method for preventing personal information leakage and third-party application server
CN109246078B (en) Data interaction method and server
CN102123362A (en) Method for automatically acquiring mobile phone number by mobile equipment
CN108366176B (en) Charging method, device and system for terminal application
CN107277799B (en) Method, device, terminal and storage medium for binding mobile phone number
CN103581881A (en) Comprehensive number-obtaining device as well as system and method for obtaining cell phone number of user on network side
US20150180851A1 (en) Method, device, and system for registering terminal application
CN107318100B (en) Method, device and system for binding mobile phone number
CN114302349B (en) Method and system for extracting number by client
CN112165458A (en) Real-name authentication method, device and terminal
CN114554251B (en) Multimedia data requesting method and device, storage medium and electronic device
CN106961457B (en) Method and system for applying mobile internet enterprise toolbar
CN101778055B (en) Message processing method and network entity
GB2520938A (en) Mobile device location
CN113691614B (en) Information processing method and device
CN111246404A (en) Method and device for processing verification code short message
CN112799796A (en) Timed task management method, device and storage medium
US9830207B2 (en) Message communication system and operation method thereof
CN112069488B (en) Application login method in communication program and related device thereof

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