Method, electronic device, storage medium, and program product for detecting change in marriage status of mouth of user
By identifying the position of marital status field names and field values in the household registration book picture, combining text and color recognition technology to calculate the probability of marital status change, the problem of low efficiency in the existing technology of marital status detection in household registration book book is solved, and accurate and Efficient marital status collection and change detection.
Patent Information
- Application Number
- CN202411138482.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-19
- Publication Date
- 2024-11-19
AI Technical Summary
In the prior art, the automated identification and collection of marital status of household registration is inefficient, the labor costs are high, and the marital status changes are not effectively detected.
By determining the position of the marital status field name and field value in the household registration picture, combining text recognition and color recognition technology, the probability of marital status changes can be calculated to achieve automated detection of marital status.
It improves the accuracy and efficiency of marital status change detection for household registration, reduces labor costs, and realizes automatic collection and change detection of marital status.
Smart Images

Figure CN118982837A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of computer technology, and in particular to a household register marital status change detection method, electronic equipment, storage medium and program product. Background Art
[0002] In many transaction scenarios such as real estate transactions, the marital status of the transaction parties has an impact on transaction qualifications, transaction stability, etc. In order to ensure the normal progress of the transaction, it is necessary to collect the marital status information of the transaction parties. The existing technology is to manually identify the marital status recorded in the household registration book and enter it into the system.
[0003] Manual identification of the marital status recorded in the household register is inefficient and labor-intensive. Therefore, it is necessary to identify and collect the marital status in the household register in an automated manner. In the automated identification and collection of the marital status in the household register, the marital status that has not changed can be directly automatically collected and entered. For the marital status that has changed, it is necessary to be able to automatically detect whether the marital status has changed, so that the data entry personnel can further confirm the final status of the marriage and enter it. Summary of the invention
[0004] The embodiment of the present invention provides a household register marital status change detection method, electronic equipment, storage medium and program product, which realizes the automatic detection of household register marital status change.
[0005] The embodiment of the present invention provides a household registration book marital status change detection method, comprising the following steps: determining a household registration book image containing a marital status field name of a target person and the position of the marital status field name in the household registration book image; determining the marital status field value filling position according to the text direction of the household registration book image, the typesetting method of the household registration book image and the position of the marital status field name in the household registration book image; performing text extraction on the marital status field value filling position in the household registration book image to determine the text information of the marital status field value filling position; performing color recognition on the marital status field value filling position in the household registration book image to determine the change chapter information of the marital status field value filling position; and determining whether the marital status of the target person in the household registration book has changed according to the text information of the marital status field value filling position and the change chapter information.
[0006] According to a method for detecting changes in marital status in a household register provided by an embodiment of the present invention, the method of determining whether the marital status in the household register of the target person has changed based on the text information at the position where the marital status field value is filled in and the change chapter information comprises: determining a first probability of a change in marital status based on the text information at the position where the marital status field value is filled in; determining a second probability of a change in marital status based on the change chapter information at the position where the marital status field value is filled in; performing weighted calculation based on the first probability and the second probability to obtain a probability of a change in marital status; and determining that the marital status in the household register of the target person has changed in response to the probability of a change in marital status being greater than a preset threshold.
[0007] According to a method for detecting changes in marital status in a household register provided by an embodiment of the present invention, the first probability of a change in marital status occurring based on text information at the position where the marital status field value is filled in comprises: in response to learning that only a single preset marital status description information appears at the position where the marital status field value is filled in based on the text information at the position where the marital status field value is filled in, determining the first probability to be a first value; in response to learning that at least two preset marital status description information appears at the position where the marital status field value is filled in based on the text information at the position where the marital status field value is filled in, or other text information other than the preset marital status description information appears, determining the first probability to be a second value; wherein the second value is greater than the first value.
[0008] According to a method for detecting changes in marital status in a household register provided by an embodiment of the present invention, the change stamp information includes the probability that a change stamp exists at the position where the marital status field value is filled in; wherein, the greater the probability that a change stamp exists at the position where the marital status field value is filled in, the greater the second probability.
[0009] According to an embodiment of the present invention, a method for detecting changes in marital status in a household register is provided, wherein color recognition is performed on the position where the marital status field value is filled in the household register picture to determine the change chapter information of the position where the marital status field value is filled in, including: obtaining an image color matrix by color recognition of the position where the marital status field value is filled in the household register picture; wherein the image color matrix includes position information and color information of each pixel point at the position where the marital status field value is filled in; identifying the number of pixels, pixel distribution and pixel clustering outline of pixels in the image color matrix that are consistent with the color of the change chapter, and determining the probability that a change chapter exists at the position where the marital status field value is filled in according to the number of pixels, the pixel distribution and the pixel clustering outline.
[0010] According to a method for detecting changes in marital status in a household registration book provided by an embodiment of the present invention, the method of determining a household registration book picture containing a marital status field name of a target person and the position of the marital status field name in the household registration book picture comprises: obtaining at least one page of the household registration book picture of the target person; performing OCR text recognition on the at least one page of the household registration book picture to obtain character information and position information of the characters in the at least one page of the household registration book picture; searching for the marital status field name based on a preset edit distance error by traversing the character information, and determining the household registration book picture containing the marital status field name of the target person and the position of the marital status field name in the household registration book picture according to the position information.
[0011] According to a method for detecting changes in marital status in a household registration book provided by an embodiment of the present invention, after determining that the marital status in the household registration book of a target person has changed, the method further includes: judging whether the at least one page of the household registration book image contains a household registration book change page based on character information of the text in the at least one page of the household registration book image; in response to the at least one page of the household registration book image not containing a household registration book change page, giving a first prompt message that a household registration book change page needs to be supplemented; in response to the at least one page of the household registration book image containing a household registration book change page, further detecting whether the household registration book change page contains change information related to the change in marital status; in response to the household registration book change page containing change information related to the change in marital status, giving confirmation information that the marital status in the household registration book of the target person has changed; in response to the household registration book change page not containing change information related to the change in marital status, giving a second prompt message that relevant certificates need to be submitted.
[0012] According to an embodiment of the present invention, a household register marital status change detection method is provided, wherein the position for filling in the marital status field value is determined according to the text direction of the household register picture, the layout of the household register picture and the position of the marital status field name in the household register picture, including: determining a first rectangular frame with the smallest area surrounding the marital status field name; determining a second rectangular frame adjacent to the first rectangular frame and containing a form for filling in the marital status according to the text direction of the household register picture and the layout of the household register picture, and using the second rectangular frame as the position for filling in the marital status field value; wherein the ratio of the height of the second rectangular frame to the first rectangular frame is a preset first ratio, and the ratio of the width of the second rectangular frame to the first rectangular frame is a preset second ratio.
[0013] According to a method for detecting changes in marital status in a household register provided by an embodiment of the present invention, the text information of the position where the marital status field value is filled in is determined by extracting text from the position where the marital status field value is filled in in the household register image, including: determining the text information of the position where the marital status field value is filled in by extracting text from the text contained in the second rectangular box and involved in the border of the second rectangular box.
[0014] The embodiment of the present invention also provides a household registration book marital status change detection device, comprising the following modules: a first determination module, used to: determine the household registration book image containing the marital status field name of the target person and the position of the marital status field name in the household registration book image; a second determination module, used to: determine the marital status field value filling position according to the text direction of the household registration book image, the typesetting method of the household registration book image and the position of the marital status field name in the household registration book image; a third determination module, used to: extract text from the marital status field value filling position in the household registration book image, and determine the text information of the marital status field value filling position; a fourth determination module, used to: perform color recognition on the marital status field value filling position in the household registration book image, and determine the change chapter information of the marital status field value filling position; a fifth determination module, used to: determine whether the marital status of the household registration book of the target person has changed according to the text information of the marital status field value filling position and the change chapter information.
[0015] An embodiment of the present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, a household register marital status change detection method as described in any one of the above is implemented.
[0016] An embodiment of the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the household register marital status change detection method as described in any one of the above is implemented.
[0017] An embodiment of the present invention further provides a computer program product, including a computer program, which, when executed by a processor, implements any of the household register marital status change detection methods described above.
[0018] The household registration booklet marital status change detection method, electronic device, storage medium and program product provided by the embodiment of the present invention determine the household registration booklet image containing the marital status field name of the target person and the position of the marital status field name in the household registration booklet image, determine the marital status field value filling position according to the text direction of the household registration booklet image, the typesetting method of the household registration booklet image and the position of the marital status field name in the household registration booklet image, perform text extraction on the marital status field value filling position in the household registration booklet image, determine the text information of the marital status field value filling position, perform color recognition on the marital status field value filling position in the household registration booklet image, determine the change chapter information of the marital status field value filling position, and determine whether the marital status of the target person in the household registration booklet has changed according to the text information of the marital status field value filling position and the change chapter information, thereby realizing the automatic detection of the marital status change of the household registration booklet, reducing the labor cost and improving the accuracy of the detection of the marital status change of the household registration booklet. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0020] Figure 1 This is one of the flow charts of the household register marital status change detection method provided in an embodiment of the present invention.
[0021] Figure 2 This is an example picture of a household registration book.
[0022] Figure 3 This is the second flow chart of the household register marital status change detection method provided in the embodiment of the present invention.
[0023] Figure 4 It is a structural schematic diagram of a household register marital status change detection device provided in an embodiment of the present invention.
[0024] Figure 5 It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0025] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of them. Based on the embodiments in the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the embodiments of the present invention.
[0026] Figure 1 FIG. 1 is a flow chart of a method for detecting changes in marital status in a household register provided by an embodiment of the present invention. Figure 1 As shown, the method includes: Step S1, determining a household register picture of a target person including a marital status field name and a position of the marital status field name in the household register picture.
[0027] The target person is the person whose household registration book marriage status change detection is to be performed, that is, the household registration book marriage status change of the target person is detected. In at least one household registration book page provided by the target person, the household registration book image containing the marital status field name of the target person and the position of the marital status field name in the household registration book image can be determined by optical character recognition (OCR) technology.
[0028] Figure 2 This is an example picture of a household registration book. Figure 2 The picture of the household registration book shown is a picture of the permanent resident registration card. Figure 2 As shown, the household register picture contains the marital status field name.
[0029] Step S2: determine the filling position of the marital status field value according to the text direction of the household registration book image, the layout of the household registration book image and the position of the marital status field name in the household registration book image.
[0030] The position for filling in the marital status field value refers to the position in the household registration book image used to fill in the marital status information, that is, the position for filling in the field value of the marital status field name. The position for filling in the marital status field value is related to the layout of the household registration book image. According to the layout habits, when the text is normally displayed vertically, the position for filling in the marital status field value is usually located to the right or bottom of the marital status field name. In actual application, the relative position of the position for filling in the marital status field value and the marital status field name is determined according to the specific layout of the household registration book image.
[0031] When actually determining the position to fill in the marital status field value in the household registration book image, in addition to determining the relative position of the marital status field value filling position and the marital status field name according to the layout of the household registration book image, it is also necessary to obtain the text direction of the household registration book image. Because household registration book images are usually uploaded by scanning or taking photos, the text direction in the uploaded household registration book image may be tilted, so it is necessary to obtain the text direction of the household registration book image, and determine the position to fill in the marital status field value in combination with the text direction of the household registration book image and the relative position of the marital status field value filling position and the marital status field name.
[0032] Step S3, extracting text from the position where the marital status field value is filled in the household register picture, and determining text information of the position where the marital status field value is filled in.
[0033] When extracting text from the position where the marital status field value is filled, you can filter based on the previous OCR recognition results to obtain the text information of the position where the marital status field value is filled. Alternatively, you can directly perform OCR recognition on the position where the marital status field value is filled in the household registration book image to obtain the text information of the position where the marital status field value is filled. The text information of the position where the marital status field value is filled can reflect to a certain extent whether the marital status of the household registration book has changed.
[0034] Step S4: Perform color recognition on the position where the marital status field value is filled in the household register picture, and determine the change chapter information of the position where the marital status field value is filled in.
[0035] When the marital status changes, the original marital status information is usually crossed out on the household registration book and the new marital status information is written in. When the information on the household registration book is modified, a change stamp (which can be called a household registration book change stamp or a household registration change stamp) needs to be stamped at the modified location. The change stamp is usually red, so the color of the marital status field value filling position in the household registration book image is recognized according to the color of the change stamp, and the information of the pixel points that are consistent with the color of the change stamp is identified. From this, it can be determined whether the marital status field value filling position is stamped with a change stamp, that is, the change stamp information of the marital status field value filling position is obtained. The change stamp information of the marital status field value filling position can reflect whether the marital status has changed to a certain extent.
[0036] Step S5: Determine whether the marital status of the target person in the household register has changed based on the text information of the position where the marital status field value is filled in and the change chapter information.
[0037] The text information at the position where the marital status field value is filled in and the change chapter information at the position where the marital status field value is filled in can respectively reflect whether the marital status of the household registration book has changed from different angles. In order to improve the accuracy of the detection of marital status changes in the household registration book, the text information at the position where the marital status field value is filled in and the change chapter information can be combined to determine whether the marital status of the target person's household registration book has changed.
[0038] The method for detecting changes in marital status in a household register provided by an embodiment of the present invention determines a household register picture containing a marital status field name and the position of the marital status field name in the household register picture of a target person, determines the position where the marital status field value is filled in according to the text direction of the household register picture, the typesetting method of the household register picture and the position of the marital status field name in the household register picture, extracts text from the position where the marital status field value is filled in in the household register picture, determines text information at the position where the marital status field value is filled in, performs color recognition on the position where the marital status field value is filled in in the household register picture, determines change chapter information at the position where the marital status field value is filled in, determines whether the marital status in the household register of the target person has changed according to the text information at the position where the marital status field value is filled in and the change chapter information, thereby realizing automatic detection of changes in marital status in the household register, reducing labor costs, and improving the accuracy of detection of changes in marital status in the household register.
[0039] According to a method for detecting changes in marital status in a household register provided by an embodiment of the present invention, the method of determining whether the marital status in the household register of the target person has changed based on the text information at the position where the marital status field value is filled in and the change chapter information comprises: determining a first probability of a change in marital status based on the text information at the position where the marital status field value is filled in; determining a second probability of a change in marital status based on the change chapter information at the position where the marital status field value is filled in; performing weighted calculation based on the first probability and the second probability to obtain a probability of a change in marital status; and determining that the marital status in the household register of the target person has changed in response to the probability of a change in marital status being greater than a preset threshold.
[0040] When determining whether the marital status of the target person's household registration booklet has changed based on the text information at the position where the marital status field value is filled in and the change chapter information, a first probability of the marital status change is determined based on the text information at the position where the marital status field value is filled in, that is, a judgment is made based on the text information at the position where the marital status field value is filled in, and a first probability of the marital status change is given; a second probability of the marital status change is determined based on the change chapter information at the position where the marital status field value is filled in, that is, a judgment is made based on the change chapter information at the position where the marital status field value is filled in, and a second probability of the marital status change is given; the first probability of the marital status change is determined in advance based on the text information at the position where the marital status field value is filled in and the change chapter information at the position where the marital status field value is filled in. The second probability of a change in marital status is determined by the change chapter information at the position where the status field value is filled in, and different weights are set. The setting of weights needs to take into account the different importance of text information and image information in the detection of changes in marital status in the household registration book, as well as their actual role in judging changes in marital status, so as to improve the accuracy and reliability of the judgment. The first probability and the second probability are weightedly calculated according to the preset weights to obtain the probability of change in marital status; the probability of change in marital status is compared with the preset threshold value. If the probability of change in marital status is greater than the preset threshold value, it is determined that the marital status of the target person in the household registration book has changed; if the probability of change in marital status is less than or equal to the preset threshold value, it is determined that the marital status of the target person in the household registration book has not changed.
[0041] The method for detecting changes in marital status in a household registration book provided in an embodiment of the present invention determines a first probability of a change in marital status based on text information at the position where the marital status field value is filled in, determines a second probability of a change in marital status based on change chapter information at the position where the marital status field value is filled in, performs weighted calculation based on the first probability and the second probability, and obtains the probability of a change in marital status. In response to the probability of a change in marital status being greater than a preset threshold, it is determined that a change has occurred in the household registration book marital status of the target person, thereby improving the accuracy and flexibility of detecting changes in marital status in the household registration book.
[0042] According to a method for detecting changes in marital status in a household register provided by an embodiment of the present invention, the first probability of a change in marital status occurring based on text information at the position where the marital status field value is filled in comprises: in response to learning that only a single preset marital status description information appears at the position where the marital status field value is filled in based on the text information at the position where the marital status field value is filled in, determining the first probability to be a first value; in response to learning that at least two preset marital status description information appears at the position where the marital status field value is filled in based on the text information at the position where the marital status field value is filled in, or other text information other than the preset marital status description information appears, determining the first probability to be a second value; wherein the second value is greater than the first value.
[0043] Since the marital status in the household registration has not changed, only a single marital status information appears in the marital status field value filling position. These marital status information are enumerable in real life, such as single, married, divorced, and widowed. If the marital status has changed, the previous marital status is usually crossed out and the new marital status is written. Although the previous marital status has marks such as strikethroughs, the relevant text information can be recognized by OCR technology through denoising and other processing. In addition, after the marital status is modified, a change stamp will be stamped in the marital status field value filling position, and the change stamp usually displays relevant text. Therefore, the relevant text information of the change stamp located in the marital status field value filling position can also be identified through OCR recognition. That is, if the marital status has changed, multiple marital statuses (including two marital statuses) will be detected, and other text information other than marital status may also be detected.
[0044] If it is known from the text information at the position where the marital status field value is filled that only a single preset marital status description information appears at the position where the marital status field value is filled, the first probability is determined to be a first value. The first value may be a preset value, and since only a single preset marital status description information appears at the position where the marital status field value is filled, the probability of the marital status occurring is low, and the first value may be set to a lower value.
[0045] If it is known from the text information at the position where the marital status field value is filled that at least two preset marital status description information or other text information other than the preset marital status description information appears at the position where the marital status field value is filled, then the first probability is determined to be the second value. The second value may be a preset value, and since at least two preset marital status description information or other text information other than the preset marital status description information appears at the position where the marital status field value is filled, the probability of the marital status occurring is high, and the second value may be set to a higher value. The second value needs to be greater than the first value.
[0046] The method for detecting changes in marital status in a household registration book provided in an embodiment of the present invention determines a first probability as a first value by responding to the text information at the position where the marital status field value is filled in, knowing that only a single preset marital status description information appears at the position where the marital status field value is filled in based on the text information at the position where the marital status field value is filled in; and determines the first probability as a second value greater than the first value in response to the text information at the position where the marital status field value is filled in, knowing that at least two preset marital status description information appears at the position where the marital status field value is filled in, or other text information other than the preset marital status description information appears. This improves the accuracy of determining the first probability, thereby further improving the accuracy of detecting changes in marital status in the household registration book.
[0047] According to a method for detecting changes in marital status in a household register provided by an embodiment of the present invention, the change stamp information includes the probability that a change stamp exists at the position where the marital status field value is filled in; wherein, the greater the probability that a change stamp exists at the position where the marital status field value is filled in, the greater the second probability.
[0048] The change chapter information includes the probability that a change chapter exists at the location where the marital status field value is filled in. The greater the probability that a change chapter exists at the location where the marital status field value is filled in, the greater the probability that the marital status has changed, and therefore, the greater the second probability.
[0049] The method for detecting changes in marital status in a household register provided in an embodiment of the present invention further improves the accuracy of detecting changes in marital status in the household register by setting the change chapter information to include the probability that a change chapter exists at the position where the marital status field value is filled in. The greater the probability that a change chapter exists at the position where the marital status field value is filled in, the greater the second probability, thereby further improving the accuracy of detecting changes in marital status in the household register.
[0050] According to an embodiment of the present invention, a method for detecting changes in marital status in a household register is provided, wherein color recognition is performed on the position where the marital status field value is filled in the household register picture to determine the change chapter information of the position where the marital status field value is filled in, including: obtaining an image color matrix by color recognition of the position where the marital status field value is filled in the household register picture; wherein the image color matrix includes position information and color information of each pixel point at the position where the marital status field value is filled in; identifying the number of pixels, pixel distribution and pixel clustering outline of pixels in the image color matrix that are consistent with the color of the change chapter, and determining the probability that a change chapter exists at the position where the marital status field value is filled in according to the number of pixels, the pixel distribution and the pixel clustering outline.
[0051] When color recognition is performed on the position where the marital status field value is filled in the household registration book image and the change chapter information of the position where the marital status field value is filled in is determined, color recognition is performed on the image of the position where the marital status field value is filled in the household registration book image to obtain an image color matrix, which includes position information and color information of each pixel point at the position where the marital status field value is filled in.
[0052] The number of pixels, pixel distribution and pixel clustering outline of pixels in the color matrix of the image that are consistent with the color of the change stamp (such as red) are identified. The more pixels there are, the greater the probability that a change stamp exists at the position where the marital status field value is filled. The pixel distribution reflects the position of the pixels. The closer the position of the pixels is to the center of the position where the marital status field value is filled, the greater the probability that a change stamp exists at the position where the marital status field value is filled. The pixel clustering outline reflects the shape information expressed by the clustering of pixels that are consistent with the color of the change stamp. The closer the pixel clustering outline is to the shape of the change stamp, the greater the probability that a change stamp exists at the position where the marital status field value is filled. Since the change stamp may be stamped outside the position where the marital status field value is filled, the shape of the change stamp includes the overall shape and partial shape of the change stamp.
[0053] When identifying the pixel points in the image color matrix that are consistent with the color of the change chapter (such as red), the image color matrix can be converted to the HSV color space to detect the pixel points that are consistent with the color of the change chapter. Of course, in the RGB color space, the pixel points in the image color matrix that are consistent with the color of the change chapter can also be obtained. It should be noted that due to the household registration book image uploaded by scanning or taking a photo, the color of the change chapter in the household registration book image may be different from the color of the actual change chapter, so the color consistency does not mean that the color value is absolutely consistent. For example, light red and dark red are both considered to be red, and the two colors are considered to be consistent in this application. Since the color space space color is gradual, the color value range of the change chapter can be set according to a pre-selected color range such as light red to dark red, such as setting the R value range, G value range and B value range of the change chapter respectively, as long as the R value of the pixel point in the image color matrix is within the R value range, the G value is within the G value range, and the B value is within the B value range, then the color of the pixel point in the image color matrix is considered to be consistent with the color of the change chapter.
[0054] Therefore, the probability of a change chapter at the location where the marital status field value is filled is determined by comprehensively obtaining the number of pixels, the distribution of pixels, and the outline of pixel clustering. Specifically, the third probability of a change in marital status can be determined based on the number of pixels; the degree of proximity of pixels with the same color as the change chapter to the center of the location where the marital status field value is filled is determined based on the distribution of pixels; the fourth probability of a change in marital status can be determined based on the degree of proximity of pixels with the same color as the change chapter to the center of the location where the marital status field value is filled; the degree of proximity of the pixel clustering outline to the shape of the change chapter (including the overall shape and some situations) is determined based on the outline of pixel clustering; the fifth probability of a change in marital status can be determined based on the degree of proximity of the pixel clustering outline to the shape of the change chapter. The third probability, the fourth probability, and the fifth probability can be weighted and summed according to the preset weights to obtain the probability of a change chapter at the location where the marital status field value is filled.
[0055] The method for detecting changes in marital status in a household registration book provided in an embodiment of the present invention performs color recognition on an image of a position where a marital status field value is filled in a household registration book image to obtain an image color matrix, wherein the image color matrix includes position information and color information of each pixel point at the position where the marital status field value is filled in, identifies the number of pixels, pixel distribution and pixel clustering contour of pixels in the image color matrix that are consistent with the color of the change stamp, and determines the probability that a change stamp exists at the position where the marital status field value is filled in based on the number of pixels, pixel distribution and pixel clustering contour, thereby improving the accuracy of determining the probability that a change stamp exists at the position where the marital status field value is filled in, that is, improving the accuracy of determining the second probability, thereby further improving the accuracy of detecting changes in marital status in the household registration book.
[0056] According to a method for detecting changes in marital status in a household registration book provided by an embodiment of the present invention, the method of determining a household registration book picture containing a marital status field name of a target person and the position of the marital status field name in the household registration book picture comprises: obtaining at least one page of the household registration book picture of the target person; performing OCR text recognition on the at least one page of the household registration book picture to obtain character information and position information of the characters in the at least one page of the household registration book picture; searching for the marital status field name based on a preset edit distance error by traversing the character information, and determining the household registration book picture containing the marital status field name of the target person and the position of the marital status field name in the household registration book picture according to the position information.
[0057] When determining the household registration book image containing the marital status field name of the target person and the position of the marital status field name in the household registration book image, obtain at least one page of the household registration book image of the target person, such as obtaining at least one page of the household registration book image of the target person scanned and uploaded according to the material provision requirements, perform OCR text recognition on at least one page of the household registration book image, and obtain character information and position information of the text in at least one page of the household registration book image, wherein the character information of the text refers to what kind of characters the text displays, and the position information of the text includes the household registration book image to which the text belongs and the position of the text in the household registration book image; by traversing the character information, the marital status field name is determined within the preset edit distance error allowable range, and the household registration book image containing the marital status field name of the target person and the position of the marital status field name in the household registration book image are determined according to the position information of the marital status field name.
[0058] Before performing OCR text recognition on at least one page of the household register image, the household register image may be preprocessed in advance, such as adjusting brightness and contrast to improve text recognizability, and applying an image direction correction algorithm to ensure that the text direction is correct.
[0059] The method for detecting changes in marital status in a household registration book provided in an embodiment of the present invention obtains at least one page of a household registration book image of a target person, performs OCR text recognition on at least one page of the household registration book image, obtains character information and position information of characters in at least one page of the household registration book image, searches for the marital status field name based on a preset edit distance error by traversing the character information, determines the household registration book image of the target person containing the marital status field name and the position of the marital status field name in the household registration book image according to the position information, thereby improving the positioning accuracy of the marital status field name and further improving the accuracy of detecting changes in marital status in the household registration book.
[0060] According to a method for detecting changes in marital status in a household registration book provided by an embodiment of the present invention, after determining that the marital status in the household registration book of a target person has changed, the method further includes: judging whether the at least one page of the household registration book image contains a household registration book change page based on character information of the text in the at least one page of the household registration book image; in response to the at least one page of the household registration book image not containing a household registration book change page, giving a first prompt message that a household registration book change page needs to be supplemented; in response to the at least one page of the household registration book image containing a household registration book change page, further detecting whether the household registration book change page contains change information related to the change in marital status; in response to the household registration book change page containing change information related to the change in marital status, giving confirmation information that the marital status in the household registration book of the target person has changed; in response to the household registration book change page not containing change information related to the change in marital status, giving a second prompt message that relevant certificates need to be submitted.
[0061] If it is determined that the marital status information has changed, further check whether all text information in the household registration book image contains "registration item change and correction record" to determine whether the household registration book image contains the change page in the household registration book, and check whether there is change information related to the change of marital status in the registration item change and correction record, so as to confirm the detection result of the marital status change. If there is no change page in the household registration book image or the registration item change and correction record does not have change information related to the change of marital status, relevant prompt information can be given.
[0062] Therefore, after determining that the marital status of the target person's household registration book has changed, it is determined whether at least one page of the household registration book image contains a household registration book change page based on the character information of the text in at least one page of the household registration book image. If at least one page of the household registration book image does not contain a household registration book change page, a first prompt message is given that the household registration book change page needs to be supplemented; if at least one page of the household registration book image contains a household registration book change page, it is further detected whether the household registration book change page contains change information related to the change in marital status; if the household registration book change page contains change information related to the change in marital status, confirmation information that the marital status of the target person's household registration book has changed is given; if the household registration book change page does not contain change information related to the change in marital status, a second prompt message is given that relevant certificates need to be submitted.
[0063] The household registration booklet marital status change detection method provided by the embodiment of the present invention determines whether at least one page of the household registration booklet image contains a household registration book change page based on the character information of the text in at least one page of the household registration booklet image. In response to the at least one page of the household registration booklet image not containing the household registration book change page, a first prompt information that the household registration book change page needs to be supplemented is given. In response to the at least one page of the household registration booklet image containing the household registration book change page, whether the household registration book change page contains change information related to the change of marital status is further detected. In response to the change information related to the change of marital status is contained in the household registration book change page, confirmation information that the household registration booklet marital status of the target person has been changed is given. In response to the change information related to the change of marital status is not contained in the household registration book change page, a second prompt information that relevant certificates need to be submitted is given. A more comprehensive and accurate judgment can be given, which improves the reliability of the marital status change detection result, and other relevant change information in the household registration booklet can be obtained, and relevant information prompts are given when conditions are met.
[0064] According to an embodiment of the present invention, a household register marital status change detection method is provided, wherein the position for filling in the marital status field value is determined according to the text direction of the household register picture, the layout of the household register picture and the position of the marital status field name in the household register picture, including: determining a first rectangular frame with the smallest area surrounding the marital status field name; determining a second rectangular frame adjacent to the first rectangular frame and containing a form for filling in the marital status according to the text direction of the household register picture and the layout of the household register picture, and using the second rectangular frame as the position for filling in the marital status field value; wherein the ratio of the height of the second rectangular frame to the first rectangular frame is a preset first ratio, and the ratio of the width of the second rectangular frame to the first rectangular frame is a preset second ratio.
[0065] The relative position of the marital status field name in the household registration book image and the position for filling in the marital status field value is determined by the layout of the household registration book image. When the text in the household registration book image is normally displayed vertically, the position for filling in the marital status field value is usually to the right or below the position of the marital status field name. However, since the text in the household registration book image uploaded by scanning or other means may be tilted, if the direction of the household registration book image has not been corrected, the determination of the position for filling in the marital status field value also needs to consider the direction of the household registration book image.
[0066] When determining the position for filling in the marital status field value, determine the first rectangular frame with the smallest area surrounding the marital status field name, determine the second rectangular frame adjacent to the first rectangular frame and containing a form for filling in the marital status according to the text direction of the household registration book image and the layout of the household registration book image, and use the second rectangular frame as the position for filling in the marital status field value. Among them, the ratio of the height of the second rectangular frame to the first rectangular frame is the preset first ratio, and the ratio of the width of the second rectangular frame to the first rectangular frame is the preset second ratio. The preset first ratio and the preset second ratio can be 1 or not 1, and the preset first ratio and the preset second ratio can be the same or different, and can be set with reference to the layout of the household registration book image.
[0067] The method for detecting changes in marital status in a household register provided by an embodiment of the present invention determines a first rectangular frame with the smallest area surrounding the name of a marital status field, determines a second rectangular frame adjacent to the first rectangular frame and containing a form for filling in marital status according to the text direction of a household register image and the layout of the household register image, and uses the second rectangular frame as a position for filling in the marital status field value; wherein the ratio of the height of the second rectangular frame to the first rectangular frame is a preset first ratio, and the ratio of the width of the second rectangular frame to the first rectangular frame is a preset second ratio, thereby improving the accuracy of determining the position for filling in the marital status field value, thereby further improving the accuracy of detecting changes in marital status in the household register.
[0068] According to a method for detecting changes in marital status in a household register provided by an embodiment of the present invention, the text information of the position where the marital status field value is filled in is determined by extracting text from the position where the marital status field value is filled in in the household register image, including: determining the text information of the position where the marital status field value is filled in by extracting text from the text contained in the second rectangular box and involved in the border of the second rectangular box.
[0069] Among the characters in the position where the marital status field value is filled, some characters may be partially located within the position where the marital status field value is filled, and partially located outside the position where the marital status field value is filled. In order to obtain complete text information, when extracting characters from the position where the marital status field value is filled in the household registration booklet image, and determining the text information of the position where the marital status field value is filled, the characters contained in the second rectangular frame and involved in the second rectangular frame border are extracted to determine the text information of the position where the marital status field value is filled. Among them, the characters contained in the second rectangular frame are the characters located in the second rectangular frame representing the position where the marital status field value is filled (which can be called the characters surrounded by the second rectangular frame), and the characters involved in the second rectangular frame border are the characters that intersect with the border of the second rectangular frame representing the position where the marital status field value is filled, that is, the characters that are partially located in the second rectangular frame and partially located outside the second rectangular frame (which can be called the characters half-surrounded by the second rectangular frame).
[0070] The method for detecting changes in marital status in a household register provided in an embodiment of the present invention determines the text information of the position where the marital status field value is filled in by extracting text contained in the second rectangular box and involved in the border of the second rectangular box, thereby improving the comprehensiveness of the text information and further improving the accuracy of detecting changes in marital status in the household register.
[0071] Figure 3 This is the second flow chart of the household registration marital status change detection method provided by the embodiment of the present invention. Figure 3 As shown, the method includes: 1. Image preprocessing: First, the input household registration book image is preprocessed, including adjusting the brightness and contrast to improve the recognizability of the text, and applying the image direction correction algorithm to ensure the correct text direction.
[0072] 2. Apply OCR recognition: Use high-precision OCR technology to perform text recognition on the pre-processed household registration book image to obtain the character information of all the text in the household registration book image and its position information in the image.
[0073] 3. Keyword positioning: Traverse all text information recognized by OCR, use the edit distance algorithm to find the "marital status" field within a certain error range, and determine its location. If the "marital status" field is not found, infer the location information of the "marital status" field based on the standard format of the household registration book.
[0074] 4. Minimum enclosing rectangle calculation: Calculate the minimum enclosing rectangle position of the "Marital Status" field, and determine the rectangular box corresponding to the position where the Marital Status field value is filled in.
[0075] 5. Extract text information from the location where the marital status field value is filled in: Detect and extract all text information in the rectangular box corresponding to the location where the marital status field value is filled in, in preparation for subsequent analysis.
[0076] 6. Marital status text analysis: Analyze the text information extracted in step 5 to check whether it contains only a single status text in the marital status (single, married, divorced, widowed). If multiple marital status texts or other irrelevant texts are detected, it is considered that the marital status may have changed.
[0077] 7. Image color distribution detection: Perform color distribution detection on the image area where the marital status field value is filled in. The image color matrix can be converted into the HSV color space to detect the number, distribution and clustering outline of "red" (the color of the change stamp) pixels to identify the marital status change stamp.
[0078] 8. Comprehensive analysis and judgment: Based on the information from steps 6 and 7, a weighted judgment is made on whether the marital status has changed. If both the text and color analysis indicate a change, then the marital status has changed.
[0079] 9. Change information detection: If step 8 determines that the marital status has changed, further detect all text information in the image, look for key information such as "registration item changes and correction records", and verify whether there is any relevant marital status change information.
[0080] 10. Correlation analysis and final judgment: Analyze the correlation between the change information detected in step 9 and the change in marital status, and finally further determine whether the marital status has changed and output the result.
[0081] The following is a description of a household register marital status change detection device provided in an embodiment of the present invention. The household register marital status change detection device described below and the household register marital status change detection method described above can be referenced to each other.
[0082] Figure 4 Schematic diagram of the structure of the household registration marital status change detection device provided by the embodiment of the present invention. Figure 4As shown, the device includes a first determination module 10, a second determination module 20, a third determination module 30, a fourth determination module 40 and a fifth determination module 50, wherein: the first determination module 10 is used to determine the household registration book image containing the marital status field name of the target person and the position of the marital status field name in the household registration book image; the second determination module 20 is used to determine the marital status field value filling position according to the text direction of the household registration book image, the typesetting method of the household registration book image and the position of the marital status field name in the household registration book image; the third determination module 30 is used to extract text from the marital status field value filling position in the household registration book image to determine the text information of the marital status field value filling position; the fourth determination module 40 is used to perform color recognition on the marital status field value filling position in the household registration book image to determine the change chapter information of the marital status field value filling position; the fifth determination module 50 is used to determine whether the marital status of the household registration book of the target person has changed according to the text information of the marital status field value filling position and the change chapter information.
[0083] The household registration book marriage status change detection device provided by the embodiment of the present invention determines the household registration book image containing the marriage status field name of the target person and the position of the marriage status field name in the household registration book image, determines the position where the marriage status field value is filled in according to the text direction of the household registration book image, the layout method of the household registration book image and the position of the marriage status field name in the household registration book image, extracts text from the position where the marriage status field value is filled in the household registration book image, determines the text information of the position where the marriage status field value is filled in, performs color recognition on the position where the marriage status field value is filled in the household registration book image, determines the change chapter information of the position where the marriage status field value is filled in, and determines whether the household registration book marriage status of the target person has changed according to the text information of the position where the marriage status field value is filled in and the change chapter information, thereby realizing automatic detection of household registration book marriage status change, reducing labor costs, and improving the accuracy of household registration book marriage status change detection.
[0084] Figure 5 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 5As shown, the electronic device may include: a processor (processor) 510, a communication interface (Communications Interface) 520, a memory (memory) 530 and a communication bus 540, wherein the processor 510, the communication interface 520, and the memory 530 communicate with each other through the communication bus 540. The processor 510 can call the logic instructions in the memory 530 to execute the household registration book marital status change detection method, which includes: determining the household registration book image of the target person containing the marital status field name and the position of the marital status field name in the household registration book image; determining the marital status field value filling position according to the text direction of the household registration book image, the typesetting method of the household registration book image and the position of the marital status field name in the household registration book image; performing text extraction on the marital status field value filling position in the household registration book image to determine the text information of the marital status field value filling position; performing color recognition on the marital status field value filling position in the household registration book image to determine the change chapter information of the marital status field value filling position; determining whether the marital status of the target person in the household registration book has changed according to the text information of the marital status field value filling position and the change chapter information.
[0085] In addition, the logic instructions in the above-mentioned memory 530 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the embodiment of the present invention is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0086] On the other hand, an embodiment of the present invention further provides a computer program product, which includes a computer program, which can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the household registration book marital status change detection method provided by the above-mentioned methods, which includes: determining a household registration book image of a target person containing a marital status field name and the position of the marital status field name in the household registration book image; determining the marital status field value filling position according to the text direction of the household registration book image, the layout method of the household registration book image and the position of the marital status field name in the household registration book image; performing text extraction on the marital status field value filling position in the household registration book image to determine the text information of the marital status field value filling position; performing color recognition on the marital status field value filling position in the household registration book image to determine the change chapter information of the marital status field value filling position; determining whether the marital status of the target person in the household registration book has changed according to the text information of the marital status field value filling position and the change chapter information.
[0087] On the other hand, an embodiment of the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the household registration book marriage status change detection method provided by the above-mentioned methods, the method comprising: determining a household registration book image of a target person containing a marriage status field name and the position of the marriage status field name in the household registration book image; determining a position where the marriage status field value is filled in according to the text direction of the household registration book image, the layout method of the household registration book image and the position of the marriage status field name in the household registration book image; performing text extraction on the position where the marriage status field value is filled in in the household registration book image to determine text information of the position where the marriage status field value is filled in; performing color recognition on the position where the marriage status field value is filled in in the household registration book image to determine change chapter information of the position where the marriage status field value is filled in; and determining whether the marriage status of the target person in the household registration book has changed according to the text information and the change chapter information of the position where the marriage status field value is filled in.
[0088] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0089] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0090] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the embodiments of the present invention, rather than to limit them. Although the embodiments of the present invention have been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the embodiments of the present invention.
Claims
1. A method for detecting changes in marital status in a household register, It is characterized in that include: Determine the household register picture containing the marital status field name of the target person and the position of the marital status field name in the household register picture; Determine the filling position of the marital status field value according to the direction of the text in the household registration book image, the layout of the household registration book image, and the position of the marital status field name in the household registration book image; Extracting text from the position where the marital status field value is filled in the household register picture to determine text information at the position where the marital status field value is filled in; Performing color recognition on the position where the marital status field value is filled in the household register picture, and determining the change seal information of the position where the marital status field value is filled in; Determine whether the marital status of the target person in the household registration book has changed based on the text information at the position where the marital status field value is filled in and the change chapter information.
2. The household register marital status change detection method according to claim 1, It is characterized in that The step of determining whether the marital status of the target person in the household register has changed according to the text information of the position where the marital status field value is filled in and the change chapter information includes: Determine a first probability of a change in marital status based on text information at the position where the marital status field value is filled in; Determine a second probability of a change in marital status according to the change chapter information of the position where the marital status field value is filled in; Performing weighted calculation according to the first probability and the second probability to obtain the probability of change of marital status; In response to the probability of the marital status change being greater than a preset threshold, it is determined that the marital status of the target person in the household registration book has changed.
3. The household register marital status change detection method according to claim 2, It is characterized in that The determining the first probability of a change in marital status according to the text information of the position filled in the marital status field value includes: In response to learning, based on the text information of the position where the marital status field value is filled in, that only a single preset marital status description information appears at the position where the marital status field value is filled in, determining that the first probability is a first value; In response to learning, based on the text information at the location where the marital status field value is filled in, that at least two preset marital status description information appears at the location where the marital status field value is filled in, or other text information other than the preset marital status description information appears, the first probability is determined to be a second value; wherein the second value is greater than the first value.
4. The household register marital status change detection method according to claim 2, It is characterized in that The change stamp information includes the probability that a change stamp exists at the location where the marital status field value is filled in; wherein, the greater the probability that a change stamp exists at the location where the marital status field value is filled in, the greater the second probability.
5. The household register marital status change detection method according to claim 4, It is characterized in that The color recognition of the position where the marital status field value is filled in the household register picture and the determination of the change chapter information of the position where the marital status field value is filled in include: By performing color recognition on the position where the marital status field value is filled in the household registration booklet image, an image color matrix is obtained; wherein the image color matrix includes the position information and color information of each pixel point at the position where the marital status field value is filled in; Identify the number of pixels, pixel distribution and pixel clustering outline of pixels in the image color matrix that are consistent with the color of the change stamp, and determine the probability of a change stamp existing at the location where the marital status field value is filled in based on the number of pixels, the pixel distribution and the pixel clustering outline.
6. The household register marital status change detection method according to claim 1, It is characterized in that The household register picture containing the marital status field name of the determined target person and the position of the marital status field name in the household register picture include: Obtaining at least one page of the household registration booklet of the target person; Performing OCR text recognition on the at least one page of the household register image to obtain character information and position information of the text in the at least one page of the household register image; By traversing the character information, the marital status field name is searched based on a preset edit distance error, and the household register picture of the target person containing the marital status field name and the position of the marital status field name in the household register picture are determined according to the position information.
7. The household register marital status change detection method according to claim 6, It is characterized in that After the marital status of the household registration of the determined target person changes, the method further includes: Determining whether the at least one page of the household registration book image includes a household registration book change page according to character information of the characters in the at least one page of the household registration book image; In response to the at least one page of the household register picture not including a household register change page, providing a first prompt message that a household register change page needs to be supplemented; In response to the at least one page of the household register image including a household register change page, further detecting whether the household register change page includes change information related to the change of marital status; In response to the change information related to the change of marital status included in the household register change page, providing confirmation information that the marital status of the target person in the household register has been changed; In response to the fact that the household registration change page does not contain change information related to the change in marital status, a second prompt message is given requiring submission of relevant certificates.
8. The household register marital status change detection method according to claim 1, It is characterized in that The step of determining the filling position of the marital status field value according to the direction of the text in the household registration book image, the layout of the household registration book image, and the position of the marital status field name in the household registration book image includes: Determine a first rectangular frame with the smallest area surrounding the marital status field name; According to the text direction of the household registration book image and the layout of the household registration book image, a second rectangular box adjacent to the first rectangular box containing a form for filling in the marital status is determined, and the second rectangular box is used as the filling position of the marital status field value; wherein, the ratio of the height of the second rectangular box to the first rectangular box is a preset first ratio, and the ratio of the width of the second rectangular box to the first rectangular box is a preset second ratio.
9. The household register marital status change detection method according to claim 8, It is characterized in that The step of extracting text from the position where the marital status field value is filled in the household register picture to determine text information of the position where the marital status field value is filled in includes: The text information of the filling position of the marital status field value is determined by extracting the text contained in the second rectangular frame and the text involved in the second rectangular frame border.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the program, the household register marital status change detection method as described in any one of claims 1 to 9 is implemented.
11. A non-transitory computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the household register marital status change detection method as described in any one of claims 1 to 9 is implemented.
12. A computer program product comprising a computer program, It is characterized in that When the computer program is executed by a processor, the household register marital status change detection method as described in any one of claims 1 to 9 is implemented.
Citation Information
Patent Citations
Image recognition and information extraction method and device for standardized document
CN111353492A
Table structured information extraction method and device and electronic equipment
CN113297308A
Information processing device and recording medium
CN113449576A
Multi-target administrative law enforcement document information integrity identification detection method and system
CN116092099A
Display Control Device
JP7349208B1
