CN112685064B - Processing method and device for equipment identification, storage medium and electronic device - Google Patents

Processing method and device for equipment identification, storage medium and electronic device Download PDF

Info

Publication number
CN112685064B
CN112685064B CN202011643538.6A CN202011643538A CN112685064B CN 112685064 B CN112685064 B CN 112685064B CN 202011643538 A CN202011643538 A CN 202011643538A CN 112685064 B CN112685064 B CN 112685064B
Authority
CN
China
Prior art keywords
equipment
information
current
original
different types
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
CN202011643538.6A
Other languages
Chinese (zh)
Other versions
CN112685064A (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.)
Nanjing Aegis Information Technology Co ltd
Original Assignee
Nanjing Aegis Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nanjing Aegis Information Technology Co ltd filed Critical Nanjing Aegis Information Technology Co ltd
Priority to CN202011643538.6A priority Critical patent/CN112685064B/en
Publication of CN112685064A publication Critical patent/CN112685064A/en
Application granted granted Critical
Publication of CN112685064B publication Critical patent/CN112685064B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

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

Abstract

The application discloses a processing method and device of equipment identification, a storage medium and an electronic device. The method comprises the steps of pre-storing an equipment ID table, wherein the equipment ID table comprises original equipment ID information of different types in the same equipment; receiving first device information of a target device, wherein the first device information comprises current device ID information; and under the condition that at least two pieces of original equipment ID information in different types in the same equipment are different from the current equipment ID information, updating the original equipment ID information in the equipment ID table into the current equipment ID information. The method and the device solve the technical problem that the unique identifier of the Android device is obtained and a fault tolerance mechanism is not provided. The uniqueness and stability of the device ID are improved through the method and the device.

Description

Processing method and device for equipment identification, storage medium and electronic device
Technical Field
The present invention relates to the field of software management, and in particular, to a device identifier processing method and device, a storage medium, and an electronic device.
Background
In the industry, single or multiple device information identifiers such as IMEI, android ID, MAC address and the like are mostly adopted, and only single ID information is usually accessed at a server side, so that a fault tolerance mechanism is not introduced.
The Android device does not have a stable API interface so that the developer can acquire the device ID. As more and more places need to use the device ID, when the Android version is upgraded, it is more and more difficult to acquire the Android device ID.
Aiming at the problem that the unique identifier of the Android device is acquired in the related technology and does not have a fault tolerance mechanism, no effective solution is proposed at present.
Disclosure of Invention
The main purpose of the application is to provide a processing method and device for equipment identification, a storage medium and an electronic device, so as to solve the problem that obtaining a unique identifier of Android equipment does not have a fault tolerance mechanism.
To achieve the above object, according to a first aspect of the present application, a method for processing a device identifier is provided.
The processing method of the equipment identifier comprises the following steps: pre-storing an equipment ID table, wherein the equipment ID table comprises different types of original equipment ID information in the same equipment; receiving first device information of a target device, wherein the first device information comprises current device ID information; and under the condition that at least two pieces of original equipment ID information in different types in the same equipment are different from the current equipment ID information, updating the original equipment ID information in the equipment ID table into the current equipment ID information.
Further, after updating the original device ID information in the device ID table to the current device ID information, the method further includes: encrypting a second ID of a preset type according to the ID of the main key in the pre-stored equipment ID table, wherein the second ID is mapped with the ID of the main key one by one; and issuing the second ID.
Further, when it is found that at least two pieces of original equipment ID information in different types of the same equipment are different from the current equipment ID information, updating the original equipment ID information in the equipment ID table to the current equipment ID information includes: the original equipment ID information includes at least: IMEI, android ID of the equipment, and MAC address of the equipment; if three pieces of original equipment ID information in different types in the same equipment are different from the current equipment ID information, no matched equipment is queried; under the condition that three pieces of original equipment ID information in different types in the same equipment are all identical to the current equipment ID information, inquiring matched equipment and issuing the current equipment ID information; under the condition that two pieces of original equipment ID information in different types in the same equipment are queried to be identical to the current equipment ID information, traversing a matched equipment list, and issuing the current equipment ID information which belongs to the arrangement according to a preset priority, wherein the preset priority is sequentially as follows from high to low: IMEI > MAC address of device > Android ID of device > hardware information of device.
Further, when it is found that at least two pieces of original equipment ID information in different types of the same equipment are different from the current equipment ID information, updating the original equipment ID information in the equipment ID table to the current equipment ID information includes: and under the condition that three pieces of original equipment ID information in different types in the same equipment are inquired to be different from the current equipment ID information, generating a unique equipment identifier of new equipment and simultaneously inserting the equipment ID of the new equipment and the hardware information of the equipment.
In order to achieve the above object, according to a second aspect of the present application, there is provided a processing method of device identification.
The processing method of the equipment identifier comprises the following steps: transmitting an equipment information acquisition request, wherein the acquisition request at least carries current equipment ID information; receiving current equipment ID information updated by original equipment ID information in an equipment ID table under the condition that at least two pieces of original equipment ID information in different types in the same equipment are inquired in a server, wherein the server is pre-stored with the equipment ID table, and the equipment ID table comprises the original equipment ID information in different types in the same equipment.
Further, after receiving the current device ID information, the method further includes: generating a unique device identifier of a new device and simultaneously inserting a device ID of the new device and hardware information of the device; uploading a unique device identifier of the device, a device ID of the new device and hardware information of the device according to preset time; and receiving updated current equipment ID information under the condition that the unique equipment identifiers of the equipment are not matched.
To achieve the above object, according to a third aspect of the present application, there is provided a processing apparatus for device identification.
The processing device of the equipment identifier of the application comprises: the device comprises a pre-storing module, a pre-storing module and a pre-storing module, wherein the pre-storing module is used for pre-storing a device ID table, and the device ID table comprises different types of original device ID information in the same device; a receiving module, configured to receive first device information of a target device, where the first device information includes current device ID information; and the first updating module is used for updating the original equipment ID information in the equipment ID table into the current equipment ID information under the condition that at least two pieces of original equipment ID information in different types in the same equipment are different from the current equipment ID information.
In order to achieve the above object, according to a fourth aspect of the present application, there is provided a processing apparatus for device identification.
The processing device of the equipment identifier of the application comprises: the device comprises a sending module, a receiving module and a receiving module, wherein the sending module is used for sending a device information acquisition request, and the acquisition request at least carries current device ID information; and the second updating module is used for receiving the current equipment ID information updated by the original equipment ID information in the equipment ID table under the condition that at least two pieces of original equipment ID information in different types in the same equipment are inquired in the server and are different from the current equipment ID information, wherein the server is pre-stored with the equipment ID table, and the equipment ID table comprises the original equipment ID information in different types in the same equipment.
In order to achieve the above object, according to a fifth aspect of the present application, there is provided a storage medium having stored therein a computer program, wherein the computer program is arranged to perform the steps of any of the method embodiments described above when run.
To achieve the above object, according to a sixth aspect of the present application, there is provided an electronic device comprising a memory, in which a computer program is stored, and a processor arranged to run the computer program to perform the steps of any of the method embodiments described above.
In the method, the device, the storage medium and the electronic device for processing the device identifier, a pre-stored device ID table is adopted, the device ID table comprises different types of original device ID information in the same device, and by receiving the first device information of the target device, the first device information comprises the current device ID information, so that the purpose of updating the original device ID information in the device ID table into the current device ID information under the condition that at least two different types of original device ID information in the same device are different from the current device ID information is achieved, the technical effects of improving the uniqueness and the stability of the device ID are achieved, and the technical problems of obtaining the unique identifier of the Android device and having a fault-tolerant mechanism are solved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this application, are included to provide a further understanding of the application and to provide a further understanding of the application with regard to the other features, objects and advantages of the application. The drawings of the illustrative embodiments of the present application and their descriptions are for the purpose of illustrating the present application and are not to be construed as unduly limiting the present application. In the drawings:
FIG. 1 is a schematic system architecture diagram of a method for processing device identification according to an embodiment of the present application;
FIG. 2 is a flow chart of a method for processing device identification according to an embodiment of the present application;
FIG. 3 is a flow chart of a method for processing device identification according to an embodiment of the present application;
FIG. 4 is a schematic diagram of a processing device structure of a device identifier according to an embodiment of the present application;
FIG. 5 is a schematic diagram of a processing device structure of a device identifier according to an embodiment of the present application;
FIG. 6 is a schematic diagram of a computer device for implementing a method for processing device identification according to an embodiment of the present application;
fig. 7 is a flow chart of a method for processing device identification according to a preferred embodiment of the present application.
Detailed Description
In order to make the present application solution better understood by those skilled in the art, the following description will be made in detail and with reference to the accompanying drawings in the embodiments of the present application, it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, shall fall within the scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate in order to describe the embodiments of the present application described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
In the present application, the terms "upper", "lower", "left", "right", "front", "rear", "top", "bottom", "inner", "outer", "middle", "vertical", "horizontal", "lateral", "longitudinal" and the like indicate an azimuth or a positional relationship based on that shown in the drawings. These terms are used primarily to better describe the present application and its embodiments and are not intended to limit the indicated device, element or component to a particular orientation or to be constructed and operated in a particular orientation.
Also, some of the terms described above may be used to indicate other meanings in addition to orientation or positional relationships, for example, the term "upper" may also be used to indicate some sort of attachment or connection in some cases. The specific meaning of these terms in this application will be understood by those of ordinary skill in the art as appropriate.
Furthermore, the terms "mounted," "configured," "provided," "connected," "coupled," and "sleeved" are to be construed broadly. For example, it may be a fixed connection, a removable connection, or a unitary construction; may be a mechanical connection, or an electrical connection; may be directly connected, or indirectly connected through intervening media, or may be in internal communication between two devices, elements, or components. The specific meaning of the terms in this application will be understood by those of ordinary skill in the art as the case may be.
It should be noted that, in the case of no conflict, the embodiments and features in the embodiments may be combined with each other. The present application will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
As shown in fig. 1, the system includes: the Android device 100 stores a device ID table in the server 200. Specifically, the identification code of the Android device 100 includes one of the following: device ID, IMEI, mac address, UDID. Wherein the device ID is a device ID. Can be acquired by using TelephonyManager service provided by a system, and has uniqueness. Which in turn includes IMEI and MEID/ESN. IMEI refers to the return of the GSM device and is written on the motherboard, and the reload APP does not change IMEI. Android 6.0 above systems require users to grant read_phone_state rights and cannot be obtained if the user refuses. The Mac address refers to a hardware identifier, including a wifi Mac address and a bluetooth Mac address. The UDID is used to indicate the device's uniqueness, the value is unchanged even if the application is reloaded.
Further, the method for obtaining the identification code of the Android device 100 includes: firstly, the ID and the MAC address of the Android device can be obtained by a method in the prior art. Second, READ_PHONE_STATE permissions are required for the IMEI, so if READ_PHONE_STATE permissions are not wanted, the IMEI may not be acquired.
Furthermore, the IMEI can avoid permission acquisition only before Android 6.0; if after 6.0 and before 10.0, READ_PHONE_STATE rights are required. After Android 10.0, the read_phone_state rights are not available. Therefore, if there is no read_phone_state permission, and Android 10.0, the following processing can be performed: collecting information related to some Android devices, wherein the information comprises one of the following steps: model, hardware information of the device, etc. Regarding hardware information of the device, the following conditions are to be satisfied: i.e. after the device is restarted, factory settings are restored, etc., without change.
As shown in fig. 2, the method is executed at the server side, and specifically includes steps S201 to S203 as follows:
step S201, pre-storing an equipment ID table, wherein the equipment ID table comprises different types of original equipment ID information in the same equipment;
step S202, first device information of target devices is received, wherein the first device information comprises current device ID information;
step S203, when it is queried that at least two pieces of original equipment ID information in different types of the same equipment are different from the current equipment ID information, updating the original equipment ID information in the equipment ID table to the current equipment ID information.
From the above description, it can be seen that the following technical effects are achieved:
by means of a pre-stored equipment ID table, the equipment ID table comprises original equipment ID information of different types in the same equipment, and by receiving first equipment information of target equipment, the first equipment information comprises current equipment ID information, the purposes that the original equipment ID information in the equipment ID table is updated into the current equipment ID information under the condition that at least two pieces of the original equipment ID information of different types in the same equipment are different from the current equipment ID information are inquired are achieved, and therefore the technical effects of improving the uniqueness and stability of the equipment ID are achieved, and the technical problems that the unique identifier of Android equipment is obtained and a fault-tolerant mechanism is achieved are solved.
The device ID table pre-stored in the server in step S201 described above includes different types of original device ID information in the same device. The original device ID information refers to device ID information after the last update. I.e., the original device ID information may or may not be changed.
In one embodiment, the device ID table core's attributes (columns), such as ID|DID_1|DID_2|DID_3.
In a specific embodiment, the original device ID information refers to original device ID information of the Android device.
After the server receives the first device information of the target device in step S202, current device ID information is obtained according to the first device information. At this time, the server does not know whether the device ID information has changed.
In one embodiment, the device IDs of the Android device are uploaded and retrieved by a server. For example, SELECT from t_device_id WHERE did_1=? or did_2=? or did_3=? .
In the step S203, it is queried whether at least two pieces of original equipment ID information in different types in the same equipment are different from the current equipment ID information, and if the server queries that the pieces of original equipment ID information are different, the original equipment ID information in the equipment ID table is updated to the current equipment ID information. I.e. if a record is retrieved on the server and at least two of the IDs are identical to the uploaded, the ID information of the query result is returned. If not, inserting the uploaded multiple device IDs, and returning the ID of the newly inserted record.
In a specific embodiment, the different types of original device ID information in the same device include: android device ID, MAC address, IMEI serial number.
As a preferred embodiment, by introducing a "bayer fault tolerance" scheme. By collecting three pieces of equipment ID information (Android equipment ID, MAC address and IMEI serial number) to the cloud, if two pieces of equipment ID information (for example, the Android equipment ID and the MAC address) are the same as the previous record, the same Android equipment is considered, and the changed ID is updated.
As a preferred implementation manner in this embodiment, after updating the original device ID information in the device ID table to the current device ID information, the method further includes: encrypting a second ID of a preset type according to the ID of the main key in the pre-stored equipment ID table, wherein the second ID is mapped with the ID of the main key one by one; and issuing the second ID.
In specific implementation, another Long type ID is obtained by adopting an encryption method according to the main key ID, and the ID and the main key ID are required to be mapped one by one so as to ensure that the ID and the main key ID are not repeated, and meanwhile, the calculation result is required to have discreteness. In the above processing, considering that the primary key of the table in the server is a self-increasing sequence to ensure the order of insertion, that is, the primary key of the table cannot be returned directly, otherwise, other device IDs are easily presumed by a third party and the number of users is known.
As a preferred implementation manner in this embodiment, when it is queried that at least two pieces of original equipment ID information in different types in the same equipment are different from the current equipment ID information, updating the original equipment ID information in the equipment ID table to the current equipment ID information includes: the original equipment ID information includes at least: IMEI, android ID of the equipment, and MAC address of the equipment; if three pieces of original equipment ID information in different types in the same equipment are different from the current equipment ID information, no matched equipment is queried; under the condition that three pieces of original equipment ID information in different types in the same equipment are all identical to the current equipment ID information, inquiring matched equipment and issuing the current equipment ID information; under the condition that two pieces of original equipment ID information in different types in the same equipment are queried to be identical to the current equipment ID information, traversing a matched equipment list, and issuing the current equipment ID information which belongs to the arrangement according to a preset priority, wherein the preset priority is sequentially as follows from high to low: IMEI > MAC address of device > Android ID of device > hardware information of device.
In the implementation, the original equipment ID information at least includes: the serial number of the device, the Android ID of the device, the MAC address of the device.
In a specific embodiment, if the IMEI, android ID, and MAC are all unequal, the query request does not return a record, i.e., there is no matching Android device.
In one embodiment, if the IMEI, android ID and MAC are all the same, return is made directly. If not, the traversing list returns the device ID with the priority, wherein the preset priority is as follows from high to low: IMEI > MAC address of device > Android ID of device > hardware information of device.
In one embodiment, if only one of the Android ID or MAC is equal, but the device hardware information does not match, it is not considered the same device.
As a preferred implementation manner in this embodiment, when it is queried that at least two pieces of original equipment ID information in different types in the same equipment are different from the current equipment ID information, updating the original equipment ID information in the equipment ID table to the current equipment ID information includes: and under the condition that three pieces of original equipment ID information in different types in the same equipment are different from the current equipment ID information, generating a unique equipment identifier of the new equipment and simultaneously inserting the equipment ID and the hardware information of the new equipment.
In one embodiment, if there is no matching device, then it is considered a new device; at this point, a new UDID return is generated while inserting the relevant information for the new device. The related information at least comprises equipment ID and hardware information.
Wherein, the hardware information needs to satisfy a requirement: after the operations such as restarting the device, restoring factory settings and the like, the device cannot change. Wherein, the conventional information includes CPU core number, RAM/ROM size, screen resolution and DPI parameters.
In one embodiment, the conventional device information is easy to tamper with, so that besides the conventional information, some cold device features, such as network interface and sensor related information, can be mined. When the conventional information is tampered, if the equipment information of the cold door is not changed, the same equipment can be still identified. Preferably, for ease of retrieval, the information may be compressed to 64 bits, i.e. to length Long.
In a preferred embodiment, if only one record of the Android ID or the MAC is searched when one of the Android ID and the MAC address is changed under the condition that the Android imei cannot be obtained, 1 to 2 Android IDs or MACs may be the same, and at this time, the Android devices can be distinguished with a high probability by adding the device information.
As shown in fig. 3, the method is executed at the client, and specifically includes the following steps S301 to S302:
step S301, a device information acquisition request is sent, wherein the acquisition request at least carries current device ID information;
step S302, receiving current equipment ID information updated by original equipment ID information in an equipment ID table when at least two pieces of original equipment ID information in different types of equipment ID information in the same equipment are found to be different from the current equipment ID information in a server, where an equipment ID table is pre-stored in the server, where the equipment ID table includes the original equipment ID information in different types in the same equipment.
In the step S301, the client sends a device information acquisition request carrying current device ID information.
In step S302, according to the result that at least two pieces of original equipment ID information in different types in the same equipment are different from the current equipment ID information, the updated current equipment ID information of the original equipment ID information in the equipment ID table is queried in the server. I.e. the updated current device ID information is included in the result returned by the request of the client.
As a preferred implementation manner in this embodiment, after receiving the current device ID information, the method further includes: generating a unique device identifier of a new device and simultaneously inserting a device ID of the new device and hardware information of the device; uploading a unique device identifier of the device, a device ID of the new device and hardware information of the device according to preset time; and receiving updated current equipment ID information under the condition that the unique equipment identifiers of the equipment are not matched.
In the implementation, after the UDID is obtained, the UDID and the device information can be uploaded to the cloud server at regular time, and the cloud server compares the stored information with the uploaded information and updates the stored information if the stored information is different from the uploaded information, so that the stability of the UDID can be improved.
In a specific embodiment, the user uninstalls the application when the device is Android 7.0 and installs the application back after Android 8.0, and the Android ID is changed at this time, but according to the MAC address and the device information, we can recognize the device and update the Android ID. If the MAC can not be acquired in the next period, the Android device can still be identified according to the Android ID and the device information.
Assuming that the probability of repetition and the probability of change are both one thousandth, then: the condition that the same equipment is not identified by the two collection of the same equipment is that at least two equipment IDs are different from the last time. This probability is about three parts per million. If two different devices are present, the condition of the same device is that of the three device IDs, the probability that at least two device IDs are identical to the other device is likewise about three parts per million. Therefore, the uniqueness and stability of the device ID of the Android device can be improved.
It should be noted that the steps illustrated in the flowcharts of the figures may be performed in a computer system such as a set of computer executable instructions, and that although a logical order is illustrated in the flowcharts, in some cases the steps illustrated or described may be performed in an order other than that illustrated herein.
According to an embodiment of the present application, there is also provided a processing apparatus for device identification for implementing the above method, as shown in fig. 4, where the apparatus includes:
a pre-storing module 401, configured to pre-store an equipment ID table, where the equipment ID table includes different types of original equipment ID information in the same equipment;
a receiving module 402, configured to receive first device information of a target device, where the first device information includes current device ID information;
the first updating module 403 is configured to update the original equipment ID information in the equipment ID table to the current equipment ID information when it is queried that at least two pieces of original equipment ID information in different types of the same equipment are different from the current equipment ID information.
The device ID table pre-stored in the server in the pre-storing module 401 includes different types of original device ID information in the same device. The original device ID information refers to device ID information after the last update. I.e., the original device ID information may or may not be changed.
In one embodiment, the device ID table core's attributes (columns), such as ID|DID_1|DID_2|DID_3.
In a specific embodiment, the original device ID information refers to original device ID information of the Android device.
The receiving module 402 obtains current device ID information according to the first device information after the server receives the first device information of the target device. At this time, the server does not know whether the device ID information has changed.
In one embodiment, the device IDs of the Android device are uploaded and retrieved by a server. For example, SELECT from t_device_id WHERE did_1=? or did_2=? or did_3=? .
The first updating module 403 queries whether at least two pieces of original equipment ID information in different types in the same equipment are different from the current equipment ID information, and if the server queries that the pieces of original equipment ID information are different, updates the original equipment ID information in the equipment ID table to the current equipment ID information. I.e. if a record is retrieved on the server and at least two of the IDs are identical to the uploaded, the ID information of the query result is returned. If not, inserting the uploaded multiple device IDs, and returning the ID of the newly inserted record.
In a specific embodiment, the different types of original device ID information in the same device include: android device ID, MAC address, IMEI serial number.
As a preferred embodiment, by introducing a "bayer fault tolerance" scheme. By collecting three pieces of equipment ID information (Android equipment ID, MAC address and IMEI serial number) to the cloud, if two pieces of equipment ID information (for example, the Android equipment ID and the MAC address) are the same as the previous record, the same Android equipment is considered, and the changed ID is updated.
According to an embodiment of the present application, there is also provided a processing apparatus for device identification for implementing the above method, as shown in fig. 5, where the apparatus includes:
a sending module 501, configured to send an equipment information obtaining request, where the obtaining request at least carries current equipment ID information;
a second updating module 502, configured to receive current device ID information updated by original device ID information in a device ID table when at least two pieces of original device ID information of different types in the same device are found to be different from the current device ID information in a server, where the server stores a device ID table in advance, and the device ID table includes the original device ID information of different types in the same device.
In order to better understand the flow of the distributed task scheduling method, the following explanation is given with reference to the preferred embodiment, but the technical solution of the embodiment of the present invention is not limited.
According to the processing method of the equipment identifier, single or multiple equipment information identifiers such as IMEI, android ID, MAC address and the like are adopted, different ID information of the same Android equipment is prestored in a server, and a fault-tolerant mechanism is introduced to improve the uniqueness and stability of the equipment ID.
Fig. 7 is a flow chart of a processing method of device identifier in the embodiment of the present application, which specifically includes the following steps:
in step S701, the client collects three pieces of device information.
The original equipment ID information at least comprises: IMEI, android ID of the device, MAC address of the device.
In step S702, the cloud matches the corresponding field information.
Step S703 determines whether two or more fields are identical.
Inquiring whether at least two pieces of original equipment ID information in different types in the same equipment are different from the current equipment ID information, and if the server inquires that the pieces of original equipment ID information are different, updating the original equipment ID information in the equipment ID table into the current equipment ID information. I.e. if a record is retrieved on the server and at least two of the IDs are identical to the uploaded, the ID information of the query result is returned. If not, inserting the uploaded multiple device IDs, and returning the ID of the newly inserted record.
In step S704, the ID of the server change is updated.
Step S705, generating an ID according to the submitted field information.
In a specific embodiment, if the IMEI, android ID, and MAC are all unequal, the query request does not return a record, i.e., there is no matching Android device.
In one embodiment, if the IMEI, android ID and MAC are all the same, return is made directly. If not, traversing the list to fetch the preset priority equipment ID and returning. The preset priority is sequentially as follows from high to low: hardware information of IMEI > MAC address of device > Android ID of device
In one embodiment, if only one of the Android ID or MAC is equal, but the device information does not match, it is not considered the same device.
Step S706, return the server ID.
And under the condition that three pieces of original equipment ID information in different types in the same equipment are inquired to be different from the current equipment ID information, generating a unique equipment identifier of new equipment and simultaneously inserting the equipment ID of the new equipment and the hardware information of the equipment.
The embodiment of the application also provides computer equipment. As shown in fig. 6, the computer device 60 may include: at least one processor 601, such as a CPU, at least one network interface 604, a user interface 603, a memory 605, at least one communication bus 602, and optionally, a display 606. Wherein the communication bus 602 is used to enable connected communications between these components. The user interface 603 may include, among other things, a touch screen, a keyboard or mouse, etc. The network interface 604 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface), and a communication connection may be established with a server via the network interface 604. The memory 605 may be a high-speed RAM memory or a non-volatile memory (non-volatile memory), such as at least one disk memory, and the memory 605 includes a flash in an embodiment of the present invention. The memory 605 may also optionally be at least one storage system located remotely from the aforementioned processor 601. As shown in fig. 6, an operating system, network communication modules, user interface modules, and program instructions may be included in memory 605, which is a type of computer storage medium.
It should be noted that the network interface 604 may be connected to a receiver, a transmitter, or other communication modules, which may include, but are not limited to, a WiFi module, a bluetooth module, etc., and it is understood that the computer device may also include a receiver, a transmitter, other communication modules, etc. in embodiments of the present invention.
Processor 601 may be operative to invoke program instructions stored in memory 605 and cause computer device 60 to:
transmitting an equipment information acquisition request, wherein the acquisition request at least carries current equipment ID information;
receiving current equipment ID information updated by original equipment ID information in an equipment ID table under the condition that at least two pieces of original equipment ID information in different types in the same equipment are inquired in a server, wherein the server is pre-stored with the equipment ID table, and the equipment ID table comprises the original equipment ID information in different types in the same equipment.
Embodiments of the present application also provide a storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the method embodiments described above when run.
Alternatively, in the present embodiment, the above-described storage medium may be configured to store a computer program for performing the steps of:
s1, pre-storing an equipment ID table, wherein the equipment ID table comprises different types of original equipment ID information in the same equipment;
s2, receiving first equipment information of target equipment, wherein the first equipment information comprises current equipment ID information;
s3, updating the original equipment ID information in the equipment ID table into the current equipment ID information under the condition that at least two pieces of original equipment ID information in different types in the same equipment are different from the current equipment ID information.
Optionally, the storage medium is further arranged to store a computer program for performing the steps of:
s1, encrypting a second ID of a preset type according to the ID of a main key in the pre-stored equipment ID table, wherein the second ID is mapped with the ID of the main key one by one;
s2, issuing the second ID.
Alternatively, in the present embodiment, the storage medium may include, but is not limited to: a usb disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing a computer program.
Embodiments of the present application also provide an electronic device comprising a memory having a computer program stored therein and a processor arranged to run the computer program to perform the steps of any of the method embodiments described above.
Optionally, the electronic apparatus may further include a transmission device and an input/output device, where the transmission device is connected to the processor, and the input/output device is connected to the processor.
Alternatively, in the present embodiment, the above-described processor may be configured to execute the following steps by a computer program:
s1, pre-storing an equipment ID table, wherein the equipment ID table comprises different types of original equipment ID information in the same equipment;
s2, receiving first equipment information of target equipment, wherein the first equipment information comprises current equipment ID information;
s3, updating the original equipment ID information in the equipment ID table into the current equipment ID information under the condition that at least two pieces of original equipment ID information in different types in the same equipment are different from the current equipment ID information.
It will be apparent to those skilled in the art that the modules or steps of the application described above may be implemented in a general purpose computing device, they may be centralized on a single computing device, or distributed across a network of computing devices, or they may alternatively be implemented in program code executable by computing devices, such that they may be stored in a memory device and executed by computing devices, or individually fabricated as individual integrated circuit modules, or multiple modules or steps within them may be fabricated as a single integrated circuit module. Thus, the present application is not limited to any specific combination of hardware and software.
The foregoing description is only of the preferred embodiments of the present application and is not intended to limit the same, but rather, various modifications and variations may be made by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.

Claims (9)

1. A method for processing a device identifier, comprising:
pre-storing an equipment ID table, wherein the equipment ID table comprises different types of original equipment ID information in the same equipment;
receiving first device information of a target device, wherein the first device information comprises current device ID information;
updating original equipment ID information in the equipment ID table into current equipment ID information under the condition that at least two pieces of original equipment ID information in different types in the same equipment are different from the current equipment ID information;
the updating the original equipment ID information in the equipment ID table to the current equipment ID information includes:
The original equipment ID information includes at least: IMEI, android id of the device, MAC address of the device;
if three pieces of original equipment ID information in different types in the same equipment are different from the current equipment ID information, no matched equipment is queried;
under the condition that three pieces of original equipment ID information in different types in the same equipment are all identical to the current equipment ID information, inquiring matched equipment and issuing the current equipment ID information;
under the condition that two pieces of original equipment ID information in different types in the same equipment are queried to be identical to the current equipment ID information, traversing a matched equipment list, and issuing the current equipment ID information which belongs to the arrangement according to a preset priority, wherein the preset priority is sequentially as follows from high to low: IMEI > MAC address of device > Android ID of device > hardware information of device.
2. The method of claim 1, wherein after updating the original device ID information in the device ID table to the current device ID information, further comprising:
Encrypting a second ID of a preset type according to the ID of the main key in the pre-stored equipment ID table, wherein the second ID is mapped with the ID of the main key one by one;
and issuing the second ID.
3. The method according to claim 1, wherein updating the original device ID information in the device ID table to the current device ID information when it is found that at least two pieces of original device ID information of different types in the same device are different from the current device ID information includes:
and under the condition that three pieces of original equipment ID information in different types in the same equipment are inquired to be different from the current equipment ID information, generating a unique equipment identifier of new equipment and simultaneously inserting the equipment ID of the new equipment and the hardware information of the equipment.
4. A method for processing a device identifier, comprising:
transmitting an equipment information acquisition request, wherein the acquisition request at least carries current equipment ID information;
receiving current equipment ID information updated by original equipment ID information in an equipment ID table under the condition that at least two pieces of original equipment ID information in different types in the same equipment are inquired in a server, wherein the server is pre-stored with the equipment ID table, and the equipment ID table comprises the original equipment ID information in different types in the same equipment;
The receiving, in the server, when it is queried that at least two pieces of original equipment ID information in different types in the same equipment are different from the current equipment ID information, updating the original equipment ID information in the equipment ID table to the current equipment ID information includes:
the original equipment ID information includes at least: IMEI, android id of the device, MAC address of the device;
if three pieces of original equipment ID information in different types in the same equipment are different from the current equipment ID information, no matched equipment is queried;
under the condition that three pieces of original equipment ID information in different types in the same equipment are all identical to the current equipment ID information, inquiring matched equipment and issuing the current equipment ID information;
under the condition that two pieces of original equipment ID information in different types in the same equipment are queried to be identical to the current equipment ID information, traversing a matched equipment list, and issuing the current equipment ID information which belongs to the arrangement according to a preset priority, wherein the preset priority is sequentially as follows from high to low: IMEI > MAC address of device > Android ID of device > hardware information of device.
5. The method of claim 4, further comprising, after receiving the current device ID information: generating a unique device identifier of a new device and simultaneously inserting a device ID of the new device and hardware information of the device;
uploading a unique device identifier of the device, a device ID of the new device and hardware information of the device according to preset time;
and receiving updated current equipment ID information under the condition that the unique equipment identifiers of the equipment are not matched.
6. A device identification processing apparatus, comprising:
the device comprises a pre-storing module, a pre-storing module and a pre-storing module, wherein the pre-storing module is used for pre-storing a device ID table, and the device ID table comprises different types of original device ID information in the same device;
a receiving module, configured to receive first device information of a target device, where the first device information includes current device ID information;
a first updating module, configured to update original equipment ID information in the equipment ID table to current equipment ID information when it is queried that at least two pieces of original equipment ID information in different types of equipment in the same equipment are different from the current equipment ID information;
the updating the original equipment ID information in the equipment ID table to the current equipment ID information includes:
The original equipment ID information includes at least: IMEI, android id of the device, MAC address of the device;
if three pieces of original equipment ID information in different types in the same equipment are different from the current equipment ID information, no matched equipment is queried;
under the condition that three pieces of original equipment ID information in different types in the same equipment are all identical to the current equipment ID information, inquiring matched equipment and issuing the current equipment ID information;
under the condition that two pieces of original equipment ID information in different types in the same equipment are queried to be identical to the current equipment ID information, traversing a matched equipment list, and issuing the current equipment ID information which belongs to the arrangement according to a preset priority, wherein the preset priority is sequentially as follows from high to low: IMEI > MAC address of device > android id of device > hardware information of device.
7. A device identification processing apparatus, comprising:
the device comprises a sending module, a receiving module and a receiving module, wherein the sending module is used for sending a device information acquisition request, and the acquisition request at least carries current device ID information;
A second updating module, configured to receive current equipment ID information updated by original equipment ID information in an equipment ID table when at least two pieces of original equipment ID information in different types of equipment in the same equipment are found to be different from the current equipment ID information in a server, where the server stores an equipment ID table in advance, where the equipment ID table includes the original equipment ID information in different types in the same equipment;
the updating the original equipment ID information in the equipment ID table to the current equipment ID information includes:
the original equipment ID information includes at least: IMEI, android id of the device, MAC address of the device;
if three pieces of original equipment ID information in different types in the same equipment are different from the current equipment ID information, no matched equipment is queried;
under the condition that three pieces of original equipment ID information in different types in the same equipment are all identical to the current equipment ID information, inquiring matched equipment and issuing the current equipment ID information;
Under the condition that two pieces of original equipment ID information in different types in the same equipment are queried to be identical to the current equipment ID information, traversing a matched equipment list, and issuing the current equipment ID information which belongs to the arrangement according to a preset priority, wherein the preset priority is sequentially as follows from high to low: IMEI > MAC address of device > Android ID of device > hardware information of device.
8. A computer readable storage medium, characterized in that the computer readable storage medium has stored therein a computer program, wherein the computer program is arranged to perform the method of any of the claims 1 to 3 and/or to perform the method of any of the claims 4 when run.
9. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to run the computer program to perform the method of any of the claims 1 to 3 and/or to perform the method of any of the claims 4.
CN202011643538.6A 2020-12-30 2020-12-30 Processing method and device for equipment identification, storage medium and electronic device Active CN112685064B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011643538.6A CN112685064B (en) 2020-12-30 2020-12-30 Processing method and device for equipment identification, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011643538.6A CN112685064B (en) 2020-12-30 2020-12-30 Processing method and device for equipment identification, storage medium and electronic device

Publications (2)

Publication Number Publication Date
CN112685064A CN112685064A (en) 2021-04-20
CN112685064B true CN112685064B (en) 2024-03-22

Family

ID=75456833

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011643538.6A Active CN112685064B (en) 2020-12-30 2020-12-30 Processing method and device for equipment identification, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN112685064B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115037719A (en) * 2022-05-27 2022-09-09 上海哔哩哔哩科技有限公司 Code sending method and system

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107707686A (en) * 2017-10-09 2018-02-16 深圳市沃特沃德股份有限公司 Equipment identification method and device
CN108197050A (en) * 2018-01-02 2018-06-22 联想(北京)有限公司 A kind of device identification method, apparatus and system
CN109495562A (en) * 2018-11-09 2019-03-19 精硕科技(北京)股份有限公司 Obtain the method and device of device identification
CN110637449A (en) * 2017-09-29 2019-12-31 华为技术有限公司 Method and device for accessing equipment identifier
CN110826043A (en) * 2018-08-08 2020-02-21 腾讯科技(深圳)有限公司 Digital identity application system and method, identity authentication system and method
CN110865905A (en) * 2019-09-24 2020-03-06 平安科技(深圳)有限公司 Data restoration method and device, computer equipment and storage medium
CN111046371A (en) * 2019-12-10 2020-04-21 上海掌门科技有限公司 Method, electronic device and computer-readable medium for generating device identification

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110637449A (en) * 2017-09-29 2019-12-31 华为技术有限公司 Method and device for accessing equipment identifier
CN107707686A (en) * 2017-10-09 2018-02-16 深圳市沃特沃德股份有限公司 Equipment identification method and device
CN108197050A (en) * 2018-01-02 2018-06-22 联想(北京)有限公司 A kind of device identification method, apparatus and system
CN110826043A (en) * 2018-08-08 2020-02-21 腾讯科技(深圳)有限公司 Digital identity application system and method, identity authentication system and method
CN109495562A (en) * 2018-11-09 2019-03-19 精硕科技(北京)股份有限公司 Obtain the method and device of device identification
CN110865905A (en) * 2019-09-24 2020-03-06 平安科技(深圳)有限公司 Data restoration method and device, computer equipment and storage medium
CN111046371A (en) * 2019-12-10 2020-04-21 上海掌门科技有限公司 Method, electronic device and computer-readable medium for generating device identification

Also Published As

Publication number Publication date
CN112685064A (en) 2021-04-20

Similar Documents

Publication Publication Date Title
CN108038114B (en) Path query method, terminal and computer readable storage medium
CN109951435B (en) Equipment identifier providing method and device and risk control method and device
CN104954468A (en) Resource allocation method and resource allocation device
CN110162529B (en) Data processing method, service server and data processing system
KR20180099841A (en) Method and apparatus for handling short-cut links,
CN111400334B (en) Data processing method, data processing device, storage medium and electronic device
CN110427386B (en) Data processing method, device and computer storage medium
CN110572451B (en) Data processing method, device and storage medium
CN111221840A (en) Data processing method and device, data caching method, storage medium and system
CN112685064B (en) Processing method and device for equipment identification, storage medium and electronic device
CN102024040A (en) Database synchronization method, device and system
CN110825309B (en) Data reading method, device and system and distributed system
CN111046106A (en) Cache data synchronization method, device, equipment and medium
CN114185991A (en) Method and related device for realizing data synchronization based on distributed database
CN109391658B (en) Account data synchronization method and equipment, storage medium and terminal thereof
CN108241685B (en) Data query method and query client
CN110780944B (en) Method and device for starting application permission and machine-readable storage medium
CN109165712A (en) Distributed generation method, device and computer storage medium by stages number
CN104333614A (en) Terminal recognition method, device and system
US10185735B2 (en) Distributed database system and a non-transitory computer readable medium
JP6233846B2 (en) Variable-length nonce generation
CN113486025B (en) Data storage method, data query method and device
CN106534049B (en) Data issuing method based on server, client, server and system
CN115118612A (en) Resource quota management method and device, computer equipment and storage medium
US20160234299A1 (en) Management server and operation method thereof and server system

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