CN112579830A - ID identification method and device - Google Patents

ID identification method and device Download PDF

Info

Publication number
CN112579830A
CN112579830A CN201910942182.7A CN201910942182A CN112579830A CN 112579830 A CN112579830 A CN 112579830A CN 201910942182 A CN201910942182 A CN 201910942182A CN 112579830 A CN112579830 A CN 112579830A
Authority
CN
China
Prior art keywords
value
storage format
storage
format
type
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
CN201910942182.7A
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 CN201910942182.7A priority Critical patent/CN112579830A/en
Publication of CN112579830A publication Critical patent/CN112579830A/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/90Details of database functions independent of the retrieved data types
    • G06F16/901Indexing; Data structures therefor; Storage structures
    • G06F16/9024Graphs; Linked lists
    • 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

Abstract

According to the ID identification method and device provided by the invention, the scheme obtains the ID type and the ID value of the ID to be identified, and determines the preset storage format of the ID value corresponding to the ID type. Then, analyzing the currently used storage format of the ID value of the ID to be identified; and presetting a storage format based on the ID value corresponding to the ID type, and acquiring other storage formats corresponding to the ID value. Based on the storage format currently used by the ID value and other storage formats obtained by conversion, ID data with the same ID type and ID value as the ID to be identified is identified from the ID data set. According to the process, the ID value is converted to obtain other corresponding storage formats, then the ID data with the same ID value is identified from the ID data set based on each storage format, and the identification is carried out by utilizing the multiple storage formats corresponding to the ID value, so that the same ID value with different storage formats can be identified, and the accuracy of ID identification is improved.

Description

ID identification method and device
Technical Field
The invention belongs to the technical field of computers, and particularly relates to an ID identification method and device.
Background
With the rapid development of network technology, people have more and more behaviors based on networks, and more user behavior data and attribute data in the networks. In a network, objects are usually distinguished by various identities (ID identities), and the ID-Mapping technology is popular in that several data from different sources are identified as belonging to the same object or subject by various technical means. One possible technical means currently used by the ID-Mapping technology is to determine whether data from different sources are data of the same object or data corresponding to the same subject through an ID type that cannot be easily changed. However, the identification accuracy based on the ID type is low at present.
Disclosure of Invention
In view of the above, an object of the present invention is to provide an ID identification method and apparatus, so as to solve the technical problem of low identification accuracy rate caused by that the same ID cannot be identified due to different storage formats of the same ID value, and a specific technical solution is as follows:
in a first aspect, the present invention provides an ID identification method, including:
acquiring an ID type and an ID value corresponding to an ID to be identified;
determining an ID value preset storage format corresponding to the ID type according to the ID type of the ID to be identified;
analyzing the ID value to obtain the currently used storage format of the ID value;
acquiring other storage formats corresponding to the ID value based on the ID value preset storage format corresponding to the ID type, wherein the other storage formats are storage formats which can be converted according to the currently used storage format of the ID value in the ID value preset storage format;
and identifying the ID data which is the same as the ID to be identified from the ID data set based on the ID type of the ID to be identified, the storage format currently used by the ID value and other converted storage formats.
In a possible implementation manner of the first aspect, obtaining another storage format corresponding to the ID value based on the ID value preset storage format corresponding to the ID type includes:
if the currently used storage format of the ID value belongs to the original value format type, converting the ID value according to the ID value preset storage format to obtain other original value storage formats equivalent to the currently used original value storage format, and encrypting each original value storage format corresponding to the ID value according to a preset encryption mode to obtain a preset encrypted storage format.
In another possible implementation manner of the first aspect, if the currently used storage format of the ID value belongs to an original value format type, converting the ID value according to a preset storage format of the ID value to obtain another original value storage format equivalent to the currently used original value storage format, and encrypting each original value storage format corresponding to the ID value according to a preset encryption manner, so as to obtain a corresponding encrypted storage format, where the method includes:
determining a sensitive type of an original value storage format currently used by the ID value to letters, wherein the sensitive type comprises sensitive and insensitive;
if the original value storage format currently used by the ID value is insensitive to the letter size/case, all original value storage formats corresponding to the ID value are obtained;
according to a preset encryption algorithm, respectively carrying out encryption operation on all original value storage formats corresponding to the ID value to obtain an encryption storage format with a preset letter type, wherein the preset letter type comprises a letter upper case or a letter lower case;
if the original value storage format currently used by the ID value is sensitive to letter large/small case, converting the ID value into other original value storage formats which are the same as the letter large/small case type currently used by the ID value;
and according to a preset encryption algorithm, respectively carrying out encryption operation on the original value storage format currently used by the ID value and other original value storage formats obtained by conversion to obtain the encryption storage format of the preset letter type.
In another possible implementation manner of the first aspect, obtaining another storage format corresponding to the ID value based on the ID value preset storage format corresponding to the ID type includes:
if the storage format currently used by the ID value belongs to an encryption format type, determining the sensitive type of the encryption format type to the letter case/case, wherein the sensitive type comprises sensitive and insensitive;
if the encryption storage format currently used by the ID value is insensitive to the letters capital/lowercase, converting the ID value to obtain the encryption storage format of the letters capital and the encryption storage format of the letters lowercase corresponding to the ID value;
and if the encryption storage format currently used by the ID value is sensitive to letters, keeping the encryption storage format currently used by the ID value unchanged.
In another possible implementation manner of the first aspect, the method further includes:
and if the ID data set does not have the ID data which is the same as the ID to be identified, storing the storage format currently used by the ID value of the ID to be identified and the storage format which is matched with the letter large/small writing sensitive type in other converted storage formats into the ID data set.
In another possible implementation manner of the first aspect, the parsing the ID value to obtain a currently used storage format of the ID value includes:
judging whether the ID values accord with regular expressions of each ID value preset storage format corresponding to the ID types one by one;
and determining the ID value preset storage format corresponding to the regular expression with which the ID value conforms to be the currently used storage format of the ID value.
In a second aspect, the present invention further provides an ID identification apparatus, including:
the acquisition module is used for acquiring the ID type and the ID value corresponding to the ID to be identified;
the determining module is used for determining an ID value preset storage format corresponding to the ID type according to the ID type of the ID to be identified;
the analysis module is used for analyzing the ID value to obtain the currently used storage format of the ID value;
the conversion module is used for obtaining other storage formats corresponding to the ID value based on the ID value preset storage format corresponding to the ID type, wherein the other storage formats are storage formats which can be converted according to the currently used storage format of the ID value in the ID value preset storage format;
and the identification module is used for identifying the ID data which is the same as the ID to be identified from the ID data set based on the ID type of the ID to be identified, the storage format currently used by the ID value and other converted storage formats.
In a possible implementation manner of the second aspect, the conversion module is specifically configured to:
if the currently used storage format of the ID value belongs to the original value format type, converting the ID value according to the ID value preset storage format to obtain other original value storage formats equivalent to the currently used original value storage format, and encrypting each original value storage format corresponding to the ID value according to a preset encryption mode to obtain a preset encrypted storage format.
In a third aspect, the present invention also provides an apparatus, comprising: at least one processor, and at least one memory, bus connected with the processor;
the processor and the memory complete mutual communication through the bus;
the processor is configured to call program instructions in the memory to perform the ID identification method according to any one of the possible implementations of the first aspect.
In a fourth aspect, the present invention further provides a storage medium, on which a program is stored, and the program is loaded and executed by a processor to implement the ID identification method according to any one of the possible implementation manners of the first aspect.
According to the ID identification method provided by the invention, the scheme obtains the ID type and the ID value of the ID to be identified, and determines the preset storage format of the ID value corresponding to the ID type. Then, analyzing the currently used storage format of the ID value of the ID to be identified; and presetting a storage format based on the ID value corresponding to the ID type, and acquiring other storage formats corresponding to the ID value. Based on the storage format currently used by the ID value and other storage formats obtained by conversion, ID data with the same ID type and ID value as the ID to be identified is identified from the ID data set. According to the process, the ID value is converted to obtain other corresponding storage formats, then the ID data with the same ID value is identified from the ID data set based on each storage format, and the identification is carried out by utilizing the multiple storage formats corresponding to the ID value, so that the same ID value with different storage formats can be identified, and the accuracy of ID identification is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
FIG. 1 is a flow chart of an ID identification method of the present invention;
FIG. 2 is a flow chart of another ID identification method of the present invention;
FIG. 3 is a flow chart of yet another ID identification method of the present invention;
FIG. 4 is a schematic structural diagram of an ID recognition apparatus provided in the present invention;
FIG. 5 is a schematic structural diagram of another ID recognition device provided by the present invention;
fig. 6 is a schematic structural diagram of an apparatus provided by the present invention.
Detailed Description
The ID-Mapping technology is to determine whether data from different sources belong to the same object or the same subject by using ID types that cannot be easily changed, but in practical situations, data from different sources may have different storage formats for the same ID value, and the same ID value with different storage formats may be identified as different ID values, so that the same ID value cannot be identified, and further data belonging to the same object or the same subject cannot be identified according to the ID value. In order to solve the technical problem, the invention provides an ID identification method, which obtains the ID type and the ID value of the ID to be identified and determines the preset storage format of the ID value corresponding to the ID type. Then, analyzing the currently used storage format of the ID value of the ID to be identified; and presetting a storage format based on the ID value corresponding to the ID type, and acquiring other storage formats corresponding to the ID value. Based on the storage format currently used by the ID value and other storage formats obtained by conversion, ID data with the same ID type and ID value as the ID to be identified is identified from the ID data set. According to the process, the ID value is converted to obtain other corresponding storage formats, then the ID data with the same ID value is identified from the ID data set based on each storage format, and the identification is carried out by utilizing the multiple storage formats corresponding to the ID value, so that the same ID value with different storage formats can be identified, and the accuracy of ID identification is improved.
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, a flowchart of an ID identification method provided by the present invention is shown, where the method is applied to a computer device, and the computer device may be a server, a PC, or a mobile intelligent terminal, such as a portable mobile terminal like a smart phone, a tablet computer, and the like. The method is used for identifying the ID data with the same ID type and ID value. As shown in fig. 1, the method may include the steps of:
s110, obtaining the ID type and the ID value corresponding to the ID to be identified.
The ID to be identified may be any ID, may be an ID in newly received data, or may be an ID included in history data. Where the ID value is used to distinguish between different objects.
The ID types herein include: device IDs (MAC, IDFA, IMEI, etc.), account IDs (mailbox, cell phone number, etc.), Cookie IDs, etc. These IDs are the types of IDs that are actually present in the system and may therefore also be referred to as rid (real ID).
Wherein, the mac (media Access control) address is an identifier of the network card, and can uniquely identify the network device; IDFA (identifier for advertisement) is an advertisement identifier for a device using the IOS system, typically corresponding uniquely to the device; imei (international Mobile Equipment identity) is an international Mobile Equipment identity used to identify each individual Mobile communications device in a Mobile telephone network. The Cookie ID is a number which is distributed to a user by the website when the user accesses a certain website and is stored in the browser, when the user accesses the website next time, the Cookie ID is uploaded to the website by the browser, and the Cookie ID corresponds to one user.
And S120, determining an ID value preset storage format corresponding to the ID type according to the ID type of the ID to be identified.
The preset storage format of the ID value corresponding to the ID type refers to a storage format of the ID value allowed or specified by the ID type. Different ID types may have different requirements on the ID value storage format because different ID types require different levels of secure storage.
The storage format of the ID value at least comprises an original value format type and an encryption format type, wherein the original value format type refers to characters contained in the ID value which is directly stored; the encryption format type means that the ID value is encrypted and then stored.
In one possible implementation, the storage formats that may be used for each ID type may be sorted or counted in advance.
For example, taking ID type as MAC as an example, the MAC value (i.e. the original value of MAC) is 12-bit hexadecimal number, and the storage format of the MAC value includes a standard format and a supplementary format:
the standard format is as follows: 00:00:00:00: 00-FF: FF: FF: FF: FF: FF;
supplementary format: 000000000000 to FFFFFFFFFF;
if the letters are distinguished to be large/small, the original value storage formats of the same MAC include the following four types:
standard format capitalization, e.g., 00:00:0D:7E:6F: 32;
standard format lowercase, e.g., 00:00:0d:7e:6f: 32;
supplemental format capitalization, such as 00000D7E6F 32;
supplemental format lowercase, such as 00000d7e6f 32;
in order to realize secure storage, the original value of the MAC may be encrypted and stored, where the encryption mode may be an MD5 encryption mode:
performing MD5 encryption operation on the MAC to obtain an MD5 value of the MAC value, and obtaining an MD5 value upper case format and an MD5 value lower case format if letters are distinguished; the original MAC value formats are different, and the calculated MD5 values are also different, so the MD5 value obtained by the same MAC value includes the following formats:
a MD5 value capitalization format corresponding to a standard format capitalized MAC, such as 2614a94E157BA2A0E035465C69AB2CB 9;
MD5 value lower case formats corresponding to MAC in upper case standard formats, such as 2614a94e157ba2a0e035465c69ab2cb 9;
the MD5 value capitalization format corresponding to the MAC in the standard format lower case, such as DA56CD0FC47131A0CB79F2CD95F4C8E 4;
the MD5 value lower case format corresponding to the MAC in lower case format, such as da56cd0fc47131a0cb79f2cd95f4c8e 4;
the MD5 value capitalization format corresponding to supplementary format capitalization MAC, such as 3EC1a09174E200859ACA69AC9A3B 3302;
MD5 value lower case format corresponding to MAC in supplemental format upper case, such as 3ec1a09174e200859aca69ac9a3b 3302;
an MD5 value capitalization format corresponding to a MAC in complementary format lower case, such as CBEB83CDE5443E812D65BC97C546 CFEB;
the supplementary format lower case MAC corresponds to MD5 value lower case format, such as cbeb83cde5443e812d65bc97c546 cfeb.
It can be seen that the same MAC value includes at least the 12 storage formats described above.
S130, the ID value is analyzed to obtain the storage format currently used by the ID value.
And judging the ID value one by one according to the judgment basis of the preset storage format of the ID value corresponding to the ID type to obtain the currently used storage format of the ID value.
The ID value is usually a character string, so the storage format of the ID value can be determined by regular expression, in this case, the process of analyzing the currently used storage format of the ID value is as follows:
and judging whether the ID values accord with the regular expressions of the preset storage formats of the ID values corresponding to the ID types one by one. And finally, determining the ID value preset storage format corresponding to the regular expression with the ID value as the storage format currently used by the ID value.
And if the ID value conforms to the regular expression of a certain storage format, determining the storage format of the ID value, namely the storage format corresponding to the regular expression.
Regular expressions describe a pattern of string matches that are typically used to retrieve, replace, etc. text that conforms to a certain pattern or rule.
For example, the regular expression corresponding to the standard format of the MAC value is as follows: (ix) ^ (0-9A-F) (02468 ACE): ([0-9A-F ] {2}), $.
The regular expression corresponding to the supplementary format of the MAC value is as follows: { 0-9A-F ] [02468ACE } ([0-9A-F ] {2}) ([0-9A-F ] {2}) ([0-9A-F ] {2}) $.
Of course, other ways may be used to determine the storage format currently used by the ID value, which is not limited in the present invention.
In addition, for the MD5 value obtained by the MD5 encryption method being a 32-bit hexadecimal character string, the MD5 value may also be determined by using a regular expression, and the storage format of the ID value is determined to be the MD5 encryption method as long as the format of the ID value conforms to the format of the MD5 value.
S140, based on the ID value preset storage format corresponding to the ID type and the currently used storage format of the ID value, converting to obtain other storage formats corresponding to the ID value.
Taking 12 storage formats corresponding to MAC values as an example for explanation, because the MD5 encryption method has the characteristic of being irreversible, that is, the MD5 value obtained by the original value encryption calculation cannot be restored to obtain the original value, the remaining 11 storage formats may not be obtained according to any one of the 12 storage formats of MAC values. Therefore, the other storage format in this step is a storage format that can be converted according to the currently used storage format of the ID value.
For example, the storage format of the MAC value is the MD5 value capitalization format in the capital case of the standard format, and according to the storage format, only the MD5 value lowercase format in the capital case of the standard format can be converted, and the rest 10 storage formats cannot be converted.
And S150, identifying the ID data which is the same as the ID to be identified from the ID data set based on the ID type of the ID to be identified, the storage format currently used by the ID value and other converted storage formats.
Firstly, ID data with the same ID type as the ID value of the ID to be identified are screened from the ID data set, and then the ID data with the same ID value is identified from the screened ID data according to the currently used storage format and the converted storage format of the ID value of the ID to be identified.
In one possible implementation manner of the invention, different IDs obtained from different data sources in advance and all possible storage formats corresponding to each ID are stored in an ID data set; when an ID is acquired, searching whether the ID value in different storage formats stored in the ID data set is the same as the newly acquired ID value or not, if so, determining that the ID value in the ID data set is the same as the newly acquired ID,
in the ID identification method provided in this embodiment, after obtaining the ID type and the ID value of the ID to be identified, the ID value is converted into another corresponding storage format, and then the ID data identical to the ID value is identified from the ID data set based on each storage format. The ID value is identified by using a plurality of storage formats corresponding to the ID value, and the same ID value with different storage formats can be identified, so that the ID identification accuracy is improved.
Referring to fig. 2, a flowchart of another ID identification method provided by the present invention is shown, and this embodiment will describe in detail other storage processes corresponding to the ID value, as shown in fig. 2, the method includes the following steps:
s210, obtaining the ID type and the ID value corresponding to the ID to be identified.
S220, according to the ID type of the ID to be identified, determining an ID value preset storage format corresponding to the ID type.
S230, the ID value is analyzed to obtain the storage format currently used by the ID value.
S240, judging the type of the storage format currently used by the ID value; if the format type of the original value is the original value format type, executing S250; if the format type is encrypted, S290 is performed.
The storage format type corresponding to the ID value can be generally divided into the original value format type and the encryption format type.
The original value storage rules of different ID types are different, and the original value format type may include one original value storage format or a plurality of different original value storage formats, for example, the MAC value has two original value storage formats, which are a standard format and a supplementary format, respectively, and if the letter large/small case is distinguished, the MAC value is changed into four original value storage formats, which are a standard format upper case, a standard format lower case, a supplementary format upper case, and a supplementary format lower case, respectively.
Similarly, the encrypted storage rules of the same ID type may also be different, for example, MD5 value upper case format and MD5 value lower case format corresponding to the MAC value.
In order to improve the security of the ID value during storage, an irreversible encryption algorithm, such as an MD5 value, is usually adopted, and the encryption value obtained by using such an encryption algorithm cannot be restored to obtain the original value, that is, the original value of the ID value cannot be obtained by performing a back-estimation according to the known MD5 value storage format of the ID value, so that before the storage format conversion of the ID value is performed, it is necessary to first determine the currently used storage format type of the ID value, and then perform corresponding conversion according to different storage format types.
S250, judging whether the original value format type of the ID value is sensitive to letter capital/lowercase; if not, executing S260; if so, go to step S280.
Each ID type specifies a corresponding storage specification, which specifies whether the ID value of the ID type is sensitive to letter upper/lower case.
Sensitive to letters upper/lower case means that upper/lower cases of the same letter are recognized as different letters, and insensitive to letters upper/lower case means that upper/lower cases of the same letter are recognized as the same letter.
And S260, converting the ID value into all other original value storage formats.
If the original value format type is not sensitive to letter large/small, the ID value is converted into other original value storage formats equivalent to the currently used original value storage format.
For example, the original value storage format of the MAC value includes the following four types: a standard format for upper case letters, a standard format for lower case letters, a supplemental format for upper case letters, and a supplemental format for lower case letters.
If the storage format currently used by the MAC value is a standard storage format of lower case letters, the MAC value is converted into a standard format of upper case letters, a supplementary format of lower case letters and a supplementary format of upper case letters.
And S270, respectively carrying out encryption operation on all original value storage formats corresponding to the ID value according to a preset encryption algorithm to obtain corresponding encrypted storage formats.
The preset encryption algorithm refers to an encryption algorithm that can be used for the ID type, for example, the MAC value can use the MD5 encryption algorithm.
When the same ID value in different original value formats is encrypted by using the same encryption algorithm, the obtained encrypted values may be different; for example, the MAC value in the standard format is different from the MD5 value obtained by performing MD5 calculation on the MAC in the complementary format, and the MD5 value in the upper case of the standard format is different from the MD5 value in the lower case of the standard format.
Therefore, if the original value storage format of the ID value is insensitive to the letters large/small, all the original value storage formats corresponding to the ID value are encrypted according to a preset encryption algorithm to obtain the encryption storage format of the preset letter type.
The preset letter type herein may include upper case letters and/or lower case letters.
And if the encrypted storage format corresponding to the ID type is sensitive to the capital/lowercase letters, the encrypted storage formats of the capital and the lowercase letters corresponding to all the original value storage formats corresponding to the ID value are used. If the encrypted storage format corresponding to the ID type is not sensitive to the letter large/small case, only any one letter type encrypted storage format corresponding to all the original value storage formats of the ID value can be obtained.
For example, the MAC value is stored in a standard format, and the standard storage format of the MAC value is not sensitive to letters large/small, so several MD5 value formats can be converted as follows: a standard format upper case MD5 value upper case (or lower case) format, a supplemental format upper case MD5 value upper case (or lower case) format, a standard format lower case MD5 value upper case (or lower case) format, and a supplemental format lower case MD5 value upper case (or lower case) format.
And S280, directly carrying out encryption operation on the ID value according to a preset encryption algorithm to obtain a corresponding encryption storage format.
If the original value storage format of the ID value is sensitive to the letters, namely the letters with different sizes are identified as different letters, the ID value is directly encrypted to obtain the encryption storage format of the preset letter type.
For example, the MAC value is stored in a standard format, lower case format, and the storage format is sensitive to letters, upper/lower cases; the following MD5 value format can be converted according to the standard lower case format of the MAC value: a standard format lower case MD5 value lower case format or a standard format lower case MD5 value upper case format.
S290, judging whether the encryption format type of the ID value is sensitive to letter capital/lowercase; if not, executing S2100; if so, then S2110 is performed.
S2100, obtaining the encrypted storage format of the capital letter and the encrypted storage format of the lower letter corresponding to the ID value.
If the encryption format type of the ID value is insensitive to capital/lowercase letters, the letters in the same ID value, whether in upper case or lower case, can be identified as the same ID value; in this application scenario, the letters in the current ID value may be converted to another format. For example, if the letters within the current ID value are in uppercase format, the letters within the ID value may be converted to lowercase letters; if the letters within the current ID value are in lower case format, the letters within the ID value may be converted to upper case letters.
For example, if the current storage format corresponding to the MAC value is the standard format upper case MD5 value upper case format, the letters in the MD5 value are converted into lower cases to obtain the standard format upper case MD5 value lower case format corresponding to the MAC value.
S2110, keeping the encryption storage format currently used by the ID value unchanged.
If the encryption format type of the ID value is sensitive to the letters upper/lower case, the upper and lower cases of the same letter are recognized as different letters, and thus, it is determined that the corresponding ID values are different. In such a scenario, the storage format of the ID value may be directly reserved.
The ID identification method provided in this embodiment performs corresponding storage format conversion according to different types of currently used storage formats of the ID value of the ID to be identified, so as to obtain various storage formats corresponding to the same ID value to the maximum extent, and further improve the ID identification accuracy to the maximum extent.
Referring to fig. 3, a flowchart of another ID identification method provided by the present invention is shown, where the embodiment further includes the following steps based on the embodiment shown in fig. 1:
s310, if the ID data set does not have the ID data same as the ID to be identified, storing the storage format currently used by the ID value of the ID to be identified and the storage format matched with the letter large/small writing sensitive type in other converted storage formats into the ID data set.
In order to save memory space, for a memory format insensitive to letters large/small, only a specified one of the formats needs to be stored in the ID dataset, for example, a memory format storing only letters large, or a memory format storing only letters small.
For the original value storage format, if sensitive to letter large/small, only the original value storage format of the currently used letter type is stored. And if the letter is not sensitive to the large/small letter, storing the original value storage format corresponding to any letter type.
For example, if the MAC value in the standard format lower case is sensitive to the letter upper/lower case, the standard format lower case format and the supplementary format lower case format corresponding to the MAC value are stored; if not sensitive to letter upper/lower case, the standard format upper case (or lower case) format and the supplementary format upper case (or lower case) format are stored.
For the encryption storage format, if the encryption storage format is sensitive to letter large/small case, the encryption storage format corresponding to the currently used letter type needs to be stored; an encrypted storage format that stores the upper case letters (or the lower case letters) if insensitive to the upper/lower case letters.
For example, eight MD5 values are obtained by converting the four original value storage formats of the MAC values, and if sensitive to letters large/small, the obtained eight MD5 values need to be stored; if not sensitive to letter upper/lower case, only the four MD5 values for the same letter type (letter upper or letter lower) need to be stored.
According to the ID identification method provided by the embodiment, the storage format of the ID value which is not in the ID data set is stored in the ID data set, so that the subsequent ID identification accuracy is improved. In addition, for a storage format insensitive to letters large/small, only a format of letters large or a format of letters small is required to be stored, thereby saving storage space and improving ID recognition efficiency.
On the other hand, the invention also provides an ID identification device embodiment.
Referring to fig. 4, a schematic structural diagram of an ID identification apparatus provided by the present invention is shown, where the apparatus is applied to a computer device, and as shown in fig. 4, the apparatus may include:
the obtaining module 110 is configured to obtain an ID type and an ID value corresponding to the ID to be identified.
The determining module 120 is configured to determine, according to the ID type of the ID to be identified, an ID value preset storage format corresponding to the ID type.
And the parsing module 130 is configured to parse the ID value to obtain a currently used storage format of the ID value.
The conversion module 140 is configured to preset a storage format based on the ID value corresponding to the ID type, and obtain another storage format corresponding to the ID value.
The other storage formats are storage formats which can be converted in the preset ID value storage formats according to the currently used storage format of the ID value;
and the identifying module 150 is configured to identify ID data identical to the ID to be identified from an ID data set based on the ID type of the ID to be identified, the storage format currently used by the ID value, and the other storage formats obtained through conversion.
In a possible implementation manner of the present invention, the conversion module 140 is specifically configured to:
if the currently used storage format of the ID value belongs to the original value format type, converting the ID value according to the ID value preset storage format to obtain other original value storage formats equivalent to the currently used original value storage format, and encrypting each original value storage format corresponding to the ID value according to a preset encryption mode to obtain a preset encrypted storage format.
In another possible implementation manner of the present invention, if the ID value is in an original value storage format, the conversion module is specifically configured to:
determining a sensitive type of an original value storage format currently used by the ID value to letters, wherein the sensitive type comprises sensitive and insensitive;
if the original value storage format currently used by the ID value is insensitive to the letter size/case, all original value storage formats corresponding to the ID value are obtained;
according to a preset encryption algorithm, respectively carrying out encryption operation on all original value storage formats corresponding to the ID value to obtain an encryption storage format with a preset letter type, wherein the preset letter type comprises a letter upper case or a letter lower case;
if the original value storage format currently used by the ID value is sensitive to letter large/small case, converting the ID value into other original value storage formats which are the same as the letter large/small case type currently used by the ID value;
and according to a preset encryption algorithm, respectively carrying out encryption operation on the original value storage format currently used by the ID value and other original value storage formats obtained by conversion to obtain the encryption storage format of the preset letter type.
In another possible implementation manner of the present invention, if the storage format currently used by the ID value belongs to an encryption format type, the conversion module is specifically configured to:
determining a sensitive type of the encryption format type to letter size/case, wherein the sensitive type comprises sensitive and insensitive;
if the encryption storage format currently used by the ID value is insensitive to the letters capital/lowercase, converting the ID value to obtain the encryption storage format of the letters capital and the encryption storage format of the letters lowercase corresponding to the ID value;
and if the encryption storage format currently used by the ID value is sensitive to letters, keeping the encryption storage format currently used by the ID value unchanged.
In another possible implementation manner of the present invention, as shown in fig. 5, the apparatus further includes, on the basis of the embodiment shown in fig. 4:
a storage module 210, configured to, when there is no ID data in the ID data set that is the same as the ID to be identified, store the storage format currently used by the ID value of the ID to be identified and the storage format that is matched with the letter upper/lower case sensitive type in the other storage formats obtained through conversion into the ID data set.
In another possible implementation manner of the present invention, the parsing module is specifically configured to:
judging whether the ID values accord with regular expressions of each ID value preset storage format corresponding to the ID types one by one;
and determining the ID value preset storage format corresponding to the regular expression with which the ID value conforms to be the currently used storage format of the ID value.
According to the ID identification device provided by the embodiment, the ID value is converted to obtain other corresponding storage formats, then the ID data with the same ID value is identified from the ID data set based on each storage format, and the identification is carried out by using the multiple storage formats corresponding to the ID value, so that the same ID value with different storage formats can be identified, and therefore the ID identification accuracy is improved.
The ID identification device comprises a processor and a memory, the acquisition module, the determination module, the analysis module, the conversion module, the identification module, the storage module and the like are stored in the memory as program units, and the processor executes the program units stored in the memory to realize corresponding functions.
The processor comprises a kernel, and the kernel calls the corresponding program unit from the memory. The kernel can be set to be one or more than one, and the identification accuracy of the ID value is improved by adjusting the kernel parameters.
An embodiment of the present invention provides a storage medium having a program stored thereon, which when executed by a processor implements the ID value identification method.
The embodiment of the invention provides a processor, which is used for running a program, wherein the ID value identification method is executed when the program runs.
An embodiment of the present invention provides an apparatus, as shown in fig. 6, the apparatus includes at least one processor 601, and at least one memory 602 and a bus 603, which are connected to the processor 601; the processor 601 and the memory 602 complete communication with each other through the bus 603; the processor 601 is used to call program instructions in the memory 702 to execute the ID value identification method described above. The device herein may be a server, a PC, a PAD, a mobile phone, etc.
The present application further provides a computer program product adapted to perform a program for initializing the following method steps when executed on a data processing device:
acquiring an ID type and an ID value corresponding to an ID to be identified;
determining an ID value preset storage format corresponding to the ID type according to the ID type of the ID to be identified;
analyzing the ID value to obtain the currently used storage format of the ID value;
acquiring other storage formats corresponding to the ID value based on the ID value preset storage format corresponding to the ID type, wherein the other storage formats are storage formats which can be converted according to the currently used storage format of the ID value in the ID value preset storage format;
and identifying the ID data which is the same as the ID to be identified from the ID data set based on the ID type of the ID to be identified, the storage format currently used by the ID value and other converted storage formats.
In a possible implementation manner, obtaining other storage formats corresponding to the ID value based on the ID value preset storage format corresponding to the ID type includes:
if the currently used storage format of the ID value belongs to the original value format type, converting the ID value according to the ID value preset storage format to obtain other original value storage formats equivalent to the currently used original value storage format, and encrypting each original value storage format corresponding to the ID value according to a preset encryption mode to obtain a preset encrypted storage format.
In another possible implementation manner, if the currently used storage format of the ID value belongs to an original value format type, converting the ID value according to the ID value preset storage format to obtain another original value storage format equivalent to the currently used original value storage format, and encrypting each original value storage format corresponding to the ID value according to a preset encryption manner, to obtain a corresponding encrypted storage format, including:
determining a sensitive type of an original value storage format currently used by the ID value to letters, wherein the sensitive type comprises sensitive and insensitive;
if the original value storage format currently used by the ID value is insensitive to the letter size/case, all original value storage formats corresponding to the ID value are obtained;
according to a preset encryption algorithm, respectively carrying out encryption operation on all original value storage formats corresponding to the ID value to obtain an encryption storage format with a preset letter type, wherein the preset letter type comprises a letter upper case or a letter lower case;
if the original value storage format currently used by the ID value is sensitive to letter large/small case, converting the ID value into other original value storage formats which are the same as the letter large/small case type currently used by the ID value;
and according to a preset encryption algorithm, respectively carrying out encryption operation on the original value storage format currently used by the ID value and other original value storage formats obtained by conversion to obtain the encryption storage format of the preset letter type.
In another possible implementation manner, the obtaining of the other storage formats corresponding to the ID value based on the ID value preset storage format corresponding to the ID type includes:
if the storage format currently used by the ID value belongs to an encryption format type, determining the sensitive type of the encryption format type to the letter case/case, wherein the sensitive type comprises sensitive and insensitive;
if the encryption storage format currently used by the ID value is insensitive to the letters capital/lowercase, converting the ID value to obtain the encryption storage format of the letters capital and the encryption storage format of the letters lowercase corresponding to the ID value;
and if the encryption storage format currently used by the ID value is sensitive to letters, keeping the encryption storage format currently used by the ID value unchanged.
In another possible implementation manner, the method further includes:
and if the ID data set does not have the ID data which is the same as the ID to be identified, storing the storage format currently used by the ID value of the ID to be identified and the storage format which is matched with the letter large/small writing sensitive type in other converted storage formats into the ID data set.
In another possible implementation manner, the parsing the ID value to obtain a storage format currently used by the ID value includes:
judging whether the ID values accord with regular expressions of each ID value preset storage format corresponding to the ID types one by one;
and determining the ID value preset storage format corresponding to the regular expression with which the ID value conforms to be the currently used storage format of the ID value.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a device includes one or more processors (CPUs), memory, and a bus. The device may also include input/output interfaces, network interfaces, and the like.
The memory may include volatile memory in a computer readable medium, Random Access Memory (RAM) and/or nonvolatile memory such as Read Only Memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip. The memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The above are merely examples of the present application and are not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (10)

1. An ID identification method, comprising:
acquiring an ID type and an ID value corresponding to an ID to be identified;
determining an ID value preset storage format corresponding to the ID type according to the ID type of the ID to be identified;
analyzing the ID value to obtain the currently used storage format of the ID value;
acquiring other storage formats corresponding to the ID value based on the ID value preset storage format corresponding to the ID type, wherein the other storage formats are storage formats which can be converted according to the currently used storage format of the ID value in the ID value preset storage format;
and identifying the ID data which is the same as the ID to be identified from the ID data set based on the ID type of the ID to be identified, the storage format currently used by the ID value and other converted storage formats.
2. The method according to claim 1, wherein the obtaining of the other storage format corresponding to the ID value based on the ID value preset storage format corresponding to the ID type comprises:
if the currently used storage format of the ID value belongs to the original value format type, converting the ID value according to the ID value preset storage format to obtain other original value storage formats equivalent to the currently used original value storage format, and encrypting each original value storage format corresponding to the ID value according to a preset encryption mode to obtain a preset encrypted storage format.
3. The method according to claim 2, wherein if the currently used storage format of the ID value belongs to an original value format type, converting the ID value into another original value storage format equivalent to the currently used original value storage format according to the ID value preset storage format, and encrypting each original value storage format corresponding to the ID value in a preset encryption manner to obtain a corresponding encrypted storage format, includes:
determining a sensitive type of an original value storage format currently used by the ID value to letters, wherein the sensitive type comprises sensitive and insensitive;
if the original value storage format currently used by the ID value is insensitive to the letter size/case, all original value storage formats corresponding to the ID value are obtained;
according to a preset encryption algorithm, respectively carrying out encryption operation on all original value storage formats corresponding to the ID value to obtain an encryption storage format with a preset letter type, wherein the preset letter type comprises a letter upper case or a letter lower case;
if the original value storage format currently used by the ID value is sensitive to letter large/small case, converting the ID value into other original value storage formats which are the same as the letter large/small case type currently used by the ID value;
and according to a preset encryption algorithm, respectively carrying out encryption operation on the original value storage format currently used by the ID value and other original value storage formats obtained by conversion to obtain the encryption storage format of the preset letter type.
4. The method according to claim 2, wherein the obtaining of the other storage format corresponding to the ID value based on the ID value preset storage format corresponding to the ID type comprises:
if the storage format currently used by the ID value belongs to an encryption format type, determining the sensitive type of the encryption format type to the letter case/case, wherein the sensitive type comprises sensitive and insensitive;
if the encryption storage format currently used by the ID value is insensitive to the letters capital/lowercase, converting the ID value to obtain the encryption storage format of the letters capital and the encryption storage format of the letters lowercase corresponding to the ID value;
and if the encryption storage format currently used by the ID value is sensitive to letters, keeping the encryption storage format currently used by the ID value unchanged.
5. The method according to any one of claims 1-4, further comprising:
and if the ID data set does not have the ID data which is the same as the ID to be identified, storing the storage format currently used by the ID value of the ID to be identified and the storage format which is matched with the letter large/small writing sensitive type in other converted storage formats into the ID data set.
6. The method according to any of claims 1-4, wherein said parsing said ID value to obtain a currently used storage format of the ID value comprises:
judging whether the ID values accord with regular expressions of each ID value preset storage format corresponding to the ID types one by one;
and determining the ID value preset storage format corresponding to the regular expression with which the ID value conforms to be the currently used storage format of the ID value.
7. An ID identification device, comprising:
the acquisition module is used for acquiring the ID type and the ID value corresponding to the ID to be identified;
the determining module is used for determining an ID value preset storage format corresponding to the ID type according to the ID type of the ID to be identified;
the analysis module is used for analyzing the ID value to obtain the currently used storage format of the ID value;
the conversion module is used for obtaining other storage formats corresponding to the ID value based on the ID value preset storage format corresponding to the ID type, wherein the other storage formats are storage formats which can be converted according to the currently used storage format of the ID value in the ID value preset storage format;
and the identification module is used for identifying the ID data which is the same as the ID to be identified from the ID data set based on the ID type of the ID to be identified, the storage format currently used by the ID value and other converted storage formats.
8. The apparatus of claim 7, wherein the conversion module is specifically configured to:
if the currently used storage format of the ID value belongs to the original value format type, converting the ID value according to the ID value preset storage format to obtain other original value storage formats equivalent to the currently used original value storage format, and encrypting each original value storage format corresponding to the ID value according to a preset encryption mode to obtain a preset encrypted storage format.
9. An apparatus, comprising: at least one processor, and at least one memory, bus connected with the processor;
the processor and the memory complete mutual communication through the bus;
the processor is configured to call program instructions in the memory to perform the ID identification method of any of claims 1-6.
10. A storage medium having a program stored thereon, wherein the program is loaded into and executed by a processor to implement the ID identification method of any one of claims 1 to 6.
CN201910942182.7A 2019-09-30 2019-09-30 ID identification method and device Pending CN112579830A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910942182.7A CN112579830A (en) 2019-09-30 2019-09-30 ID identification method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910942182.7A CN112579830A (en) 2019-09-30 2019-09-30 ID identification method and device

Publications (1)

Publication Number Publication Date
CN112579830A true CN112579830A (en) 2021-03-30

Family

ID=75116759

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910942182.7A Pending CN112579830A (en) 2019-09-30 2019-09-30 ID identification method and device

Country Status (1)

Country Link
CN (1) CN112579830A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009059241A (en) * 2007-08-31 2009-03-19 Toshiba Corp Information processor and program
CN101794308A (en) * 2010-03-04 2010-08-04 哈尔滨工程大学 Method for extracting repeated strings facing meaningful string mining and device
CN106649210A (en) * 2015-10-30 2017-05-10 北京国双科技有限公司 Data conversion method and device
CN109543463A (en) * 2018-10-11 2019-03-29 平安科技(深圳)有限公司 Data Access Security method, apparatus, computer equipment and storage medium
CN110022308A (en) * 2019-03-11 2019-07-16 中国科学院信息工程研究所 A kind of internet of things equipment recognition methods and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009059241A (en) * 2007-08-31 2009-03-19 Toshiba Corp Information processor and program
CN101794308A (en) * 2010-03-04 2010-08-04 哈尔滨工程大学 Method for extracting repeated strings facing meaningful string mining and device
CN106649210A (en) * 2015-10-30 2017-05-10 北京国双科技有限公司 Data conversion method and device
CN109543463A (en) * 2018-10-11 2019-03-29 平安科技(深圳)有限公司 Data Access Security method, apparatus, computer equipment and storage medium
CN110022308A (en) * 2019-03-11 2019-07-16 中国科学院信息工程研究所 A kind of internet of things equipment recognition methods and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
雷旭;冯兴乐;常莹;谭亮;: "基于LabVIEW多样式数据识别及存取的实现", 测控技术, no. 04 *

Similar Documents

Publication Publication Date Title
CN107516038B (en) Method and device for determining device fingerprint
CN110943961A (en) Data processing method, device and storage medium
CN111163072B (en) Method and device for determining characteristic value in machine learning model and electronic equipment
CN103942292A (en) Virtual machine mirror image document processing method, device and system
US11368901B2 (en) Method for identifying a type of a wireless hotspot and a network device thereof
CN114244603A (en) Anomaly detection and comparison embedded model training and detection method, device and medium
CN110413711B (en) Differential data acquisition method and storage medium thereof
CN103870480A (en) Dynamic data masking method and database system
CN114338413A (en) Method and device for determining topological relation of equipment in network and storage medium
CN110865982A (en) Data matching method and device, electronic equipment and storage medium
CN110929173A (en) Method, device, equipment and medium for identifying same person
CN110929260A (en) Malicious software detection method, device, server and readable storage medium
CN108133026B (en) Multi-data processing method, system and storage medium
CN114024761A (en) Network threat data detection method and device, storage medium and electronic equipment
CN107391980B (en) Login verification method, device, equipment and storage medium based on equipment data
CN109359274B (en) Method, device and equipment for identifying character strings generated in batch
CN112579830A (en) ID identification method and device
CN112100604A (en) Terminal equipment information processing method and device
CN106411891B (en) File processing method and device, server and equipment
CN110990799A (en) Data processing method, device and system for anti-crawler and storage medium
CN111343105B (en) Cutoff identification method and device based on deep learning
CN105718767B (en) information processing method and device based on risk identification
CN114567613A (en) Real IP identification method, device, electronic equipment and storage medium
CN113383314B (en) User similarity calculation method and device, server and storage medium
CN111242232B (en) Data slicing processing method and device and credit bank server

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