CN116723170A - Method, device, equipment and medium for generating unique identifier of mobile terminal equipment - Google Patents

Method, device, equipment and medium for generating unique identifier of mobile terminal equipment Download PDF

Info

Publication number
CN116723170A
CN116723170A CN202310992534.6A CN202310992534A CN116723170A CN 116723170 A CN116723170 A CN 116723170A CN 202310992534 A CN202310992534 A CN 202310992534A CN 116723170 A CN116723170 A CN 116723170A
Authority
CN
China
Prior art keywords
character
equipment
unique identifier
string
encrypted
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.)
Pending
Application number
CN202310992534.6A
Other languages
Chinese (zh)
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.)
Chengdu Chuxin Interactive Technology Co ltd
Original Assignee
Chengdu Chuxin Interactive 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 Chengdu Chuxin Interactive Technology Co ltd filed Critical Chengdu Chuxin Interactive Technology Co ltd
Priority to CN202310992534.6A priority Critical patent/CN116723170A/en
Publication of CN116723170A publication Critical patent/CN116723170A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/30Managing network names, e.g. use of aliases or nicknames
    • H04L61/3015Name registration, generation or assignment
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/03Protecting confidentiality, e.g. by encryption
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/30Security of mobile devices; Security of mobile applications

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Telephone Function (AREA)

Abstract

The application discloses a method, a device, equipment and a medium for generating a unique identifier of mobile terminal equipment, wherein the method comprises the following steps: configuring custom characters and generating a string of encrypted random characters; combining the custom character with the random character to generate a unique identifier of the equipment; and converting the unique equipment identifier into an operable character string, storing the operable character string in equipment, encrypting the unique equipment identifier to obtain a string of encrypted characters, and reporting the string of encrypted characters to a server for storage. The application belongs to the technical field of information security, and can generate a series of unique identifiers of equipment under the condition that user privacy information is not acquired.

Description

Method, device, equipment and medium for generating unique identifier of mobile terminal equipment
Technical Field
The application belongs to the technical field of information security, and particularly relates to a method, a device, equipment and a medium for generating a unique identifier of mobile terminal equipment.
Background
There is a scheme: the unique identification of the equipment is obtained through an open interface appointed by the android system, and the logic is as follows:
A. reading an "android_id" field in system settings;
B. acquiring a mobile identification field (IMEI) from a mobile information server manager;
C. acquiring an OAID through an advertisement identification library developed by a mobile security alliance;
the following problems exist in the conventional scheme of acquiring a unique identifier by using the above three methods:
1. the field "android_id" in the system setting can change along with the reset of the system or the operation of a user, and cannot be kept unique all the time;
"Mobile identification field (IMEI)" involves privacy compliance issues and system authorization is required for acquisition, otherwise it cannot be acquired;
3. the coverage rate of the advertisement identification library is too small to cover all devices.
Disclosure of Invention
The application aims to overcome the defects of the prior art and provide a method, a device, equipment and a medium for generating unique identifiers of mobile terminal equipment, wherein all android mobile equipment can generate a series of unique identifiers under the condition that user privacy information is not acquired.
The aim of the application is achieved by the following technical scheme:
a method for generating a unique identifier of a mobile terminal device, the method being applied to an android device, the method comprising:
configuring custom characters and generating a string of encrypted random characters;
combining the custom character with the random character to generate a unique identifier of the equipment;
and converting the unique equipment identifier into an operable character string, storing the operable character string in equipment, encrypting the unique equipment identifier to obtain a string of encrypted characters, and reporting the string of encrypted characters to a server for storage.
Further, the server receives the data uploaded by the client through the submitting interface, analyzes and extracts the encrypted characters after receiving the data, and stores the encrypted characters in a database.
Further, the parsing to extract the encrypted character includes:
analyzing the data received by the submitting interface, wherein the data format is json character strings, and assigning the character strings to character string variables;
converting the character string variable into a jsonObject object through a JSON library;
the required value is obtained by calling the getString () of the jsonObject itself.
Further, the converting the device unique identifier into an operable character string is stored in the device, and the converting includes:
creating a text file through an IO library in Java and storing the text file in an application catalog;
storing the unique identifier of the equipment into a text file for storage;
opening a text file in a byte stream form to obtain a buffer reader object;
creating a variable character sequence StringBuilder object;
circularly reading data in a file in the form of text lines;
the read data is put into a created StringBuilder object for type conversion;
and converting the StringBuilder object after filling the data into an operable character string through the self-contained toString.
Further, the generating a string of encrypted random characters includes:
the encrypted random number is generated by a UUID static factory in the UTILS library in Java.
On the other hand, the application also provides a device for generating the unique identifier of the mobile terminal equipment, which comprises:
the character generation module configures custom characters and generates a string of encrypted random characters;
the unique identifier generation module combines the custom character with the random character to generate a device unique identifier;
and the unique identification storage module converts the unique identification of the equipment into an operable character string to be stored in the equipment, encrypts the unique identification of the equipment, and then obtains a string of encrypted characters to be reported to a server for storage.
On the other hand, the application also provides a computer device, which comprises a processor and a memory, wherein the memory stores a computer program, and the computer program is loaded and executed by the processor to realize any mobile terminal device unique identifier generation method.
In another aspect, the present application further provides a computer readable storage medium, where a computer program is stored, where the computer program is loaded and executed by a processor to implement any one of the mobile terminal device unique identifier generating methods described above.
The application has the beneficial effects that:
(1) The unique identifier of the device generated by the method is suitable for any android mobile device, dangerous authorities do not need to be acquired, privacy problems are avoided, and the safety of acquiring the unique identifier is greatly improved.
(2) The unique identifier generated by the application can not change along with the reset of the system or the operation of a user, so that the situation that a result cannot be obtained is avoided, the generated character has no sensitive information, and the security level is high.
Drawings
FIG. 1 is a flow chart of a method for generating a unique identifier of a mobile terminal device according to an embodiment of the present application;
fig. 2 is a block diagram of a mobile terminal device unique identifier generating apparatus according to an embodiment of the present application.
Detailed Description
Other advantages and effects of the present application will become apparent to those skilled in the art from the following disclosure, which describes the embodiments of the present application with reference to specific examples. The application may be practiced or carried out in other embodiments that depart from the specific details, and the details of the present description may be modified or varied from the spirit and scope of the present application. It should be noted that the following embodiments and features in the embodiments may be combined with each other without conflict.
All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
The following problems exist in the traditional scheme of acquiring a unique identifier:
1. the field "android_id" in the system setting can change along with the reset of the system or the operation of a user, and cannot be kept unique all the time;
"Mobile identification field (IMEI)" involves privacy compliance issues and system authorization is required for acquisition, otherwise it cannot be acquired;
3. the coverage rate of the advertisement identification library is too small to cover all devices.
In order to solve the above technical problems, the following embodiments of the mobile terminal device unique identifier generating method, apparatus, device and medium are provided.
Example 1
Referring to fig. 1, shown in fig. 1 is a flowchart of a method for generating a unique identifier of a mobile terminal device according to this embodiment. The method specifically comprises the following steps:
step one: the custom character is configured and a string of encrypted random characters is generated.
Specifically, this embodiment configures a global custom character: "CX-", which is used to determine the unique prefix, the custom character can be named arbitrarily. The encrypted random number is generated by a UUID static factory in a public and generic JAVA library.
The UUID static factory generated encrypted random numbers in the UTILS library in Java do not involve any privacy concerns and do not require any high-risk rights, and therefore are preferred to the traditional way of using the "mobile identification field (IMEI)".
In addition, before generating custom characters and generating universal identifier (UUID), the present embodiment first creates a text file for storing the generated unique identifier, creates a text file through the IO library in Java, and stores the text file in the application directory under the name "UUID.
Step two: and combining the custom character with the random character to generate a unique identifier of the equipment.
For example, if the custom character is CX-, and the UUID static factory generates an encrypted random number of "c25c505d-377d-4a9e-850b-f477495b138d", the unique identifier of the combined device is CX-c25c505d-377d-4a9e-850b-f477495b138d ", and the generation of the data breaks through the machine limit of the traditional advertising device identifier, is not limited to only obtaining the unique identifier of a specific mobile phone manufacturer, and is suitable for all android devices.
Step three: and converting the unique equipment identifier into an operable character string, storing the operable character string in equipment, encrypting the unique equipment identifier to obtain a string of encrypted characters, and reporting the string of encrypted characters to a server for storage.
Specifically, the successfully generated unique identifier is saved in the text file for storage, so that the possibility that the unique identifier fails due to the reset of the device or the operation of the application is avoided. The specific implementation logic is as follows:
a. judging whether a file of uuid.txt exists or not, and opening the file in a byte stream form to obtain a BufferedReader object if the file exists;
b. creating a variable character sequence 'StringBuilder' object;
c. circularly reading data in a file in the form of text lines;
d. the read data is put into a created 'StringBuilder' object for type conversion;
e. and converting the 'StringBuilder' object filled with data into an operable character string by a 'toString' method carried by the 'StringBuilder' object.
And encrypting the obtained unique identification data by using MD5 to obtain a string of characters similar to '9 f1947463c468f6545975113999bd 778', and reporting the encrypted data to a server for storage.
The server provides a reporting interface and processes the data reported by the client, and the steps are as follows:
1. creating a post submitting interface of a server side, which is used for receiving data of a client side;
2. analyzing interface data and extracting required values, wherein the acquisition mode is as follows:
a. parsing client data received through the first step in the format of "json" strings, such as "{" msg ": success", ".
encryptedI9 f1947463c468f6545975113999bd778"}" and assigning it to the variable "jsonData";
b. converting the "jsonData" character string variable into a "jsonObject" object through a JSON library;
c. by calling the "jsonObject" self-contained getString () method, the "encrypted" parameter is entered, resulting in the required value of "9f1947463c468f6545975113999bd778".
3. And storing the data into a server database for subsequent updating and maintenance.
In this embodiment, a user opens a client for the first time, and in the case of network connection, the client generates a string of mobile device unique identifiers by combining custom characters with a Universal Unique Identifier (UUID), and stores the mobile device unique identifiers in an internal storage space of an application, which ensures that no duplicate data exists in an installation period. And then, through interaction with the server, reporting the data to the server for matching and storage. The device unique identifier generated by the method provided by the embodiment is suitable for any android mobile device, dangerous authorities do not need to be acquired, privacy problems are avoided, and the security of acquiring the unique identifier is greatly improved. The unique identifier generated by the method provided by the embodiment cannot change along with the reset of the system or the operation of a user, so that the situation that a result cannot be obtained is avoided, the generated character has no sensitive information, and the security level is high.
Example 2
Referring to fig. 2, shown in fig. 2 is a block diagram of a mobile terminal device unique identifier generating apparatus according to the present embodiment. The device specifically comprises the following structures:
the character generation module configures custom characters and generates a string of encrypted random characters;
the unique identifier generation module combines the custom character with the random character to generate a unique identifier of the equipment;
the unique identification storage module converts the unique identification of the equipment into an operable character string to be stored in the equipment, encrypts the unique identification of the equipment to obtain a string of encrypted characters, and reports the string of encrypted characters to the server for storage.
Example 3
The preferred embodiment provides a computer device, which can implement the steps in any embodiment of the method for generating the unique identifier of the mobile terminal device provided by the embodiment of the present application, so that the beneficial effects of the method for generating the unique identifier of the mobile terminal device provided by the embodiment of the present application can be achieved, and detailed descriptions of the foregoing embodiments are omitted herein.
Example 4
Those of ordinary skill in the art will appreciate that all or a portion of the steps of the various methods of the above embodiments may be performed by instructions, or by instructions controlling associated hardware, which may be stored in a computer-readable storage medium and loaded and executed by a processor. To this end, an embodiment of the present application provides a storage medium storing a plurality of instructions capable of being loaded by a processor to perform the steps of any one of the embodiments of the method for generating a unique identifier for a mobile terminal device provided by the embodiment of the present application.
Wherein the storage medium may include: read Only Memory (ROM), random access Memory (RAM, random Access Memory), magnetic or optical disk, and the like.
The foregoing description of the preferred embodiments of the application is not intended to be limiting, but rather is intended to cover all modifications, equivalents, and alternatives falling within the spirit and principles of the application.

Claims (8)

1. The method for generating the unique identifier of the mobile terminal device is applied to the android device and is characterized by comprising the following steps:
configuring custom characters and generating a string of encrypted random characters;
combining the custom character with the random character to generate a unique identifier of the equipment;
and converting the unique equipment identifier into an operable character string, storing the operable character string in equipment, encrypting the unique equipment identifier to obtain a string of encrypted characters, and reporting the string of encrypted characters to a server for storage.
2. The method for generating a unique identifier of a mobile terminal device according to claim 1, wherein the server receives data uploaded by the client through the submitting interface, parses and extracts the encrypted character after receiving the data, and stores the encrypted character in the database.
3. The method for generating a unique identifier of a mobile terminal device according to claim 2, wherein the parsing and extracting the encrypted character includes:
analyzing the data received by the submitting interface, wherein the data format is json character strings, and assigning the character strings to character string variables;
converting the character string variable into a jsonObject object through a JSON library;
the required value is obtained by calling the getString () of the jsonObject itself.
4. The method for generating a unique identifier of a mobile terminal device according to claim 1, wherein the converting the unique identifier of the device into an operable character string is stored in the device, comprising:
creating a text file through an IO library in Java and storing the text file in an application catalog;
storing the unique identifier of the equipment into a text file for storage;
opening a text file in a byte stream form to obtain a buffer reader object;
creating a variable character sequence StringBuilder object;
circularly reading data in a file in the form of text lines;
the read data is put into a created StringBuilder object for type conversion;
and converting the StringBuilder object after filling the data into an operable character string through the self-contained toString.
5. The method for generating a unique identifier for a mobile terminal device according to claim 1, wherein the generating a string of encrypted random characters comprises:
the encrypted random number is generated by a UUID static factory in the UTILS library in Java.
6. A mobile terminal device unique identifier generating apparatus, the apparatus comprising:
the character generation module configures custom characters and generates a string of encrypted random characters;
the unique identifier generation module combines the custom character with the random character to generate a device unique identifier;
and the unique identification storage module converts the unique identification of the equipment into an operable character string to be stored in the equipment, encrypts the unique identification of the equipment, and then obtains a string of encrypted characters to be reported to a server for storage.
7. A computer device comprising a processor and a memory, wherein the memory has stored therein a computer program that is loaded and executed by the processor to implement the mobile-end device unique identification generation method of any of claims 1-5.
8. A computer readable storage medium, wherein a computer program is stored in the storage medium, and the computer program is loaded and executed by a processor to implement the mobile terminal device unique identifier generation method according to any one of claims 1-5.
CN202310992534.6A 2023-08-08 2023-08-08 Method, device, equipment and medium for generating unique identifier of mobile terminal equipment Pending CN116723170A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310992534.6A CN116723170A (en) 2023-08-08 2023-08-08 Method, device, equipment and medium for generating unique identifier of mobile terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310992534.6A CN116723170A (en) 2023-08-08 2023-08-08 Method, device, equipment and medium for generating unique identifier of mobile terminal equipment

Publications (1)

Publication Number Publication Date
CN116723170A true CN116723170A (en) 2023-09-08

Family

ID=87864736

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310992534.6A Pending CN116723170A (en) 2023-08-08 2023-08-08 Method, device, equipment and medium for generating unique identifier of mobile terminal equipment

Country Status (1)

Country Link
CN (1) CN116723170A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103488920A (en) * 2013-09-24 2014-01-01 北京深思数盾科技有限公司 Implementation method and system of wireless information safety device
US20160028699A1 (en) * 2013-03-13 2016-01-28 Jumpto Media Inc. Encrypted network storage space
CN109413115A (en) * 2018-12-29 2019-03-01 中国银行股份有限公司 Version of an agreement analytic method and system
CN109992504A (en) * 2019-03-07 2019-07-09 苏州浪潮智能科技有限公司 A kind of server Redfish test method, system, terminal and storage medium
CN114064732A (en) * 2021-11-26 2022-02-18 上海汇付数据服务有限公司 Method and system for generating unique identifier of equipment
CN116244764A (en) * 2022-12-16 2023-06-09 南方电网数字平台科技(广东)有限公司 Method and system for generating device unique ID of Android device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160028699A1 (en) * 2013-03-13 2016-01-28 Jumpto Media Inc. Encrypted network storage space
CN103488920A (en) * 2013-09-24 2014-01-01 北京深思数盾科技有限公司 Implementation method and system of wireless information safety device
CN109413115A (en) * 2018-12-29 2019-03-01 中国银行股份有限公司 Version of an agreement analytic method and system
CN109992504A (en) * 2019-03-07 2019-07-09 苏州浪潮智能科技有限公司 A kind of server Redfish test method, system, terminal and storage medium
CN114064732A (en) * 2021-11-26 2022-02-18 上海汇付数据服务有限公司 Method and system for generating unique identifier of equipment
CN116244764A (en) * 2022-12-16 2023-06-09 南方电网数字平台科技(广东)有限公司 Method and system for generating device unique ID of Android device

Similar Documents

Publication Publication Date Title
US10972908B2 (en) Wireless network connection method, apparatus, and system
CN104683407B (en) A kind of transmission method and equipment of page data and application data
CN113259133B (en) Encryption communication method, equipment and storage medium based on HTTP protocol
CN112788012B (en) Log file encryption method and device, storage medium and electronic equipment
CN112416391A (en) System upgrading method and device, computer equipment and storage medium
CN108282484B (en) Password acquisition method and device, computer equipment and storage medium
KR102421567B1 (en) Internet access management service server capable of providing internet access management service based on terminal grouping and operating method thereof
CN111865905A (en) Ukey-based communication method, device and storage medium
CN110647738B (en) Service wind control adaptation method, device, equipment and storage medium
CN105577657A (en) SSL/TLS algorithm suite expansion method
CN116455572B (en) Data encryption method, device and equipment
CN116723170A (en) Method, device, equipment and medium for generating unique identifier of mobile terminal equipment
CN104185167A (en) Method and terminal for updating cardlock information of terminal
CN107623679B (en) Data marking processing method and device and storage medium
CN115243256A (en) Gateway dynamic login method and device
CN114492489A (en) NFC label verification system based on dynamic data
CN112632588A (en) Text encryption method and device
CN111787642B (en) Third-party application based authentication networking method and device
EP3896588B1 (en) Backlock access for logging into a computing device
CN107547518B (en) Method and device for hiding front-end password
CN109145645B (en) Method for protecting short message verification code in android mobile phone
CN106936816B (en) Method and system for inquiring and positioning
CN105306233B (en) Terminal management method and system, server and terminal
CN111131162B (en) Method and device for starting two-dimensional code display
US20240169428A1 (en) Systems and methods for processing peer-to-peer financial product markup language agency notices

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20230908