CN114064732A - Method and system for generating unique identifier of equipment - Google Patents

Method and system for generating unique identifier of equipment Download PDF

Info

Publication number
CN114064732A
CN114064732A CN202111421787.5A CN202111421787A CN114064732A CN 114064732 A CN114064732 A CN 114064732A CN 202111421787 A CN202111421787 A CN 202111421787A CN 114064732 A CN114064732 A CN 114064732A
Authority
CN
China
Prior art keywords
character string
unique identifier
identifier
read
equipment
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
CN202111421787.5A
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.)
Shanghai Huifu Data Service Co ltd
Original Assignee
Shanghai Huifu Data Service 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 Shanghai Huifu Data Service Co ltd filed Critical Shanghai Huifu Data Service Co ltd
Priority to CN202111421787.5A priority Critical patent/CN114064732A/en
Publication of CN114064732A publication Critical patent/CN114064732A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • G06F16/24552Database cache management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • G06F16/90335Query processing
    • G06F16/90344Query processing by using string matching techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Computational Linguistics (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • Telephone Function (AREA)

Abstract

The invention discloses a method and a system for generating a unique identifier of equipment. The technical scheme is as follows: the method comprises the following steps: step 1: acquiring the equipment identifier through the cross-application cache, and directly jumping to the step 4 if the equipment identifier is successfully acquired and accords with a rule taking a preset character as a starting field; step 2: generating a character string serving as a unique identifier of the device based on the acquired device identifier; and step 3: caching the character string used as the unique identifier of the equipment generated in the step 2 through cross-application caching; and 4, step 4: and outputting the character string generated in the step 2 or obtained in the step 1 as a device unique identifier to be supplied to a service party for use.

Description

Method and system for generating unique identifier of equipment
Technical Field
The invention relates to a generation technology of an equipment identifier, in particular to a method and a system for generating a unique identifier of mobile equipment through software and hardware information, which are applied to the fields of mobile terminal development, mobile payment wind control, user data analysis and the like.
Background
With the importance of the country and the individual on information security, the identifiers which are universally used in the industry and uniquely identify the mobile equipment, such as IMEI, Mac address, IDFA and other information, are prohibited to be read; if information such as UUID provided by a third party is used, the risk that the information is replaced or replaced and the APP Store refuses to put on the shelf can exist, the user equipment cannot be uniquely identified, further, the transaction behaviors cannot be monitored in real time, fraud cannot be accurately identified, and the like, so that the risks in the aspects of asset loss, policy supervision and the like are caused.
In view of this, in order to ensure the fund and transaction security of platform users and comply with policy monitoring and supervision rules, the industry needs to independently develop a set of unique device identifiers capable of enabling the companies to share APPs on the premise of complying with relevant information security regulations, so as to meet the relevant requirements in the fields of mobile terminal development, mobile transaction wind control, user data analysis, and the like.
Disclosure of Invention
The following presents a simplified summary of one or more aspects in order to provide a basic understanding of such aspects. This summary is not an extensive overview of all contemplated aspects, and is intended to neither identify key or critical elements of all aspects nor delineate the scope of any or all aspects. Its sole purpose is to present some concepts of one or more aspects in a simplified form as a prelude to the more detailed description that is presented later.
The invention aims to solve the problems and provides a method and a system for generating a unique identifier of equipment, wherein the unique identifier of mobile equipment is generated through software and hardware information, data sharing among applications in a platform is realized through the unique identifier of the mobile equipment, a mobile terminal is helped to develop to identify the mobile equipment, and the unique identifier can be used for guaranteeing wind control in the aspect of payment transaction and analysis of key measurement indexes, including conversion rate (CVR), average income per user (ARPU) and the like after being uploaded to a background.
The technical scheme of the invention is as follows: the invention discloses a method for generating a unique identifier of equipment, which comprises the following steps:
step 1: acquiring the equipment identifier through the cross-application cache, and directly jumping to the step 4 if the equipment identifier is successfully acquired and accords with a rule taking a preset character as a starting field;
step 2: generating a character string serving as a unique identifier of the device based on the acquired device identifier;
and step 3: caching the character string used as the unique identifier of the equipment generated in the step 2 through cross-application caching;
and 4, step 4: and outputting the character string generated in the step 2 or obtained in the step 1 as a device unique identifier to be supplied to a service party for use.
According to an embodiment of the method for generating the unique identifier of the device, the cross-application cache is to cache data including the device identifier into the public key string through a SecKeychain interface of the IOS system.
According to an embodiment of the method for generating a unique identifier of a device of the present invention, step 2 further includes:
generating a universal unique identification code character string based on the device identifier obtained in the step 1 through an IOS system interface;
providing a preset character prefix for the universal unique identification code character string;
and acquiring the equipment code through an IOS system interface and adding the equipment code to the rearmost part of the universal unique identification code character string to form a three-section type long string without character string separation by taking a preset character prefix as a starting point, centering the universal unique identification code and stopping the equipment code as a character string of the equipment unique identifier.
The invention also discloses a method for generating the unique identifier of the equipment, which comprises the following steps:
step 1: reading the character string content in an external storage designated file, judging whether the read character string meets the condition, if so, synchronizing the read character string to the designated file and the designated keyword in the sharing option storage mode, then returning the read character string in advance, and ending the whole process;
step 2: if the character string read in the step 1 does not meet the condition, continuing to read the designated file in the sharing option storage mode and the key value character string corresponding to the designated keyword, if the key value character string read in the step 2 meets the condition, then synchronously writing the key value character string read in the step 2 into the external storage designated file, checking whether the corresponding access authority to the external storage exists before writing into the external storage designated file, if not, not doing the writing operation, and returning the key value character string read in the step 2 in advance;
and step 3: and if the key value character string read in the step 2 does not meet the condition, creating a character string starting with a preset character, performing splicing and encryption processing on a plurality of fields based on the equipment mark acquired from the android system to form a final format of the unique identifier of the equipment, and synchronizing the value of the final format into a specified file directory and a specified keyword in a shared option storage mode and an external storage specified file.
According to an embodiment of the method for generating the unique identifier of the device, a specified file path is created in an external storage in advance, the specified file path includes a field of a customized keyword, a key value of the keyword is output in a character string form, and the condition in step 1 is to judge whether the character string is empty and conforms to a pre-established beginning format.
According to an embodiment of the method for generating a unique identifier of a device of the present invention, the splicing and encryption process of the multiple fields in step 3 further includes:
firstly, the first splicing is carried out through fields including time stamps, models, device hardware names or device hardware identification codes and device marks, then the content after the first splicing is encrypted through md5, the encrypted character strings are generated and then spliced again with the character strings which are created before and begin with preset characters, and the final format of the unique identifier of the device is formed.
The invention also discloses a system for generating the unique identifier of the equipment, which comprises the following components:
the device identifier acquisition module is configured to acquire a device identifier through the cross-application cache, and directly skip to the device unique identifier output module if the device identifier is successfully acquired and meets a rule with a preset character as a starting field;
a device unique identifier generation module configured to generate a character string serving as a device unique identifier based on the device identifier acquired by the device identifier acquisition module;
a device unique identifier caching module configured to cache the character string serving as the device unique identifier generated by the device unique identifier generating module by cross-application caching;
and the device unique identifier output module is configured to output the character string generated by the device unique identifier generation module or acquired by the device identifier acquisition module, and the character string is provided for the service party as the device unique identifier.
According to an embodiment of the system for generating the unique identifier of the device, the cross-application caching is to cache data including the device identifier into the public key string through a SecKeychain interface of the IOS system.
According to an embodiment of the system for generating a device unique identifier of the present invention, the device unique identifier generating module is further configured to perform the following processes:
generating a universal unique identification code character string based on the equipment identifier acquired by the equipment identifier acquisition module through an IOS system interface;
providing a preset character prefix for the universal unique identification code character string;
and acquiring the equipment code through an IOS system interface and adding the equipment code to the rearmost part of the universal unique identification code character string to form a three-section type long string without character string separation by taking a preset character prefix as a starting point, centering the universal unique identification code and stopping the equipment code as a character string of the equipment unique identifier.
The invention also discloses a system for generating the unique identifier of the equipment, which comprises the following components:
the external storage appointed file processing module is configured to read the character string content in the external storage appointed file, judge whether the read character string meets the condition, if so, synchronize the read character string to the appointed file and the appointed keyword in the sharing option storage mode, then return the read character string in advance, and the whole process is finished;
the sharing option storage processing module is configured to continue to read the designated file and the key value character string corresponding to the designated keyword in the sharing option storage mode if the character string read by the external storage designated file processing module does not meet the condition, and then synchronously write the key value character string read by the sharing option storage processing module into the external storage designated file if the key value character string read by the sharing option storage processing module meets the condition, check whether the corresponding access authority to the external storage exists before the key value character string is written into the external storage designated file, and if the key value character string does not meet the authority, do not perform writing operation and return the key value character string read by the sharing option storage processing module in advance;
and the device unique identifier creating module is configured to create a character string starting with a preset character if the key-value character string read from the sharing option storage processing module does not meet the condition, perform splicing and encryption processing on a plurality of fields based on the device mark acquired from the android system to form a final format of the device unique identifier, and synchronize the value of the final format into a specified file directory and a specified keyword in a sharing option storage mode and an external storage specified file.
According to an embodiment of the system for generating the unique device identifier of the present invention, in the external storage designated file processing module, a designated file path is created in advance in the external storage, the designated file path includes a field of a custom keyword, a key value of the keyword is output in a form of a character string, and a condition in the external storage designated file processing module is to determine whether the character string is empty and conforms to a predetermined beginning format.
According to an embodiment of the system for generating a device unique identifier of the present invention, the process of splicing and encrypting the plurality of fields in the device unique identifier creation module further includes:
firstly, the first splicing is carried out through fields including time stamps, models, device hardware names or device hardware identification codes and device marks, then the content after the first splicing is encrypted through md5, the encrypted character strings are generated and then spliced again with the character strings which are created before and begin with preset characters, and the final format of the unique identifier of the device is formed.
Compared with the prior art, the invention has the following beneficial effects: in the method, on one hand, sharing of the Unique Identifier Device ID of the mobile equipment among the APPs in the platform is realized through a cross-application cache technology, on the other hand, in different operating systems, the Unique effect of the platform data is realized in a mode that the Unique Identifier Device ID is mutually isolated from the data cached by other platforms by using respective preset characters as prefixes and using generated UUID (Universal Unique Identifier) character strings as middle sections and equipment codes as tail parts.
Drawings
The above features and advantages of the present disclosure will be better understood upon reading the detailed description of embodiments of the disclosure in conjunction with the following drawings. In the drawings, components are not necessarily drawn to scale, and components having similar relative characteristics or features may have the same or similar reference numerals.
Fig. 1 shows a flow chart of a first embodiment of the method of generating a device unique identifier of the present invention.
Fig. 2 shows a flow chart of a second embodiment of the method of generating a device unique identifier of the present invention.
Fig. 3 is a block diagram showing a first embodiment of the system for generating a unique identifier of a device of the present invention.
Fig. 4 is a block diagram showing a second embodiment of the system for generating a unique identifier of a device of the present invention.
Detailed Description
The invention is described in detail below with reference to the figures and specific embodiments. It is noted that the aspects described below in connection with the figures and the specific embodiments are only exemplary and should not be construed as imposing any limitation on the scope of the present invention.
Fig. 1 shows a flow of a first embodiment of the method of generating a device unique identifier of the present invention. In this embodiment, an implementation of the present invention in an IOS operating system is described as an example.
Step 1: by obtaining the device identifier across the application caching techniques, if the device identifier is successfully obtained and it complies with the rule starting with the 'i.' string, then jump directly to step 4.
The cross-application caching technique is to cache data including a device identifier into a public key string through the seckeyhain interface of the system.
If the acquired character string conforms to the rule with the 'i.' character string as the starting field, it means that the Device unique identifier Device ID is read in this step.
In this embodiment, the character string of 'i.' is taken as the start field only as an example, and in other embodiments, other preset characters can be taken as the start field.
Step 2: based on the acquired Device identifier, a character string serving as a Device unique identifier Device ID is generated.
The step 2 further comprises three steps of processing, each as follows.
Step 2 a: and generating a Universal Unique Identifier (UUID) character string based on the device identifier acquired in the step 1 through a system interface.
Specifically, in step 2a, a UUID string of 32-bit characters is generated by calling the IOS system interface CFUUIDCreate.
And step 2 b: a prefix of 'i.' is provided for the UUID string.
In this embodiment, the prefix of 'i.' is provided for the UUID string only as an example, and in other embodiments, other preset characters may be used to provide the prefix for the UUID string.
And step 2 c: and acquiring the equipment code through a system interface, and adding the equipment code to the rearmost part of the UUID character string to form a three-section long string with the start of 'i.', the UUID middle and the equipment code end and without character string separation.
The device code in step 2c, that is, the model (model) information of the device itself, is obtained through the IOS system API syscllbyname function, and the result is a character string, for example: iPhone11, 8.
The Device ID generated in step 2 is added with the model information (i.e., the Device code number) of the Device itself, compared with the Device ID obtained in step 1.
And step 3: the character string generated in step 2 serving as the Device unique identifier Device ID is cached by applying a caching technique across applications.
And 4, step 4: and outputting the character string generated in the step 2 or obtained in the step 1 as a Device unique identifier (Device ID) to be supplied to a service party.
Fig. 2 shows a flow of a second embodiment of the method of generating a device unique identifier of the present invention. In this embodiment, an implementation of the present invention in an Android operating system is described as an example.
Step 1: reading the character string content in the external storage designated file, judging whether the read character string meets the conditions (the conditions are that the character string is not empty and meets the preset initial format), if so, synchronizing the read character string to the designated file and the designated key in the Shared Preferences storage mode, returning the read character string in advance, and ending the whole process.
For example, a specified file path is created in advance in the external storage, the BUFFERED _ FINAL _ UDID _ KEY in the file path is specified as a custom part, and the KEY value of the KEY is output in the form of a character string, and it is determined whether the character string is empty and conforms to a predetermined beginning format, such as whether it is a character string that begins with' a. In this embodiment, the 'a.' character string is taken as the start field only as an example, and in other embodiments, other preset characters may be taken as the start field.
If the character string read from the user-defined keyword (BUFFERED _ FINAL _ UDID _ KEY) as the KEY value is not empty and conforms to the pre-established beginning format, synchronizing the KEY value (i.e. the character string) to the specified file and the specified keyword in the Shared Preferences storage mode, and then returning the read character string in advance, and ending the whole process.
The sharing options (Shared Preferences) are a lightweight storage class on the Android platform, are used for storing some common configurations of applications, and are suitable for storing lightweight data. It is divided into multiple authorities and can share access globally.
In this step, the purpose of synchronizing to the specified file and the specified keyword key in the Shared Preferences storage mode is to prevent the APP from still being able to acquire the stored content when the externally stored content is deleted objectively.
Step 2: if the character string read in the step 1 does not meet the condition (that is, the condition that the character string is not empty and meets the preset starting format is not met), continuing to read the key-value character string corresponding to the designated file and the designated key in the Shared Preferences storage mode, if the key-value character string read in the step 2 meets the condition (that is, the condition that the character string is not empty and meets the preset starting format is met), then synchronously writing the key-value character string read in the step 2 into the external storage designated file, checking whether the corresponding access authority to the external storage exists before the key-value character string is written into the external storage designated file, and if the access authority does not exist, not doing the writing operation, and returning the key-value character string stored in the Shared Preferences read in the step 2 in advance.
And step 3: if the key-value character string read in the step 2 does not meet the condition (namely, does not meet the condition that the character string is not empty and meets the preset starting format), a character string starting with 'A.' is created, a format of a final unique identifier of the equipment is formed after splicing and encryption processing is carried out on a plurality of fields based on ANDROID _ ID (equipment mark, equipment ID which is easily accessed by an ANDROID system and provided for an application) acquired from the system, the value of the final format is synchronized into a specified file directory and a specified key (key) in a Shared Preferences storage mode, and the specified file is stored externally.
Similarly, in the above processing, the a.' character string is taken as the start field only as an example, and in other embodiments, other preset characters may be taken as the start field.
The value of the ANDROID _ ID is changed with the ANDROID system, is an ID unique to the ANDROID system, is a 64-bit number randomly generated when the ANDROID system is started for the first time, and also changes after the system is refreshed, and meanwhile, a manufacturer customizes a Bug of the system to cause different devices to possibly generate the same ANDROID _ ID, and the ANDROID _ ID acquired by some devices is null.
In consideration of the above situation, the other fields are first spliced with the ANDROID _ ID (the other fields are combinations of timestamps, models, device hardware names, and device hardware identifiers, for example), then the spliced contents of the fields are encrypted by md5, and after a 32-bit encrypted string is generated, the string is spliced with the previously created string beginning with 'a.', so as to form the final format of the device unique identifier: "a" (32-bit string generated by md5 encryption) ".
The synchronization to the external storage designated file is to achieve that the same unique mark can be obtained by using an SDK (software development kit) or an APP under the generation mode, and the synchronization to the external storage designated file is stored in the designated file directory and the keywords of the SP to prevent the external storage file from having no content due to the problems of authority and the like and further being read from the current private directory.
Fig. 3 shows the structure of a first embodiment of the system for generating a unique identifier of a device of the present invention. Referring to fig. 3, the system of the present embodiment includes: the device comprises a device identifier acquisition module, a device unique identifier generation module, a device unique identifier caching module and a device unique identifier output module.
The device identifier acquisition module is configured to acquire the device identifier through the cross-application cache, and if the device identifier acquisition is successful and the device identifier acquisition conforms to a rule with a preset character as a starting field, directly jumping to the device unique identifier output module. The cross-application caching is to cache data including the device identifier into a public key string through a SecKeychain interface of the IOS system
The device-unique-identifier generating module is configured to generate a character string serving as a device unique identifier based on the device identifier acquired by the device-identifier acquiring module.
The device unique identifier generation module is further configured to perform the following: generating a universal unique identification code character string based on the equipment identifier acquired by the equipment identifier acquisition module through an IOS system interface; providing a preset character prefix for the universal unique identification code character string; and acquiring the equipment code through an IOS system interface and adding the equipment code to the rearmost part of the universal unique identification code character string to form a three-section type long string without character string separation by taking a preset character prefix as a starting point, centering the universal unique identification code and stopping the equipment code as a character string of the equipment unique identifier.
The device unique identifier caching module is configured to cache the character string used as the device unique identifier generated by the device unique identifier generating module across applications.
The device unique identifier output module is configured to output the character string generated by the device unique identifier generation module or acquired by the device identifier acquisition module for use as the device unique identifier for provision to the service party.
Fig. 4 shows the structure of a second embodiment of the system for generating a unique identifier of a device of the present invention. Referring to fig. 4, the system of the present embodiment includes: the device comprises an external storage designated file processing module, a sharing option storage processing module and a device unique identifier creating module.
The external storage appointed file processing module is configured to read character string contents in the external storage appointed file, judge whether the read character strings meet conditions, synchronize the read character strings to the appointed file and the appointed keywords in the sharing option storage mode if the read character strings meet the conditions, then return the read character strings in advance, and the whole process is finished.
In the external storage designated file processing module, a designated file path is created in the external storage in advance, the designated file path comprises a field of a self-defined keyword, a key value of the keyword is output in a character string form, and the condition in the external storage designated file processing module is that whether the character string is empty or not is judged and the character string conforms to a pre-established starting format.
The sharing option storage processing module is configured to continue to read the designated file and the key value character string corresponding to the designated keyword in the sharing option storage mode if the character string read by the external storage designated file processing module does not meet the condition, and then synchronously write the key value character string read by the sharing option storage processing module into the external storage designated file if the key value character string read by the sharing option storage processing module meets the condition, check whether the corresponding access authority to the external storage exists before the key value character string is written into the external storage designated file, and if the key value character string does not meet the authority, do not perform the writing operation and return the key value character string read by the sharing option storage processing module in advance.
The device unique identifier creating module is configured to create a character string starting with a preset character if the key value character string read from the sharing option storage processing module does not meet the condition, form a final format of the device unique identifier after splicing and encrypting a plurality of fields based on the device identifier obtained from the android system, and synchronize the value of the final format into a specified file directory and a specified keyword in a sharing option storage mode and an external storage specified file.
The process of splicing and encrypting the plurality of fields in the device unique identifier creation module further comprises:
firstly, the first splicing is carried out through fields including time stamps, models, device hardware names or device hardware identification codes and device marks, then the content after the first splicing is encrypted through md5, the encrypted character strings are generated and then spliced again with the character strings which are created before and begin with preset characters, and the final format of the unique identifier of the device is formed.
While, for purposes of simplicity of explanation, the methodologies are shown and described as a series of acts, it is to be understood and appreciated that the methodologies are not limited by the order of acts, as some acts may, in accordance with one or more embodiments, occur in different orders and/or concurrently with other acts from that shown and described herein or not shown and described herein, as would be understood by one skilled in the art.
Those of skill would further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both. To clearly illustrate this interchangeability of hardware and software, various illustrative components, blocks, modules, circuits, and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the overall system. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The various illustrative logical blocks, modules, and circuits described in connection with the embodiments disclosed herein may be implemented or performed with a general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination thereof designed to perform the functions described herein. A general purpose processor may be a microprocessor, but in the alternative, the processor may be any conventional processor, controller, microcontroller, or state machine. A processor may also be implemented as a combination of computing devices, e.g., a combination of a DSP and a microprocessor, a plurality of microprocessors, one or more microprocessors in conjunction with a DSP core, or any other such configuration.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium. In the alternative, the storage medium may be integral to the processor. The processor and the storage medium may reside in an ASIC. The ASIC may reside in a user terminal. In the alternative, the processor and the storage medium may reside as discrete components in a user terminal.
In one or more exemplary embodiments, the functions described may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software as a computer program product, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage media may be any available media that can be accessed by a computer. By way of example, and not limitation, such computer-readable media can comprise RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer. Any connection is properly termed a computer-readable medium. For example, if the software is transmitted from a web site, server, or other remote source using a coaxial cable, fiber optic cable, twisted pair, Digital Subscriber Line (DSL), or wireless technologies such as infrared, radio, and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of medium. Disk (disk) and disc (disc), as used herein, includes Compact Disc (CD), laser disc, optical disc, Digital Versatile Disc (DVD), floppy disk and blu-ray disc where disks (disks) usually reproduce data magnetically, while discs (discs) reproduce data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media.
The previous description of the disclosure is provided to enable any person skilled in the art to make or use the disclosure. Various modifications to the disclosure will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other variations without departing from the spirit or scope of the disclosure. Thus, the disclosure is not intended to be limited to the examples and designs described herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (12)

1. A method for generating a unique identifier for a device, the method comprising:
step 1: acquiring the equipment identifier through the cross-application cache, and directly jumping to the step 4 if the equipment identifier is successfully acquired and accords with a rule taking a preset character as a starting field;
step 2: generating a character string serving as a unique identifier of the device based on the acquired device identifier;
and step 3: caching the character string used as the unique identifier of the equipment generated in the step 2 through cross-application caching;
and 4, step 4: and outputting the character string generated in the step 2 or obtained in the step 1 as a device unique identifier to be supplied to a service party for use.
2. The method of claim 1, wherein the cross-application caching is performed by caching data including the device identifier into a public key string through a SecKeychain interface of the IOS system.
3. The method for generating the unique identifier of the device according to claim 1, wherein the step 2 further comprises:
generating a universal unique identification code character string based on the device identifier obtained in the step 1 through an IOS system interface;
providing a preset character prefix for the universal unique identification code character string;
and acquiring the equipment code through an IOS system interface and adding the equipment code to the rearmost part of the universal unique identification code character string to form a three-section type long string without character string separation by taking a preset character prefix as a starting point, centering the universal unique identification code and stopping the equipment code as a character string of the equipment unique identifier.
4. A method for generating a unique identifier for a device, the method comprising:
step 1: reading the character string content in an external storage designated file, judging whether the read character string meets the condition, if so, synchronizing the read character string to the designated file and the designated keyword in the sharing option storage mode, then returning the read character string in advance, and ending the whole process;
step 2: if the character string read in the step 1 does not meet the condition, continuing to read the designated file in the sharing option storage mode and the key value character string corresponding to the designated keyword, if the key value character string read in the step 2 meets the condition, then synchronously writing the key value character string read in the step 2 into the external storage designated file, checking whether the corresponding access authority to the external storage exists before writing into the external storage designated file, if not, not doing the writing operation, and returning the key value character string read in the step 2 in advance;
and step 3: and if the key value character string read in the step 2 does not meet the condition, creating a character string starting with a preset character, performing splicing and encryption processing on a plurality of fields based on the equipment mark acquired from the android system to form a final format of the unique identifier of the equipment, and synchronizing the value of the final format into a specified file directory and a specified keyword in a shared option storage mode and an external storage specified file.
5. The method according to claim 4, wherein a specified file path is created in advance in the external storage, the specified file path includes a field of a customized keyword, a key value of the keyword is output in the form of a character string, and the condition in step 1 is to determine whether the character string is empty and conforms to a pre-established beginning format.
6. The method for generating the unique identifier of the device according to claim 4, wherein the splicing and encryption process of the plurality of fields in step 3 further comprises:
firstly, the first splicing is carried out through fields including time stamps, models, device hardware names or device hardware identification codes and device marks, then the content after the first splicing is encrypted through md5, the encrypted character strings are generated and then spliced again with the character strings which are created before and begin with preset characters, and the final format of the unique identifier of the device is formed.
7. A system for generating a unique identifier for a device, the system comprising:
the device identifier acquisition module is configured to acquire a device identifier through the cross-application cache, and directly skip to the device unique identifier output module if the device identifier is successfully acquired and meets a rule with a preset character as a starting field;
a device unique identifier generation module configured to generate a character string serving as a device unique identifier based on the device identifier acquired by the device identifier acquisition module;
a device unique identifier caching module configured to cache the character string serving as the device unique identifier generated by the device unique identifier generating module by cross-application caching;
and the device unique identifier output module is configured to output the character string generated by the device unique identifier generation module or acquired by the device identifier acquisition module, and the character string is provided for the service party as the device unique identifier.
8. The system of claim 7, wherein the cross-application caching is performed by caching data including the device identifier into a public key string through a SecKeychain interface of the IOS system.
9. The system for generating a device unique identifier according to claim 7, wherein the device unique identifier generating module is further configured to perform the following processes:
generating a universal unique identification code character string based on the equipment identifier acquired by the equipment identifier acquisition module through an IOS system interface;
providing a preset character prefix for the universal unique identification code character string;
and acquiring the equipment code through an IOS system interface and adding the equipment code to the rearmost part of the universal unique identification code character string to form a three-section type long string without character string separation by taking a preset character prefix as a starting point, centering the universal unique identification code and stopping the equipment code as a character string of the equipment unique identifier.
10. A system for generating a unique identifier for a device, the system comprising:
the external storage appointed file processing module is configured to read the character string content in the external storage appointed file, judge whether the read character string meets the condition, if so, synchronize the read character string to the appointed file and the appointed keyword in the sharing option storage mode, then return the read character string in advance, and the whole process is finished;
the sharing option storage processing module is configured to continue to read the designated file and the key value character string corresponding to the designated keyword in the sharing option storage mode if the character string read by the external storage designated file processing module does not meet the condition, and then synchronously write the key value character string read by the sharing option storage processing module into the external storage designated file if the key value character string read by the sharing option storage processing module meets the condition, check whether the corresponding access authority to the external storage exists before the key value character string is written into the external storage designated file, and if the key value character string does not meet the authority, do not perform writing operation and return the key value character string read by the sharing option storage processing module in advance;
and the device unique identifier creating module is configured to create a character string starting with a preset character if the key-value character string read from the sharing option storage processing module does not meet the condition, perform splicing and encryption processing on a plurality of fields based on the device mark acquired from the android system to form a final format of the device unique identifier, and synchronize the value of the final format into a specified file directory and a specified keyword in a sharing option storage mode and an external storage specified file.
11. The system according to claim 10, wherein the external storage-designated file processing module is configured to create a designated file path in the external storage in advance, the designated file path includes a field of a customized keyword, a key value of the keyword is output in a form of a character string, and the external storage-designated file processing module is configured to determine whether the character string is empty and conforms to a predetermined beginning format.
12. The system for generating a unique device identifier according to claim 10, wherein the process of splicing and encrypting the plurality of fields in the unique device identifier creation module further comprises:
firstly, the first splicing is carried out through fields including time stamps, models, device hardware names or device hardware identification codes and device marks, then the content after the first splicing is encrypted through md5, the encrypted character strings are generated and then spliced again with the character strings which are created before and begin with preset characters, and the final format of the unique identifier of the device is formed.
CN202111421787.5A 2021-11-26 2021-11-26 Method and system for generating unique identifier of equipment Pending CN114064732A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111421787.5A CN114064732A (en) 2021-11-26 2021-11-26 Method and system for generating unique identifier of equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111421787.5A CN114064732A (en) 2021-11-26 2021-11-26 Method and system for generating unique identifier of equipment

Publications (1)

Publication Number Publication Date
CN114064732A true CN114064732A (en) 2022-02-18

Family

ID=80276650

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111421787.5A Pending CN114064732A (en) 2021-11-26 2021-11-26 Method and system for generating unique identifier of equipment

Country Status (1)

Country Link
CN (1) CN114064732A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115250263A (en) * 2022-07-21 2022-10-28 中国银行股份有限公司 Equipment identification method and device
CN116723170A (en) * 2023-08-08 2023-09-08 成都初心互动科技有限公司 Method, device, equipment and medium for generating unique identifier of mobile terminal equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115250263A (en) * 2022-07-21 2022-10-28 中国银行股份有限公司 Equipment identification method and device
CN116723170A (en) * 2023-08-08 2023-09-08 成都初心互动科技有限公司 Method, device, equipment and medium for generating unique identifier of mobile terminal equipment

Similar Documents

Publication Publication Date Title
US20210160053A1 (en) Merkle tree construction methods and apparatuses and simplified payment verification methods and apparatuses
CN110188096B (en) Index creating method, device and equipment for data record
CN107516038B (en) Method and device for determining device fingerprint
JP6435398B2 (en) Method and system for facilitating terminal identifiers
CN114064732A (en) Method and system for generating unique identifier of equipment
EP3813296B1 (en) Methods and apparatuses for reading blockchain data
CN110008743B (en) Data attribute identification method, device and equipment in block chain type account book
US20210158340A1 (en) Methods and apparatuses for concealing transaction written to blockchain
CN111352935B (en) Index creating method, device and equipment in block chain type account book
CN108416212A (en) Method for identifying application program and device
CN110474775B (en) User creating method, device and equipment in block chain type account book
CN110022315A (en) Weight management method, device and equipment in a kind of piece of chain type account book
TW201642156A (en) Page jumps based on text hiding
TW202040407A (en) Data verification method, system, device and equipment in block chain type account book
CN108616361B (en) Method and device for identifying uniqueness of equipment
CN104036194A (en) Vulnerability detection method and device for revealing private data in application program
CN110059088B (en) Data attribute identification method, device and equipment in block chain type account book
CN110046509B (en) Method and device for hiding transaction written into block chain
CN106990974B (en) APP updating method and device and electronic equipment
CN110750533A (en) Data storage method, device and equipment based on multiple service attributes
CN110059087B (en) Data attribute identification method, device and equipment in block chain type account book
CN110008733B (en) Method and device for hiding transaction written into block chain
CN110020547A (en) A kind of data hiding method, device and equipment
CN113486025B (en) Data storage method, data query method and device
CN110688664B (en) Authority management method, device and equipment in block chain type account book

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
CB02 Change of applicant information

Address after: 5 / F, building C5, 700 Yishan Road, Xuhui District, Shanghai, 200233

Applicant after: Shanghai HuiFu payment Co.,Ltd.

Address before: 5 / F, building C5, 700 Yishan Road, Xuhui District, Shanghai, 200233

Applicant before: SHANGHAI HUIFU DATA SERVICE Co.,Ltd.

CB02 Change of applicant information