CN108965216B - Method for improving equipment ID security, client, storage medium and computer equipment - Google Patents

Method for improving equipment ID security, client, storage medium and computer equipment Download PDF

Info

Publication number
CN108965216B
CN108965216B CN201710386385.3A CN201710386385A CN108965216B CN 108965216 B CN108965216 B CN 108965216B CN 201710386385 A CN201710386385 A CN 201710386385A CN 108965216 B CN108965216 B CN 108965216B
Authority
CN
China
Prior art keywords
client
identification information
spare
ids
server
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710386385.3A
Other languages
Chinese (zh)
Other versions
CN108965216A (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.)
Yami Technology Guangzhou Co ltd
Original Assignee
Wuhan Douyu Network 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 Wuhan Douyu Network Technology Co Ltd filed Critical Wuhan Douyu Network Technology Co Ltd
Priority to CN201710386385.3A priority Critical patent/CN108965216B/en
Publication of CN108965216A publication Critical patent/CN108965216A/en
Application granted granted Critical
Publication of CN108965216B publication Critical patent/CN108965216B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/0876Network architectures or network communication protocols for network security for authentication of entities based on the identity of the terminal or configuration, e.g. MAC address, hardware or software configuration or device fingerprint

Abstract

The embodiment of the invention provides a method, a client and a server for improving the safety of equipment ID, which are used for improving the safety of the equipment ID. The method comprises the steps that a client sends a device ID of the client and identification information of the client to a server, the server judges whether the device ID is the same as device IDs of a plurality of historical records, when the device ID is not consistent with the device IDs of the plurality of historical records, whether the identification information is consistent with the identification information of the plurality of historical records is further judged, each piece of identification information of the historical records corresponds to one device ID of the historical record, and when the identification information is consistent with one piece of identification information of one historical record, the device ID is determined to be illegal.

Description

Method for improving equipment ID security, client, storage medium and computer equipment
Technical Field
The invention relates to the technical field of computers, in particular to a method, a client and a server for improving the safety of equipment ID.
Background
In the related art, the server recognizes and authenticates each client based on a device ID (IDentity) of the client. For example, the validity of the user identity is verified by the device ID, the amount of application installation is counted by the number of device IDs, or the users who repeatedly participate in the lottery are filtered by the device ID, etc. The device ID is a character string obtained by the client according to a certain algorithm.
However, in the process of implementing the technical solution of the invention in the embodiments of the present application, the inventors of the present application find that the above-mentioned technology has at least the following technical problems: lawless persons decipher the algorithm for generating the device ID to generate the pseudo device ID, and the server cannot recognize the pseudo device ID, so that various results derived based on the device ID are inaccurate. Therefore, the prior art has the technical problem of how to improve the safety of the device ID.
Disclosure of Invention
The embodiment of the invention provides a method, a client and a server for improving the safety of equipment ID, which are used for improving the safety of the equipment ID.
In a first aspect, the present invention provides a method for improving device ID security, which is applied to a client, and the method includes:
obtaining a device ID of the client;
acquiring identification information of the client, wherein the identification information of different clients is partially or completely different;
transmitting the device ID and the identification information to a server to cause the server to verify whether the device ID is legitimate based on the device ID and the identification information.
Optionally, the identification information includes hardware information and/or system information of the client.
Optionally, before obtaining the device ID of the client, the method further includes:
generating a standby device ID;
storing the spare device IDs in a plurality of different storage spaces, respectively;
obtaining a device ID of the client, comprising:
reading the spare device IDs from a plurality of the storage spaces, respectively;
judging whether the read IDs of the standby devices are consistent;
when a plurality of the spare device IDs are consistent, taking any one of the spare device IDs as the device ID;
when a plurality of the spare apparatus IDs do not coincide, the spare apparatus ID is regenerated, and the regenerated spare apparatus ID is taken as the apparatus ID.
Optionally, generating the standby device ID includes:
obtaining a user ID of a login user on the client, system time of the client, an operating system of the client and an application program name;
generating the standby device ID based on the user ID, the system time, the operating system, and the application name.
Optionally, sending the device ID and the identification information to the server includes:
encrypting the device ID and the identification information to obtain verification information;
and sending the verification information to the server.
In a second aspect, the present invention provides a method for improving device ID security, applied to a server, the method including:
receiving a device ID and identification information of a client sent by the client, wherein the identification information of different clients is partially or completely different;
judging whether the device ID is the same as the device IDs of a plurality of history records;
when the equipment ID is not consistent with the equipment IDs of the plurality of historical records, judging whether the identification information is consistent with the identification information of the plurality of historical records, wherein the identification information of each historical record corresponds to one equipment ID of the historical record;
determining that the device ID is illegal when the identification information coincides with identification information of one of the history records.
Optionally, the method further includes:
and when the identification information is inconsistent with the identification information of the plurality of historical records, determining that the equipment ID is legal.
Optionally, the identification information includes hardware information and/or system information of the client.
Optionally, after determining that the device ID is legal, the method further includes:
and classifying the equipment ID according to at least one dimension of the identification information.
Optionally, receiving the device ID and the identification information of the client sent by the client includes:
receiving verification information sent by the client, wherein the verification information is formed by encrypting the equipment ID and the identification information;
and decrypting the verification information to obtain the equipment ID and the identification information.
In a third aspect, the present invention provides a client, including:
an obtaining module, configured to obtain a device ID of the client;
the acquisition module is used for acquiring the identification information of the client, wherein the identification information of different clients is partially or completely different;
a sending module, configured to send the device ID and the identification information to a server, so that the server verifies whether the device ID is legal based on the device ID and the identification information.
Optionally, the identification information includes hardware information and/or system information of the client.
Optionally, the client further includes:
the generation module is used for generating a standby equipment ID before obtaining the equipment ID of the client; storing the spare device IDs in a plurality of different storage spaces, respectively;
the obtaining module is configured to read the spare device IDs from the plurality of storage spaces respectively; judging whether the read IDs of the standby devices are consistent; when a plurality of the spare device IDs are consistent, taking any one of the spare device IDs as the device ID; when a plurality of the spare apparatus IDs do not coincide, the spare apparatus ID is regenerated, and the regenerated spare apparatus ID is taken as the apparatus ID.
Optionally, the generating module is configured to obtain a user ID of a user logging in the client, a system time of the client, an operating system of the client, and an application name; generating the standby device ID based on the user ID, the system time, the operating system, and the application name.
Optionally, the sending module is configured to encrypt the device ID and the identification information to obtain verification information; and sending the verification information to the server.
In a fourth aspect, the present invention provides a server, comprising:
the receiving module is used for receiving the equipment ID and the identification information of the client side sent by the client side, wherein the identification information of different client sides is partially or completely different;
a first judgment module, configured to judge whether the device ID is the same as device IDs of multiple history records;
a second judging module, configured to, when the device ID is inconsistent with the device IDs of the multiple history records, judge whether the identification information is consistent with identification information of the multiple history records, where the identification information of each history record corresponds to a device ID of the history record;
a first determining module, configured to determine that the device ID is illegal when the identification information is consistent with identification information of one of the history records.
Optionally, the server further includes a second determining module, configured to determine that the device ID is legal when the identification information is inconsistent with the identification information of the multiple history records.
Optionally, the identification information includes hardware information and/or system information of the client.
Optionally, the server further includes a classifying module, configured to classify the device ID according to at least one dimension of the identification information after determining that the device ID is legal.
Optionally, the receiving module is configured to receive verification information sent by the client, where the verification information is formed by encrypting the device ID and the identification information; and decrypting the verification information to obtain the equipment ID and the identification information.
In a fifth aspect, the invention provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the method of the first aspect.
In a sixth aspect, the present invention provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the method of the second aspect.
In a seventh aspect, the present invention provides a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps of the method of the first aspect when executing the program.
In an eighth aspect, the present invention provides a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the method of the second aspect when executing the program.
One or more technical solutions in the embodiments of the present application have at least one or more of the following technical effects:
1. in the technical scheme of the embodiment of the invention, a client acquires the equipment ID of the client and acquires the identification information of the client, wherein the identification information of different clients is partially or completely different, and then the equipment ID and the identification information are sent to a server, so that the server can verify whether the equipment ID is legal or not based on the equipment ID and the identification information. Because the identification information of different clients is partially or completely different, even if the device ID is forged by a lawless person, the actual situation of the client can be represented by the identification information, so that the server can identify the illegal device ID based on the device ID and the identification information at the same time, and the security of the device ID is improved.
2. In the technical scheme of the embodiment of the invention, a server receives an equipment ID and identification information of a client sent by the client, wherein the identification information of different clients is partially or completely different, then whether the equipment ID is the same as the equipment IDs of a plurality of historical records is judged, when the equipment ID is not consistent with the equipment IDs of the plurality of historical records, whether the identification information is consistent with the identification information of the plurality of historical records is further judged, each piece of identification information of the historical records corresponds to one equipment ID of the historical record, and when the identification information is consistent with one piece of identification information of one historical record, the equipment ID is determined to be illegal. It can be seen that, since the identification information of different clients is partially or entirely different, even if the device ID does not coincide with the device IDs of a plurality of the histories, the server may consider the device ID to be illegal if the identification information of the client coincides with the identification information of one of the histories. Therefore, even if a lawbreaker counterfeits the device ID but cannot change the identification information, the server can recognize the ineffectiveness thereof. Therefore, the present invention improves the security of the device ID.
Drawings
FIG. 1 is a flowchart of a method for improving device ID security at a client side according to an embodiment of the present invention;
FIG. 2 is a flowchart of a method for improving device ID security at a server side according to an embodiment of the present invention;
FIG. 3 is a schematic structural diagram of a client according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a server in an embodiment of the present invention.
Detailed Description
The embodiment of the invention provides a method, a client and a server for improving the safety of equipment ID, which are used for improving the safety of the equipment ID.
In order to solve the technical problems, the technical scheme provided by the invention has the following general idea:
in the technical scheme of the embodiment of the invention, a client sends a device ID of the client and identification information of the client to a server, the server judges whether the device ID is the same as the device IDs of a plurality of historical records, when the device ID is not consistent with the device IDs of the plurality of historical records, the server further judges whether the identification information is consistent with the identification information of the plurality of historical records, each piece of identification information of the historical records corresponds to one device ID of the historical record, and when the identification information is consistent with one piece of identification information of one of the historical records, the device ID is determined to be illegal. Since the identification information of different clients is partially or entirely different, even if the device ID is not identical to the device IDs of a plurality of the histories, the server may consider the device ID to be illegal if the identification information of the client is identical to the identification information of one of the histories. Therefore, even if a lawbreaker counterfeits the device ID but cannot change the identification information, the server can recognize the ineffectiveness thereof. Therefore, the present invention improves the security of the device ID.
The technical solutions of the present invention are described in detail below with reference to the drawings and specific embodiments, and it should be understood that the specific features in the embodiments and examples of the present invention are described in detail in the technical solutions of the present application, and are not limited to the technical solutions of the present application, and the technical features in the embodiments and examples of the present application may be combined with each other without conflict.
The term "and/or" herein is merely an association describing an associated object, meaning that three relationships may exist, e.g., a and/or B, may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
The present invention provides a method for improving the security of device IDs, as shown in fig. 1 and 2. First, a method on the client side is described. Referring to fig. 1, a flow chart of a method for improving device ID security on a client side is shown, the method includes:
s101: obtaining a device ID of the client;
s102: acquiring identification information of the client, wherein the identification information of different clients is partially or completely different;
s103: transmitting the device ID and the identification information to a server to cause the server to verify whether the device ID is legitimate based on the device ID and the identification information.
Specifically, when a client sends data and/or a request to a server, the server needs to be provided with the device ID of the client in order to indicate the identity. Therefore, when the device ID needs to be used, S101 is executed. In the first implementation of S101, the client may read out the device ID generated in advance from the storage space. In the second embodiment, the client may also temporarily generate a device ID. In the specific implementation process, a person skilled in the art to which the present invention pertains may select any of various embodiments, and the present invention is not particularly limited.
More specifically, in an implementation manner under the first implementation manner, the client may store the device ID in a storage space, and further read the device ID from the storage space when the device ID needs to be acquired.
Alternatively, in another implementation mode under the first implementation mode, the device ID may be stored in at least two different storage spaces, so as to further improve the security of the device ID. More specifically, in this embodiment, before S101, the method further includes:
generating a standby device ID;
storing the spare device IDs in a plurality of different storage spaces, respectively;
s101 specifically comprises the following steps:
reading the spare device IDs from a plurality of the storage spaces, respectively;
judging whether the read IDs of the standby devices are consistent;
when a plurality of the spare device IDs are consistent, taking any one of the spare device IDs as the device ID;
when a plurality of the spare apparatus IDs do not coincide, the spare apparatus ID is regenerated, and the regenerated spare apparatus ID is taken as the apparatus ID.
Specifically, in such an implementation, the device ID generated in advance as described above is specifically a standby device ID. After the spare device ID is generated, the spare device ID is stored in a plurality of different storage spaces. The plurality of storage spaces may be any plurality of storage spaces, and the present invention is not limited in particular.
For example, the spare device ID is stored in a memory space of system settings, a memory space of shared preferences SharedPreferences, and a memory space of peripherals. The peripheral device is, for example, a mobile hard disk or a memory card, and the invention is not limited in particular.
After the standby equipment ID is generated, the standby equipment ID is stored in a storage space set by the system through the following codes:
Settings.System.putString(getContentResolver(),"my-deviceid",deviceId);
system, putstring () is a storage function provided by the android system. my-deviceId is the key that stores the unit of spare device ID, which stores the data that is the data deviceId of the spare ID.
And storing the standby device ID into a memory space of SharedPreferences by:
SharedPreferences lsporiferces getSharedPreferences ("my-deviceid", 0); obtaining a SharedPreference object named my-deviceid through getSharedPreference function;
sharedpreferences, editor locater ═ lsferrees (); // get the editable object localEditor through the SharedPreferences object.
Pictstring ("my-deviceId", deviceId); v/then store the data of the standby device ID to the SharedPreferences object named my-deviceid by editing the object;
and, the spare device ID is stored in the storage space of the peripheral (exemplified by an SD (Secure Digital) card) by:
string sdStatus ═ environment. Acquiring the state of the SD card through a system function getExternalStoragState;
file ═ new File ("/sdcard/my-deviceid.txt"); creating a file with a file name my-deviceid.txt in the SD card;
FileOutputStream ═ new FileOutputStream (file); v/output the spare device ID data in the client;
stream, write (deviceId); v/writing the data of the spare equipment ID in the file of my-deviceid.txt;
close (); // end of shutdown;
further, since the spare device IDs are stored in the plurality of different storage spaces, respectively, when the device IDs are acquired in S101, each of the spare device IDs is read out from the plurality of different storage spaces, respectively.
Then, in order to identify whether a lawbreaker counterfeits the device IDs, the client compares all the read backup device IDs, and determines whether the backup device IDs match. When the plurality of spare device IDs are identical, that is, any two spare device IDs are the same, it indicates that the spare device ID has not been modified or forged, and therefore, any one spare device ID may be used as the device ID used this time. Conversely, when the multiple spare device IDs do not coincide, i.e., the multiple spare device IDs are not identical, it indicates that one or more of the spare device IDs are modified or forged. In order to improve the security of the device ID, the client regenerates the backup device ID, and uses the regenerated backup device ID as the device ID used this time. And, overwriting the spare device ID in each storage space with the regenerated spare device ID.
Following the above example, the spare device ID is stored in the storage space of the system setting, the storage space of SharedPreferences and the storage space of the peripheral device, and then when the device ID needs to be obtained, the spare device ID is read from the storage spaces of the system setting, SharedPreferences and the peripheral device, respectively. Assuming that the backup device ID in the system device, the backup device ID in SharedPreferences, and the backup device ID in the peripheral are the same, the backup device ID in the system device is taken as the device ID. Alternatively, assuming that the backup device ID in SharedPreferences is the same as the backup device ID in the peripheral device, but the backup device ID in the system device is different from both the backup device ID in SharedPreferences and the backup device ID in the peripheral device, then the client regenerates the backup device ID as the device ID.
As can be seen from the above description, by storing the spare device IDs in a plurality of different storage spaces, even if a lawless person modifies or forges one or more of the spare device IDs, as long as all of the spare device IDs read finally are not completely identical, the client considers that the spare device IDs are unsafe, and regenerates a new spare device ID as the device ID, ensuring that the client provides the server with a safe device ID. Therefore, the security of the device ID at the client is further improved.
The method for generating the standby equipment ID comprises the following steps:
obtaining a user ID of a login user on the client, system time of the client, an operating system of the client and an application program name;
generating the standby device ID based on the user ID, the system time, the operating system, and the application name.
Specifically, the user ID is an ID of a user who logs in to an application program of the client, and may be generated by the server and transmitted to the client, or may be generated by the client, and the present invention is not particularly limited. Such as a live application or other application. System time refers to the time of the client system. The operating system is, for example, an android system or an apple mobile device operating system.
When the standby device ID needs to be generated, the client acquires the user ID, the system time, the operating system and the application name, and then generates the standby device ID based on the user ID, the system time, the operating system and the application name. Specifically, the client may generate an algorithm of the device ID based on the prior art, or may encrypt the user ID, the system time, the operating system, and the application name with an encryption algorithm, and use the encryption result as the spare device ID.
In the method for generating the standby device ID, the system time is added, in other words, the device ID finally sent to the server may reflect the generation time of the device ID. Then, if the client provides an operational record or log to the server, the server may determine, based on the record or log, the time each time the client generates a standby device ID. And the time at which a lawbreaker modifies or forges the device ID is not recorded in case it is discovered. Then the device ID may be considered illegal if the server determines that the time at which the device ID is embodied does not match the time at which the record or log record generated the device ID. Therefore, the device ID is generated based on the system time, and the security of the device ID is further improved.
In addition, it should be understood by those skilled in the art that although the embodiment of the present invention has been described above with respect to the method for generating a spare device ID in the first embodiment, if a device ID is temporarily generated in the second embodiment, the method for generating a spare device ID is also fully applicable to temporarily generating a device ID.
Next, in S102, identification information of the client is obtained. In a specific implementation process, the execution order of S101 and S102 may be set as required, for example, S101 is executed first and then S102 is executed, or S102 is executed first and then S101 is executed, and the present invention is not limited in particular.
The identification information is information identifying a situation of one client, and thus, identification information of different clients is partially or entirely different. In embodiments of the present invention, the identification information includes, but is not limited to, hardware information and/or system information. The hardware information is information representing a hardware condition of the client, and includes, but is not limited to, an IMEI (International Mobile Equipment Identity), a Mobile phone number, a MAC (Media Access Control) address, a SIM (Subscriber Identity Module) card serial number, a CPU frequency, a memory size, and the like. System information is information representing a client system including, but not limited to, operating system, system version number, application version number, network type, and ANDROID _ ID, etc.
It can be seen that the identification information of each client is partially or totally different, since each client has hardware conditions and system conditions that are not exactly the same. Then, when the device ID needs to be verified to the server as being legitimate, the client acquires and acquires the hardware information and the system information one by one.
For convenience of description, the following description will be given by taking the example that the identification information includes hardware information and system information, where the hardware information specifically includes an IMEI, a mobile phone number, a MAC, and a serial number of an SIM card, and the system information specifically includes a system version number, an application version number, a network type, and an ANDROID _ ID. The respective information is acquired by the following code:
stringiei ═ telmgr. getdeviceid (); acquiring IMEI through a system function getSystemservice;
string telephone number (); acquiring a mobile phone Number through a system function getLine1 Number;
string network name ═ telmgr. getnetworkoperera name (); acquiring the name netname of the network type through a system function getNetworkOpera name;
WifiManager WIFI ═ (WifiManager) getsysteservice (WIFI _ SERVICE); acquiring a management object of wifi through a system function getSystemservice;
wifi. getconnectioninfo (); obtaining WiFi information through a system function getConnectionInfo;
string wiremac ═ info. // obtaining the MAC address;
string android ID ═ secure. // obtain ANDROID _ ID;
string seriaanalber ═ telmgr. getsimmaterial number (); acquiring a serial number SeriaNamber of the SIM card through a system function getSimStallNumber;
stretch version is android. Acquiring a system version number through os.build;
PackageManager packageManager=getPackageManager();
PackageInfo packInfo= packageManager.getPackageInfo(getPackageName(),0);
string version ═ packinfo. Acquiring the version number of the application program;
after obtaining the plurality of information, the client identification information is obtained.
Then, in S103, the device ID and the identification information are collectively transmitted to the server, so that the server verifies the validity of the device ID based on the device ID and the identification information.
In a specific implementation process, the device ID and the identification information may be sent to the server separately, or may be carried in other data or information and sent to the server. Further, to improve the security of the device ID, in an embodiment, S103 may be specifically implemented by the following processes:
encrypting the device ID and the identification information to obtain verification information;
and sending the verification information to the server.
Specifically, the client encrypts the device ID and the identification information in a preset encryption manner specified in advance by the server, and sends the encryption result as authentication information to the server. And then, after receiving the verification information, the server decrypts the equipment ID and the identification information according to a preset decryption mode corresponding to the preset encryption mode, and further verifies whether the equipment ID is legal or not. The preset Encryption method includes, but is not limited to, MD5 (fifth version of Message Digest Algorithm), TEA (Tiny Encryption Algorithm, Data Encryption Algorithm), DEA (Data Encryption Algorithm), and the like.
As can be seen from the above description, in the technical solution of the embodiment of the present invention, a client obtains a device ID of the client, obtains identification information of the client, where part or all of the identification information of different clients are different, and then sends the device ID and the identification information to a server, so that the server verifies whether the device ID is legal based on the device ID and the identification information. Because the identification information of different clients is partially or completely different, even if the device ID is forged by a lawless person, the actual situation of the client can be represented by the identification information, so that the server can identify the illegal device ID based on the device ID and the identification information at the same time, and the security of the device ID is improved.
The following describes the server-side method. Referring to fig. 2, a flowchart of a method for improving device ID security on a server side is shown, where the method includes:
s201: receiving a device ID and identification information of a client sent by the client, wherein the identification information of different clients is partially or completely different;
s202: judging whether the device ID is the same as the device IDs of a plurality of history records;
s203: when the equipment ID is not consistent with the equipment IDs of the plurality of historical records, judging whether the identification information is consistent with the identification information of the plurality of historical records, wherein the identification information of each historical record corresponds to one equipment ID of the historical record;
s204: determining that the device ID is illegal when the identification information coincides with identification information of one of the history records.
Specifically, in S201, the server receives the device ID and the identification information transmitted by the client. Similarly, the identification information is hardware information and/or system information. If the client encrypts the device ID and the identification information as the verification information and sends the verification information to the server, the specific implementation process of S201 is as follows:
receiving verification information sent by the client, wherein the verification information is formed by encrypting the equipment ID and the identification information;
and decrypting the verification information to obtain the equipment ID and the identification information.
Specifically, the server decrypts the authentication information in a preset decryption manner corresponding to the preset encryption manner, thereby obtaining the device ID and the identification information. For example, assuming that the server specifies that the preset encryption mode used by the client is TEA, the server decrypts the authentication information based on TEA.
In addition, if the key used when the client encrypts the device ID and the identification information is not fixed, the client further needs to send the key used in the current encryption to the server, so that the server can decrypt the authentication information according to the key used in the current encryption.
Next, in S202, it is determined whether the device ID is the same as the device IDs of the plurality of histories. Specifically, the server verifies each received device ID, records the device ID if the device ID is a legitimate device ID, and associates and records identification information corresponding to the device ID with the device ID. The device ID received later needs to be compared with the device ID of the history record.
If the currently received device ID is the same as one of the historical device IDs, indicating that the device ID has been counted (e.g., counting the number of applications installed or users participating in a lottery, etc.), the subsequent steps are not performed.
If the currently received device ID is inconsistent with the device IDs of all history records, in order to further verify whether the device ID is legal, in S203, the identification information and the plurality of history identification information are compared. If the currently received device ID is different from the device IDs of all the history records, the identification information is also inconsistent with the identification information of all the history records, which indicates that the device ID is not counted, and the device ID and the corresponding identification information are not recorded. Therefore, the device ID is determined to be legitimate. On the contrary, if the currently received device ID is different from the device IDs of all the history records, but the identification information is identical to the identification information of one of the history records, the device ID may be forged on the client by a lawless person, and thus, in the embodiment of the present invention, the device ID is determined to be illegal.
Optionally, as an optional embodiment, after determining that the device ID is legal, the method may further include:
and classifying the equipment ID according to at least one dimension of the identification information.
Specifically, the server may categorize and count the device IDs in at least one dimension that the identification information has. Wherein, a specific information included in the identification information is a dimension. In the above example, the identification information specifically includes an IMEI, a mobile phone number, a MAC address, a SIM card serial number, a system version number, an application version number, a network type, and an ANDROID _ ID, and then the identification information has dimensions including an IMEI dimension, a mobile phone number dimension, a MAC address dimension, a SIM card serial number dimension, a system version number dimension, an application version number dimension, a network type dimension, and an ANDROID _ ID dimension. Thus, device IDs may be categorized and counted in the above-described dimensions based on the identification information.
For example, if the system included in the identification information is an android system, the installation amount of the application program in the android system can be counted. If the identification information includes the application version number, the installation amount of each version can be counted. If the identification information includes a mobile phone number, and the mobile phone number can represent the region, the application installation amount or the user condition of each region can be counted.
Based on the same inventive concept as the method for improving the device ID security at the client side in the foregoing embodiment, the present invention further provides a client, as shown in fig. 3, including:
an obtaining module 101, configured to obtain a device ID of the client;
an obtaining module 102, configured to obtain identification information of the client, where the identification information of different clients is partially or completely different;
a sending module 103, configured to send the device ID and the identification information to a server, so that the server verifies whether the device ID is legal based on the device ID and the identification information.
Optionally, the identification information includes hardware information and/or system information of the client.
Optionally, the client further includes:
the generation module is used for generating a standby equipment ID before obtaining the equipment ID of the client; storing the spare device IDs in a plurality of different storage spaces, respectively;
the obtaining module 101 is configured to read the spare device IDs from the plurality of storage spaces respectively; judging whether the read IDs of the standby devices are consistent; when a plurality of the spare device IDs are consistent, taking any one of the spare device IDs as the device ID; when a plurality of the spare apparatus IDs do not coincide, the spare apparatus ID is regenerated, and the regenerated spare apparatus ID is taken as the apparatus ID.
Optionally, the generating module is configured to obtain a user ID of a user logging in the client, a system time of the client, an operating system of the client, and an application name; generating the standby device ID based on the user ID, the system time, the operating system, and the application name.
Optionally, the sending module 103 is configured to encrypt the device ID and the identification information to obtain verification information; and sending the verification information to the server.
Various changes and specific examples of the method for improving the device ID security in the embodiment of fig. 1 are also applicable to the client in this embodiment, and those skilled in the art can clearly know the implementation method of the client in this embodiment through the foregoing detailed description of the method for improving the device ID security, so that details are not described here for brevity of the description.
Based on the same inventive concept as the method for improving the device ID security at the server side in the foregoing embodiment, the present invention further provides a server, as shown in fig. 4, including:
a receiving module 201, configured to receive a device ID and identification information of a client sent by the client, where the identification information of different clients is partially or completely different;
a first judging module 202, configured to judge whether the device ID is the same as device IDs of multiple history records;
a second judging module 203, configured to, when the device ID is inconsistent with the device IDs of the multiple history records, judge whether the identification information is consistent with identification information of the multiple history records, where the identification information of each history record corresponds to a device ID of the history record;
a first determining module 204, configured to determine that the device ID is illegal when the identification information is consistent with the identification information of one of the history records.
Optionally, the server further includes a second determining module, configured to determine that the device ID is legal when the identification information is inconsistent with the identification information of the multiple history records.
Optionally, the identification information includes hardware information and/or system information of the client.
Optionally, the server further includes a classifying module, configured to classify the device ID according to at least one dimension of the identification information after determining that the device ID is legal.
Optionally, the receiving module 201 is configured to receive authentication information sent by the client, where the authentication information is formed by encrypting the device ID and the identification information; and decrypting the verification information to obtain the equipment ID and the identification information.
Various changes and specific examples of the method for improving the device ID security in the foregoing embodiment of fig. 2 are also applicable to the server in this embodiment, and through the foregoing detailed description of the method for improving the device ID security, those skilled in the art can clearly know the implementation method of the server in this embodiment, so for the brevity of the description, detailed descriptions are omitted here.
Based on the same inventive concept as the method for improving device ID security at the client side in the foregoing embodiments, the present invention also provides a computer-readable storage medium having a computer program stored thereon, which when executed by a processor implements the steps of any of the methods performed by the client described above.
Based on the same inventive concept as the method for improving the device ID security at the server side in the foregoing embodiments, the present invention also provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of any of the methods performed by the server described above.
Based on the same inventive concept as the method for improving the device ID security at the client side in the foregoing embodiments, the present invention further provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the processor implements the steps of any one of the methods performed by the client.
Based on the same inventive concept as the method for improving the device ID security at the server side in the foregoing embodiments, the present invention further provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the processor implements the steps of any one of the methods performed by the server.
One or more technical solutions in the embodiments of the present application have at least one or more of the following technical effects:
1. in the technical scheme of the embodiment of the invention, a client acquires the equipment ID of the client and acquires the identification information of the client, wherein the identification information of different clients is partially or completely different, and then the equipment ID and the identification information are sent to a server, so that the server can verify whether the equipment ID is legal or not based on the equipment ID and the identification information. Because the identification information of different clients is partially or completely different, even if the device ID is forged by a lawless person, the actual situation of the client can be represented by the identification information, so that the server can identify the illegal device ID based on the device ID and the identification information at the same time, and the security of the device ID is improved.
2. In the technical scheme of the embodiment of the invention, a server receives an equipment ID and identification information of a client sent by the client, wherein the identification information of different clients is partially or completely different, then whether the equipment ID is the same as the equipment IDs of a plurality of historical records is judged, when the equipment ID is not consistent with the equipment IDs of the plurality of historical records, whether the identification information is consistent with the identification information of the plurality of historical records is further judged, each piece of identification information of the historical records corresponds to one equipment ID of the historical record, and when the identification information is consistent with one piece of identification information of one historical record, the equipment ID is determined to be illegal. It can be seen that, since the identification information of different clients is partially or entirely different, even if the device ID does not coincide with the device IDs of a plurality of the histories, the server may consider the device ID to be illegal if the identification information of the client coincides with the identification information of one of the histories. Therefore, even if a lawbreaker counterfeits the device ID but cannot change the identification information, the server can recognize the ineffectiveness thereof. Therefore, the present invention improves the security of the device ID.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention 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.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (8)

1. A method for improving device ID security is applied to a client, and is characterized in that the method comprises the following steps:
obtaining the equipment ID of the client generated by the client, wherein the equipment ID of the client is used for identifying and verifying each client;
acquiring identification information of the client, wherein the identification information of different clients is partially or completely different;
sending the device ID and the identification information to a server to enable the server to verify whether the device ID is legal or not based on the device ID and the identification information;
before obtaining the device ID of the client generated by the client, the method further includes:
generating a standby device ID;
storing the spare device IDs in a plurality of different storage spaces, respectively;
obtaining a device ID of the client, comprising:
reading the spare device IDs from a plurality of the storage spaces, respectively;
judging whether the read IDs of the standby devices are consistent;
when a plurality of the spare device IDs are consistent, taking any one of the spare device IDs as the device ID;
when a plurality of the spare apparatus IDs do not coincide, the spare apparatus ID is regenerated, and the regenerated spare apparatus ID is taken as the apparatus ID.
2. The method of claim 1, wherein the identification information comprises hardware information and/or system information of the client.
3. The method of claim 1, wherein generating a standby device ID comprises:
obtaining a user ID of a login user on the client, system time of the client, an operating system of the client and an application program name;
generating the standby device ID based on the user ID, the system time, the operating system, and the application name.
4. The method of claim 1, wherein sending the device ID and the identification information to the server comprises:
encrypting the device ID and the identification information to obtain verification information;
and sending the verification information to the server.
5. A client, comprising:
an obtaining module, configured to obtain a device ID of the client generated by the client, where the device ID of the client is used to identify and verify each client;
the acquisition module is used for acquiring the identification information of the client, wherein the identification information of different clients is partially or completely different;
a sending module, configured to send the device ID and the identification information to a server, so that the server verifies whether the device ID is legal based on the device ID and the identification information;
the generation module is used for generating a standby equipment ID before obtaining the equipment ID of the client; storing the spare device IDs in a plurality of different storage spaces, respectively;
the obtaining module is configured to read the spare device IDs from the plurality of storage spaces respectively; judging whether the read IDs of the standby devices are consistent; when a plurality of the spare device IDs are consistent, taking any one of the spare device IDs as the device ID; when a plurality of the spare apparatus IDs do not coincide, the spare apparatus ID is regenerated, and the regenerated spare apparatus ID is taken as the apparatus ID.
6. The client of claim 5, wherein the identification information comprises hardware information and/or system information of the client.
7. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 4.
8. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the method according to any of claims 1-4 are implemented when the program is executed by the processor.
CN201710386385.3A 2017-05-26 2017-05-26 Method for improving equipment ID security, client, storage medium and computer equipment Active CN108965216B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710386385.3A CN108965216B (en) 2017-05-26 2017-05-26 Method for improving equipment ID security, client, storage medium and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710386385.3A CN108965216B (en) 2017-05-26 2017-05-26 Method for improving equipment ID security, client, storage medium and computer equipment

Publications (2)

Publication Number Publication Date
CN108965216A CN108965216A (en) 2018-12-07
CN108965216B true CN108965216B (en) 2021-07-23

Family

ID=64494461

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710386385.3A Active CN108965216B (en) 2017-05-26 2017-05-26 Method for improving equipment ID security, client, storage medium and computer equipment

Country Status (1)

Country Link
CN (1) CN108965216B (en)

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW200513086A (en) * 2003-09-19 2005-04-01 Hui Lin Internet passing security authentication system and method, and IC card authentication hardware
CN102801717B (en) * 2012-08-03 2016-06-15 苏州迈科网络安全技术股份有限公司 Login validation method and system
CN103401957B (en) * 2013-08-07 2016-09-28 五八同城信息技术有限公司 A kind of unique method identifying client machine under web environment
CN105678530A (en) * 2016-02-17 2016-06-15 中国建设银行股份有限公司 Data processing method and system

Also Published As

Publication number Publication date
CN108965216A (en) 2018-12-07

Similar Documents

Publication Publication Date Title
US11258792B2 (en) Method, device, system for authenticating an accessing terminal by server, server and computer readable storage medium
US9954842B2 (en) Method, client, server and system of login verification
EP3100171B1 (en) Client authentication using social relationship data
CN110798315B (en) Data processing method and device based on block chain and terminal
CN106571951B (en) Audit log obtaining method, system and device
US20130031642A1 (en) Licensing verification for application use
JP5827692B2 (en) Bound data card and mobile host authentication method, apparatus and system
CN104123488A (en) Method and device for verifying application program
CN111935095A (en) Source code leakage monitoring method and device and computer storage medium
CN111814132A (en) Security authentication method and device, security authentication chip and storage medium
CN111585995A (en) Method and device for transmitting and processing safety wind control information, computer equipment and storage medium
CN112383577A (en) Authorization method, device, system, equipment and storage medium
CN111934862B (en) Server access method and device, readable medium and electronic equipment
CN108933766B (en) Method and client for improving equipment ID security
CN109218009B (en) Method, client and server for improving equipment ID security
CN116644485A (en) Anti-counterfeiting authentication method and device for server memory, electronic equipment and storage medium
CN108965216B (en) Method for improving equipment ID security, client, storage medium and computer equipment
CN108933765B (en) Method, client and server for improving equipment ID security
CN108616528A (en) A kind of cloud storage method and system
CN114650175B (en) Verification method and device
CN109347639B (en) Method and device for generating serial number
CN112202709B (en) Security management system and method for full scene networking equipment
CN108886519B (en) Cloud storage of data
CN116910771A (en) Block chain data management method, device, computer equipment and storage medium
CN112231762A (en) File access method, device and storage medium

Legal Events

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

Effective date of registration: 20240129

Address after: Room 801, 85 Kefeng Road, Huangpu District, Guangzhou City, Guangdong Province

Patentee after: Yami Technology (Guangzhou) Co.,Ltd.

Country or region after: China

Address before: 430000 East Lake Development Zone, Wuhan City, Hubei Province, No. 1 Software Park East Road 4.1 Phase B1 Building 11 Building

Patentee before: WUHAN DOUYU NETWORK TECHNOLOGY Co.,Ltd.

Country or region before: China