CN102915240A - Marking method of iOS (Internetwork Operating System) device - Google Patents

Marking method of iOS (Internetwork Operating System) device Download PDF

Info

Publication number
CN102915240A
CN102915240A CN2012103432258A CN201210343225A CN102915240A CN 102915240 A CN102915240 A CN 102915240A CN 2012103432258 A CN2012103432258 A CN 2012103432258A CN 201210343225 A CN201210343225 A CN 201210343225A CN 102915240 A CN102915240 A CN 102915240A
Authority
CN
China
Prior art keywords
ios
index
value
operating system
unappropriated
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
CN2012103432258A
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.)
Beijing Gridsum Technology Co Ltd
Original Assignee
Beijing Gridsum 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 Beijing Gridsum Technology Co Ltd filed Critical Beijing Gridsum Technology Co Ltd
Priority to CN2012103432258A priority Critical patent/CN102915240A/en
Publication of CN102915240A publication Critical patent/CN102915240A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention relates to a marking method of an iOS (Internetwork Operating System) device, belonging to the technical field of mobile application. The marking method comprises the following steps that: firstly whether the ID (Identity) of the iOS device is cached in the operation system cache of the iOS device or not is checked, if so, the ID of the iOS device is used, and the operation is ended; or else the next step is executed; an identifier is defined and is provided with a conventional value; a value which occurs most frequently and M vacant indexes are checked in the conventional values +0 to N of the identifier in a pasteboard of the operation system of the iOS device, if vacant indexes are not found, a random number is generated, wherein the random number is the ID of the iOS device, and the operation is ended; N and M are positive integers; if the vacant indexes are found, the value occurring most frequently is stored in the pasteboard of the operation system through the vacant indexes; and the value occurring most frequently is cached, and the value is the ID of the iOS device.

Description

A kind of denotation approach of iOS equipment
Technical field
The invention belongs to mobile applied technical field, be specifically related to a kind of denotation approach of iOS equipment.
Background technology
IOS equipment has referred to install the hardware device of iOS operating system, and such as iPad, iPhone etc., iOS are the handheld equipment operating systems by Apple's exploitation.In the prior art, for unique sign iOS equipment, general method is to read the hardware relevant information, such as equipment Serial Number, and mac address of nic, the information such as UDID.These information relate to privacy of user, and official of Apple does not advise that the developer reads these information.Although iOS6 has had replacement scheme, still there are a large amount of iOS5 users and a small amount of iOS4 user at present, and not all equipment can both be upgraded to iOS6.
Summary of the invention
For the defective that exists in the prior art, technical matters to be solved by this invention provides a kind of denotation approach that does not read the iOS equipment of hardware information.
For solving the problems of the technologies described above, the technical solution used in the present invention is as follows:
A kind of denotation approach of iOS equipment may further comprise the steps:
(1) searches whether buffer memory is crossed this iOS device id in the iOS device operating system buffer memory, in this way, then use this iOS device id, finish; Otherwise execution next step;
(2) identifier of definition, and be assigned to about definite value of described identifier;
(3) in the pasting boards of iOS device operating system, search about definite value+" 0 " of described identifier to " N " middle occurrence number maximum value and M unappropriated index, if do not find unappropriated index, then generate a random number, described random number is the ID of described iOS equipment, finishes; Described N and M are positive integer;
If find unappropriated index, then be stored in the pasting boards of operating system with the described unappropriated index value that occurrence number is maximum;
(4) the maximum value of buffer memory occurrence number, this value is the iOS device id.
The denotation approach of aforesaid iOS equipment, about definite value type is character string or numeral described in the step (2).
The denotation approach of aforesaid iOS equipment, in the step (3), described unappropriated index quantity M is two.
The denotation approach of aforesaid iOS equipment, in the step (3), described N 〉=50 * M.
The denotation approach of aforesaid iOS equipment, in the step (3), generate random number after, described random number is stored in the index of the buffer memory of operating system and pasting boards.
The denotation approach of aforesaid iOS equipment wherein, after random number is stored in the index of pasting boards, but is YES with the persistence setup of attribute of described index.
The denotation approach of aforesaid iOS equipment wherein, after maximum values is stored in the operating system pasting boards with occurrence number with unappropriated index, but is YES with the persistence setup of attribute of described index.
Adopt the method for the invention, can be in the situation that does not read hardware information unique sign iOS equipment, and have fault-tolerance.Fault-tolerance be mainly manifested in device flag to be found by redundant storage in a plurality of keys of system's pasting boards, get the maximum value of occurrence number as the unique sign of equipment, avoided because the situation that some accidents cause the part key assignments to lose or be tampered.Because device id is to be buffered in system's pasting boards, even application software still can remain after deleted, after being installed again, the application software of other new installations or this application software still may be read into original device id.
Description of drawings
Fig. 1 is the denotation approach process flow diagram of iOS equipment in the embodiment.
Embodiment
Below in conjunction with accompanying drawing the specific embodiment of the present invention is described in detail.
As shown in Figure 1, do not read hardware information sign iOS device, method in the present embodiment, may further comprise the steps:
(1) searches whether buffer memory is crossed this iOS device id in the iOS device operating system buffer memory, in this way, then use this iOS device id, finish; Otherwise execution next step.
(2) identifier udidkey of definition can be character string or numeric type, is assigned to the value of an agreement of udidkey, take character string as example: " com.gridsum.tracker.udid ".
The purpose of definition identifier udidkey is for the subsequent step storage and searches random number uuid that because system's pasting boards is a public place, other programs also can be accessed, so identifier udidkey also is in order to isolate with other programs.
(3) in system's pasting boards, about definite value+" 0 " of searching identifier occurrence number not worth any more than in " N " is namely found out the maximum value of occurrence number in the value of com.gridsum.tracker.udid0 to com.gridsum.tracke r.udidN.Simultaneously, search M unappropriated index.
If do not find unappropriated index, then generate a random number uuid, be stored among the udidkey+ " 0 ", this random number uuid is unique sign of iOS equipment, finishes.After generating random number uuid, described random number is stored in the index of the buffer memory of operating system and pasting boards, but and is YES with the persistence setup of attribute of described index.
If find unappropriated index, then be stored in system's pasting boards with this index value that occurrence number is maximum, but and the persistence attribute (persistent) of system's pasting boards be set to YES.This is can to get off by persistence for the value that the system that is stored in is pasted in the version, otherwise data will be cleared behind the powered-down.
Seeking unappropriated index quantity M can be one, also can be two or more.In order to strengthen fault-tolerance, avoid losing or being tampered because certain operations causes index value, preferred, select more than two unappropriated index to store the maximum value of occurrence number, carry out redundancy backup.Described N and M are positive integer, and be preferred, when M=1, and N 〉=50; When M=2, N 〉=100; Be N 〉=50 * M.In the present embodiment, M=2, N=100.
For example: suppose that the data mode in the present system pasting boards is as follows:
Key Value
com.gridsum.tracke r.udid0 1234567
com.gridsum.tracke r.udid1 1234567
com.gridsum.tracker.udid2 abcdefg
com.gridsum.tracke r.udid3 1234567
com.gridsum.tracke r.udid5 1234567
The value that occurrence number is maximum in system's pasting boards is that 1234567, two unappropriated index are respectively com.gridsum.tracker.udid4 and com.gridsum.tracker.udid6.
After executing this step, the data mode in system's pasting boards is as follows:
Key Value
com.gridsum.tracker.udid0 1234567
com.gridsum.tracker.udid1 1234567
com.gridsum.tracker.udid2 abcdefg
com.gridsum.tracker.udid3 1234567
com.gridsum.tracker.udid4 1234567
com.gridsum.tracker.udid5 1234567
com.gridsum.tracker.udid6 1234567
(4) the maximum value of buffer memory occurrence number in operating system, this value is the ID of iOS equipment.
Obviously, those skilled in the art can carry out various changes and modification to the present invention and not break away from the spirit and scope of the present invention.Like this, if of the present invention these are revised and modification belongs within the scope of claim of the present invention and equivalent technology thereof, then the present invention also is intended to comprise these changes and modification interior.

Claims (8)

1. the denotation approach of an iOS equipment may further comprise the steps:
(1) searches whether buffer memory is crossed this iOS device id in the iOS device operating system buffer memory, in this way, then use this iOS device id, finish; Otherwise execution next step;
(2) identifier of definition, and be assigned to about definite value of described identifier;
(3) in the pasting boards of iOS device operating system, search about definite value+" 0 " of described identifier to " N " middle occurrence number maximum value and M unappropriated index, if do not find unappropriated index, then generate a random number, described random number is the ID of described iOS equipment, finishes; Described N and M are positive integer;
If find unappropriated index, then be stored in the pasting boards of operating system with the described unappropriated index value that occurrence number is maximum;
(4) the maximum value of buffer memory occurrence number, this value is the iOS device id.
2. the denotation approach of iOS equipment as claimed in claim 1, it is characterized in that: about definite value type is character string described in the step (2).
3. the denotation approach of iOS equipment as claimed in claim 1 is characterized in that: about definite value type described in the step (2) is numeral.
4. such as the denotation approach of each described iOS equipment in the claim 1 ~ 3, it is characterized in that: in the step (3), described unappropriated index quantity M is two.
5. such as the denotation approach of each described iOS equipment in the claim 1 ~ 3, it is characterized in that: in the step (3), described N 〉=50 * M.
6. such as the denotation approach of each described iOS equipment in the claim 1 ~ 3, it is characterized in that: in the step (3), generate random number after, described random number is stored in the index of the buffer memory of operating system and pasting boards.
7. the denotation approach of iOS equipment as claimed in claim 6 is characterized in that: after random number is stored in the index of pasting boards, but be YES with the persistence setup of attribute of described index.
8. such as the denotation approach of each described iOS equipment in the claim 1 ~ 3, it is characterized in that: after maximum values is stored in the operating system pasting boards with occurrence number with unappropriated index, but be YES with the persistence setup of attribute of described index.
CN2012103432258A 2012-09-14 2012-09-14 Marking method of iOS (Internetwork Operating System) device Pending CN102915240A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2012103432258A CN102915240A (en) 2012-09-14 2012-09-14 Marking method of iOS (Internetwork Operating System) device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2012103432258A CN102915240A (en) 2012-09-14 2012-09-14 Marking method of iOS (Internetwork Operating System) device

Publications (1)

Publication Number Publication Date
CN102915240A true CN102915240A (en) 2013-02-06

Family

ID=47613614

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2012103432258A Pending CN102915240A (en) 2012-09-14 2012-09-14 Marking method of iOS (Internetwork Operating System) device

Country Status (1)

Country Link
CN (1) CN102915240A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107092503A (en) * 2017-03-28 2017-08-25 武汉斗鱼网络科技有限公司 The method and system that mobile terminal small data UUID is permanently stored
CN113556797A (en) * 2021-06-29 2021-10-26 深圳市闪联信息技术有限公司 Method and system for quickly establishing connection between mobile equipment and large-screen equipment
CN114491680A (en) * 2021-12-28 2022-05-13 山东赤子城网络技术有限公司 Method and system for obtaining unique identifier of iOS terminal equipment

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
YLECHELLE: "《OpenUDID.h》", 《OPENUDID.H》 *
YLECHELLE: "《OpenUDID.m》", 《OPENUDID.M》 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107092503A (en) * 2017-03-28 2017-08-25 武汉斗鱼网络科技有限公司 The method and system that mobile terminal small data UUID is permanently stored
CN113556797A (en) * 2021-06-29 2021-10-26 深圳市闪联信息技术有限公司 Method and system for quickly establishing connection between mobile equipment and large-screen equipment
CN114491680A (en) * 2021-12-28 2022-05-13 山东赤子城网络技术有限公司 Method and system for obtaining unique identifier of iOS terminal equipment
CN114491680B (en) * 2021-12-28 2023-03-24 山东赤子城网络技术有限公司 Method and system for obtaining unique identifier of iOS terminal equipment

Similar Documents

Publication Publication Date Title
CN111090628B (en) Data processing method and device, storage medium and electronic equipment
CN103379159B (en) A kind of method that distributed Web station data synchronizes
CN103608809B (en) Recommending data is enriched with
CN103268201B (en) A kind of date storage method, memory storage and read method
CN102866958B (en) Method and device for accessing dispersed internal memory
CN104731896A (en) Data processing method and system
US11048423B2 (en) Method and system for synchronizing requests related to key-value storage having different portions
CN103810212A (en) Automated database index creation method and system
CN103902702A (en) Data storage system and data storage method
CN103166911A (en) Version management server authority management method and version management server authority management equipment
US20120158742A1 (en) Managing documents using weighted prevalence data for statements
CN110750372B (en) Log system and log management method based on shared memory
CN105389367A (en) Power network graphic multi-tense and multi-level distributed storage method based on Mongo database
CN103473326A (en) Method and device providing searching advices
CN103853714A (en) Data processing method and device
CN104572845A (en) File distribution method and device, equipment and system
CN103714086A (en) Method and device used for generating non-relational data base module
CN104881454A (en) Updating method and system of parameter
CN111143231B (en) Method, apparatus and computer program product for data processing
CN106897338A (en) A kind of data modification request processing method and processing device for database
CN102959548A (en) Data storage method, search method and device
CN102915240A (en) Marking method of iOS (Internetwork Operating System) device
CN105224418A (en) A kind of data back up method and device
EP3343395A1 (en) Data storage method and apparatus for mobile terminal
CN104021085A (en) Mobile terminal internal memory cleaning method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C12 Rejection of a patent application after its publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20130206