CN104111932B - A kind of recognition methods of ID card No. and device - Google Patents

A kind of recognition methods of ID card No. and device Download PDF

Info

Publication number
CN104111932B
CN104111932B CN201310134135.2A CN201310134135A CN104111932B CN 104111932 B CN104111932 B CN 104111932B CN 201310134135 A CN201310134135 A CN 201310134135A CN 104111932 B CN104111932 B CN 104111932B
Authority
CN
China
Prior art keywords
card
character
character string
code
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.)
Expired - Fee Related
Application number
CN201310134135.2A
Other languages
Chinese (zh)
Other versions
CN104111932A (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 kind of recognition methods of ID card No. and device, overcomes there is presently no more ripe the defects of ID card No. is identified from network data, this method includes:Identify to be the character string of ID card No. from character stream;ID card No. coding rule is used to be verified to described for the character string of ID card No.;Possible effective ID card No. will may be used as the character string of ID card No. by the described of checking.Embodiments herein can carry out filtering identification in networking security field to the web page contents of big flow, and accuracy is high, speed is fast, committed memory space is small on hardware device.

Description

A kind of recognition methods of ID card No. and device
Technical field
The present invention relates to recognition methods and the device of Number Reorganization technology, more particularly to a kind of ID card No..
Background technology
The identification of ID card No. is in networking security field, such as intrusion detection, short message filtering, information inquiry etc. There is important application.With network technology development and Internet the network information such as popularization, personal information safety and Protection, is increasingly valued by people.
The identification of ID card No. herein, refers in the information processing system of networking, from network data or from file In data (such as webpage), identify and extract effective ID card No..These numbers are likely to be disobeying for some people on networking Rule issue, easily causes the leakage of individual privacy information.
Can be by identifying ID card No., and early warning or the means such as hide, to protect the violation of ID card information Leakage.But current this respect is also without more ripe technology.
The content of the invention
The technical problems to be solved by the invention are to overcome there is presently no more ripe to identify body from network data The defects of part card number.
In order to solve the above-mentioned technical problem, the invention provides a kind of recognition methods of ID card No., including:
Identify to be the character string of ID card No. from character stream;
ID card No. coding rule is used to be verified to described for the character string of ID card No.;
Possible effective ID card No. will may be used as the character string of ID card No. by the described of checking.
Preferably, identify to be the character string of ID card No. from character stream, including:
Using the Hash that can be made a distinction to effective digital, negligible character, forbidden character and possible end mark Table carries out character recognition to the character stream;
The character string of ten eight-digit number words composition or 17 bit digitals and an X or x character string are identified as described It may be the character string of ID card No..
Preferably, ID card No. coding rule is used to be verified to described for the character string of ID card No., Including:
ID card No. coding rule is used to carry out ID card No. for the character string of ID card No. to described The checking of address code, date of birth code and check code.
Preferably, ID card No. coding rule is used to carry out identity card for the character string of ID card No. to described The checking of the address code of number, including:
Using two-dimensional array the address may be carried out to described for the first six digits character in the character string of ID card No. The checking of code.
Preferably, using the two-dimensional array first dimension to it is described may be ID card No. character string in first three Position character carries out the checking of the six administrative areas of the People's Republic of China number of the address code, may be to described using the second dimension of the two-dimensional array The four to six character in the character string of ID card No. carries out the checking of number in the area of the address code;
Wherein, the length that the two-dimensional array first is tieed up is more than or equal to the effective six administrative areas of the People's Republic of China number represented by three bit digitals The quantity of code, the length of the second dimension are more than or equal to number in the area in all effective six administrative areas of the People's Republic of China numbers represented by three bit digitals Quantity.
Present invention also provides a kind of identification device of ID card No., including:
Identification module, it is the character string of ID card No. to be configured to identify from character stream;
Authentication module, it is configured to use ID card No. coding rule to described for the character string of ID card No. may to enter Row checking;
Execution module, it is configured to that possibility will may be used as effectively for the character string of ID card No. by the described of checking ID card No..
Preferably, the identification module includes:
Recognition unit, it is configured to using can be to effective digital, negligible character, forbidden character and possible end mark The Hash table made a distinction carries out character recognition to the character stream;
Judging unit, it is configured to the character string or 17 bit digitals and an X or x word of ten eight-digit number words composition Symbol string, which is identified as described, to be the character string of ID card No..
Preferably, the authentication module includes:
First authentication unit, be configured to use ID card No. coding rule to it is described may be the character of ID card No. String carries out the checking of the address code of ID card No.;
Second authentication unit, be configured to use ID card No. coding rule to it is described may be the character of ID card No. String carries out the checking of the date of birth code of ID card No.;
3rd authentication unit, be configured to use ID card No. coding rule to it is described may be the character of ID card No. String carries out the checking of the check code of ID card No..
Preferably, first verification units configured be using two-dimensional array to it is described may be ID card No. character First six digits character in string carries out the checking of the address code.
Preferably, first verification units configured be using the two-dimensional array first dimension to it is described may be identity The checking that the front three character in the character string of number carries out the six administrative areas of the People's Republic of China number of the address code is demonstrate,proved, utilizes the two-dimemsional number Second dimension of group is to the area that the address code may be carried out for the four to six character in the character string of ID card No. The checking of interior number;
Wherein, the length that the two-dimensional array first is tieed up is more than or equal to the effective six administrative areas of the People's Republic of China number represented by three bit digitals The quantity of code, the length of the second dimension are more than or equal to number in the area in all effective six administrative areas of the People's Republic of China numbers represented by three bit digitals Quantity.
Compared with prior art, embodiments herein can be carried out in networking security field to the web page contents of big flow Filtering identification, accuracy is high, speed is fast, committed memory space is small on hardware device.Embodiments herein passes through to by three The numerical value of big area code is mapped as 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 illustrated in the following description, also, partly becomes from specification Obtain it is clear that or being understood by implementing the present invention.The purpose of the present invention and other advantages can be by specification, rights Specifically noted structure is realized and obtained in claim and accompanying drawing.
Brief description of the drawings
Accompanying drawing is used for providing further understanding technical solution of the present invention, and a part for constitution instruction, with this The embodiment of application is used to explain technical scheme together, does not form the limitation to technical solution of the present invention.
Fig. 1 is the schematic flow sheet of the recognition methods of the ID card No. of the embodiment of the present application.
Fig. 2 is the schematic flow sheet of the identifying system of the ID card No. of the embodiment of the present application.
Embodiment
Embodiments of the present invention are described in detail below with reference to drawings and Examples, and how the present invention is applied whereby Technological means solves technical problem, and the implementation process for reaching technique effect can fully understand and implement according to this.The application is real Apply each feature be combineding with each other under the premise of not colliding in example and embodiment, protection scope of the present invention it It is interior.
In addition, can be in the department of computer science of such as one group computer executable instructions the flow of accompanying drawing illustrates the step of Performed in system.Also, although logical order is shown in flow charts, in some cases, can be with different from herein Order perform shown or described step.
The China second-generation identity card that China applies at present, includes 18 numbers, and its coding rule is wrapped in 18 numbers One-bit digital check code containing 17 bit digital body codes and after 17 bit digital body codes.Wherein 17 bit digital sheets Six bit digital address codes, eight-digit number word date of birth code and three bit digital sequence codes are included in body code successively.Wherein six bit digitals The administrative division code of the address code presentation code object place where someone is permanent residents;The birth of date of birth representation coded object Year, month, day, wherein time are represented with 4-digit number, and separator is not had between year, month, day;The same address code institute of order representation In the regional extent of mark, serial number that the personnel being born on the same day of the same month of the same year are compiled and edited.Check code is according to above 17 Digital code, according to ISO7064:The result that 1983.MOD11-2 checking algorithms calculate.
In six bit digital address codes, the province code of the first and second bit digital presentation code object place where someone is permanent residents, the 3rd, the city codes of the 4-digit number presentation code object place where someone is permanent residents, the five, the six bit digital presentation code objects are permanent The district code in registered permanent residence location.Can also be using the front three in six bit digital address codes as six administrative areas of the People's Republic of China number, latter three As number in area.
In eight date of birth codes, four time codes, two months code and two date codes are followed successively by.Four time codes Virtual value is to be less than or equal to 2100 more than or equal to 1900.Two months code virtual value be more than or equal to 1 be less than or equal to 12.Two Date code when two months, code was 1,3,5,7,8,10 and 12 be more than or equal to 1 be less than or equal to 31, two months code be 4th, 6,9 and 11 when be to be less than or equal to 30 more than or equal to 1, two months code be 2 and be big during four representation leap years in time In being less than or equal to 29 equal to 1, two months code be 2 and be to be less than or equal to 28 more than or equal to 1 during four representation non-leap years in time.
The assigned code in the front two presentation code object place where someone is permanent residents administrative local police station of government in three sequence codes, 3rd represents sex by odd even.Embodiments herein is not verified and confirmed to three sequence codes.
One identifying code can be checked according to 17 bit digital body codes and canonical algorithm.In itself and checking computation results Represent that the 17 bit digital body code and the identifying code are an authentic and valid ID card No. when equal, with checking computation results not phase Represent that the 17 bit digital body code and the identifying code are an invalid ID card No. during symbol.
In actual life, for convenience of ID card No. is read and write, some optional words are often inserted among ID card No. Symbol, such as dash or period etc., merogenesis is carried out to ID card No..
As shown in figure 1, the recognition methods of the ID card No. of the embodiment of the present application mainly includes following content.
S110, identify to be the character string of ID card No. from the character stream of network data using Hash table.
Embodiments herein utilizes can be to effective digital, negligible character, forbidden character and possible end mark 256 character Hash (hash) tables of the octet made a distinction carry out character recognition.The character Hash table be effective digital, Negligible character, forbidden character and possible end mark set different values.Specifically, embodiments herein is by significant figure The value of word is set to 1, the value of negligible character be set to 2, forbidden character value be set to 3 and will likely the value of end mark be set to 4.
The character string includes insignificant additional character, numeral and end that may be present in embodiments herein Symbol, the end mark represent character X or x.When wherein the character string includes end mark X or x, the numeral in the character string is 17 Position;When the character string does not include end mark X or x, the numeral in the character string is 18.The word that ten eight-digit number words are formed Symbol string or 17 bit digitals and an X or x character string are identified as being the character string of ID card No..
S120, the character string is verified using ID card No. coding rule.Wherein checking, mainly according to body Checking of part card number coding rule to the address code of character string progress ID card No., date of birth code and check code.
S130, the character string by checking is used as may effective ID card No..
Embodiments herein establishes the character HASH tables that length is 256, and incite somebody to action according to the possibility numerical value of 8 characters The value of effective digital is set to 1, the value of negligible character be set to 2, forbidden character value be set to 3 and will likely end mark value It is set to 4.The value for representing effective digital is 1, and the effective digital is 10 numerals, including character 0 to 9.Represent for separation can The value for ignoring character is 2, and insignificant 9 characters include in embodiments herein:Space, tab characters, carriage return, line feed, Point, dash (-), equal to number (=), folding number (/), reflexed number ().Expression may be that the character of ID card No. end mark is X or x value is 3.It is not that the character of foregoing 10 numerals, negligible character and end mark is used as idle character, its value is 4。
In the other embodiment of the application, the character ignored for representing to separate can also have more, such as exclamation mark (!), asterisk (*), pound sign (#) etc., every can appear in be used to be separated ID card No. among ID card No. And the character conveniently read and write, the negligible character in the embodiment of the present application is can be considered, it is breathed out in the character of the embodiment of the present application Uncommon table intermediate value is 2.
When reading input character string, by character HASH tables, the type attribute of character is read, and take different behaviour Make.A character in pending character string is read every time, the numerical value of character HASH tables is read using the character as subscript, for value For 1 significant character, recorded when record length is less than 19, otherwise abandoned.It is direct for 2 negligible character for being worth Abandon.For being worth the end mark for 3, if the length of the character string recorded is 18, the character string recorded may be exactly One effective ID card No., complete extraction work;If the length of the character string recorded is 17, end mark is recorded Into character string as a possible effective ID card No., extraction work is completed;The character string recorded of other length It is not an ID card No., removes the character string (clear buffer) recorded.For being worth the forbidden character for 4, if The length of the character string recorded is 18, then effectively ID card No. may be carried the character string that this has been recorded as one Hand over, otherwise remove the character string (clear buffer) recorded.
The character HASH tables that embodiments herein is established, data item corresponding to each ascii codes are the ascii codes Attribute.Value such as hash [48] for 1, ascii codes 48 is character ' 0 ', therefore its numerical value is 1 (effective identity card character), hash [45] value is that 2, ascii codes 45 are character '-', therefore its numerical value is 2 (insignificant separating characters).Embodiments herein According to default character HASH tables, using the character to be detected in data flow as subscript, inquiry draws the type of character.Judging to appoint During one character, it is only necessary to judge its hash [a] numerical value.
Embodiments herein is by once tabling look-up, you can completes the processing of character, effective identity card character is remembered Record, finalization process is carried out to invalid identity card character, negligible character is filtered and the judgement to end mark is handled, knot Identity card number length is closed, the character string being consistent with identification card number code length item is quickly drawn, completes carrying for ID card No. Take and verify work.
Six bit digital address codes are divided into the six administrative areas of the People's Republic of China number and three bit digitals of three bit digitals by embodiments herein Number in area.Embodiments herein using two-dimensional array to may be ID card No. character string in first six digits character enter Row checking.The length that two-dimensional array first is tieed up is more than or equal to the quantity of the effective six administrative areas of the People's Republic of China number represented by three bit digitals, The length of second dimension is more than or equal to the quantity of number in the area in all effective six administrative areas of the People's Republic of China numbers represented by three bit digitals.Profit With the first of two-dimensional array the dimension to may be ID card No. character string in front three character carry out the big administration of address code The checking of area code code, using two-dimensional array second dimension to may be ID card No. character string in the four to six character Carry out the checking of number in the area of address code.First dimension of the two-dimensional array records big row all in effective ID card No. Administrative division number, the second dimension record have under all effectively six administrative areas of the People's Republic of China numbers number in effective district.Embodiments herein, the two dimension First dimension of array be one-dimensional great Qu hash tables, and the second dimension is two-dimentional administrative area hash tables, by the one-dimensional great Qu hash tables with Two-dimentional administrative area hash tables carry out the quick identification for carrying out six bit digital address codes.
The length that two-dimensional array first is tieed up is more than or equal to the quantity of the effective six administrative areas of the People's Republic of China number represented by three bit digitals, The length of second dimension is more than or equal to the quantity of number in the area in all effective six administrative areas of the People's Republic of China numbers represented by three bit digitals.By In the six administrative areas of the People's Republic of China, number has many null values, and embodiments herein utilizes big area code code to save the memory headroom of hardware device Mapping table verifies that the space of the big area code code mapping table is more than 0 but is less than three to the six administrative areas of the People's Republic of China number of three bit digitals The numerical value 0-999 of the big area code of bit digital is mapped as the valid interval that a numerical value is less than 999, for example is the effective of 0-149 Section.The six administrative areas of the People's Republic of China number of current national identification card number code is stored with the big area code code mapping table.
Embodiments herein is in the area of each three bit digital using number mapping table in the area that length is 1000 Number is verified, wherein number in the area of three bit digitals is stored, for being carried out to three bit digitals after the number of the six administrative areas of the People's Republic of China Checking.By tabling look-up twice, you can complete the validation of six bit digital address codes.
To save space, embodiments herein establishes administrative area HASH tables with completing in ID card No. six bit digitals The fast verification of location code.The mapping of three six administrative areas of the People's Republic of China numbers of identity card is established, the data value of 1000 length is mapped as 150 length The data item occurrence of degree, 150*1000 two-dimensional array is resettled, complete the confirmation of six bit address codes.Wherein, great Qu HASH tables are used To complete the HASH of the six administrative areas of the People's Republic of China number in ID card No. mappings.Because number hollow remainder values in the six administrative areas of the People's Republic of China are more, this The embodiment of application is mapped as the codomain scope that a length is 150, and the internal memory greatly reduced needed for hardware device is empty Between.In great Qu HASH tables, 0-148 items each correspond to an effective six administrative areas of the People's Republic of China number, and the 149th represents invalid area code. The numerical value of great Qu HASH tables, as first subscript variable of two-dimensional array, number is used as two dimension in the area in ID card No. Second dimension subscript variable of array.In the two dimension HASH tables of administrative area, numerical value 0 represents that the number is not an effective address code, Numerical value 1 represents that the number is an effective address code.
Such as the character string got from webpage " aaaa123asd110.108- 196212302873uuuuuuuuuu ", character " aaaa " is successively read first, judge that it is all invalidation word by character HASH tables Symbol, delete.Then character " 123 " is read, judges that it, for significant character, is recorded by character HASH tables.And then read " asd ", when reading character " a ", the digit length of the character string recorded is 3, is not the length 15 of effective ID card No. Or 18, therefore it is not that effective character abandons;Equally " sd " character also abandons, and the character string " 123 " recorded The character in an effective ID card No. can not possibly have been turned into, therefore also abandoned.And then " 110.108- is read 196212302873 ", due to judging that " 110 ", " 108 " and " 196212302873 " are all effective words by character HASH tables Symbol, then sequentially recorded, while judge that character " " and "-" are negligible characters by character HASH tables, by this two Individual character is ignored.Because recorded character string " 110108196212302873 " has reached 18 bit lengths, then made Number is demonstrate,proved for a possible province to be stored, and is made whether to be the judgement of effective ID card No. to it.Using area Number judge that sentence Hash2 [hash1 [110]] [108] is judged, the HASH values for obtaining big area code 110 are 1, Hash2 [1] [108] item is 1, and effectively, first six digits character " 110108 " is an effective address code.Then " 19621230 " are made whether For the judgement of an effective date of birth code, finally using ISO7064:1983.MOD11-2 checking algorithms are to character string " 110108196212302873 " last character " 3 " is verified.Accordingly, it can be determined that go out character string Whether " 110108196212302873 " are a possible effective ID card No..
As shown in Fig. 2 the identification device of the ID card No. of the embodiment of the present application mainly includes identification module 210, checking Module 220 and execution module 230.
Identification module 210, it is the character string of ID card No. to be configured to identify from character stream;
Authentication module 220, it is connected with identification module 210, is configured to using ID card No. coding rule to the possibility Verified for the character string of ID card No.;
Execution module 230, it is connected with authentication module 220, is configured to be ID card No. by the described of checking Character string as may effective ID card No..
As shown in Fig. 2 above-mentioned identification module 210 includes recognition unit 211 and judging unit 212.
Recognition unit 211, it is configured to using can be to effective digital, negligible character, forbidden character and possible knot The Hash table that beam symbol makes a distinction carries out character recognition to the character stream;
Judging unit 212, it is connected with recognition unit 211 and authentication module 220, is configured to the word for forming ten eight-digit number words Symbol string or 17 bit digitals and an X or x character string, which are identified as described, to be the character string of ID card No..
As shown in Fig. 2 above-mentioned authentication module 220 includes the first authentication unit 221, the second authentication unit 222 and the 3rd Authentication unit 223.
First authentication unit 221, it is connected with the judging unit 212 in execution module 230 and identification module 210, is configured to ID card No. coding rule is used to the address code that ID card No. may be carried out for the character string of ID card No. Checking;
Second authentication unit 222, it is connected with the judging unit 212 in execution module 230 and identification module 210, is configured to ID card No. coding rule is used to the date of birth that ID card No. may be carried out for the character string of ID card No. The checking of code;
3rd authentication unit 223, it is connected with the judging unit 212 in execution module 230 and identification module 210, is configured to ID card No. coding rule is used to the check code that ID card No. may be carried out for the character string of ID card No. Checking.
Above-mentioned first authentication unit 221 be configured to using two-dimensional array to it is described may be ID card No. character string in First six digits character carry out the checking of the address code.
Above-mentioned first authentication unit 221 be configured to using the two-dimensional array first dimension to it is described may be identification card number Front three character in the character string of code carries out the checking of the six administrative areas of the People's Republic of China number of the address code, utilizes the two-dimensional array Second dimension to it is described may be ID card No. character string in the four to six character carry out in the area of the address code number The checking of code.The length that the two-dimensional array first is tieed up is more than or equal to the effective six administrative areas of the People's Republic of China number represented by three bit digitals Quantity, the length of the second dimension are more than or equal to the number of number in the area in all effective six administrative areas of the People's Republic of China numbers represented by three bit digitals Amount.
Those skilled in the art should be understood that each part for the device that above-mentioned the embodiment of the present application is provided, And each step in method, they can be concentrated on single computing device, or are distributed in multiple computing device institutes group Into network on.Alternatively, they can be realized with the program code that computing device can perform.It is thus possible to they are deposited Storage performed in the storage device by computing device, either they are fabricated to respectively each integrated circuit modules or by it In multiple modules or step be fabricated to single integrated circuit module to realize.So, the present invention is not restricted to any specific Hardware and software combine.
Although disclosed herein embodiment as above, described content be only readily appreciate the present invention and use Embodiment, it is not limited to the present invention.Technical staff in any art of the present invention, taken off not departing from the present invention On the premise of the spirit and scope of dew, any modification and change, but the present invention can be carried out in the form and details of implementation Scope of patent protection, still should be subject to the scope of the claims as defined in the appended claims.

Claims (10)

1. a kind of recognition methods of ID card No., including:
Identify to be the character string of ID card No. from character stream;
ID card No. coding rule is used to be verified to described for the character string of ID card No.;
Possible effective ID card No. will may be used as the character string of ID card No. by the described of checking;
It may enter row address for the front three character in the character string of ID card No. to described using the first dimension of two-dimensional array The checking of the six administrative areas of the People's Republic of China number of code;
Wherein, the length that the two-dimensional array first is tieed up is more than or equal to the effective six administrative areas of the People's Republic of China number represented by three bit digitals Quantity.
2. according to the method for claim 1, wherein, identify to be the character string of ID card No. from character stream, Including:
Using the Hash table pair that can be made a distinction to effective digital, negligible character, forbidden character and possible end mark The character stream carries out character recognition;
The character string of ten eight-digit number words composition or 17 bit digitals and an X or x character string are identified as the possibility For the character string of ID card No..
3. according to the method for claim 1, wherein, use ID card No. coding rule to it is described may be identification card number Code character string verified, including:
ID card No. coding rule is used to the address that ID card No. may be carried out for the character string of ID card No. The checking of code, date of birth code and check code.
4. according to the method for claim 3, wherein, use ID card No. coding rule to it is described may be identification card number The character string of code carries out the checking of the address code of ID card No., including:
Using two-dimensional array the address code may be carried out to described for the first six digits character in the character string of ID card No. Checking.
5. the method according to claim 11, wherein:
Using the two-dimensional array second dimension to it is described may be ID card No. character string in the four to six character Carry out the checking of number in the area of the address code;
Wherein, the length that the two-dimensional array second is tieed up is more than or equal to three bit digital institute tables in all effective six administrative areas of the People's Republic of China numbers The quantity of number in the area shown.
6. a kind of identification device of ID card No., including:
Identification module, it is the character string of ID card No. to be configured to identify from character stream;
Authentication module, it is configured to use ID card No. coding rule to test for the character string of ID card No. described Card;
Execution module, it is configured to that possible effective identity will may be used as by the described of checking for the character string of ID card No. Demonstrate,prove number;
The authentication module includes:First authentication unit;
First verification units configured be using two-dimensional array first dimension to it is described may be ID card No. character string In front three character carry out address code six administrative areas of the People's Republic of China number checking;
Wherein, the length that the two-dimensional array first is tieed up is more than or equal to the effective six administrative areas of the People's Republic of China number represented by three bit digitals Quantity.
7. device according to claim 6, wherein, the identification module includes:
Recognition unit, being configured to use can be carried out to effective digital, negligible character, forbidden character and possible end mark The Hash table of differentiation carries out character recognition to the character stream;
Judging unit, it is configured to the character string or 17 bit digitals and an X or x character string for forming ten eight-digit number words It is the character string of ID card No. to be identified as described.
8. device according to claim 6, wherein,
First authentication unit, be additionally configured to use ID card No. coding rule to it is described may be the character string of ID card No. Carry out the checking of the address code of ID card No.;
The authentication module also includes:
Second authentication unit, it is configured to use ID card No. coding rule to described for the character string of ID card No. may to enter The checking of the date of birth code of row ID card No.;
3rd authentication unit, it is configured to use ID card No. coding rule to described for the character string of ID card No. may to enter The checking of the check code of row ID card No..
9. device according to claim 8, wherein:
First verification units configured be using two-dimensional array to it is described may be ID card No. character string in the first six Position character carries out the checking of the address code.
10. device according to claim 9, wherein:
First verification units configured be using the two-dimensional array second dimension to it is described may be ID card No. word The four to six character in symbol string carries out the checking of number in the area of the address code;
Wherein, the length that the two-dimensional array second is tieed up is more than or equal to three bit digital institute tables in all effective six administrative areas of the People's Republic of China numbers The quantity of number in the area shown.
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 CN104111932A (en) 2014-10-22
CN104111932B true 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)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
CN110020640B (en) * 2019-04-19 2021-08-24 厦门商集网络科技有限责任公司 Method and terminal for correcting identity card information
CN111669616B (en) * 2020-06-23 2022-11-04 杭州海康威视系统技术有限公司 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

Also Published As

Publication number Publication date
CN104111932A (en) 2014-10-22

Similar Documents

Publication Publication Date Title
CN104111932B (en) A kind of recognition methods of ID card No. and device
CN102737183B (en) Method and device for webpage safety access
CN106709032A (en) Method and device for extracting structured information from spreadsheet document
CN104035839B (en) Android system private data recovers implementation method
JP2015053735A5 (en)
CN206003441U (en) A kind of anti-counterfeiting mark
CN107180479B (en) Bill identification method, device, equipment and storage medium
CN105653984B (en) File fingerprint method of calibration and device
CN107704501A (en) A kind of method and system for identifying homologous binary file
CN111814793A (en) Medicine image-text information violation detection method and system
CN112015806A (en) Method and device for storing data by block chain
CN112541443A (en) Invoice information extraction method and device, computer equipment and storage medium
CN106326407A (en) Method for abstracting security baseline knowledge bases of different formats
CN106547895A (en) A kind of extracting method and device of info web
CN105608205B (en) The finger-mark check method and device of structural data
CN113489704A (en) Sensitive data identification method and device based on flow, electronic equipment and medium
JP5810179B2 (en) Two-dimensional code generation method, two-dimensional code generation device, program, two-dimensional code reading method, and two-dimensional code reading device
CN107784610A (en) Basic drug information proofreading method and device
CN105592087A (en) DNP abnormity detection method based on vector machine learning
CN113536782A (en) Sensitive word recognition method and device, electronic equipment and storage medium
CN104766349A (en) Geometrical form graph coding and decoding method applied to external packing of commodities
CN107193788A (en) Construction industry engineering project Excel file data format storage method and system
CN108255866A (en) Check the method and apparatus linked in website
CN106815249B (en) Vertical text advertisement filtering method and device
CN113282952B (en) Engineering system design file tampering detection positioning method and device

Legal Events

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

Granted publication date: 20180213

CF01 Termination of patent right due to non-payment of annual fee