Disclosure of Invention
The application provides a method and a device for maintaining the validity of a mobile terminal, which aim to solve the problem that the prior art can not timely and pertinently remind a user of the change of the number of the mobile terminal. The application further provides a method and a device for uploading the information of the mobile terminal, and a system for maintaining the validity of the mobile terminal.
The method for maintaining the validity of the mobile terminal comprises the following steps:
receiving identity identification information which is sent by a mobile terminal and corresponds to an account of the mobile terminal;
judging whether the received identity identification information of the mobile terminal is different from the pre-stored identity identification information of the account or not;
and if not, sending a notification that the received identification information is different from the pre-stored identification information of the account to the account.
Optionally, the receiving the identification information corresponding to the mobile terminal account sent by the mobile terminal includes:
receiving mobile terminal information which is packaged by adopting a predefined data format and corresponds to the mobile terminal account;
and analyzing the received information to acquire the identification information corresponding to the mobile terminal account.
Optionally, the predefined data format refers to one of a Json data format or an xml data format.
Optionally, the receiving the identification information corresponding to the mobile terminal account sent by the mobile terminal includes:
receiving identity identification information sent by a mobile terminal;
judging whether the received identification information needs to be decrypted or not;
and if so, decrypting the received identification information.
Optionally, the receiving the identification information corresponding to the mobile terminal account sent by the mobile terminal further includes:
verifying the data correctness of the received identification information;
if the verification result is that the data is accurate, executing the step of judging whether the identity identification information needs to be decrypted; and if the verification result is that the data is inaccurate, returning a prompt of data abnormity to the mobile terminal and prompting the mobile terminal to upload the data again.
Optionally, the receiving the identification information corresponding to the mobile terminal account sent by the mobile terminal further includes:
receiving a first check value of the identity identification information sent by the mobile terminal;
the verifying the data correctness of the received identification information comprises:
calculating a second check value of the received identification information by using a check algorithm used for generating the first check value;
judging whether the first check value and the second check value are the same; if the identity identification information is the same as the identification information, the received identity identification information is considered to be accurate; and if the identity identification information is not the same, the received identity identification information is considered to be inaccurate.
Optionally, the identification information includes an IMSI number of the mobile terminal.
Optionally, the method further includes:
receiving equipment verification information which is sent by a mobile terminal and corresponds to the mobile terminal account;
judging whether the received equipment verification information of the mobile terminal is different from the prestored equipment verification information of the account or not;
and if the device verification information is different from the prestored device verification information of the account, sending a notification that the received device verification information is different from the prestored device verification information of the account to the account.
Optionally, the device authentication information of the mobile terminal includes an IMEI number of the mobile terminal, a MAC address of the mobile terminal, or a bluetooth MAC address of the mobile terminal.
Correspondingly, the present application also provides an apparatus for maintaining the validity of a mobile terminal, including:
the mobile terminal comprises a receiving unit, a processing unit and a processing unit, wherein the receiving unit is used for receiving identity identification information which is sent by the mobile terminal and corresponds to an account of the mobile terminal;
the judging unit is used for judging whether the received identification information of the mobile terminal is different from the prestored identification information of the account or not;
and the notification unit is used for sending a notification that the received identification information is different from the pre-stored identification information of the account to the account when the received identification information of the mobile terminal is different from the pre-stored identification information of the account.
In addition, the present application also provides a method for uploading mobile terminal information, including:
acquiring identity identification information corresponding to a mobile terminal account;
sending the identity identification information to a server;
and receiving a notification that the identity identification information sent to the server end and returned by the server end is different from the identity identification information prestored in the account.
Optionally, the method further includes: encrypting the identification information corresponding to the mobile terminal account by adopting an encryption algorithm;
correspondingly, the sending of the identification information means sending the identification information encrypted by an encryption algorithm.
Optionally, the encryption algorithm includes an AES algorithm or an MD5 algorithm.
Optionally, before sending the identification information, a check algorithm is used to calculate a check value of the identification information to be sent;
correspondingly, the sending the identification information specifically means sending the identification information to be sent and the check value.
Optionally, the verification algorithm includes an MD5 algorithm.
Optionally, the sending the identification information specifically means encapsulating and sending the identification information by using a predefined data format.
Optionally, the method further includes:
acquiring equipment verification information corresponding to a mobile terminal account;
sending the equipment verification information to a server side;
and receiving a notification that the equipment verification information sent to the server side and returned by the server side is different from the equipment verification information prestored in the account.
Optionally, the device authentication information includes: the IMEI number of the mobile terminal, the MAC address of the mobile terminal or the Bluetooth MAC address of the mobile terminal.
Correspondingly, the present application also provides an apparatus for uploading mobile terminal information, including:
the information acquisition unit is used for acquiring the identity identification information corresponding to the mobile terminal account;
the information sending unit is used for sending the identity identification information to a server side;
and the notification receiving unit is used for receiving a notification that the identity identification information sent to the server side and returned by the server side is different from the identity identification information prestored in the account.
In addition, the present application also provides a system for maintaining the validity of a mobile terminal, comprising: the apparatus for maintaining the validity of the mobile terminal according to any one of the above claims, and the apparatus for uploading the information of the mobile terminal according to any one of the above claims.
Compared with the prior art, the method has the following advantages:
the method for maintaining the validity of the mobile terminal, the method for uploading the information of the mobile terminal, the corresponding device and the corresponding system utilize the corresponding relation between the identification information of the mobile terminal and the number of the mobile terminal, and actively detect the change of the identification information of the mobile terminal corresponding to the account of the mobile terminal, namely: the identification information is different from the prestored identification information of the account, so that the fact that the account owner possibly changes the number of the mobile terminal is inferred, a notification of the identification information change is sent to the account in time, the account is reminded of updating the corresponding relation between the number of the mobile terminal and the account, the effectiveness of the mobile terminal corresponding to the account is maintained, inconvenience brought to a user due to the fact that the corresponding relation is not updated in time is avoided, and user experience can be effectively improved.
Detailed Description
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present application. This application is capable of implementation in many different ways than those herein set forth and of similar import by those skilled in the art without departing from the spirit of this application and is therefore not limited to the specific implementations disclosed below.
In the application, a method and a device for maintaining the validity of a mobile terminal, a method and a device for uploading information of the mobile terminal and a system for maintaining the validity of the mobile terminal are respectively provided. Details are described in the following examples one by one.
Please refer to fig. 1, which is a flowchart illustrating an embodiment of a method for maintaining validity of a mobile terminal according to the present application. The method comprises the following steps:
step 101: and receiving the identity identification information which is sent by the mobile terminal and corresponds to the mobile terminal account.
The mobile terminal referred to in this application is not only a mobile phone (i.e. a so-called mobile phone or a smart phone), but also includes other communication devices that have a unique device identifier (e.g. an IMEI number) and unique identification information (e.g. an IMSI number) inside a mobile network and can send and receive information via a wireless interface during a moving process, for example: the system comprises a notebook computer, an iPad device, a PAD device and the like supporting a 3G network card. For ease of description, the following description of some basic concepts will be referred to in terms of mobile phones, and will also apply to the mobile terminals described above.
There are three common identification codes or numbers associated with a mobile terminal: an IMEI number, an IMSI number, and a mobile terminal number (i.e., a so-called mobile phone number).
The IMEI is an english abbreviation of an International Mobile Equipment identity (International Mobile Equipment identity), namely, a Mobile phone serial number and a Mobile phone "serial number" which are commonly known, and is used for identifying each independent Mobile phone device in a Mobile network, is an internationally recognized Mobile phone identification serial number, and is equivalent to an identity card of a Mobile phone. The IMEI is an "electronic serial number" consisting of 15 digits, which corresponds to a mobile telephone one to one, and the code is unique worldwide. The IMEI number is one of the mobile terminal device authentication information described in the present application, and the mobile terminal device authentication information described in the present application further includes a mobile terminal MAC address and a mobile terminal bluetooth MAC address, which can uniquely identify each mobile terminal device.
IMSI is an english abbreviation of International Mobile Subscriber Identity (International Mobile Subscriber Identity), and is a number used in a Public Land Mobile Network (PLMN) to uniquely identify a Mobile Subscriber, namely: the application describes identification information. In GSM networks this number is usually stored in a SIM (Subscriber Identity Module) card, in CDMA networks for chinese telecommunications this number is usually stored in a UIM (User Identity Module) card, in TD-SCDMA and WCDMA networks for third generation this number is usually stored in a USIM card, and for IMS (IP Multimedia Subsystem) networks for 3GPP, each IMS User has an IMPI (IP Multimedia private User Identity) that functions like an IMSI, in an Isim (IMS) SIM card. The IMSI number is not visible to the user but to the mobile network, and the transmission of mobile telephone signals inside the mobile network is carried out via the IMSI number and not via what is known as the mobile telephone number.
The IMSI consists of 15 digits and comprises three parts of MCC, MNC and MSIN, wherein the MCC is a Mobile Country Code (Mobile Country Code) which is uniformly distributed and managed by International Telecommunications Union (ITU), uniquely identifies the Country to which the Mobile subscriber belongs, and has 3 digits in total, and the number of the china is 460; MNC is mobile network Code (MobileNetwork Code) with 2 digits, china mobile system uses 00, 02, 07, china unicom GSM system uses 01, china telecom CDMA system uses 03, and a typical IMSI number is 460030912121001; MSIN is a Mobile Subscriber identification number (Mobile Subscriber identity number) having 10 digits in total. Since the IMSI contains the mobile country code MCC, the country from which each subscriber is coming can be distinguished, and thus international roaming can be achieved. Within the same country, a distinction can be made by means of the mobile network code MNC if there are several mobile network operators.
The Mobile telephone number is part of the Mobile station international ISDN number (MSISDN), which is the number that uniquely identifies the Mobile subscriber in the public telephone network switching network numbering plan. According to the recommendation of CCITT, MSISDN is composed of Country Code (CC), domestic destination code (NDC) and user number (SN), if the country code CC is removed from the above numbers, it is the so-called mobile phone number (i.e. mobile phone number), and the mobile phone number in China is usually 11 bits at present. The mobile terminal number is the mobile phone number.
The SIM, UIM or USIM card usually stores an IMSI number, but the mobile phone number is not necessarily stored therein, and the SIM card only retains the IMSI and some authentication information, for example, in a GSM network. The IMSI and the verification information are uploaded to a server of an operator in a form of a short message every time the mobile phone is registered, and the server issues a registration result to the mobile phone in a form of the short message after the registration action is finished. The delivered content will vary according to different conditions. If the server does not contain the mobile phone number in the sent short message, the mobile phone cannot acquire the mobile phone number. If the short message contains the mobile phone number, the mobile phone will cache the mobile phone number. Therefore, the SIM, UIM, USIM, or the like card can acquire IMSI information, but does not necessarily acquire the mobile phone number.
Although a card such as a SIM or USIM stores only an IMSI number and does not store a mobile phone number, there is a one-to-one correspondence between the IMSI number and the mobile phone number, and a specific subscriber can be identified by this correspondence. The corresponding relation is not stored in the SIM or USIM card, but in the server of the operator, when the user applies for and opens the mobile communication service to the mobile operator, the operator will bind the IMSI number of the new SIM or USIM card with the new mobile phone number on the network side network element HLR (Home Location Register) database, so as to establish the corresponding relation between the mobile phone number and the IMSI number, which is usually fixed.
According to the method for maintaining the validity of the mobile terminal, the change of the identification information of the mobile terminal used by the user is actively detected, the possibility that the user changes the number of the mobile terminal is judged, and the user is timely reminded of the change information, so that the user can timely update the corresponding relation between the account and the number of the mobile terminal. The method for maintaining the validity of the mobile terminal mainly utilizes the corresponding relation between the number of the mobile terminal and the identity identification information of the mobile terminal.
To implement the method provided by the present application, the identification information corresponding to an account sent by the mobile terminal needs to be compared with the prestored identification information of the account, so as to determine whether the identification information corresponding to the account changes, and in order to implement the comparison, the identification information corresponding to the account is collected before the comparison, that is: and receiving the identity identification information which is sent by the mobile terminal and corresponds to the mobile terminal account within a period of time, and storing the mobile terminal account and the identity identification information which corresponds to the mobile terminal account as a basis for subsequent comparison.
In a specific example of this embodiment, a user establishes a correspondence between an elutriation account and a mobile phone number of the user (that is, generally, the account is bound to the mobile phone number), and when the user logs in a client application program on a mobile phone by using the account, a server implementing the method of the present application receives account information of the user and a corresponding IMSI number (that is, identification information stored in a SIM card of the mobile phone) uploaded by the mobile phone used by the user, and stores the account information of the user and the corresponding IMSI number in an HBase database.
The above is the data acquisition process of the mobile terminal, the acquisition process can be executed once or for many times, and the acquisition can be set in a period of time after the corresponding relationship between the account and the mobile phone number is established; the collected mobile terminal data may include not only the IMSI number but also device identification information identifying the mobile terminal, such as: the IMEI number of the mobile terminal, the MAC address of the mobile terminal, the Bluetooth MAC address of the mobile terminal and the like; the collected data may also be stored in other types of databases or in data files, and these embodiments may be adjusted according to different requirements, which is not a core of the present application and is not limited in the present application.
After data acquisition is completed, the received identification information of an account uploaded by the mobile terminal can be compared with the acquired identification information of the account, and for the description, refer to the description in step 102.
After receiving the identification information corresponding to the mobile terminal account sent by the mobile terminal, before comparing the identification information with the identification information collected in advance, the following processing needs to be further executed: the method comprises the steps of analyzing and obtaining the identification information, judging the data correctness of the identification information, and carrying out necessary decryption processing on the identification information, which is described one by one below.
Firstly, identity identification information is obtained through analysis.
The mobile terminal information corresponding to the mobile terminal account sent by the mobile terminal is usually packaged by adopting a pre-negotiated data format. After receiving the information, the information is firstly analyzed to obtain the required identification information.
Common data formats are xml and Json, both of which are plain text based data interchange formats. xml, an extensible markup language, is a subset of standard generalized markup languages, can be used to mark data, define data types, and is a source language that allows users to define their own markup language. xml is designed to transmit and store data, it is well suited for Web transport, it provides a uniform way to describe and exchange structured data independent of the application or vendor, and the simplicity of xml makes it easy to read and write data in any application, which makes xml a common language for data exchange very quickly.
The advent of Json provides another data exchange format for application developers. Json (JavaScriptObject Notation) is a lightweight data exchange format that provides much greater simplicity and flexibility than xml. Json's data format is very simple, and Json can be used to transfer a simple string, a numerical value, an array, or a complex Object. Meanwhile, Json is a JavaScript native format and is very suitable for interaction between a server and the JavaScript.
In a specific example of this embodiment, a Json data exchange format is used, so the received mobile terminal information may be in a format similar to:
{"Account":"User1","IMSI":"460030912121001","IMEI":"xxxxxxxxxxx",
"MacAddr":"xx-xx-xx-xx-xx-xx"}
the above is merely one example of a Json data format, and in particular embodiments, the data received from the mobile terminal may contain different content. In a specific example of this embodiment, the received mobile terminal information encapsulated in the Json format is analyzed, and the identification information corresponding to the mobile terminal account is obtained from the analyzed mobile terminal information, that is, the mobile terminal account is: and obtaining the IMSI number.
Secondly, the data correctness of the identification information is judged.
In addition to the identification information, the received mobile terminal information may also include a check code of the identification information, where the check code is used to verify the correctness of the transmitted data. During data transmission, whether wireless or wired, errors may occur, for example: if the received data is incorrect, the subsequent operation based on the data may be correspondingly wrong or meaningless. To avoid this problem, it is common to calculate a check code (also called check value), that is: a sender calculates a check code of data to be sent and sends the data and the check code together; and after receiving the data, the receiver recalculates the check code, compares the check code with the received check code, if the check code is consistent with the received check code, the transmitted data is still correct, otherwise, the data is damaged in the transmission process and needs to be retransmitted.
In a specific example of this embodiment, an MD5 verification algorithm is used. MD5 (named message digest algorithm fifth edition in chinese) is a widely used hash function in the field of computer security to provide integrity protection for messages, and its basic principle is to map data of any length into a large integer of 128 bits, for example: MD5(tanajiya. tar.gz) =0ca175b9c0f726a831d895e269332461 is the check value calculated for the tanajiya. tar.gz file, and may also be referred to as a digital signature of the file. The algorithm is mainly used for ensuring the completeness and consistency of information transmission and providing completeness protection for data transmission. In other embodiments, other verification algorithms may be used, as long as the correctness of the received data can be verified, and the application does not limit the specific verification algorithm.
In a specific example of this embodiment, the IMSI number is obtained from the received mobile terminal information, the check code of the IMSI number is also obtained, then the MD5 algorithm is used to recalculate the check code of the received IMSI number, and the received check code and the calculated check code are compared, where the two are the same, so as to verify the data correctness of the received IMSI number. In other embodiments, if the two check codes are different after the comparison, it indicates that an error occurs in the data transmission process, in which case, one possible solution is: and sending a prompt of abnormal data transmission to the mobile terminal, and requiring the mobile terminal to upload data again.
In this embodiment, the received mobile terminal information is checked one by one, that is: for each item of information (such as IMSI number and IMEI number) needing to verify the data correctness, corresponding check codes (such as IMSI check codes and IMEI check codes) can be extracted from the received mobile terminal information, and the check codes are checked one by one to judge the data correctness of each item of information; in other embodiments, the received mobile terminal information may also adopt a global check mode, that is: the received mobile terminal information has a total check code, under the condition, the data correctness of the whole mobile terminal information needs to be verified firstly, and if the received data is correct, the required information is acquired one by one according to the predefined data format. The above description is only a modification of the specific embodiment, and as long as the sender and the receiver make an appointment, the method for maintaining the validity of the mobile terminal provided by the present application can be implemented, which does not depart from the core of the present application, and is within the protection scope of the present application.
And finally, carrying out necessary decryption processing on the identification information.
As the simplest and most easy implementation manner, the mobile terminal directly sends the original content of the identification information and other related information, namely: if no encryption is performed, the step 102 can be directly performed after receiving the above information without performing the decryption process described in this step. This embodiment, although simple, has significant drawbacks. The identification information is information for uniquely identifying the mobile terminal user, for example: the IMSI number, which is part of the privacy of the user, should be protected from exposure to others. When the information is transmitted in the form of plaintext on the air interface, a malicious attacker can obtain the identification information of the mobile terminal user through eavesdropping and other modes, and can continuously initiate an access authentication request by using the intercepted IMSI to initiate DOS attack on the network, so that the leakage of the identification information can bring serious security threat to the user and the network. To avoid this, when uploading information related to the privacy of the user, the mobile terminal generally adopts an encryption manner, that is: the cryptograph mode is adopted for transmission at the air interface, so that the server end for implementing the method for maintaining the validity of the mobile terminal provided by the application naturally also receives the encrypted information, so that the received information cannot be directly used, whether decryption is needed or not needs to be judged, and decryption processing is carried out according to the need.
The received information is not decrypted for the following three cases:
1) the received identification information is in plaintext, i.e.: the mobile terminal does not encrypt the information;
2) the received identification information is a ciphertext generated by adopting an irreversible encryption algorithm, the irreversible encryption algorithm is that a secret key is not needed in the encryption process, the plaintext is directly processed into the ciphertext through the encryption algorithm, and the encrypted data cannot be decrypted, namely: the original plaintext cannot be restored by the ciphertext, for example: MD5 is an irreversible encryption algorithm, and in this case, ciphertext comparison may be performed in step 102;
3) in this case, although the plaintext can be obtained by decrypting the ciphertext, since the previously acquired identification information is stored using the ciphertext, the ciphertext can be directly compared in step 102, thereby simplifying the processing flow.
The above lists three cases where decryption processing is not necessary, and in addition, decryption processing is necessary for the received identification information. In a specific example of this embodiment, the received identification information is encrypted by the reversible encryption algorithm AES, and the identification information collected in advance is stored in the Hbase database in the form of plaintext, so in this step, decryption processing must be performed.
The aes (advanced Encryption standard) algorithm, also called advanced Encryption standard, is a specification used by the national institute of standards and technology for encrypting electronic data, and is an Encryption algorithm that can be used for protecting electronic data. Specifically, AES is an iterative, symmetric key-block cipher that can use 128, 192, and 256-bit keys and encrypt and decrypt data in 128-bit (16-byte) blocks. The AES advanced encryption standard is one of the most popular algorithms in symmetric key cryptography, which uses the same key to encrypt and decrypt data, as opposed to public key ciphers that use a key pair.
The AES is a reversible encryption algorithm, and in a specific example of this embodiment, the mobile terminal performs AES encryption processing on the identification information by using a specific key, and the receiving end also performs decryption processing by using the same key, so as to obtain a plaintext of the received identification information. As for the management of the key, the mobile terminal and the server may use the same fixed key that is preset, or may use a mode of updating and distributing the key periodically, so as to provide a more complete security guarantee.
In a specific example of this embodiment, since the ciphertext generated by the AES encryption algorithm is received, the decryption is performed by using the AES algorithm, in other embodiments, the received identification information may be unencrypted, may be encrypted by using another reversible encryption algorithm or an irreversible encryption algorithm, and in this step, only the necessary decryption process is performed according to the similar description above, and these modifications do not affect the core of this application, and this application is not limited.
In this embodiment, the data correctness of the received information is verified, and then the necessary decryption processing is performed, but in other embodiments, a different processing sequence may be adopted, which mainly depends on the processing mode when the mobile terminal transmits the information. If the mobile terminal calculates the check code of the identification information (such as the IMSI number) to be sent first, and then performs reversible encryption processing on the identification information, the server implementing the method for maintaining the validity of the mobile terminal according to the present application should adopt a different processing order from that of the present embodiment after receiving the identification information and the check code from the mobile terminal, that is: the identity identification information is decrypted, then the check code of the decrypted identity identification information is calculated, and then the correctness of the data is verified by comparing whether the received check code is consistent with the check code obtained by calculation. In any of the embodiments, the mobile terminal and the server may be predefined, or the mobile terminal may provide corresponding indication information in the transmitted data, so that the server can process the data according to the correct flow corresponding to the mobile terminal processing flow.
In a specific example of this embodiment, the identification information uploaded by the mobile terminal is received and acquired through the above steps, that is: the IMSI number, in other embodiments, may receive and obtain other information uploaded by the mobile terminal at the same time, for example: device authentication information of a mobile terminal, comprising: one or more of the IMEI number of the mobile terminal, the MAC address of the mobile terminal or the Bluetooth MAC address of the mobile terminal can be compared with the pre-collected verification information of the mobile terminal equipment to detect the change of the mobile terminal equipment in time.
Step 102: and judging whether the received identification information of the mobile terminal is different from the prestored identification information of the account.
Through the processing of step 101, the identification information corresponding to the account of the mobile terminal uploaded by the mobile terminal is already obtained, and in this step, the received identification information is compared with the pre-stored identification information obtained from the account to determine whether the two are different.
First, identification information corresponding to the account is acquired from pre-stored information.
In the pre-collection stage, the mobile terminal account and the corresponding identification information are collected and stored, and in this step, the identification information corresponding to the account is extracted from the stored information according to the received mobile terminal account information.
In a specific example of this embodiment, the information collected in advance is stored in the Hbase database, so that the Get operation is performed with the mobile terminal account as the primary key, and the identification information corresponding to the mobile terminal account can be obtained, that is: an IMSI number corresponding to the account.
In other embodiments, the information collected in advance may be stored in a relational database, or may be stored in a common data file or table, and the identity information corresponding to the mobile terminal account may be obtained by executing an SQL statement or other search methods.
Then, the identification information is compared.
In step 101, the identification information corresponding to the mobile terminal account is received, and the data correctness is verified, if the pre-acquired identification information is stored in a ciphertext form, the received identification information ciphertext corresponding to the account is directly compared with the pre-stored identification information ciphertext, otherwise, the plaintext or the decrypted identification information of the identification information received in step 101 is compared with the pre-stored identification information, and whether the plaintext or the decrypted identification information is different from the pre-stored identification information is judged.
In a specific example of this embodiment, a user of a mobile terminal account changes a new SIM card and also changes a new mobile phone number, and when the user subsequently uses the account to log in a certain client application program on a mobile phone, a server implementing the method for maintaining the validity of a mobile terminal of the present application receives account information and corresponding identification information of the user, that is: when the new IMSI number stored in the new SIM performs the comparison operation in this step, it is determined that the received identification information of the mobile terminal is different from the pre-stored identification information of the account.
In this embodiment, it is determined whether the received identification information is different from the pre-stored identification information, and in other embodiments, if the device authentication information of the mobile terminal is pre-stored in the acquisition stage and the device authentication information of the mobile terminal is also received in step 101, in this step, it may also be determined whether the received mobile terminal device authentication information of an account is different from the pre-stored device authentication information of the account, so as to determine whether the account user has replaced the mobile terminal device.
Step 103: and if the received identification information of the mobile terminal is different from the prestored identification information of the account, sending a notice that the received identification information is different from the prestored identification information of the account to the account.
The method for maintaining the validity of the mobile terminal provided by the application utilizes the corresponding relation between the mobile terminal identification information and the mobile terminal number, and actively detects the change of the mobile terminal identification information corresponding to a certain account, namely: and the identification information is different from the prestored identification information of the account, so that the fact that the account owner possibly changes the number of the mobile terminal is inferred, and a notice of the identification information change is sent to the account in time.
The notification may specifically take different forms, for example: and the method comprises the following modes of dialing a phone call, sending a short message, sending an email, pushing a reminding notice to a mobile client application program interface which is currently logged in by a user and the like. The specific notification form is not critical, and the application is not limited.
In a specific example of this embodiment, by comparing a received IMSI number of a certain mobile terminal account with a pre-stored IMSI number of the account, it is detected that the IMSI number corresponding to the mobile terminal account changes, so as to infer that the account owner may change a mobile phone number, and a notification is sent to the account at the first time to remind the account owner to update the corresponding relationship between the account and the mobile phone number in time.
If the determination result in step 102 is that the identification information has not changed, no notification needs to be sent in this step, and as an optional implementation manner, the receiving process of the current mobile terminal information may be regarded as a data acquisition process, the received data may be stored, and information such as a record of the receiving time may be updated for later query or comparison.
If the received mobile terminal device authentication information of an account is compared with the prestored device authentication information of the account in step 102, and it is detected that the device authentication information changes, which indicates that the account has replaced the mobile terminal device, a notification that the received device authentication information is different from the prestored device authentication information of the account may be sent to the account in this step, and if the account and the mobile terminal device also have a binding relationship, the account owner may perform corresponding processing as soon as possible.
Accordingly, if the account receives the notification, the necessary operations are performed, such as: logging in the relevant website updates the binding (i.e. the corresponding relationship) between the account and the mobile terminal number (or the device authentication information of the mobile terminal), then the relevant data of the server implementing the method provided by the application should be updated, that is: and updating the corresponding relation between the mobile terminal account and the identification information (or equipment verification information) stored in the server terminal, and making necessary preparation for continuing detection later.
In the above embodiment, a method for maintaining the validity of a mobile terminal is provided, and correspondingly, an apparatus for maintaining the validity of a mobile terminal is also provided. Please refer to fig. 2, which is a schematic diagram of an embodiment of an apparatus for maintaining validity of a mobile terminal according to the present application. Since the apparatus embodiments are substantially similar to the method embodiments, they are described in a relatively simple manner, and reference may be made to some of the descriptions of the method embodiments for relevant points. The device embodiments described below are merely illustrative.
An apparatus for maintaining validity of a mobile terminal according to this embodiment includes: a receiving unit 201, configured to receive identity identification information corresponding to an account of a mobile terminal sent by the mobile terminal; a judging unit 202, configured to judge whether the received identification information of the mobile terminal is different from pre-stored identification information of the account; a notifying unit 203, configured to send a notification that the received identification information of the mobile terminal is different from the pre-stored identification information of the account to the account when the received identification information of the mobile terminal is different from the pre-stored identification information of the account.
Optionally, the receiving unit includes:
the first receiving and executing subunit is used for receiving the mobile terminal information which is packaged by adopting a predefined data format and corresponds to the mobile terminal account;
and the information analysis subunit analyzes the received information and acquires the identity identification information corresponding to the mobile terminal account.
Optionally, the predefined data format adopted by the mobile terminal information received by the first receiving execution subunit is one of a Json data format and an xml data format.
Optionally, the receiving unit includes:
the second receiving execution subunit is used for receiving the identity identification information sent by the mobile terminal;
and the decryption subunit is used for judging whether decryption processing needs to be performed on the received identification information, and if so, performing decryption processing on the received identification information.
Optionally, the receiving unit further includes:
the data verification subunit is used for verifying the data correctness of the received identification information;
and the verification result processing subunit is used for calling the decryption subunit to decrypt the received identification information when the verification result is that the data is accurate, returning a prompt of data abnormality to the mobile terminal when the verification result is that the data is inaccurate, and prompting the mobile terminal to upload the data again.
Optionally, the receiving unit further includes:
the verification value receiving unit is used for receiving a first verification value of the identity identification information sent by the mobile terminal;
the data verification subunit includes:
a check value operator unit for calculating a second check value of the received identification information by using a check algorithm used for generating the first check value;
a check value judgment subunit, configured to judge whether the first check value and the second check value are the same; if the identity identification information is the same as the identification information, the received identity identification information is considered to be accurate; and if the identity identification information is not the same, the received identity identification information is considered to be inaccurate.
Optionally, the identification information received by the receiving unit includes an IMSI number of the mobile terminal.
Optionally, the apparatus further comprises:
the device authentication information receiving unit is used for receiving device authentication information which is sent by the mobile terminal and corresponds to the mobile terminal account;
the device authentication information judging unit is used for judging whether the received device authentication information of the mobile terminal is different from the prestored device authentication information of the account;
and the device authentication information notification unit is used for sending a notification that the received device authentication information is different from the pre-stored device authentication information of the account to the account when the received device authentication information of the mobile terminal is different from the pre-stored device authentication information of the account.
Optionally, the device authentication information received by the device authentication information receiving unit includes: the IMEI number of the mobile terminal, the MAC address of the mobile terminal or the Bluetooth MAC address of the mobile terminal.
Corresponding to the method for maintaining the validity of the mobile terminal, the application also provides a method for uploading the information of the mobile terminal. Please refer to fig. 3, which is a flowchart illustrating an embodiment of a method for uploading information of a mobile terminal according to the present application, wherein the same parts as those in the first embodiment are not repeated, please refer to the corresponding parts in the first embodiment. The method for uploading the information of the mobile terminal comprises the following steps:
step 301: and acquiring identity identification information corresponding to the mobile terminal account.
According to the method for uploading the information of the mobile terminal, when an account is detected to log in or an application program on the mobile terminal is used, the identification information corresponding to the account is acquired and sent to the server side for implementing the method for maintaining the validity of the mobile terminal, so that the acquisition process of the identification information of the account is realized, or the server side is matched to complete the detection of whether the identification information is changed.
In this embodiment, acquiring the identification information corresponding to the mobile terminal account includes the following operations: and acquiring the identity identification information, encrypting the identity identification information, and calculating a check code of the identity identification information.
Firstly, identity identification information corresponding to a mobile terminal account is obtained.
In a specific example of this embodiment, when it is detected that a user logs in a mobile application on a mobile phone using an account of the user, the method for uploading information of a mobile terminal provided by the present application specifically uses an interface provided by a TelephonyManager class to obtain identification information corresponding to the account. The TelephonyManager class generally provides a set of methods for accessing status and information associated with communications with a mobile terminal. The method comprises the state and information of the SIM card of the mobile terminal, the state of the mobile network and the information of the user of the mobile terminal, and the related data can be acquired by using the provided get method in the application program.
It should be noted that some communication-related information stored in the mobile terminal belongs to the personal privacy information of the user, and therefore, a certain authority is required to acquire the communication information. In a specific example of this embodiment, the mobile terminal used by the account is a mobile phone (i.e., a so-called Android phone) that adopts an Android operating system, and before calling a related function interface to obtain information related to communication of the mobile terminal, necessary permission setting needs to be performed. The following are common rights associated with obtaining communication information:
and dialing the telephone authority: identity, permission, call _ PHONE;
the conversation authority: identity.
Reading the phone status authority: update _ PHONE _ STATE;
and modifying the telephone state authority: update _ PHONE _ STATE;
processing the dialing right: processing _ outputting _ CALLS.
In a specific example of this embodiment, in order to obtain the identification information (or the mobile terminal device authentication information) of the mobile terminal, the above-mentioned phone state reading authority needs to be set first, as shown in the following example code:
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
if necessary, the method of getSubscriberId () provided by TelephonyManager class can be called to obtain the identification information of the mobile terminal (i.e. IMSI number of android phone), and the exemplary code segments are as follows:
TelephonyManager tm=(TelephonyManager)
getSystemService(Context.TELEPHONY_SERVICE);
tm.getSubscriberId();
the identification information is then encrypted.
After the identification information of the mobile terminal is obtained, the identification information can be directly sent to a server end implementing the method for maintaining the validity of the mobile terminal in a plaintext form through an air interface. However, the identification information of the mobile terminal is also part of the privacy of the user, and if the identification information is transmitted in a clear text form on an air interface, the identification information may be obtained by a malicious attacker through eavesdropping and the like, so that security threats are brought to the user and the network. To avoid this, as a preferred embodiment, when uploading information related to the privacy of the user, the mobile terminal generally adopts an encryption manner, that is: and the cipher text is transmitted in an air interface in a cipher text mode. In a specific example of this embodiment, an AES encryption algorithm is used, and in other embodiments, an MD5 encryption algorithm or other encryption algorithms may also be used. If the mobile terminal adopts a reversible encryption algorithm (such as AES algorithm), the plaintext of the identification information can be obtained through a corresponding decryption algorithm at the server side, and if the mobile terminal adopts a non-reversible encryption algorithm (such as MD5 algorithm), the server side cannot decrypt and only can directly store or use the encrypted identification information.
And finally, calculating the check code of the identity identification information.
In the data transmission process, errors may occur for various reasons, and in order to facilitate the receiver to verify the correctness of the received data, a check code is usually calculated. Specifically, in this embodiment, before sending the acquired authentication information (which may have been encrypted), the mobile terminal needs to calculate a check code of the authentication information by using a check algorithm, and send the authentication information and the check code together to the server implementing the method for maintaining validity of the mobile terminal of the present application, after the server receives the authentication information, the server can verify the data correctness of the received identification information by using the check code, and then perform subsequent decryption and other processing, which may be referred to as related description in the first embodiment.
In a specific example of this embodiment, an MD5 verification algorithm is used, and in other embodiments, other verification methods may be selected as long as the mobile terminal and the server side use the same verification algorithm. Of course, in other embodiments, the process of calculating the check code described in this step may not be performed, and the corresponding server side does not perform the operation of verifying the correctness of the data.
In a specific example of this embodiment, after acquiring the identification information, the mobile terminal adopts a method of encrypting and then calculating a check value, and in other embodiments, different processing sequences may also be adopted, that is: the verification value of the identity identification information is calculated firstly, then the identity identification information is encrypted, correspondingly, after the server end receives the identity authentication information, the server end needs to decrypt firstly, then the verification value of the decrypted identity authentication information is calculated, and the correctness of the identity authentication information is verified by comparing the verification value with the received verification value, if the mode is adopted, the mobile terminal needs to adopt a reversible encryption algorithm. The above-described different processing procedures are modifications of the embodiments, and do not affect the core of the present application, and are within the scope of the present application.
In a specific example of this embodiment, the identification information (IMSI number of the android mobile phone) corresponding to the mobile terminal account is obtained, and further, the device authentication information of the mobile terminal may be obtained in this step as needed, for example: the IMEI number, the MAC address or the Bluetooth MAC address of the mobile terminal. The specific implementation manner is similar to obtaining an IMSI number, and also needs to perform necessary permission setting, and then call a related method as follows:
obtaining an IMEI number: calling getDeviceId () method of TelephonyManager class;
acquiring the MAC address: calling a getMacAddress () method of the WifiInfo class;
acquiring a Bluetooth MAC address: the getAddress () method of the BluetoothAdapter class is called.
For the acquired device authentication information of the mobile terminal, a similar processing manner to the identification information may also be adopted, that is: necessary encryption processing and/or calculation of the corresponding check code is performed.
Step 302: and sending the identity identification information to a server.
In step 301, the identification information corresponding to the mobile terminal account has been obtained, necessary encryption processing is performed, and a corresponding check value is calculated, and in this step, the mobile terminal account, the identification information, and the check value are encapsulated in a predefined data format and sent to a server implementing the method for maintaining the validity of the mobile terminal provided by the present application through an air interface.
Before sending data, the server side packages the data in a predefined data format, so that the server side can analyze the received data. The commonly used data formats are xml and Json, and for the description of the two data formats, please refer to the corresponding description in the first embodiment. In a specific example of this embodiment, the mobile terminal account, the identification information (i.e., the IMSI number), and the corresponding check value are encapsulated in a Json data format. In other embodiments, xml or other data exchange formats may be used, and the present application is not limited specifically.
In a specific example of this embodiment, only the identification information corresponding to the account is packaged and sent to the server, in other embodiments, if the device authentication information (for example, an IMEI number, a MAC address, or a bluetooth MAC address) corresponding to the account is also obtained in step 301, the device authentication information may also be packaged and sent to the server in this step.
In this embodiment, a method of checking the relevant information of the mobile terminal to be sent one by one is adopted, that is,: for each item of information (such as IMSI number, IMEI number, etc.) needing to verify data correctness, respectively calculating a check code, then encapsulating each item of mobile terminal information and the corresponding check code by adopting a predefined format, and then sending the encapsulated mobile terminal information and the corresponding check code to the server side. In other embodiments, an overall verification method different from the above processing sequence may be adopted, that is: after the relevant information of the mobile terminal to be sent is packaged according to a predefined data format, a total check code is calculated for the information to be sent, and then the information and the check code are sent. The above description is only a modification of the specific embodiment, and as long as the mobile terminal and the server side make an appointment, the method provided by the present application can be implemented, which does not depart from the core of the present application, and is within the protection scope of the present application.
Step 303: and receiving a notification that the identity identification information sent to the server side and returned by the server side is different from the identity identification information prestored in the account.
If the identification information sent by the mobile terminal to the server in step 302 is different from the identification information pre-stored in the server, the account will receive a relevant reminding notification, and the notification receiving manner may be various, for example: incoming calls, short messages, e-mails, and reminder notifications displayed on the program interface of the mobile client. The specific notification form is not critical, and the application is not limited.
After receiving the reminding notification, the account owner firstly confirms whether the mobile terminal number corresponding to the identification information is changed, and if so, the corresponding relation between the account and the mobile terminal number should be modified in time through an interface or an interface provided by an application service provider.
In a specific example of this embodiment, a panning user applies for a new mobile phone number and synchronously replaces the SIM card, and when the user logs in an application on the mobile terminal, the user receives the notification to notify that the IMSI number of the mobile phone used has been changed, and reminds the user to confirm whether the corresponding relationship between the panning account and the mobile phone number needs to be updated, and to perform corresponding processing in time. The user logs in the mobile phone binding changing interface of the Taobao website in time, and because the operation is timely, the original mobile phone number does not fail, the user still can receive the check code through the original mobile phone number, and therefore the corresponding relation (namely the binding relation) between the Taobao account and the new mobile phone number is smoothly updated.
In other embodiments, if the device authentication information corresponding to the mobile terminal account is also uploaded in step 302, the server may also send a corresponding notification if it is determined that the uploaded device authentication information of the mobile terminal is different from the pre-stored device authentication information of the account, so that the mobile terminal may also receive a notification of device authentication information change, and if the account and the mobile terminal device also have a corresponding relationship, the account owner should update the corresponding relationship as soon as possible.
In the above embodiment, a method for uploading mobile terminal information is provided, and correspondingly, the present application also provides an apparatus for uploading mobile terminal information. Please refer to fig. 4, which is a schematic diagram of an embodiment of an apparatus for uploading information of a mobile terminal according to the present application. Since the apparatus embodiments are substantially similar to the method embodiments, they are described in a relatively simple manner, and reference may be made to some of the descriptions of the method embodiments for relevant points. The device embodiments described below are merely illustrative.
An apparatus for uploading information of a mobile terminal according to this embodiment includes: an information obtaining unit 401, configured to obtain identity identification information corresponding to a mobile terminal account; an information sending unit 402, configured to send the identification information to a server; a notification receiving unit 403, configured to receive a notification that the identification information sent to the server is different from the pre-stored identification information of the account, where the notification is returned by the server.
Optionally, the apparatus further comprises:
the encryption unit is used for encrypting the identification information corresponding to the mobile terminal account by adopting an encryption algorithm;
correspondingly, the information sending unit is specifically configured to send the identification information encrypted by using an encryption algorithm.
Optionally, the encryption unit is specifically configured to encrypt the identification information corresponding to the mobile terminal account by using an AES algorithm or an MD5 algorithm.
Optionally, the apparatus further comprises:
a check value calculating unit, configured to calculate a check value of the to-be-transmitted identification information by using a check algorithm before the identification information is transmitted;
correspondingly, the information sending unit is specifically configured to send the to-be-sent identification information and the check value.
Optionally, the check value calculating unit is specifically configured to calculate, before sending the identification information, a check value of the identification information to be sent by using an MD5 algorithm.
Optionally, the information sending unit is specifically configured to package and send the identification information in a predefined data format.
Optionally, the apparatus further comprises:
the device authentication information acquisition unit is used for acquiring device authentication information corresponding to the mobile terminal account;
the equipment verification information sending unit is used for sending the equipment verification information to a server side;
and the equipment verification information notification receiving unit is used for receiving a notification that the equipment verification information sent to the server side and returned by the server side is different from the account pre-stored equipment verification information.
Optionally, the device authentication information acquired by the device authentication information acquiring unit includes: the IMEI number of the mobile terminal, the MAC address of the mobile terminal or the Bluetooth MAC address of the mobile terminal.
An embodiment of the present application further provides a system for maintaining validity of a mobile terminal, as shown in fig. 5, the system includes a device 501 for maintaining validity of a mobile terminal and a device 502 for uploading information of a mobile terminal, which are described in the foregoing embodiments. The apparatus for maintaining the validity of the mobile terminal is generally disposed in a server, but is not limited to the server, and may be any device capable of implementing the method for maintaining the validity of the mobile terminal, and the apparatus for uploading information of the mobile terminal is generally disposed in the mobile terminal. For example, the device for uploading mobile terminal information is arranged on a smart phone, and can acquire and upload the identification information corresponding to the smart phone account and receive the notification of the change of the identification information; the device for maintaining the validity of the mobile terminal is arranged on the server, and the identity identification information of the account uploaded by the smart phone is received and compared with the pre-stored identity identification information of the account, so that whether the identity identification information of the account changes or not is judged, the change is notified to the smart phone account, and a user is reminded to execute related updating operation in time.
According to the method for maintaining the validity of the mobile terminal, the method for uploading the information of the mobile terminal, the corresponding device and the corresponding system, the corresponding relation between the identification information of the mobile terminal and the number of the mobile terminal is utilized, and the identification information of the mobile terminal corresponding to the account of the mobile terminal is actively detected to change, namely: the identification information is different from the prestored identification information of the account, so that the fact that the account owner possibly changes the number of the mobile terminal is inferred, a notification of the identification information change is sent to the account in time, the account is reminded of updating the corresponding relation between the number of the mobile terminal and the account, the effectiveness of the mobile terminal corresponding to the account is maintained, inconvenience brought to a user due to the fact that the corresponding relation is not updated in time is avoided, and user experience can be effectively improved.
Although the present application has been described with reference to the preferred embodiments, it is not intended to limit the present application, and those skilled in the art can make variations and modifications without departing from the spirit and scope of the present application, therefore, the scope of the present application should be determined by the claims that follow.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
1. Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include non-transitory computer readable media (transient media), such as modulated data signals and carrier waves.
2. As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.