CN110020640B - Method and terminal for correcting identity card information - Google Patents

Method and terminal for correcting identity card information Download PDF

Info

Publication number
CN110020640B
CN110020640B CN201910316776.7A CN201910316776A CN110020640B CN 110020640 B CN110020640 B CN 110020640B CN 201910316776 A CN201910316776 A CN 201910316776A CN 110020640 B CN110020640 B CN 110020640B
Authority
CN
China
Prior art keywords
address
address information
information
level
card
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.)
Active
Application number
CN201910316776.7A
Other languages
Chinese (zh)
Other versions
CN110020640A (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.)
Xiamen Shangji Network Technology Co ltd
Original Assignee
Xiamen Shangji Network 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 Xiamen Shangji Network Technology Co ltd filed Critical Xiamen Shangji Network Technology Co ltd
Priority to CN201910316776.7A priority Critical patent/CN110020640B/en
Publication of CN110020640A publication Critical patent/CN110020640A/en
Application granted granted Critical
Publication of CN110020640B publication Critical patent/CN110020640B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/22Image preprocessing by selection of a specific region containing or referencing a pattern; Locating or processing of specific regions to guide the detection or recognition
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/40Document-oriented image-based pattern recognition
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • Character Discrimination (AREA)

Abstract

The invention relates to a method and a terminal for correcting identity card information, and belongs to the field of data processing. The method comprises the steps of calling an OCR engine to identify the number of the identity card to obtain the number of the identity card; calling an OCR engine to identify the address of the identity card to obtain the address of the identity card; acquiring three-level address information corresponding to the first six bits of the identification number; the third-level address information comprises provincial-level address information, city-level address information and county-level address information; correcting the first part of the ID card address according to the tertiary address information; the identity card address comprises a first part and a second part; the first part comprises provincial, city and county addresses; the second part is address information of the identity card address except the first part; and correcting the second part of the ID card address according to a preset address information base. The time for correcting the information of the identity card is shortened.

Description

Method and terminal for correcting identity card information
Technical Field
The invention relates to a method and a terminal for correcting identity card information, and belongs to the field of data processing.
Background
After the OCR engine scans the identity card, the identity card information is identified so as to provide data for subsequent business processing. Since the recognition accuracy of the OCR engine cannot reach 100%, after the OCR engine recognizes the identification card information, the identification card information needs to be corrected to improve the accuracy of the identification card information. The identity card address is generally corrected through empirical values, for example, characters "mansion" and "" are particularly similar and are easy to be confused, and the "mansion city" is easy to be recognized as " city" by an OCR recognition engine. Since addresses generally only appear in "Xiamen", the "Xiamen" is used directly in the correction process to replace "". The method for directly replacing and correcting has limited correcting quantity and is easy to cause excessive replacement due to over subjectivity in practical algorithm application, and the corrected information has low accuracy.
Patent document No. 201880000142.4 provides an address error correction method and terminal. The above patent document is to obtain an address to be corrected; recognizing the province name corresponding to the address to be corrected according to the first dictionary tree to obtain a primary name; the first dictionary tree is used for storing province names and city names; acquiring a second dictionary tree corresponding to the first-level name; the second dictionary tree is used for storing a city name, a county name and a district name corresponding to the current province name; identifying a county name or a district name corresponding to the address to be corrected according to the second dictionary tree to obtain a secondary name; acquiring a third dictionary tree corresponding to the secondary name; the third dictionary tree is used for storing the names of towns, villages and streets corresponding to the secondary names; and acquiring more than one candidate address corresponding to the address to be corrected according to the third dictionary tree to obtain a candidate address set. The space occupied in the address error correction process is reduced.
However, the patent document mentioned above repeatedly calls the dictionary tree storing the correct address information in the process of correcting the identification card information obtained by the OCR recognition, which is time-consuming.
Disclosure of Invention
The technical problem to be solved by the invention is as follows: how to shorten the time for correcting the identity card information.
In order to solve the technical problems, the invention adopts the technical scheme that:
the invention provides a method for correcting identity card information, which comprises the following steps:
calling an OCR engine to identify the identity card to obtain identity card information; the identity card information comprises an identity card number and an identity card address;
acquiring three-level address information corresponding to the first six bits of the identity card number from a preset address mapping table; the third-level address information comprises provincial-level address information, city-level address information and county-level address information; each record in the address mapping table comprises a two-digit code and address information corresponding to the two-digit code;
correcting the first part of the ID card address according to the tertiary address information; the identity card address comprises a first part and a second part; the first part comprises provincial, city and county addresses; the second part is address information of the identity card address except the first part;
correcting the second part of the ID card address according to a preset address information base; the address information base comprises a plurality of pieces of correct address information; the address information in the address information base comprises village and town address information, village address information and street address information.
Preferably, the correcting the first part of the id card address according to the third-level address information specifically includes:
and when the county level address information in the three-level address information exists in the identity card address, correcting the first part of the identity card address according to the provincial level address information and the city level address information in the three-level address information.
Preferably, the correcting the first part of the id card address according to the provincial address information and the urban address information in the three-level address information specifically includes:
acquiring the position information of the character province in the ID card address to obtain the province address ending position;
setting the position of the first character of the ID card address as the provincial address starting position;
replacing characters from the start position of the provincial address to the end position of the provincial address by using provincial address information in the three-level address information;
setting the position information of the last character of the provincial address ending position in the identity card address as the city address starting position;
acquiring the position information of a first character in the county-level address information of the three-level address information in the identity card address to obtain the starting position of the county-level address;
setting the position information of the previous character of the county-level address starting position in the identity card address as a city-level address ending position;
and replacing characters from the start position of the city-level address to the end position of the city-level address by using the city-level address information in the three-level address information.
Preferably, the three-level address information corresponding to the first six bits of the identification number is acquired, specifically:
verifying the accuracy of the identity card number to obtain a verification result; the verification result comprises accuracy and inaccuracy;
and if the verification result is accurate, acquiring three-level address information corresponding to the first six bits of the identification number.
Preferably, the method comprises the following steps:
calling an OCR engine to identify the gender of the identity card to obtain a gender identification result;
judging the parity of the 15 th bit to the 17 th bit of the identity card number to obtain a judgment result; the judgment result comprises an odd number and an even number;
if the judgment result is an odd number, correcting the gender identification result to be a male; otherwise, correcting the gender identification result to be female.
The present invention also provides a terminal for correcting identity card information, comprising one or more processors and a memory, the memory storing a program and configured to perform the following steps by the one or more processors:
calling an OCR engine to identify the number of the identity card to obtain the number of the identity card;
calling an OCR engine to identify the address of the identity card to obtain the address of the identity card;
acquiring three-level address information corresponding to the first six bits of the identification number; the third-level address information comprises provincial-level address information, city-level address information and county-level address information;
correcting the first part of the ID card address according to the tertiary address information; the identity card address comprises a first part and a second part; the first part comprises provincial, city and county addresses; the second part is address information of the identity card address except the first part;
correcting the second part of the ID card address according to a preset address information base; the address information base comprises a plurality of pieces of correct address information; the address information in the address information base comprises village and town address information, village address information and street address information.
Preferably, the correcting the first part of the id card address according to the third-level address information specifically includes:
and when the county level address information in the three-level address information exists in the identity card address, correcting the first part of the identity card address according to the provincial level address information and the city level address information in the three-level address information.
Preferably, the correcting the first part of the id card address according to the provincial address information and the urban address information in the three-level address information specifically includes:
acquiring the position information of the character province in the ID card address to obtain the province address ending position;
setting the position of the first character of the ID card address as the provincial address starting position;
replacing characters from the start position of the provincial address to the end position of the provincial address by using provincial address information in the three-level address information;
setting the position information of the last character of the provincial address ending position in the identity card address as the city address starting position;
acquiring the position information of a first character in the county-level address information of the three-level address information in the identity card address to obtain the starting position of the county-level address;
setting the position information of the previous character of the county-level address starting position in the identity card address as a city-level address ending position;
and replacing characters from the start position of the city-level address to the end position of the city-level address by using the city-level address information in the three-level address information.
Preferably, the three-level address information corresponding to the first six bits of the identification number is acquired, specifically:
verifying the accuracy of the identity card number to obtain a verification result; the verification result comprises accuracy and inaccuracy;
and if the verification result is accurate, acquiring three-level address information corresponding to the first six bits of the identification number.
Preferably, the method comprises the following steps:
calling an OCR engine to identify the gender of the identity card to obtain a gender identification result;
judging the parity of the 15 th bit to the 17 th bit of the identity card number to obtain a judgment result; the judgment result comprises an odd number and an even number;
if the judgment result is an odd number, correcting the gender identification result to be a male; otherwise, correcting the gender identification result to be female.
The invention has the following beneficial effects:
1. the method is different from the prior art that the dictionary tree stored with correct address information needs to be called repeatedly in the process of correcting the address of the identity card obtained by OCR, and the time cost is high. The invention provides a method and a terminal for correcting identity card information, which are used for correcting an identity card address obtained by OCR recognition by utilizing the first six digits of an identity card number. Because the first bit to the second bit of the identification card number are codes of provincial level address information, the third bit to the fourth bit are codes of city level address information, and the fifth bit to the sixth bit are codes of county level address information, the invention can directly and effectively correct the provincial level address information, the city level address information and the county level address information in the identification card address by utilizing the first six bits of the identification card number, and the parts except the provincial level address information, the city level address information and the county level address information in the identification card address are compared with the address in the address information base to achieve the purpose of correction. The method and the device utilize the first six digits of the identity card number to correct the provincial address information, the municipal address information and the county address information in the identity card address, effectively reduce the times of comparison of calling an address information base in the error correction process of the identity card address obtained by OCR recognition, and greatly shorten the time for correcting the identity card address. Meanwhile, the address information base does not need to store provincial level address information, city level address information and county level address information, the capacity of the address information base can be reduced, and the time for correcting the ID card address by comparing the ID card address with the address in the address information base is further shortened.
2. Further, in order to avoid that some identity card addresses are corrected wrongly due to the fact that the identity addresses are inconsistent with the addresses corresponding to the identity card numbers due to the fact that the user port addresses are changed, the method searches whether county-level address information corresponding to the identity card numbers exists in the identity card addresses recognized by the OCR engine, and if the county-level address information exists, the county-level address of the identity card numbers is consistent with the recognized identity card addresses, the provincial-level addresses and the city-level addresses corresponding to the county-level addresses are also consistent. Therefore, the address of the identity card obtained by the OCR engine can be corrected through the provincial address and the urban address corresponding to the identity card number. According to the method, only when county-level address information corresponding to the identity card number exists in the identity card address obtained through OCR recognition, the provincial-level address information and the city-level address information corresponding to the identity card number are used for correcting the identity card address, and the condition of error correction is avoided.
3. Furthermore, the county-level address information is used as a positioning reference, so that provincial-level addresses and city-level addresses can be accurately positioned, and the efficiency and the accuracy of correcting the identity card information are improved.
4. Furthermore, only when the verification result of the ID card number is accurate, the ID card address is corrected according to the first six digits of the ID card number, which is beneficial to improving the accuracy of correcting the ID card information.
5. Further, the gender recognition result of the OCR engine is corrected according to the identification number.
Drawings
FIG. 1 is a block flow diagram of an embodiment of a method for correcting ID card information according to the present invention;
fig. 2 is a block diagram of a specific embodiment of a terminal for correcting id card information according to the present invention;
description of reference numerals:
1. a processor; 2. A memory.
Detailed Description
The invention is described in detail below with reference to the figures and the specific embodiments.
Referring to fig. 1 to fig. 2,
the first embodiment of the invention is as follows:
as shown in fig. 1, the present embodiment provides a method for correcting identity card information, including:
s1, calling an OCR engine to recognize the identity card to obtain identity card information; the identity card information comprises an identity card number and an identity card address.
For example, the scanner scans an identification card and recognizes the scanned image to obtain an identification card number "360222198610060711", and an identification card address "136" of the public bridge city, bridge village, joe group, Wangxi province, shadow town, city, floating beam county, city, public bridge town, crow bridge village. The identity card number is generated randomly by a program and is an identity card number in an unrealistic identity.
S2, verifying the accuracy of the ID card number to obtain a verification result; the verification results include accurate and inaccurate.
Wherein, the accuracy of the ID card number is judged according to the 5.1.4.1 validation formula and the calculation of 5.1.4.2 validation code character set in GB11643-1999 citizen ID number.
And S3, if the verification result is accurate, acquiring three-level address information corresponding to the first six bits of the identification number.
And only when the verification result of the ID card number is accurate, the ID card address is corrected according to the first six digits of the ID card number. The first six digits of the ID card number are address codes, and the address codes are administrative division codes of the county (city and district) where the encoding object house entrance is located.
S4, acquiring three-level address information corresponding to the first six digits of the ID card number from a preset address mapping table; the third-level address information comprises provincial-level address information, city-level address information and county-level address information; each record in the address mapping table comprises a two-digit code and address information corresponding to the two-digit code.
For example, the first six digits of the id number "360222198610060711" are "360222", where "36" represents provincial-level address information "Jiangxi province", "02" represents city-level address information "Jingdezhen city", and "22" represents county-level address information "Floating Beam county".
S5, correcting the first part of the ID card address according to the three-level address information; the identity card address comprises a first part and a second part; the first part comprises provincial, city and county addresses; the second part is the address information of the identity card address except the first part. The method specifically comprises the following steps:
s51, judging whether the county level address information in the three-level address information exists in the ID card address.
For example, the id card address "wanxi province shadow town city floating beam county through public bridge town doodle group 136" is traversed, and county-level address information "floating beam county" corresponding to the id card number "360222198610060711" exists in the id card address.
S52, when the county level address information in the three levels of address information exists in the ID card address, correcting the first part of the ID card address according to the provincial level address information and the city level address information in the three levels of address information.
In order to avoid inconsistency between an identity card address and an address corresponding to an identity card number due to the fact that some identity card addresses are changed to sign a user port address, in the embodiment, whether county-level address information corresponding to the identity card number exists in the identity card address recognized by the OCR engine is searched, and if the county-level address information exists, the county-level address of the identity card number is consistent with the identity card address obtained through recognition, so that the provincial-level address and the city-level address corresponding to the identity card number are also consistent. Therefore, the address of the identity card obtained by the OCR engine can be corrected through the provincial address and the urban address corresponding to the identity card number.
Preferably, the correcting the first part of the id card address according to the provincial address information and the urban address information in the three-level address information specifically includes:
s521, obtaining the position information of the character province in the ID card address to obtain the province address ending position.
S522, setting the position of the first character of the ID card address as the provincial address starting position.
For example, the location of the "wane" character in the identification card address "wane west shadow town city floating beam county city via public bridge town doody group 136" is the provincial address starting location.
And S523, replacing characters from the start position of the provincial address to the end position of the provincial address by using the provincial address information in the three-level address information.
For example, the character from the provincial address start position to the provincial address end position is "wangxi province", and the provincial address information in the three-level address information corresponding to the identification number is "jiangxi province". Therefore, the provincial address of the identification card address recognized by the OCR engine is 'Wangxi province' with an error, and the 'Wangxi province' needs to be replaced by 'Jiangxi province' so as to correct the recognition result of the OCR engine.
And S524, setting the position information of the last character of the provincial level address ending position in the ID card address as the city level address starting position.
For example, in the id card address "wanxi province shadow town city floating beam prefecture through public bridge town doodle joe group 136", the position of the "province" character is the province level address ending position, and the position of the "scenery" character is the city level address starting position.
And S525, obtaining the position information of the first character in the county-level address information of the three-level address information in the ID card address to obtain the starting position of the county-level address.
For example, in the identification card address "wanxi province shadow town city floating beam county city dobby joe group 136 via public bridge town dobby," floating "character is located as the county-level address starting position.
S526, setting the position information of the previous character of the county-level address starting position in the identity card address as the city-level address ending position.
For example, in the identification card address "wanxi province shadow town city floating beam county city doodle group 136 via public bridge town doodle village," city "character is located at the city level address ending position.
S527, replacing the characters from the start position of the city level address to the end position of the city level address with the city level address information in the three levels of address information.
For example, the character from the start position of the civic address to the end position of the civic address is "jing de zhen", and the civic address information in the third-level address information corresponding to the identification number is "jing de zhen". Therefore, the identity card address recognized by the OCR engine has an error in the "madder town" and needs to be replaced by the "madder town" to correct the recognition result of the OCR engine.
S6, correcting the second part of the ID card address according to a preset address information base; the address information base comprises a plurality of pieces of correct address information; the address information in the address information base comprises village and town address information, village address information and street address information.
Wherein the second portion of the identification card address can be corrected using existing identification card address correction methods.
Preferably, the similarity between the second part of the ID card address and each address information in the address information base is calculated; and replacing the second part of the ID card address with the address information with the maximum similarity in the address information base.
For example, in this embodiment, the second part of the address of the identity card is "number 136 of the crow group of the crow of the public bridge town," a large amount of address information which does not include the provincial address, the city address and the county address is stored in the preset address information base, and the address information with the maximum similarity in the preset address information base is "number 136 of the crow group of the crow of the public bridge town. Thus, the second portion of the identification card address "bridge number 136 via bridge town doodle bridge number 136" is replaced with "bridge number 136 via bridge town doodle bridge number via bridge town doodle bridge".
The identity card address obtained by the OCR engine identification is corrected through the steps, and the finally obtained identity card address is 136 number of the crow bridge group of the city of the Town bridge, Jingdezhen, Xia, the city of the floating girder, the city of the public bridge, the town, the crow bridge and the village.
In this embodiment, the first six digits of the identification card number are used to correct the identification card address obtained by OCR recognition. Since the first bit to the second bit of the identification card number are codes of provincial level address information, the third bit to the fourth bit are codes of city level address information, and the fifth bit to the sixth bit are codes of county level address information, the first six bits of the identification card number can be used for directly and effectively correcting provincial level address information, city level address information and county level address information in the identification card address, and the parts except the provincial level address information, the city level address information and the county level address information in the identification card address are compared with the addresses in the address information base to achieve the purpose of correction. In the embodiment, the provincial level address information, the municipal level address information and the county level address information in the identity card address are corrected by utilizing the first six digits of the identity card number, so that the times of calling an address information base for comparison in the process of correcting the identity card address obtained by OCR recognition are effectively reduced, and the time for correcting the identity card address is greatly shortened. Meanwhile, the address information base does not need to store provincial level address information, city level address information and county level address information, the capacity of the address information base can be reduced, and the time for correcting the ID card address by comparing the ID card address with the address in the address information base is further shortened.
And S7, calling an OCR engine to identify the gender of the identity card to obtain a gender identification result.
S8, judging the parity of the 15 th bit to the 17 th bit of the ID number to obtain a judgment result; the judgment result comprises an odd number and an even number.
S9, if the judgment result is odd, correcting the sex identification result to be male; otherwise, correcting the gender identification result to be female.
Wherein, the 15 th to 17 th of the ID number are sequence codes, the sequence code for male is odd, and the sequence code for female is even. Accordingly, the gender recognition result by the OCR engine can be corrected according to the parity of the sequential code.
The second embodiment of the invention is as follows:
as shown in fig. 2, the present embodiment provides a terminal for correcting identity information, which includes one or more processors 1 and a memory 2, where the memory 2 stores programs and is configured to be executed by the one or more processors 1 to perform the following steps:
s1, calling an OCR engine to recognize the identity card to obtain identity card information; the identity card information comprises an identity card number and an identity card address.
For example, the scanner scans an identification card and recognizes the scanned image to obtain an identification card number "360222198610060711", and an identification card address "136" of the public bridge city, bridge village, joe group, Wangxi province, shadow town, city, floating beam county, city, public bridge town, crow bridge village. The identity card number is generated randomly by a program and is an identity card number in an unrealistic identity.
S2, verifying the accuracy of the ID card number to obtain a verification result; the verification results include accurate and inaccurate.
Wherein, the accuracy of the ID card number is judged according to the 5.1.4.1 validation formula and the calculation of 5.1.4.2 validation code character set in GB11643-1999 citizen ID number.
And S3, if the verification result is accurate, acquiring three-level address information corresponding to the first six bits of the identification number.
And only when the verification result of the ID card number is accurate, the ID card address is corrected according to the first six digits of the ID card number. The first six digits of the ID card number are address codes, and the address codes are administrative division codes of the county (city and district) where the encoding object house entrance is located.
S4, acquiring three-level address information corresponding to the first six digits of the ID card number from a preset address mapping table; the third-level address information comprises provincial-level address information, city-level address information and county-level address information; each record in the address mapping table comprises a two-digit code and address information corresponding to the two-digit code.
For example, the first six digits of the id number "360222198610060711" are "360222", where "36" represents provincial-level address information "Jiangxi province", "02" represents city-level address information "Jingdezhen city", and "22" represents county-level address information "Floating Beam county".
S5, correcting the first part of the ID card address according to the three-level address information; the identity card address comprises a first part and a second part; the first part comprises provincial, city and county addresses; the second part is the address information of the identity card address except the first part. The method specifically comprises the following steps:
s51, judging whether the county level address information in the three-level address information exists in the ID card address.
For example, the id card address "wanxi province shadow town city floating beam county through public bridge town doodle group 136" is traversed, and county-level address information "floating beam county" corresponding to the id card number "360222198610060711" exists in the id card address.
S52, when the county level address information in the three levels of address information exists in the ID card address, correcting the first part of the ID card address according to the provincial level address information and the city level address information in the three levels of address information.
In order to avoid inconsistency between an identity card address and an address corresponding to an identity card number due to the fact that some identity card addresses are changed to sign a user port address, in the embodiment, whether county-level address information corresponding to the identity card number exists in the identity card address recognized by the OCR engine is searched, and if the county-level address information exists, the county-level address of the identity card number is consistent with the identity card address obtained through recognition, so that the provincial-level address and the city-level address corresponding to the identity card number are also consistent. Therefore, the address of the identity card obtained by the OCR engine can be corrected through the provincial address and the urban address corresponding to the identity card number.
Preferably, the correcting the first part of the id card address according to the provincial address information and the urban address information in the three-level address information specifically includes:
s521, obtaining the position information of the character province in the ID card address to obtain the province address ending position.
S522, setting the position of the first character of the ID card address as the provincial address starting position.
For example, the location of the "wane" character in the identification card address "wane west shadow town city floating beam county city via public bridge town doody group 136" is the provincial address starting location.
And S523, replacing characters from the start position of the provincial address to the end position of the provincial address by using the provincial address information in the three-level address information.
For example, the character from the provincial address start position to the provincial address end position is "wangxi province", and the provincial address information in the three-level address information corresponding to the identification number is "jiangxi province". Therefore, the provincial address of the identification card address recognized by the OCR engine is 'Wangxi province' with an error, and the 'Wangxi province' needs to be replaced by 'Jiangxi province' so as to correct the recognition result of the OCR engine.
And S524, setting the position information of the last character of the provincial level address ending position in the ID card address as the city level address starting position.
For example, in the id card address "wanxi province shadow town city floating beam prefecture through public bridge town doodle joe group 136", the position of the "province" character is the province level address ending position, and the position of the "scenery" character is the city level address starting position.
And S525, obtaining the position information of the first character in the county-level address information of the three-level address information in the ID card address to obtain the starting position of the county-level address.
For example, in the identification card address "wanxi province shadow town city floating beam county city dobby joe group 136 via public bridge town dobby," floating "character is located as the county-level address starting position.
S526, setting the position information of the previous character of the county-level address starting position in the identity card address as the city-level address ending position.
For example, in the identification card address "wanxi province shadow town city floating beam county city doodle group 136 via public bridge town doodle village," city "character is located at the city level address ending position.
S527, replacing the characters from the start position of the city level address to the end position of the city level address with the city level address information in the three levels of address information.
For example, the character from the start position of the civic address to the end position of the civic address is "jing de zhen", and the civic address information in the third-level address information corresponding to the identification number is "jing de zhen". Therefore, the identity card address recognized by the OCR engine has an error in the "madder town" and needs to be replaced by the "madder town" to correct the recognition result of the OCR engine.
S6, correcting the second part of the ID card address according to a preset address information base; the address information base comprises a plurality of pieces of correct address information; the address information in the address information base comprises village and town address information, village address information and street address information.
Wherein the second portion of the identification card address can be corrected using existing identification card address correction methods.
Preferably, the similarity between the second part of the ID card address and each address information in the address information base is calculated; and replacing the second part of the ID card address with the address information with the maximum similarity in the address information base.
For example, in this embodiment, the second part of the address of the identity card is "number 136 of the crow group of the crow of the public bridge town," a large amount of address information which does not include the provincial address, the city address and the county address is stored in the preset address information base, and the address information with the maximum similarity in the preset address information base is "number 136 of the crow group of the crow of the public bridge town. Thus, the second portion of the identification card address "bridge number 136 via bridge town doodle bridge number 136" is replaced with "bridge number 136 via bridge town doodle bridge number via bridge town doodle bridge".
The identity card address obtained by the OCR engine identification is corrected through the steps, and the finally obtained identity card address is 136 number of the crow bridge group of the city of the Town bridge, Jingdezhen, Xia, the city of the floating girder, the city of the public bridge, the town, the crow bridge and the village.
In this embodiment, the first six digits of the identification card number are used to correct the identification card address obtained by OCR recognition. Since the first bit to the second bit of the identification card number are codes of provincial level address information, the third bit to the fourth bit are codes of city level address information, and the fifth bit to the sixth bit are codes of county level address information, the first six bits of the identification card number can be used for directly and effectively correcting provincial level address information, city level address information and county level address information in the identification card address, and the parts except the provincial level address information, the city level address information and the county level address information in the identification card address are compared with the addresses in the address information base to achieve the purpose of correction. In the embodiment, the provincial level address information, the municipal level address information and the county level address information in the identity card address are corrected by utilizing the first six digits of the identity card number, so that the times of calling an address information base for comparison in the process of correcting the identity card address obtained by OCR recognition are effectively reduced, and the time for correcting the identity card address is greatly shortened. Meanwhile, the address information base does not need to store provincial level address information, city level address information and county level address information, the capacity of the address information base can be reduced, and the time for correcting the ID card address by comparing the ID card address with the address in the address information base is further shortened.
And S7, calling an OCR engine to identify the gender of the identity card to obtain a gender identification result.
S8, judging the parity of the 15 th bit to the 17 th bit of the ID number to obtain a judgment result; the judgment result comprises an odd number and an even number.
S9, if the judgment result is odd, correcting the sex identification result to be male; otherwise, correcting the gender identification result to be female.
Wherein, the 15 th to 17 th of the ID number are sequence codes, the sequence code for male is odd, and the sequence code for female is even. Accordingly, the gender recognition result by the OCR engine can be corrected according to the parity of the sequential code.
The above description is only an embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes performed by the present specification and drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A method of correcting identification card information, comprising:
calling an OCR engine to identify the identity card to obtain identity card information; the identity card information comprises an identity card number and an identity card address;
verifying the accuracy of the identity card number to obtain a verification result; the verification result comprises accuracy and inaccuracy; if the checking result is accurate;
acquiring three-level address information corresponding to the first six bits of the identification number from a preset address mapping table; the third-level address information comprises provincial-level address information, city-level address information and county-level address information; each record in the address mapping table comprises a two-digit code and address information corresponding to the two-digit code;
correcting the first part of the ID card address according to the tertiary address information; the identity card address comprises a first part and a second part; the first part comprises provincial, city and county addresses; the second part is address information of the identity card address except the first part;
correcting the second part of the ID card address according to a preset address information base; the address information base comprises a plurality of pieces of correct address information; the address information in the address information base comprises village and town address information, village address information and street address information; calculating the similarity between the second part of the ID card address and each address information in the address information base; and replacing the second part of the ID card address with the address information with the maximum similarity in the address information base.
2. The method for correcting identity card information according to claim 1, wherein correcting the first part of the identity card address according to the tertiary address information specifically comprises:
and when the county level address information in the three-level address information exists in the identity card address, correcting the first part of the identity card address according to the provincial level address information and the city level address information in the three-level address information.
3. The method for correcting id card information according to claim 1, wherein the correcting the first part of the id card address according to the provincial address information and the urban address information in the tertiary address information specifically comprises:
acquiring the position information of the character province in the ID card address to obtain the province address ending position;
setting the position of the first character of the ID card address as the provincial address starting position;
replacing characters from the start position of the provincial address to the end position of the provincial address by using provincial address information in the three-level address information;
setting the position information of the last character of the provincial address ending position in the identity card address as the city address starting position;
acquiring the position information of a first character in the county-level address information of the three-level address information in the identity card address to obtain the starting position of the county-level address;
setting the position information of the previous character of the county-level address starting position in the identity card address as a city-level address ending position;
and replacing characters from the start position of the city-level address to the end position of the city-level address by using the city-level address information in the three-level address information.
4. The method for correcting id card information according to claim 1, wherein the obtaining of three levels of address information corresponding to the first six digits of the id card number includes:
verifying the accuracy of the identity card number to obtain a verification result; the verification result comprises accuracy and inaccuracy;
and if the verification result is accurate, acquiring three-level address information corresponding to the first six bits of the identification number.
5. The method for correcting identity card information according to claim 1, comprising:
calling an OCR engine to identify the gender of the identity card to obtain a gender identification result;
judging the parity of the 15 th bit to the 17 th bit of the identity card number to obtain a judgment result; the judgment result comprises an odd number and an even number;
if the judgment result is an odd number, correcting the gender identification result to be a male; otherwise, correcting the gender identification result to be female.
6. A terminal for correcting identification card information, comprising one or more processors and a memory, the memory storing a program and configured to perform the following steps by the one or more processors:
calling an OCR engine to identify the number of the identity card to obtain the number of the identity card;
calling an OCR engine to identify the address of the identity card to obtain the address of the identity card;
verifying the accuracy of the identity card number to obtain a verification result; the verification result comprises accuracy and inaccuracy; if the checking result is accurate;
acquiring three-level address information corresponding to the first six bits of the identification number; the third-level address information comprises provincial-level address information, city-level address information and county-level address information;
correcting the first part of the ID card address according to the tertiary address information; the identity card address comprises a first part and a second part; the first part comprises provincial, city and county addresses; the second part is address information of the identity card address except the first part;
correcting the second part of the ID card address according to a preset address information base; the address information base comprises a plurality of pieces of correct address information; the address information in the address information base comprises village and town address information, village address information and street address information; calculating the similarity between the second part of the ID card address and each address information in the address information base; and replacing the second part of the ID card address with the address information with the maximum similarity in the address information base.
7. The terminal for correcting id card information according to claim 6, wherein correcting the first part of the id card address according to the third-level address information specifically includes:
and when the county level address information in the three-level address information exists in the identity card address, correcting the first part of the identity card address according to the provincial level address information and the city level address information in the three-level address information.
8. The terminal for correcting id card information according to claim 6, wherein the first part of the id card address is corrected according to the provincial address information and the urban address information in the tertiary address information, specifically:
acquiring the position information of the character province in the ID card address to obtain the province address ending position;
setting the position of the first character of the ID card address as the provincial address starting position;
replacing characters from the start position of the provincial address to the end position of the provincial address by using provincial address information in the three-level address information;
setting the position information of the last character of the provincial address ending position in the identity card address as the city address starting position;
acquiring the position information of a first character in the county-level address information of the three-level address information in the identity card address to obtain the starting position of the county-level address;
setting the position information of the previous character of the county-level address starting position in the identity card address as a city-level address ending position;
and replacing characters from the start position of the city-level address to the end position of the city-level address by using the city-level address information in the three-level address information.
9. The terminal for correcting id card information according to claim 6, wherein the three levels of address information corresponding to the first six digits of the id card number are acquired, specifically:
verifying the accuracy of the identity card number to obtain a verification result; the verification result comprises accuracy and inaccuracy;
and if the verification result is accurate, acquiring three-level address information corresponding to the first six bits of the identification number.
10. The terminal for correcting ID card information according to claim 6, comprising:
calling an OCR engine to identify the gender of the identity card to obtain a gender identification result;
judging the parity of the 15 th bit to the 17 th bit of the identity card number to obtain a judgment result; the judgment result comprises an odd number and an even number;
if the judgment result is an odd number, correcting the gender identification result to be a male; otherwise, correcting the gender identification result to be female.
CN201910316776.7A 2019-04-19 2019-04-19 Method and terminal for correcting identity card information Active CN110020640B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910316776.7A CN110020640B (en) 2019-04-19 2019-04-19 Method and terminal for correcting identity card information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910316776.7A CN110020640B (en) 2019-04-19 2019-04-19 Method and terminal for correcting identity card information

Publications (2)

Publication Number Publication Date
CN110020640A CN110020640A (en) 2019-07-16
CN110020640B true CN110020640B (en) 2021-08-24

Family

ID=67191879

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910316776.7A Active CN110020640B (en) 2019-04-19 2019-04-19 Method and terminal for correcting identity card information

Country Status (1)

Country Link
CN (1) CN110020640B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112990133B (en) * 2021-04-28 2021-08-27 杭州金线连科技有限公司 Multitask-based deep convolutional neural network identity card information identification method
CN114661688B (en) * 2022-03-25 2023-09-19 马上消费金融股份有限公司 Address error correction method and device

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104111932A (en) * 2013-04-17 2014-10-22 北京启明星辰信息技术股份有限公司 Recognition method and device of ID (identity) card numbers
CN104750852A (en) * 2015-04-14 2015-07-01 海量云图(北京)数据技术有限公司 Method for finding and classifying Chinese address data
CN105069056A (en) * 2015-07-24 2015-11-18 湖北文理学院 Character string matching based method and system for analyzing address information of identification card
CN105589885A (en) * 2014-10-24 2016-05-18 阿里巴巴集团控股有限公司 Method and system for checking data consistency
CN105701488A (en) * 2016-01-01 2016-06-22 广州恒巨信息科技有限公司 Identity card identification method
CN106790061A (en) * 2016-12-20 2017-05-31 财付通支付科技有限公司 User profile verification method and device
CN107247950A (en) * 2017-06-06 2017-10-13 电子科技大学 A kind of ID Card Image text recognition method based on machine learning
CN108369582A (en) * 2018-03-02 2018-08-03 福建联迪商用设备有限公司 A kind of address error correction method and terminal
CN109284593A (en) * 2018-09-06 2019-01-29 北京旷视科技有限公司 Auth method, device and electronic equipment
CN109376510A (en) * 2018-08-28 2019-02-22 中国平安人寿保险股份有限公司 Front-end information verification method, device, storage medium and computer equipment
CN109635628A (en) * 2018-10-23 2019-04-16 深圳壹账通智能科技有限公司 ID card information verification method, device, equipment and computer readable storage medium

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104111932A (en) * 2013-04-17 2014-10-22 北京启明星辰信息技术股份有限公司 Recognition method and device of ID (identity) card numbers
CN105589885A (en) * 2014-10-24 2016-05-18 阿里巴巴集团控股有限公司 Method and system for checking data consistency
CN104750852A (en) * 2015-04-14 2015-07-01 海量云图(北京)数据技术有限公司 Method for finding and classifying Chinese address data
CN105069056A (en) * 2015-07-24 2015-11-18 湖北文理学院 Character string matching based method and system for analyzing address information of identification card
CN105701488A (en) * 2016-01-01 2016-06-22 广州恒巨信息科技有限公司 Identity card identification method
CN106790061A (en) * 2016-12-20 2017-05-31 财付通支付科技有限公司 User profile verification method and device
CN107247950A (en) * 2017-06-06 2017-10-13 电子科技大学 A kind of ID Card Image text recognition method based on machine learning
CN108369582A (en) * 2018-03-02 2018-08-03 福建联迪商用设备有限公司 A kind of address error correction method and terminal
CN109376510A (en) * 2018-08-28 2019-02-22 中国平安人寿保险股份有限公司 Front-end information verification method, device, storage medium and computer equipment
CN109284593A (en) * 2018-09-06 2019-01-29 北京旷视科技有限公司 Auth method, device and electronic equipment
CN109635628A (en) * 2018-10-23 2019-04-16 深圳壹账通智能科技有限公司 ID card information verification method, device, equipment and computer readable storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
《巧用Excel 函数提取身份证信息》;杨卓;《福建电脑》;20180531(第5期);第166页 *

Also Published As

Publication number Publication date
CN110020640A (en) 2019-07-16

Similar Documents

Publication Publication Date Title
CN105069056B (en) Identity certificate address information analytic method and system based on string matching
CN110020640B (en) Method and terminal for correcting identity card information
CN111177184A (en) Structured query language conversion method based on natural language and related equipment thereof
CN103914544A (en) Method for quickly matching Chinese addresses in multi-level manner on basis of address feature words
CN109739997B (en) Address comparison method, device and system
WO2018218788A1 (en) Third-generation sequencing sequence alignment method based on global seed scoring optimization
CN101620677A (en) Fingerprint identification method based on triangulation and LOD technology
CN110633345B (en) Method and system for identifying enterprise registration address
CN113095307B (en) Automatic identification method for financial voucher information
CN111008625B (en) Address correction method, device, equipment and storage medium
CN113420546A (en) Text error correction method and device, electronic equipment and readable storage medium
CN112860957B (en) Method, medium and system for checking fixed value list
CN116343237A (en) Bill identification method based on deep learning and knowledge graph
CN111724110A (en) Address information processing method and device, computer equipment and storage medium
CN111859956B (en) Address word segmentation method for financial industry
CN112925874B (en) Similar code searching method and system based on case marks
CN115759055A (en) English place name proofreading method considering multi-dimensional character characteristics
CN111126042B (en) VIN code verification method and VIN code identification method and device using confidence
CN101887462A (en) Rapid classification and registration method capable of continuously optimizing geographical name database
CN114722824A (en) Address processing method and device, storage medium and electronic equipment
CN113934736A (en) Enterprise identification method, device and storage medium
JP2998054B2 (en) Character recognition method and character recognition device
US6970868B2 (en) Method for ascertaining valid address codes
CN112651232B (en) Address error correction method, device, equipment and storage medium
JP2013105344A (en) Business form processing system and business form processing method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant