CN104111932A - Recognition method and device of ID (identity) card numbers - Google Patents

Recognition method and device of ID (identity) card numbers Download PDF

Info

Publication number
CN104111932A
CN104111932A CN201310134135.2A CN201310134135A CN104111932A CN 104111932 A CN104111932 A CN 104111932A CN 201310134135 A CN201310134135 A CN 201310134135A CN 104111932 A CN104111932 A CN 104111932A
Authority
CN
China
Prior art keywords
card
identity number
character string
character
checking
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.)
Granted
Application number
CN201310134135.2A
Other languages
Chinese (zh)
Other versions
CN104111932B (en
Inventor
许金鹏
王洋
李健安
薛萍
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Venus Information Security Technology Co Ltd
Beijing Venus Information Technology Co Ltd
Original Assignee
Beijing Venus Information Security Technology Co Ltd
Beijing Venus Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Venus Information Security Technology Co Ltd, Beijing Venus Information Technology Co Ltd filed Critical Beijing Venus Information Security Technology Co Ltd
Priority to CN201310134135.2A priority Critical patent/CN104111932B/en
Publication of CN104111932A publication Critical patent/CN104111932A/en
Application granted granted Critical
Publication of CN104111932B publication Critical patent/CN104111932B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/903Querying
    • G06F16/90335Query processing
    • G06F16/90344Query processing by using string matching techniques
    • 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/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9535Search customisation based on user profiles and personalisation

Abstract

The invention discloses a recognition method and device of ID (identity) card numbers and overcomes the defect that a mature method of recognizing ID card numbers from network data lacks at present. The recognition method includes: recognizing a character string, which may be an ID card number, from a character stream; verifying the character string, which many be the ID card number, according to ID card number encoding rules; using the ID card number, which may be the ID card number and which passes verification, as a positively effective ID card number. The recognition method and device of the ID card numbers according to the embodiment has the advantages that high-traffic webpage contents can be filtered and recognized in the network security field, accuracy is high, the speed is high, and small memory space is used in hardware equipment.

Description

A kind of recognition methods of ID (identity number) card No. and device
Technical field
The present invention relates to number recognition technology, relate in particular to a kind of recognition methods and device of ID (identity number) card No..
Background technology
Being identified in networking security field of ID (identity number) card No., as all there is important application the aspects such as intrusion detection, short message filtering, information inquiry.Along with the development of network technology and popularizing of Internet, the safety of the network informations such as personal information and protection, be more and more subject to people's attention.
The identification of ID (identity number) card No. herein, refers in the information handling system of networking, from network data or from file data (as webpage), identifies and extract effective ID (identity number) card No..These numbers are likely that the violation of some people on networking is issued, and easily cause the leakage of individual privacy information.
Can by identification ID (identity number) card No., and early warning or hide etc. means, protect ID (identity number) card information violation leak.But this respect does not also have comparatively proven technique at present.
Summary of the invention
Technical matters to be solved by this invention is to overcome also there is no at present the comparatively ripe defect of identifying ID (identity number) card No. from network data.
In order to solve the problems of the technologies described above, the invention provides a kind of recognition methods of ID (identity number) card No., comprising:
From character stream, identifying may be the character string of ID (identity number) card No.;
Adopt ID (identity number) card No. coding rule may verify for the character string of ID (identity number) card No. described;
To may be that the character string of ID (identity number) card No. is as may effective ID (identity number) card No. by checking described.
Preferably, from character stream, identifying to be the character string of ID (identity number) card No., comprising:
Employing can be to significant figure, can ignore the Hash table that character, unallowable instruction digit and possible end mark distinguish carries out character recognition to described character stream;
It may be the character string of ID (identity number) card No. that the character string of the character string of ten eight digit number words compositions or 17 bit digital and X or x is identified as described.
Preferably, adopt ID (identity number) card No. coding rule may verify for the character string of ID (identity number) card No. described, comprising:
Adopt ID (identity number) card No. coding rule may carry out the checking of address code, date of birth code and the check code of ID (identity number) card No. for the character string of ID (identity number) card No. to described.
Preferably, adopt ID (identity number) card No. coding rule may carry out the checking of the address code of ID (identity number) card No. for the character string of ID (identity number) card No. to described, comprising:
Utilize two-dimensional array may carry out the checking of described address code for the first six digits character in the character string of ID (identity number) card No. to described.
Preferably, the first dimension of utilizing described two-dimensional array to described may be for the front three character in the character string of ID (identity number) card No. carries out the checking of the six administrative areas of the People's Republic of China number of described address code, the second dimension of utilizing described two-dimensional array may be carried out for the 4th to six characters in the character string of ID (identity number) card No. the checking of number in the district of described address code to described;
Wherein, the length that described two-dimensional array first is tieed up is more than or equal to the quantity of the represented effective six administrative areas of the People's Republic of China number of three bit digital, and the length of the second dimension is more than or equal to the quantity of number in the represented district of interior three bit digital of all effective six administrative areas of the People's Republic of China number.
The application also provides a kind of recognition device of ID (identity number) card No., comprising:
Identification module, being configured to identify from character stream may be the character string of ID (identity number) card No.;
Authentication module, is configured to adopt ID (identity number) card No. coding rule may verify for the character string of ID (identity number) card No. described;
Execution module, is configured to may be for the character string of ID (identity number) card No. is as effective ID (identity number) card No. by the described of checking.
Preferably, described identification module comprises:
Recognition unit, being configured to adopt can be to significant figure, can ignore the Hash table that character, unallowable instruction digit and possible end mark distinguish carries out character recognition to described character stream;
Judging unit, being configured to the character string of the character string of ten eight digit number words compositions or 17 bit digital and X or x to be identified as described may be the character string of ID (identity number) card No..
Preferably, described authentication module comprises:
The first authentication unit, is configured to adopt ID (identity number) card No. coding rule may carry out the checking of the address code of ID (identity number) card No. for the character string of ID (identity number) card No. to described;
The second authentication unit, is configured to adopt ID (identity number) card No. coding rule may carry out the checking of the date of birth code of ID (identity number) card No. for the character string of ID (identity number) card No. to described;
The 3rd authentication unit, is configured to adopt ID (identity number) card No. coding rule may carry out the checking of the check code of ID (identity number) card No. for the character string of ID (identity number) card No. to described.
Preferably, described the first verification units configured is to utilize two-dimensional array may carry out the checking of described address code for the first six digits character in the character string of ID (identity number) card No. to described.
Preferably, described the first verification units configured be the first dimension of utilizing described two-dimensional array to described may be for the front three character in the character string of ID (identity number) card No. carries out the checking of the six administrative areas of the People's Republic of China number of described address code, the second dimension of utilizing described two-dimensional array may be carried out for the 4th to six characters in the character string of ID (identity number) card No. the checking of number in the district of described address code to described;
Wherein, the length that described two-dimensional array first is tieed up is more than or equal to the quantity of the represented effective six administrative areas of the People's Republic of China number of three bit digital, and the length of the second dimension is more than or equal to the quantity of number in the represented district of interior three bit digital of all effective six administrative areas of the People's Republic of China number.
Compared with prior art, the application's embodiment can filter identification to the web page contents of large flow in networking security field, and accuracy is high, speed is fast, committed memory space is little on hardware device.The application's embodiment, by the numerical value of three large area codes is mapped as to the valid interval that a numerical value is 0-149, has saved internal memory, has reduced cost.
Other features and advantages of the present invention will be set forth in the following description, and, partly from instructions, become apparent, or understand by implementing the present invention.Object of the present invention and other advantages can be realized and be obtained by specifically noted structure in instructions, claims and accompanying drawing.
Brief description of the drawings
Accompanying drawing is used to provide the further understanding to technical solution of the present invention, and forms a part for instructions, is used from and explains technical scheme of the present invention with the application's embodiment mono-, does not form the restriction to technical solution of the present invention.
Fig. 1 is the schematic flow sheet of the recognition methods of the ID (identity number) card No. of the embodiment of the present application.
Fig. 2 is the schematic flow sheet of the recognition system of the ID (identity number) card No. of the embodiment of the present application.
Embodiment
Describe embodiments of the present invention in detail below with reference to drawings and Examples, to the present invention, how application technology means solve technical matters whereby, and the implementation procedure of reaching technique effect can fully understand and implement according to this.Each feature in the embodiment of the present application and embodiment is the mutually combining under prerequisite of not conflicting mutually, all within protection scope of the present invention.
In addition, can in the computer system such as one group of computer executable instructions, carry out in the step shown in the process flow diagram of accompanying drawing.And, although there is shown logical order in flow process, in some cases, can carry out shown or described step with the order being different from herein.
China is the China second-generation identity card of application at present, includes 18 item codes, and its coding rule is in 18 item codes, to comprise 17 bit digital body codes and be positioned at 17 bit digital body codes one-bit digital check code afterwards.Wherein in 17 bit digital body codes, comprise successively six bit digital address codes, eight digit number word date of birth code and three bit digital sequence codes.The wherein administrative division code of the six bit digital address code presentation code object places where someone is permanent residents; The year, month, day of date of birth representation coded object birth, wherein the time represents with 4-digit number, between year, month, day without separator; Sequence code represents in regional extent that same one-address code identifies, the serial number that the personnel of birth are are on the same day of the same month of the same year compiled and edited.Check code is basis 17 digit numeric codes above, the result of calculating according to ISO7064:1983.MOD11-2 checking algorithm.
In six bit digital address codes, the province code of first and second bit digital presentation code object place where someone is permanent residents, the city codes of third and fourth bit digital presentation code object place where someone is permanent residents, the district code of the 5th, the six bit digital presentation code object places where someone is permanent residents.Also can be using the front three in six bit digital address codes as six administrative areas of the People's Republic of China number, rear three as number in district.
In eight date of birth codes, be followed successively by four time codes, two months code and two date codes.The effective value of four time codes is less than or equal to 2100 for being more than or equal to 1900.Two months, the effective value of code was less than or equal to 12 for being more than or equal to 1.Two date codes two months code be 1,3,5,7,8,10 and be less than or equal to 31 for being more than or equal to 1 at 12 o'clock, two months code be 4,6,9 and be less than or equal to 30 for being more than or equal to 1 at 11 o'clock, two months code be 2 and be less than or equal to 29 for being more than or equal to 1 when four representation leap years in time, two months code be 2 and be less than or equal to 28 for being more than or equal to 1 when four representation non-leap years in time.
The configuration code in the jurisdiction local police station of government, the front two presentation code object place where someone is permanent residents in three sequence codes, the 3rd represents sex by odd even.The application's embodiment does not verify and confirms three sequence codes.
An identifying code can check according to 17 bit digital body codes and canonical algorithm.In the time that it equates with checking computation results, represent that this 17 bit digital body code and this identifying code are an authentic and valid ID (identity number) card No., while not conforming to checking computation results, represent that this 17 bit digital body code and this identifying code are an invalid ID (identity number) card No..
In actual life, read and write for convenience ID (identity number) card No., tend in the middle of ID (identity number) card No., insert some additional characters, such as dash or period etc., ID (identity number) card No. is carried out to merogenesis.
As shown in Figure 1, the recognition methods of the ID (identity number) card No. of the embodiment of the present application mainly comprises following content.
S110, utilizing Hash table to identify from the character stream of network data may be the character string of ID (identity number) card No..
256 character Hash (hash) table that the application's embodiment utilization can be to significant figure, can ignore the octet that character, unallowable instruction digit and possible end mark distinguish carries out character recognition.This character Hash table is significant figure, can ignore character, unallowable instruction digit and possible end mark arranges different values.Particularly, the application's embodiment by the value of significant figure be made as 1, the value that can ignore character is made as 2, the value of unallowable instruction digit is made as 3 and the value of possible end mark is made as to 4.
The end mark that in the application's embodiment, this character string includes insignificant additional character, numeral and may exist, this end mark represents character X or x.When wherein this character string comprises this end mark X or x, the numeral in this character string is 17; When this character string does not comprise this end mark X or x, the numeral in this character string is 18.It may be the character string of ID (identity number) card No. that the character string of the character string of ten eight digit number words compositions or 17 bit digital and X or x is identified as.
S120, adopts ID (identity number) card No. coding rule to verify this character string.Wherein this checking is mainly the checking of according to ID (identity number) card No. coding rule, this character string being carried out address code, date of birth code and the check code of ID (identity number) card No..
S130, using this character string by checking as effectively ID (identity number) card No. of possibility.
The application's embodiment is according to the possible numerical value of 8 characters, sets up length and be the character HASH table of 256, and by the value of significant figure be made as 1, the value that can ignore character is made as 2, the value of unallowable instruction digit is made as 3 and the value of possible end mark is made as to 4.The value that represents significant figure is 1, and these significant figure are 10 numerals, comprise character 0 to 9.Represent that for the value of the character ignored separated be 2, in the application's embodiment, insignificant 9 characters comprise: space, tab character, carriage return, line feed, point., dash (-), the number of equaling (=), folding number (/), reflexed ().The value that to express possibility as the character of ID (identity number) card No. end mark be X or x is 3.The character that is not aforementioned 10 numerals, can ignore character and end mark is all as idle character, and its value is 4.
In other embodiment of the application, for represent separate the character of ignoring can also have more, such as exclamation mark (! ), asterisk (*), pound sign (#) etc., every character that can appear at the middle convenient read-write for ID (identity number) card No. is separated of ID (identity number) card No., all can be considered the character ignored in the embodiment of the present application, its character Hash table intermediate value in the embodiment of the present application is 2.
In the time reading input of character string, by character, HASH shows, the type attribute of reading character, and take different operations.Read a character in pending character string at every turn, the numerical value of table taking this character as subscript reading character HASH, the significant character that is 1 for value, is less than at 19 o'clock in record length and carries out record, otherwise abandon.The character ignored that is 2 for value directly abandons.The end mark that is 3 for value, if the length of the character string having recorded is 18, the character string having recorded may be exactly an effective ID (identity number) card No., completes extraction work; If the length of the character string having recorded is 17, end mark is recorded in character string as an effective ID (identity number) card No., complete extraction work; The character string having recorded of other length is not an ID (identity number) card No., removes this character string having recorded (clear buffer).The unallowable instruction digit that is 4 for value, if the length of the character string having recorded is 18, the character string this having been recorded is submitted to as an effective ID (identity number) card No. of possibility, otherwise removes this character string having recorded (clear buffer).
The character HASH table that the application's embodiment sets up, the data item of each ascii code correspondence is the attribute of this ascii code.As hash[48] value be that 1, ascii code 48 is characters ' 0 ', therefore its numerical value be 1 (effectively I.D. character), hash[45] value be that 2, ascii code 45 is character '-', therefore its numerical value is 2 (insignificant separating characters).The application's embodiment is according to default character HASH table, and taking the character to be detected in data stream as subscript, inquiry draws the type of character.In the time judging arbitrary character, only need to judge its hash[a] numerical value.
The application's embodiment is by once tabling look-up, can complete the processing of character, effective I.D. character is carried out to record, invalid identity card character is carried out to finalization process, to ignoring that character filters and judgement processing to end mark, in conjunction with identification card number code length, draw fast the character string being consistent with identification card number code length item, complete extraction and the checking work of ID (identity number) card No..
Six bit digital address codes are divided into number in the six administrative areas of the People's Republic of China number of three bit digital and the district of three bit digital by the application's embodiment.The application's embodiment utilizes two-dimensional array to verifying for the first six digits character in the character string of ID (identity number) card No..The length that two-dimensional array first is tieed up is more than or equal to the quantity of the represented effective six administrative areas of the People's Republic of China number of three bit digital, and the length of the second dimension is more than or equal to the quantity of number in the represented district of interior three bit digital of all effective six administrative areas of the People's Republic of China number.The first dimension of utilizing two-dimensional array is to may be for the front three character in the character string of ID (identity number) card No. carries out the checking of the six administrative areas of the People's Republic of China number of address code, and the second dimension of utilizing two-dimensional array is to carrying out for the 4th to six characters in the character string of ID (identity number) card No. the checking of number in the district of address code.The first dimension of this two-dimensional array records six administrative areas of the People's Republic of China numbers all in effective ID (identity number) card No., and the second dimension records under the number of all effective six administrative areas of the People's Republic of China effectively number in district.The application's embodiment, the first dimension of this two-dimensional array is one dimension great Qu hash table, the second dimension is two-dimentional administrative area hash table, shows to carry out fast the identification of six bit digital address codes by this one dimension great Qu hash table and two-dimentional administrative area hash.
The length that two-dimensional array first is tieed up is more than or equal to the quantity of the represented effective six administrative areas of the People's Republic of China number of three bit digital, and the length of the second dimension is more than or equal to the quantity of number in the represented district of interior three bit digital of all effective six administrative areas of the People's Republic of China number.Because six administrative areas of the People's Republic of China number has many null values, the application's embodiment is the memory headroom of saving hardware device, utilize large area code code mapping table to verify the six administrative areas of the People's Republic of China number of three bit digital, the space of this large area code code mapping table is greater than 0 but be less than the numerical value 0-999 of the large area code of three bit digital is mapped as to the valid interval that a numerical value is less than 999, such as being the valid interval of 0-149.In this large area code code mapping table, store the six administrative areas of the People's Republic of China number of current national identification card number code.
The application's embodiment is that to utilize length be that in 1000 Xiang districts, number mapping table is verified number in the district of each three bit digital, wherein stores number in the district of three bit digital, is used for three bit digital after the number of the six administrative areas of the People's Republic of China to verify.Table look-up by twice, can complete the validation of six bit digital address codes.
For saving space, the application's embodiment sets up administrative area HASH and has shown the fast verification of six bit digital address codes in ID (identity number) card No..Set up the mapping of three six administrative areas of the People's Republic of China numbers of I.D., the data value of 1000 length is mapped as to the data item occurrence of 150 length, then set up the two-dimensional array of 150*1000, complete the confirmation of six bit address codes.Wherein, great Qu HASH table has been used for the HASH mapping of the six administrative areas of the People's Republic of China number in ID (identity number) card No..Because six administrative areas of the People's Republic of China number hollow remainder values is more, the application's embodiment is mapped as the codomain scope that a length is 150, has greatly reduced the required memory headroom of hardware device.In great Qu HASH table, 0-148 item is a corresponding effective six administrative areas of the People's Republic of China number separately, and the 149th represents invalid area code.The numerical value of great Qu HASH table, as first subscript variable of two-dimensional array, in ID (identity number) card No. Zhong district, number is as the second dimension subscript variable of two-dimensional array.In the two dimension HASH table of administrative area, numerical value 0 represents that this number is not an effective address code, and numerical value 1 represents that this number is an effective address code.
Such as the character string getting from webpage for " aaaa123asd110.108-196212302873uuuuuuuuuu ", reading character " aaaa " first successively, judges that by character HASH table it is all idle character, deletes.Then reading character " 123 ", judges that by character HASH table it,, for significant character, carries out record.And then read " asd ", when reading character " a ", the digital length of the character string having recorded is 3, is not the length 15 or 18 of effective ID (identity number) card No., and therefore it is not that effective character abandons; " sd " character also abandons equally, and the character string having recorded " 123 " also can not become a character in effective ID (identity number) card No., therefore also abandons.And then read " 110.108-196212302873 ", owing to judging " 110 " by character HASH table, " 108 " and " 196212302873 " are all significant characters, carry out according to the order of sequence record, judge character ". " by character HASH table and "-" is negligible character simultaneously, these two characters are ignored.Because the character string having recorded " 110108196212302873 " has reached 18 bit lengths, set it as a possible province card number and store, it is carried out to the judgement that possibility is effective ID (identity number) card No..Adopt area code judge statement Hash2[hash1[110]] [108] judge, the HASH value that obtains large area code 110 is 1, Hash2[1] [108] item is 1, effective, first six digits character " 110108 " is an effective address code.Then whether be the judgement of an effective date of birth code to " 19621230 ", finally adopt ISO7064:1983.MOD11-2 checking algorithm to carry out verification to last character of character string " 110108196212302873 " " 3 ".Whether accordingly, can judge character string " 110108196212302873 " is an effectively ID (identity number) card No..
As shown in Figure 2, the recognition device of the ID (identity number) card No. of the embodiment of the present application mainly comprises identification module 210, authentication module 220 and execution module 230.
Identification module 210, being configured to identify from character stream may be the character string of ID (identity number) card No.;
Authentication module 220, is connected with identification module 210, is configured to adopt ID (identity number) card No. coding rule may verify for the character string of ID (identity number) card No. described;
Execution module 230, is connected with authentication module 220, is configured to may be for the character string of ID (identity number) card No. is as effective ID (identity number) card No. by the described of checking.
As shown in Figure 2, above-mentioned identification module 210 comprises recognition unit 211 and judging unit 212.
Recognition unit 211, being configured to adopt can be to significant figure, can ignore the Hash table that character, unallowable instruction digit and possible end mark distinguish carries out character recognition to described character stream;
Judging unit 212, is connected with recognition unit 211 and authentication module 220, and being configured to the character string of the character string of ten eight digit number words compositions or 17 bit digital and X or x to be identified as described may be the character string of ID (identity number) card No..
As shown in Figure 2, above-mentioned authentication module 220 comprises the first authentication unit 221, the second authentication unit 222 and the 3rd authentication unit 223.
The first authentication unit 221, is connected with the judging unit 212 in execution module 230 and identification module 210, is configured to adopt ID (identity number) card No. coding rule may carry out the checking of the address code of ID (identity number) card No. for the character string of ID (identity number) card No. to described;
The second authentication unit 222, is connected with the judging unit 212 in execution module 230 and identification module 210, is configured to adopt ID (identity number) card No. coding rule may carry out the checking of the date of birth code of ID (identity number) card No. for the character string of ID (identity number) card No. to described;
The 3rd authentication unit 223, is connected with the judging unit 212 in execution module 230 and identification module 210, is configured to adopt ID (identity number) card No. coding rule may carry out the checking of the check code of ID (identity number) card No. for the character string of ID (identity number) card No. to described.
Above-mentioned the first authentication unit 221 is configured to utilize two-dimensional array may carry out the checking of described address code for the first six digits character in the character string of ID (identity number) card No. to described.
The first dimension that above-mentioned the first authentication unit 221 is configured to utilize described two-dimensional array to described may be for the front three character in the character string of ID (identity number) card No. carries out the checking of the six administrative areas of the People's Republic of China number of described address code, the second dimension of utilizing described two-dimensional array may be carried out for the 4th to six characters in the character string of ID (identity number) card No. the checking of number in the district of described address code to described.The length that described two-dimensional array first is tieed up is more than or equal to the quantity of the represented effective six administrative areas of the People's Republic of China number of three bit digital, and the length of the second dimension is more than or equal to the quantity of number in the represented district of interior three bit digital of all effective six administrative areas of the People's Republic of China number.
It is apparent to those skilled in the art that each ingredient of the device that above-mentioned the embodiment of the present application provides, and each step in method, they can concentrate on single calculation element, or are distributed on the network that multiple calculation elements form.Alternatively, they can be realized with the executable program code of calculation element.Thereby, they can be stored in memory storage and be carried out by calculation element, or they are made into respectively to each integrated circuit modules, or the multiple modules in them or step are made into single integrated circuit module realize.Like this, the present invention is not restricted to any specific hardware and software combination.
Although the disclosed embodiment of the present invention as above, the embodiment that described content only adopts for ease of understanding the present invention, not in order to limit the present invention.Those of skill in the art under any the present invention; do not departing under the prerequisite of the disclosed spirit and scope of the present invention; can in the form of implementing and details, carry out any amendment and variation; but scope of patent protection of the present invention, still must be as the criterion with the scope that appending claims was defined.

Claims (10)

1. a recognition methods for ID (identity number) card No., comprising:
From character stream, identifying may be the character string of ID (identity number) card No.;
Adopt ID (identity number) card No. coding rule may verify for the character string of ID (identity number) card No. described;
To may be that the character string of ID (identity number) card No. is as may effective ID (identity number) card No. by checking described.
2. method according to claim 1, wherein, from character stream, identifying to be the character string of ID (identity number) card No., comprising:
Employing can be to significant figure, can ignore the Hash table that character, unallowable instruction digit and possible end mark distinguish carries out character recognition to described character stream;
It may be the character string of ID (identity number) card No. that the character string of the character string of ten eight digit number words compositions or 17 bit digital and X or x is identified as described.
3. method according to claim 1, wherein, adopts ID (identity number) card No. coding rule may verify for the character string of ID (identity number) card No. described, comprising:
Adopt ID (identity number) card No. coding rule may carry out the checking of address code, date of birth code and the check code of ID (identity number) card No. for the character string of ID (identity number) card No. to described.
4. method according to claim 3, wherein, adopts ID (identity number) card No. coding rule may carry out the checking of the address code of ID (identity number) card No. for the character string of ID (identity number) card No. to described, comprising:
Utilize two-dimensional array may carry out the checking of described address code for the first six digits character in the character string of ID (identity number) card No. to described.
5. method according to claim 4, wherein:
The first dimension of utilizing described two-dimensional array to described may be for the front three character in the character string of ID (identity number) card No. carries out the checking of the six administrative areas of the People's Republic of China number of described address code, the second dimension of utilizing described two-dimensional array may be carried out for the 4th to six characters in the character string of ID (identity number) card No. the checking of number in the district of described address code to described;
Wherein, the length that described two-dimensional array first is tieed up is more than or equal to the quantity of the represented effective six administrative areas of the People's Republic of China number of three bit digital, and the length of the second dimension is more than or equal to the quantity of number in the represented district of interior three bit digital of all effective six administrative areas of the People's Republic of China number.
6. a recognition device for ID (identity number) card No., comprising:
Identification module, being configured to identify from character stream may be the character string of ID (identity number) card No.;
Authentication module, is configured to adopt ID (identity number) card No. coding rule may verify for the character string of ID (identity number) card No. described;
Execution module, is configured to may be for the character string of ID (identity number) card No. is as effective ID (identity number) card No. by the described of checking.
7. device according to claim 6, wherein, described identification module comprises:
Recognition unit, being configured to adopt can be to significant figure, can ignore the Hash table that character, unallowable instruction digit and possible end mark distinguish carries out character recognition to described character stream;
Judging unit, being configured to the character string of the character string of ten eight digit number words compositions or 17 bit digital and X or x to be identified as described may be the character string of ID (identity number) card No..
8. device according to claim 6, wherein, described authentication module comprises:
The first authentication unit, is configured to adopt ID (identity number) card No. coding rule may carry out the checking of the address code of ID (identity number) card No. for the character string of ID (identity number) card No. to described;
The second authentication unit, is configured to adopt ID (identity number) card No. coding rule may carry out the checking of the date of birth code of ID (identity number) card No. for the character string of ID (identity number) card No. to described;
The 3rd authentication unit, is configured to adopt ID (identity number) card No. coding rule may carry out the checking of the check code of ID (identity number) card No. for the character string of ID (identity number) card No. to described.
9. device according to claim 8, wherein:
Described the first verification units configured is to utilize two-dimensional array may carry out the checking of described address code for the first six digits character in the character string of ID (identity number) card No. to described.
10. device according to claim 9, wherein:
Described the first verification units configured be the first dimension of utilizing described two-dimensional array to described may be for the front three character in the character string of ID (identity number) card No. carries out the checking of the six administrative areas of the People's Republic of China number of described address code, the second dimension of utilizing described two-dimensional array may be carried out for the 4th to six characters in the character string of ID (identity number) card No. the checking of number in the district of described address code to described;
Wherein, the length that described two-dimensional array first is tieed up is more than or equal to the quantity of the represented effective six administrative areas of the People's Republic of China number of three bit digital, and the length of the second dimension is more than or equal to the quantity of number in the represented district of interior three bit digital of all effective six administrative areas of the People's Republic of China number.
CN201310134135.2A 2013-04-17 2013-04-17 A kind of recognition methods of ID card No. and device Expired - Fee Related CN104111932B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310134135.2A CN104111932B (en) 2013-04-17 2013-04-17 A kind of recognition methods of ID card No. and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310134135.2A CN104111932B (en) 2013-04-17 2013-04-17 A kind of recognition methods of ID card No. and device

Publications (2)

Publication Number Publication Date
CN104111932A true CN104111932A (en) 2014-10-22
CN104111932B CN104111932B (en) 2018-02-13

Family

ID=51708727

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310134135.2A Expired - Fee Related CN104111932B (en) 2013-04-17 2013-04-17 A kind of recognition methods of ID card No. and device

Country Status (1)

Country Link
CN (1) CN104111932B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106682629A (en) * 2016-12-30 2017-05-17 佳都新太科技股份有限公司 Identification number identification algorithm in complicated background
CN109284593A (en) * 2018-09-06 2019-01-29 北京旷视科技有限公司 Auth method, device and electronic equipment
CN110020640A (en) * 2019-04-19 2019-07-16 厦门商集网络科技有限责任公司 A kind of method and terminal for correcting ID card information
CN111669616A (en) * 2020-06-23 2020-09-15 杭州海康威视系统技术有限公司 Encoding and decoding method and device and computer storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5421619A (en) * 1993-12-22 1995-06-06 Drexler Technology Corporation Laser imaged identification card
CN101651938A (en) * 2009-07-02 2010-02-17 优视动景(北京)技术服务有限公司 Telephone number recognition system for mobile terminal and application method thereof
CN101976333A (en) * 2010-11-18 2011-02-16 上海合合信息科技发展有限公司 Method for automatically distinguishing first-generation identity card from second-generation identity card
CN102982012A (en) * 2011-09-07 2013-03-20 百度在线网络技术(北京)有限公司 Method and device used for obtaining target character strings in disorder text

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5421619A (en) * 1993-12-22 1995-06-06 Drexler Technology Corporation Laser imaged identification card
CN101651938A (en) * 2009-07-02 2010-02-17 优视动景(北京)技术服务有限公司 Telephone number recognition system for mobile terminal and application method thereof
CN101976333A (en) * 2010-11-18 2011-02-16 上海合合信息科技发展有限公司 Method for automatically distinguishing first-generation identity card from second-generation identity card
CN102982012A (en) * 2011-09-07 2013-03-20 百度在线网络技术(北京)有限公司 Method and device used for obtaining target character strings in disorder text

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106682629A (en) * 2016-12-30 2017-05-17 佳都新太科技股份有限公司 Identification number identification algorithm in complicated background
CN106682629B (en) * 2016-12-30 2019-12-13 佳都新太科技股份有限公司 Identification algorithm for identity card number under complex background
CN109284593A (en) * 2018-09-06 2019-01-29 北京旷视科技有限公司 Auth method, device and electronic equipment
CN110020640A (en) * 2019-04-19 2019-07-16 厦门商集网络科技有限责任公司 A kind of method and terminal for correcting ID card information
CN110020640B (en) * 2019-04-19 2021-08-24 厦门商集网络科技有限责任公司 Method and terminal for correcting identity card information
CN111669616A (en) * 2020-06-23 2020-09-15 杭州海康威视系统技术有限公司 Encoding and decoding method and device and computer storage medium
CN111669616B (en) * 2020-06-23 2022-11-04 杭州海康威视系统技术有限公司 Encoding and decoding method and device and computer storage medium

Also Published As

Publication number Publication date
CN104111932B (en) 2018-02-13

Similar Documents

Publication Publication Date Title
CN103699585B (en) Methods, devices and systems for file metadata storage and file recovery
US9705761B2 (en) Opinion information display system and method
CN106170002B (en) A kind of counterfeit domain name detection method of Chinese and system
CN106709032A (en) Method and device for extracting structured information from spreadsheet document
CN103646110A (en) Natural person basic identity information matching method
CN106294222A (en) A kind of method and device determining PCIE device and slot corresponding relation
CN104111932A (en) Recognition method and device of ID (identity) card numbers
CN105653984B (en) File fingerprint method of calibration and device
Cui et al. Complex building description and extraction based on Hough transformation and cycle detection
CN103136358B (en) A kind of method of Automatic Extraction forum data
CN103761221B (en) System and method for identifying sensitive text messages
CN104408190A (en) Spark based data processing method and device
CN104699785A (en) Paper similarity detection method
CN103164515A (en) Computer system confidential file knowledge base searching method
CN104618132A (en) Generation method and generation device for application program recognition rule
CN110138794A (en) A kind of counterfeit website identification method, device, equipment and readable storage medium storing program for executing
CN106611024B (en) File merging method and device
CN106528068A (en) Webpage content reconstruction method and system
CN113489704A (en) Sensitive data identification method and device based on flow, electronic equipment and medium
CN105718453B (en) The method and system that data import
CN110909110A (en) Address standardization method and device, storage medium and processor
CN105608205B (en) The finger-mark check method and device of structural data
CN104408097A (en) Hybrid indexing method and system based on character field hot update
CN102542183B (en) Copyright of network literature detection method and system
CN107784022B (en) Method and device for detecting whether legal documents are repeated

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20180213