A blockchain-based intelligent management system and method for genealogy data

Through the blockchain-based genealogy data intelligent management system, it solves the inconvenience and security problems of information preservation in traditional genealogy recording methods, achieves safe, complete and efficient management of genealogy information, and improves the readability of information.

CN117423121BActive Publication Date: 2024-10-18SHENZHEN LONGYIN NETWORK TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311381977.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-10-23
Publication Date
2024-10-18
Estimated Expiration
2043-10-23

AI Technical Summary

Technical Problem

The traditional method of recording genealogy has problems such as inconvenient and inefficient information preservation and vulnerability to malicious attacks and tampering. In particular, the diversity and non-standardized form of paper genealogy makes it difficult to quickly understand and organize information.

Method used

Adopting a blockchain-based genealogy data intelligent management system, by scanning and segmenting genealogy images, extracting and correcting text information, merging it into a tree structure, and saving it in the form of a blockchain to ensure the integrity and security of the information .

Benefits of technology

It achieves safe preservation of genealogy information, avoids the risk of tampering, and improves the readability and understanding efficiency of information through a unified section format.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117423121B_ABST
    Figure CN117423121B_ABST
Patent Text Reader

Abstract

The present invention discloses an intelligent management system and method for genealogy data based on blockchain, and relates to the technical field of blockchain; the management method comprises the following steps: step S100: scanning and acquiring an image Ι of an old genealogy, determining the layout of the genealogy in the image Ι, and segmenting the image Ι according to the layout of the genealogy; step S200: dividing the segmented image into segmented images of different priorities according to the size of the segmented image area, extracting text information from the segmented images of different priorities and identifying errors, and correcting the identified error information; step S300: merging the text information into a genealogy diagram of a tree structure corresponding to the image Ι according to the text information extracted from the corrected segmented image; step S400: saving the generated genealogy diagram in the form of blockchain; step S500: transmitting an application for newly added information to the blockchain where the genealogy diagram corresponding to the newly added information is located.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of blockchain technology, and specifically to a blockchain-based family tree data intelligent management system and method. Background Art

[0002] Blockchain is a chain data structure that combines data blocks in a sequential manner in chronological order, and is a distributed ledger that is cryptographically guaranteed to be tamper-proof and unforgeable.

[0003] The traditional way of recording genealogy is in text, and it takes a lot of time to write and modify the content. As time goes by, it is difficult to preserve the genealogy in its entirety. However, with the continuous development of technology, genealogy has gradually adopted electronic media to record, which has brought convenience to people; however, genealogy can also be maliciously attacked and tampered with, which seriously affects the authenticity and security of genealogy; at the same time, the traditional genealogy recording forms are diverse, so people cannot immediately understand the content of the genealogy when they come into contact with it, and they need to sort out the structure of the genealogy themselves, which is inefficient. Summary of the invention

[0004] The purpose of the present invention is to provide a blockchain-based intelligent management system and method for genealogy data to solve the problems raised in the above-mentioned background technology.

[0005] In order to solve the above technical problems, the present invention provides the following technical solutions: a blockchain-based intelligent management method for genealogy data, the method comprising the following steps:

[0006] Step S100: Scan and obtain an image I of an old family tree, determine the layout of the family tree in the image I, and segment the image I according to the layout of the family tree;

[0007] Step S200: obtaining the area of ​​each segmented image after segmentation, dividing all the segmented images into segmented images of different priorities according to the size of the segmented image area, extracting text information from the segmented images of different priorities and identifying errors, and correcting the identified error information;

[0008] Step S300: Based on the text information extracted from the corrected segmented image, the text information is merged into a family tree diagram of a tree structure corresponding to the image 1;

[0009] Step S400: Save the generated family tree in the form of blockchain;

[0010] Step S500: Transmit the application for new information to the blockchain where the family tree corresponding to the new information is located; when the number of nodes allowed to be added in the blockchain is greater than the set threshold, write the new information into the blockchain where the corresponding family tree is located.

[0011] Furthermore, determining the layout of the family tree in image 1 in step S100 includes the following steps:

[0012] Step S101: extract the part other than the text in the image I to generate a new image I0;

[0013] Step S102: Retrieve several pre-saved family tree images, assuming that the length of the family tree image is m and the width is n; adjust the size of the image I0 to a length of m and a width of n;

[0014] Step S103: Compare the image I0 with any family tree image; calculate the similarity ψ between the image I0 and any family tree image according to the formula:

[0015]

[0016] Where (p, q) is the pixel coordinates of the pixel point in image I0 and any family tree image, X(p, q) is the pixel value of the pixel point with coordinates (p, q) in image I0, and Y(p, q) is the pixel value of the pixel point with coordinates (p, q) in the family tree image;

[0017] Step S104: setting a threshold value of δ, when ψ<δ, it is determined that the image I0 is similar to the family tree image, and the system uses the family tree frame corresponding to the family tree image as the family tree frame corresponding to the image I0;

[0018] Furthermore, in step S100, the image I is segmented according to the format of the family tree, including the following steps:

[0019] Step S110: Set a family tree image similar to the image I0 as family tree image I j , where the genealogy image I j The genealogy frame in is the jth genealogy frame; get the genealogy image I j The pixel point a(p,q) in and the RGB values ​​corresponding to the pixel point a(p,q) are R a(p,q) ,G a(p,q) ,B a(p,q) ; Calculate the gray value Gray of pixel a(p,q) according to the formula:

[0020]

[0021] in, is a constant coefficient, and According to the calculated gray value Gray, the family tree image I j Convert to grayscale image I j ′ ;

[0022] Step S120: Binarize the grayscale image I j ′ Perform binarization; assume the maximum value of the grayscale value Gray is Max and the minimum value is Min. When Min ≤ Gray ≤ Max, the grayscale value of the pixel point a(p,q) is recorded as 255. When Gray < Min or Gray > Max, the grayscale value of the pixel point a(p,q) is recorded as 0;

[0023] Step S130: Detect whether there are consecutive pixel points with a grayscale value of 0 in the grayscale image I j ′ If so, merge these consecutive pixel points with a grayscale value of 0 into a dividing line to segment the grayscale image I j ′ Perform segmentation;

[0024] Step S140: Use the dividing line of the grayscale image I j ′ To segment the image Ι.

[0025] Furthermore, in step S200, text information extraction and error recognition are performed on segmented images with different priorities, including the following steps:

[0026] Step S201: Extract the text information in each segmented image of the image Ι; if the extracted text information in a certain segmented image is empty, it is determined that the segmented image is missing content, and the segmented image is returned for supplementation;

[0027] Step S202: Obtain the area S of any segmented image in the image Ι, and assume the area of the image Ι is S total; calculate the area ratio η of any segmented image in the image Ι according to the formula:

[0028]

[0029] Step S203: Set a threshold as λ; when η ≥ λ, the segmented image is set as a first-priority segmented image; when η < λ, the segmented image is set as a second-priority segmented image;

[0030] Step S204: Extract the text information in the first-priority segmented image, compare the extracted text information with the corpus set by the system. When a word that does not exist in the corpus appears in the extracted text information, it is determined that the text information is incorrect. Match the correct word from the corpus according to the content of the text information and modify the incorrect text information;

[0031] Step S205: Extract the text information from the second - level priority segmented image; compare the text information in the second - level priority segmented image with each other; extract feature information from the first - level priority segmented image, where the feature information includes surname origin, ancestral precepts, and migration history; identify surname information based on the extracted feature information, compare the surname information with the text information extracted from the second - level priority segmented image, and search for member information containing the surname.

[0032] Step S206: Compare the member information of a certain member with the member information of the previous - generation member of the certain member, and at the same time compare the member information of the certain member with the member information of the next - generation member;

[0033] If there is a group of information among the member information of the certain member, the member information of the previous - generation member of the certain member, and the member information of the next - generation member that is different from the other two groups of information, then modify the group of information with differences according to the information of the two identical groups; if the three groups of information are different at the same time, then modify according to the feature information extracted from the first - level priority segmentation map.

[0034] Step S207: Compare the birth year of a certain member with the birth year of the previous - generation member of the certain member and the birth year of the next - generation member of the certain member. When it is detected that the birth year of a certain member is less than the birth year of the previous - generation member of the certain member or the birth year of a certain member is greater than the birth year of the next - generation member of the certain member, the system reports an error for the birth year of the certain member.

[0035] Further, merging the text information in the corrected segmented image into a tree - structured family tree diagram in step S300 includes the following steps:

[0036] Step S301: Among the member information containing the birth year extracted from the second - level priority segmented image, search for the member information with the smallest birth year as the head node. Set the birth year of the member information of the \(v\) - th generation and the \(w\) - th position as Num vw , the birth year in any member information is Num, and set the maximum difference in birth years between two consecutive generations as \(n\);

[0037] When Num - Num vw < \(n\), determine whether the member information contains the member information of the \(v\) - th generation; if it exists, record the birth year in the target member information as Num v+1,w ; if not, determine whether the member information contains the member information of the \((v + 1)\) - th generation. If it exists, record the birth year in the target member information as Num v+2,w ;

[0038] Step S302: Based on the obtained values ​​of v and w, all member information is merged into a family tree diagram with a tree structure, taking the member information with the smallest birth year as the head node;

[0039] Step S303: saving the text extracted from the first-level priority segmented image in the form of blocks.

[0040] Furthermore, in step S500, the application for the newly added information is transmitted to the blockchain where the family tree corresponding to the newly added information is located, including the following steps:

[0041] Step S501: Identify the family tree name in the newly added information; find the blockchain where the family tree name is located according to the family tree name;

[0042] Step S502: If only one blockchain containing the family tree name is found, the application for adding new information is transmitted to the blockchain;

[0043] If there are multiple blockchains containing the family tree name, continue to match the newly added information with the information in each blockchain to find the blockchain containing the family tree;

[0044] Suppose the number of newly added information that matches the sth genealogy is W s , the number of new member information is W 总 ; According to the formula, calculate the proportion of the sth race genealogy information in the new member information γ s :

[0045]

[0046] Set the threshold μ, when γ s When ≥μ, the application for the new information is transmitted to the blockchain where the sth genealogy is located;

[0047] Step S503: All nodes in the blockchain detect the transmitted new information and set a threshold value. The number of nodes in the blockchain that allow information to be added is When there is When the system adds the new information to the corresponding position of the family tree.

[0048] Compared with the prior art, the beneficial effects achieved by the present invention are: the present invention preserves the information of the family tree in the form of blockchain, thereby preventing the family tree information from being maliciously attacked and tampered with; at the same time, the present invention divides the paper family tree into different forms according to the different writing forms of the paper family tree, and uses a unified section to organize the traditional family tree, so that the family tree information is easy for people to read and understand while ensuring its integrity. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:

[0050] Figure 1 It is a schematic diagram of the steps of the intelligent management method of genealogy data based on blockchain;

[0051] Figure 2 It is a structural diagram of an intelligent management system for genealogy data based on blockchain. DETAILED DESCRIPTION

[0052] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on 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 present invention.

[0053] See also Figure 1 , Figure 2 The present invention provides a technical solution: a blockchain-based intelligent management method for genealogy data, which includes the following steps:

[0054] Step S100: Scan and obtain an image I of an old family tree, determine the layout of the family tree in the image I, and segment the image I according to the layout of the family tree;

[0055] Wherein, determining the layout of the family tree in image 1 in step S100 includes the following steps:

[0056] Step S101: extract the part other than the text in the image I to generate a new image I0;

[0057] Step S102: Retrieve several pre-saved family tree images, assuming that the length of the family tree image is m and the width is n; adjust the size of the image I0 to a length of m and a width of n;

[0058] Step S103: Compare the image I0 with any family tree image; calculate the similarity ψ between the image I0 and any family tree image according to the formula:

[0059]

[0060] Where (p, q) is the pixel coordinates of the pixel point in image I0 and any family tree image, X(p, q) is the pixel value of the pixel point with coordinates (p, q) in image I0, and Y(p, q) is the pixel value of the pixel point with coordinates (p, q) in the family tree image;

[0061] Step S104: Set the threshold to δ. When ψ < δ, it is determined that the image I0 is similar to the family tree image, and the system uses the family tree framework corresponding to the family tree image as the family tree framework corresponding to the image I0;

[0062] Among them, in step S100, the image Ι is segmented according to the layout of the family tree, including the following steps:

[0063] Step S110: Set the family tree image similar to the image I0 as the family tree image I j , where the family tree framework in the family tree image I j is the jth family tree framework; Obtain the pixel point a(p,q) in the family tree image I j and the RGB values corresponding to the pixel point a(p,q), which are R a(p,q) , G a(p,q) , B a(p,q) respectively; Calculate the gray value Gray of the pixel point a(p,q) according to the formula:

[0064]

[0065] Among them, is a constant coefficient, and Convert the family tree image I j into a grayscale image I j ′ ;

[0066] Step S120: Perform binarization processing on the grayscale image I j ′ ; Set the maximum value of the gray value Gray as Max and the minimum value as Min. When Min ≤ Gray ≤ Max, record the gray value of the pixel point a(p,q) as 255. When Gray < Min or Gray > Max, record the gray value of the pixel point a(p,q) as 0;

[0067] Step S130: Detect whether there are consecutive pixel points with a gray value of 0 in the grayscale image I j ′ . If so, merge these consecutive pixel points with a gray value of 0 into a dividing line to segment the grayscale image I j ′ ;

[0068] Step S140: Use the dividing line of the grayscale image I j ′ to segment the image Ι.

[0069] Step S200: obtaining the area of ​​each segmented image after segmentation, dividing all the segmented images into segmented images of different priorities according to the size of the segmented image area, extracting text information from the segmented images of different priorities and identifying errors, and correcting the identified error information;

[0070] The extraction of text information and error recognition of segmented images of different priorities in step S200 include the following steps:

[0071] Step S201: extracting text information from each segmented image in image I; if the text information extracted from a segmented image is empty, the segmented image is judged to be missing content, and the segmented image is returned for supplementation;

[0072] Step S202: Obtain the area S of any segmented image in the image I, assuming that the area of ​​the image I is Stotal; calculate the area ratio η of any segmented image in the image I according to the formula:

[0073]

[0074] Step S203: setting a threshold value as λ; when η≥λ, setting the segmented image as a first-level priority segmented image; when η<λ, setting the segmented image as a second-level priority segmented image;

[0075] Step S204: extracting text information from the first-level priority segmented image, comparing the extracted text information with a corpus set by the system, and when a word that does not exist in the corpus appears in the extracted text information, it is determined that the text information is erroneous, matching the correct word from the corpus according to the content of the text information, and modifying the erroneous text information;

[0076] Step S205: extracting text information from the second-level priority segmented image; comparing the text information in the second-level priority segmented image with each other; extracting feature information from the first-level priority segmented image, the feature information including the origin of the surname, ancestral teachings and migration history; identifying the surname information based on the extracted feature information, comparing the surname information with the text information extracted from the second-level priority segmented image, and searching for member information containing the surname;

[0077] Step S206: comparing the membership information of a certain member with the membership information of the previous generation of a certain member, and comparing the membership information of a certain member with the membership information of the next generation;

[0078] If there is a difference between one set of information among the member information of a certain member, the information of the previous generation member of a certain member, and the information of the next generation member of a certain member and the other two sets of information, then modify the set of information with the difference according to the information of the two identical sets; if there are differences in all three sets of information at the same time, then modify according to the feature information extracted from the segmentation diagram of the first-level priority.

[0079] Step S207: Compare the birth year of a certain member with the birth year of the previous generation member of a certain member and the birth year of the next generation member of a certain member. When it is detected that the birth year of a certain member is less than the previous generation member of a certain member or the birth year of a certain member is greater than the next generation member of a certain member, the system reports an error for the birth year of a certain member.

[0080] Step S300: According to the text information extracted from the corrected segmented image, merge the text information into a genealogical tree diagram corresponding to Image Ι;

[0081] Among them, merging the text information in the corrected segmented image into a genealogical tree diagram in step S300 includes the following steps:

[0082] Step S301: In the member information containing the birth year extracted from the second-level priority segmented image, search for the member information with the smallest birth year as the head node, and set the birth year of the member information of the w-th member in the v-th generation to Num vw , the birth year in any member information is Num, and set the maximum difference in birth years between two consecutive generations of members to n;

[0083] When Num - Num vw < n, judge whether the member information contains the member information of the v-th generation; if it exists, record the birth year in the target member information as Num v+1,w ; if not, judge whether the member information contains the member information of the (v + 1)-th generation, if it exists, record the birth year in the target member information as Num v+2,w ;

[0084] Step S302: According to the obtained values of v and w, merge all the member information into a genealogical tree diagram with the member information with the smallest birth year as the head node;

[0085] Step S303: Save the text extracted from the first-level priority segmented image in a block form.

[0086] Step S400: Save the generated genealogical tree diagram in the form of a blockchain;

[0087] Step S500: Transmitting the application for adding new information to the blockchain where the family tree corresponding to the new information is located; when the number of nodes allowed to be added in the blockchain is greater than the set threshold, writing the new information into the blockchain where the corresponding family tree is located;

[0088] The step S500 of transmitting the application for the newly added information to the blockchain where the family tree corresponding to the newly added information is located includes the following steps:

[0089] Step S501: Identify the family tree name in the newly added information; find the blockchain where the family tree name is located according to the family tree name;

[0090] Step S502: If only one blockchain containing the family tree name is found, the application for adding new information is transmitted to the blockchain;

[0091] If there are multiple blockchains containing the family tree name, continue matching the newly added information with the information in each blockchain to find the blockchain containing the family tree;

[0092] Suppose the number of newly added information that matches the sth genealogy is W s , the number of new member information is W 总 ; According to the formula, calculate the proportion of the sth race genealogy information in the new member information γ s :

[0093]

[0094] Set the threshold μ, when γ s When ≥μ, the application for the new information is transmitted to the blockchain where the sth genealogy is located;

[0095] Step S503: All nodes in the blockchain detect the transmitted new information and set a threshold value. The number of nodes in the blockchain that allow information to be added is When there is When the system adds the new information to the corresponding position of the family tree.

[0096] Scan an old family tree and obtain the image of the old family tree, recorded as image Ι; extract everything except the text in image Ι to generate a new image I0; the system calls two pre-saved family trees, I1 and I2; suppose the image length and width of I1 and I2 are 20×10, and the threshold δ=1 according to the formula:

[0097]

[0098] The system calculates the difference ψ between image I0 and image I1 as ψ = 0.85, and the difference ψ between image I0 and image I2 as ψ = 2; since ψ < δ, it is determined that image I0 and image I1 are similar, and the first family tree framework is used as the family tree framework of image I0;

[0099] The system obtains the pixel point a(p,q) in image I1 of the first family tree framework and the RGB values in pixel point a(p,q), which are R a(p,q) , G a(p,q) , B a(p,q) ; Suppose when p = 10 and q ∈ (0, 10), the values of R a(p,q) , G a(p,q) , B a(p,q) are 20, 20, 20 respectively; Suppose

[0100] According to the formula, Convert the image I1 of the first family tree framework into a grayscale image I1 ′ , and perform binarization processing on the grayscale image I1 ′ . Let Max = 200 and Min = 30. Since Gray < Min, when p = 10 and q ∈ (0, 10), the grayscale value of pixel point a(p,q) is recorded as 0; At this time, there are continuous pixel points with grayscale value 0 in the grayscale image I1 ′ , then the continuous pixel points with grayscale value 0 are merged into a dividing line to perform segmentation on the grayscale image I1 ′ , which is also the dividing line of image I1; The system can segment image Ι according to the dividing line of image I1.

[0101] The system divides image Ι into 5 pieces and performs character recognition on the five segmented images. Among them, when the system recognizes the first segmented image, no characters are recognized. It is judged that this is caused by a block missing in the family tree, and this image is returned to the user for supplementation and then re-recognized; Suppose the area of the first segmented image is S1 = 150, the area of the second segmented image is S2 = 120, the area of the third segmented image is S3 = 50, and the area of the fourth segmented image is s4 = 30; The area of image Ι is S total = 200; Obtain Set the threshold λ = 40%; Therefore, η1 ≥ λ, η2 ≥ λ, η3 < λ, η4 < λ, then the first and second segmented images are set as the first-level priority, and the third and fourth segmented images are set as the second-level priority;

[0102] The system extracts the text information in the first-level priority segmentation image for error recognition and detects that an error has occurred; then proofreads the text information in the second-level priority segmentation image, compares the name of member Zhang San with the name of the son in his father's information, and compares it with the name of the father in his son's information. If there is no difference in the comparison results, the name of member Zhang San is correct; compare Zhang San's birth year with his father's birth year, and compare it with his son's birth year; no error is detected. Sort Zhang San's three generations according to their birth years from small to large to form a tree structure.

[0103] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.

[0104] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art can still modify the technical solutions described in the aforementioned embodiments or replace some of the technical features therein by equivalents. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A blockchain-based intelligent management method for genealogy data, characterized by: The method comprises the following steps: Step S100: Scan and obtain an image I of an old family tree, determine the layout of the family tree in the image I, and segment the image I according to the layout of the family tree; Step S200: obtaining the area of ​​each segmented image after segmentation, dividing all the segmented images into segmented images of different priorities according to the size of the segmented image area, extracting text information from the segmented images of different priorities and identifying errors, and correcting the identified error information; Step S300: Based on the text information extracted from the corrected segmented image, the text information is merged into a family tree diagram of a tree structure corresponding to the image 1; Step S400: Save the generated family tree in the form of blockchain; Step S500: Transmitting the application for the newly added information to the blockchain where the family tree corresponding to the newly added information is located; When the number of nodes allowed to be added in the blockchain exceeds the set threshold, the newly added information will be written into the blockchain where the corresponding family tree graph is located; The step S200 extracts text information and identifies errors from segmented images of different priorities, including the following steps: Step S201: extracting text information from each segmented image in image I; if the text information extracted from a segmented image is empty, the segmented image is judged to be missing content, and the segmented image is returned for supplementation; Step S202: Obtain the area S of any segmented image in the image I, assuming that the area of ​​the image I is Stotal; calculate the area ratio η of any segmented image in the image I according to the formula: Step S203: setting a threshold value as λ; when η≥λ, setting the segmented image as a first-level priority segmented image; when η<λ, setting the segmented image as a second-level priority segmented image; Step S204: extracting text information from the first-level priority segmented image, comparing the extracted text information with a corpus set by the system, and when a word that does not exist in the corpus appears in the extracted text information, it is determined that the text information is erroneous, matching the correct word from the corpus according to the content of the text information, and modifying the erroneous text information; Step S205: extracting text information from the second-level priority segmented image; comparing the text information in the second-level priority segmented image with each other; extracting feature information from the first-level priority segmented image, the feature information including the origin of the surname, ancestral teachings and migration history; identifying the surname information based on the extracted feature information, comparing the surname information with the text information extracted from the second-level priority segmented image, and searching for member information containing the surname; Step S206: comparing the membership information of a certain member with the membership information of the previous generation of a certain member, and comparing the membership information of a certain member with the membership information of the next generation of a certain member; If one of the member information of a certain member, the previous generation member information of a certain member, and the next generation member information of a certain member is different from the other two sets of information, the set of information with differences is modified according to the information of the same two sets; if the three sets of information are different at the same time, they are modified according to the feature information extracted from the first-level priority segmentation map; Step S207: comparing the birth year in the member information of a certain member with the birth year in the member information of the previous generation of the certain member and the birth year in the member information of the next generation of the certain member. When it is detected that the birth year in the member information of a certain member is less than the birth year in the member information of the previous generation of the certain member, or the birth year in the member information of a certain member is greater than the birth year in the member information of the next generation of the certain member, the system reports an error for the birth year of the certain member; The step S300 of merging the text information in the corrected segmented image into a family tree diagram with a tree structure includes the following steps: Step S301: In the member information containing the birth year extracted from the secondary priority segmentation image, search for the member information with the smallest birth year as the head node, and set the birth year of the w-th member information of the vth generation as Num vw , the birth year in any member information is Num, and the maximum difference between the birth years of two consecutive generations of members is set to n; When Num - Num vw When n, determine whether the member information of the v-th generation is included in the member information; if it exists, record the birth year in the target member information as Num v+1,w ; if not, determine whether the member information of the (v + 1)-th generation is included in the member information, and if it exists, record the birth year in the target member information as Num v+2,w ; Step S302: Based on the obtained values ​​of v and w, all member information is merged into a family tree diagram with a tree structure, taking the member information with the smallest birth year as the head node; Step S303: saving the text extracted from the first-level priority segmented image in the form of blocks.

2. According to the blockchain-based intelligent management method of genealogy data according to claim 1, it is characterized by: The step S100 of determining the layout of the family tree in the image 1 includes the following steps: Step S101: extract the part other than the text in the image I to generate a new image I0; Step S102: Retrieve several pre-saved family tree images, assuming that the length of the family tree image is m and the width is n; adjust the size of the image I0 to a length of m and a width of n; Step S103: Compare the image I0 with any family tree image; calculate the similarity ψ between the image I0 and any family tree image according to the formula: Where (p, q) is the pixel coordinates of the pixel point in image I0 and any family tree image, X(p, q) is the pixel value of the pixel point with coordinates (p, q) in image I0, and Y(p, q) is the pixel value of the pixel point with coordinates (p, q) in the family tree image; Step S104: setting a threshold value to δ, when ψ<δ, it is determined that image I0 is similar to the family tree image, and the system uses the family tree frame corresponding to the family tree image as the family tree frame corresponding to image I0.

3. According to claim 2, a blockchain-based family tree data intelligent management method is characterized by: The step S100 of segmenting the image I according to the layout of the family tree includes the following steps: Step S110: Set a family tree image similar to the image I0 as family tree image I j , where the genealogy image I j The genealogy frame in is the jth genealogy frame; get the genealogy image I j The pixel point a(p,q) in and the RGB values ​​corresponding to the pixel point a(p,q) are R a(p,q) ,G a(p,q) ,B a(p,q) ; Calculate the gray value Gray of pixel a(p,q) according to the formula: in, is a constant coefficient, and According to the calculated gray value Gray, the family tree image I j Convert to grayscale image I′ j ; Step S120: Binarize the grayscale image I′ j Perform binarization processing; assume that the maximum value of the grayscale value Gray is Max and the minimum value is Min. When Min ≤ Gray ≤ Max, the grayscale value of the pixel point a(p, q) is recorded as 255. When Gray < Min or Gray > Max, the grayscale value of the pixel point a(p, q) is recorded as 0; Step S130: Detecting grayscale image I′ j Is there any continuous pixel with gray value of 0 in the image? If so, merge these continuous pixel with gray value of 0 into a segmentation line pair gray image I′ j To split; Step S140: Grayscale image I′ j The dividing line is used to divide the image I.

4. According to the blockchain-based family tree data intelligent management method of claim 1, it is characterized by: The step S500 of transmitting the application for the newly added information to the blockchain where the family tree corresponding to the newly added information is located includes the following steps: Step S501: Identify the family tree name in the newly added information; find the blockchain where the family tree name is located according to the family tree name; Step S502: If only one blockchain containing the family tree name is found, the application for adding new information is transmitted to the blockchain; If there are multiple blockchains containing the family tree name, continue matching the newly added information with the information in each blockchain to find the blockchain containing the family tree; Suppose the number of newly added information that matches the sth genealogy is W s , the number of new member information is W 总 ; According to the formula, calculate the proportion of the sth race genealogy information in the new member information γ s : Set the threshold μ, when γ s When ≥μ, the application for the new information is transmitted to the blockchain where the sth genealogy is located; Step S503: All nodes in the blockchain detect the transmitted new information and set a threshold value. The number of nodes in the blockchain that allow information to be added is When there is When the system adds the new information to the corresponding position of the family tree.

5. A family tree data intelligent management system for a family tree data intelligent management method based on blockchain as described in any one of claims 1 to 4, characterized in that: The system includes a segmentation module, an error identification module, an information merging module, a blockchain storage module, and an information adding module; The segmentation module is used to determine the layout of the family tree in the image I and segment the image I according to the layout of the family tree; The error recognition module is used to obtain the area of ​​each segmented image, divide all the segmented images into segmented images of different priorities according to the size of the image area, extract text information from the segmented images of different priorities and recognize errors, and correct the recognized error information; The information merging module is used to compare the text information in the corrected segmented image and merge the text information into a family tree diagram of a tree structure corresponding to the image 1; The blockchain storage module is used to store the genealogy information in the form of blockchain; The information adding module is used to transmit the application for the newly added information to the blockchain where the family tree corresponding to the newly added information is located; When the number of nodes allowed to be added in the blockchain exceeds the set threshold, the newly added information will be written into the blockchain where the corresponding family tree graph is located; The error recognition module includes a family tree missing unit, a first-level priority correction unit and a second-level priority correction unit; The family tree missing module is used to determine whether a family tree is missing according to whether text information is extracted from the segmented area; The first-level priority correction unit is used to match text information according to words in the corpus, and to cover and correct the wrong words with the successfully matched words; The secondary priority correction unit is used to determine whether errors occur in the member information including the surname and the member information including the year of birth.

Citation Information

Patent Citations

  • Family tree standard database building method and system

    CN106227879A

  • Document recognizing method

    JP1997319824A