A family tree analysis system, method, device and medium based on off-chain storage
By introducing blockchain technology into the genealogy analysis system, the encryption processing and chain storage of the genealogy association tree are realized, which solves the problems of low genealogy analysis efficiency and insufficient storage confidentiality, and improves the management efficiency and security of information.
Patent Information
- Application Number
- CN202311410190.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-27
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2043-10-27
AI Technical Summary
The prior art is less efficient when performing genealogy analysis, and the storage method of electronic genealogy is not confidential and is easily tampered with, resulting in low genealogy integrity.
Adopt a genealogy analysis system based on off-chain storage, including information collection module, information association analysis module, information update module and information storage module. Through blockchain technology, the associated nodes in the genealogy association tree are encrypted and chained to ensure that Information security and integrity.
It improves the efficiency and accuracy of genealogy analysis, ensures the efficiency and security of information management, and solves the problems of low efficiency and insufficient storage confidentiality of traditional genealogy analysis.
Smart Images

Figure CN117609368B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of blockchain technology, and in particular to a family tree analysis system, method, device and medium based on off-chain storage. Background Art
[0002] With the rapid expansion of the floating population, the population mobility in today's society is becoming increasingly intense. There are many problems in the process of searching for family trees, such as low efficiency and low integrity of family trees. Specifically, traditional family trees have the following two problems: First, traditional family trees are mostly paper-based, which is inconvenient to preserve and has complex content and strict format requirements, which makes them limited in development, utilization and inheritance; second, the current storage method of electronic family trees is not highly confidential and is extremely easy to be tampered with, which leads to low integrity of family trees and low efficiency in analyzing family trees. In summary, the existing technology has the problem of low efficiency in family tree analysis. Summary of the invention
[0003] The present invention provides a family tree analysis system, method, device and medium based on off-chain storage, the main purpose of which is to solve the problem of low efficiency in family tree analysis.
[0004] To achieve the above purpose, the present invention provides a family tree analysis system based on off-chain storage, including: an information collection module, an information association analysis module, an information update module and an information storage module, specifically:
[0005] An information collection module is used to collect personal information and clan information, complete the personal information to obtain target personal information, and verify the clan information to obtain target clan information;
[0006] An information association analysis module, configured to perform a first information association calculation between the received target personal information to obtain a user association relationship, and perform a second information association calculation between the received target clan information to obtain a clan association relationship, and generate a family tree association tree based on the target personal information, the target clan information, the user association relationship and the clan association relationship;
[0007] An information updating module, used for performing link prediction on the received family tree association tree, optimizing the family tree association tree according to the result of link prediction, and obtaining a target family tree association tree;
[0008] The information storage module is used to encrypt the associated nodes in the received target family tree association tree using the preset blockchain technology to obtain encrypted information, and to store the encrypted information in a chain to obtain storage information, wherein the encrypted nodes in the received target family tree association tree are encrypted using the preset blockchain technology to obtain encrypted information, including:
[0009] Extracting time information corresponding to the associated nodes in the target family tree associated tree, and using the associated nodes other than the time information in the associated nodes as business information;
[0010] Performing a hash operation on the business information to obtain a hash value, and encapsulating the hash value and the time information to obtain a block header;
[0011] Taking the target genealogy association tree as a block body, and connecting the block header and the block body to obtain a block;
[0012] Aggregating a number of the blocks according to the time information using blockchain technology to obtain an information blockchain;
[0013] Encrypting the information blockchain using a preset encryption algorithm to obtain encrypted information;
[0014] The encryption algorithm is:
[0015]
[0016] Wherein, f represents the encrypted information, K represents the preset re-encrypted ciphertext, and p s represents the sth block information in the information blockchain, p α represents the αth block information in the information blockchain, p γ represents the γth block information in the information blockchain, and S represents a preset encryption parameter.
[0017] Optionally, when executing the function of collecting personal information and clan information, the information collection module is specifically used to:
[0018] Obtain the mobile device corresponding to the user, extract the data interface corresponding to the mobile device, and set the information collection time;
[0019] Calculate the information collection efficiency according to the information collection time, and collect information from the mobile device using the information collection module based on the data interface and the information collection efficiency to obtain collected information;
[0020] The information collection efficiency is calculated using the following formula:
[0021] T=te n+k
[0022]
[0023] Wherein, F represents the information collection efficiency, T represents the information collection time, n represents the pause time between the information collection times, a represents the average collection time corresponding to the information collection time, b and t both represent preset calculation parameters, and k represents a preset time coefficient;
[0024] The collected information is classified to obtain personal information and clan information.
[0025] Optionally, when the information collection module performs the function of completing the personal information to obtain the target personal information, it is specifically used to:
[0026] Traversing the information attributes corresponding to the personal information to obtain a non-empty information set and an empty information set;
[0027] Sorting the non-empty information set to obtain a sequence information set;
[0028] Perform median filling on the empty information set according to the non-empty information set and the sequence information set to obtain a filled information set;
[0029] The following formula can be used to fill the median:
[0030]
[0031] Among them, x c represents the cth filling attribute, I represents the non-empty information set, I * represents the sequential information set, and C represents the total number of information attributes in the empty information set;
[0032] The non-empty information set, the sequence information set and the filled information set are aggregated to obtain target personal information.
[0033] Optionally, when the information collection module performs the function of verifying the clan information to obtain the target clan information, it is specifically used to:
[0034] Acquire a target attribute, and use the clan attribute corresponding to the clan information to perform matching calculation with the target attribute to obtain an attribute matching value;
[0035] The matching calculation is performed using the following formula:
[0036]
[0037] Where r represents the attribute matching value, d jrepresents the jth clan attribute in the clan information, h j represents the target attribute corresponding to the j-th clan attribute, J represents the total number of clan attributes, and T represents the transposition symbol;
[0038] Determine whether the attribute matching value is greater than a preset target matching value;
[0039] When the attribute matching value is less than or equal to the target matching value, it indicates that the lineage information verification fails;
[0040] When the attribute matching value is greater than the target matching value, it indicates that the clan information verification is successful, and the clan information is used as the target clan information.
[0041] Optionally, when the information association analysis module performs the function of performing the first information association calculation between the received target personal information to obtain the user association relationship, it is specifically used to:
[0042] Randomly select an information center from the target personal information, and use the target personal information other than the information center in the target personal information as the candidate information center;
[0043] Calculating the correlation between the information center and the to-be-selected information center, and determining whether the correlation is greater than a preset target correlation;
[0044] The correlation is calculated using the following formula:
[0045]
[0046] Wherein, w represents the degree of association, z m represents the mth information center to be selected, Z represents the information center, and M represents the total number of the information centers to be selected;
[0047] When the correlation degree is less than or equal to the target correlation degree, it is determined that the correlation degree between the information center and the selected information center is low;
[0048] When the correlation degree is greater than the target correlation degree, it is determined that the correlation degree between the information center and the selected information center is higher, correlation information between the information center and the selected information center is extracted, and user correlation relationship is analyzed according to the correlation information.
[0049] Optionally, when the information association analysis module performs the function of generating a family tree association tree according to the target personal information, the target family information, the user association relationship and the family association relationship, it is specifically used to:
[0050] Performing an initial information connection between the target personal information according to the user association relationship to obtain a first connection information chain, and performing an initial information connection between the target clan information according to the clan association relationship to obtain a second connection information chain;
[0051] sorting the first connection information chain and the second connection information chain respectively to obtain a first sequence and a second sequence, and analyzing a connection relationship between the first connection information chain and the second connection information chain based on the first sequence and the second sequence;
[0052] Performing information connection on the first connection information chain and the second connection information chain according to the connection relationship to obtain a target connection information chain;
[0053] The target connection information chain is sorted to obtain an information sequence, and a family tree association tree is generated according to the information sequence and the target connection information chain.
[0054] Optionally, when executing the function of performing link prediction on the received family tree association tree, the information updating module is specifically used to:
[0055] Perform node division on the associated nodes in the family tree association tree to obtain positive samples and negative samples, and randomly extract a first edge node and a second edge node from the positive samples and the negative samples respectively;
[0056] Scoring the first edge node, the second edge node, and the negative sample using a preset link prediction algorithm to obtain a first score, a second score, and an edge score;
[0057] Calculating a first performance indicator according to the first score and the second score, and sorting the positive samples according to the edge scores to obtain a sample sequence;
[0058] The first performance index is calculated using the following formula:
[0059]
[0060] Among them, AUC represents the first performance indicator, g 1 indicates that the first score is higher than the second score, g 2 indicates that the first score is equal to the second score, and G indicates the number of tests between the first score and the second score;
[0061] Calculating a second performance indicator according to the sample sequence and the number of negative samples, and analyzing link prediction performance according to the first performance indicator and the second performance indicator;
[0062] The second performance index is calculated using the following formula:
[0063]
[0064] Where, β represents the second performance index, l i represents the order of the i-th sample in the sample sequence, and L represents the number of negative samples.
[0065] In order to solve the above problems, the present invention also provides a family tree analysis method based on off-chain storage, the method comprising:
[0066] The information collection module collects personal information and clan information, completes the personal information to obtain target personal information, and verifies the clan information to obtain target clan information;
[0067] The information association analysis module performs a first information association calculation on the received target personal information to obtain a user association relationship, and performs a second information association calculation on the received target clan information to obtain a clan association relationship;
[0068] The information association analysis module generates a family tree association tree according to the target personal information, the target family information, the user association relationship and the family association relationship;
[0069] The information updating module performs link prediction on the received family tree association tree, optimizes the family tree association tree according to the result of the link prediction, and obtains a target family tree association tree;
[0070] The information storage module uses the preset blockchain technology to encrypt the associated nodes in the received target family tree association tree to obtain encrypted information, and stores the encrypted information in a chain to obtain storage information.
[0071] In order to solve the above problem, the present invention further provides an electronic device, the electronic device comprising:
[0072] at least one processor; and,
[0073] a memory communicatively connected to the at least one processor; wherein,
[0074] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can perform the functions of the above-mentioned family tree analysis system based on off-chain storage.
[0075] In order to solve the above problems, the present invention also provides a computer-readable storage medium, in which at least one computer program is stored. The at least one computer program is executed by a processor in an electronic device to implement the functions of the above-mentioned genealogy analysis system based on off-chain storage.
[0076] The embodiment of the present invention can accurately collect personal information and clan information through the information collection module; improve the integrity of personal information by completing the information of personal information; ensure the accuracy of clan information by verifying the information of clan information; calculate the information association between target personal information and target clan information through the information association analysis module, accurately obtain the user association relationship and clan association relationship, and improve the relevance between information; accurately generate a genealogy association tree through the target personal information, target clan information, user association relationship and clan association relationship, and improve the accuracy and relevance of information management; perform link prediction on the genealogy association tree through the information update module, optimize the genealogy association tree according to the result of link prediction, accurately obtain the target genealogy association tree, and ensure the accuracy of the target genealogy association tree; encrypt the association nodes in the target genealogy association tree through the information storage module, accurately obtain the encrypted information, and store the encrypted information in a chain, accurately obtain the stored information, and then improve the information management efficiency and the efficiency of genealogy analysis. Therefore, the genealogy analysis system, method, device and medium based on off-chain storage proposed by the present invention can solve the problem of low efficiency when performing genealogy analysis. BRIEF DESCRIPTION OF THE DRAWINGS
[0077] Figure 1 A schematic diagram of the process of a family tree analysis system based on off-chain storage provided by an embodiment of the present invention;
[0078] Figure 2 A schematic diagram of a process for collecting personal information and clan information provided by an embodiment of the present invention;
[0079] Figure 3 A schematic diagram of a process for completing personal information to obtain target personal information provided by an embodiment of the present invention;
[0080] Figure 4 A functional module diagram of a family tree analysis method based on off-chain storage provided in one embodiment of the present invention.
[0081] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0082] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0083] The embodiment of the present application provides a genealogy analysis system based on off-chain storage. The execution subject of the genealogy analysis system based on off-chain storage includes but is not limited to at least one of the electronic devices such as a server and a terminal that can be configured to execute the system provided by the embodiment of the present application. In other words, the genealogy analysis system based on off-chain storage can be executed by software or hardware installed on a terminal device or a server device, and the software can be a blockchain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, etc. The server can be an independent server, or it can be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms.
[0084] Reference Figure 1 As shown, it is a functional module diagram of a genealogy analysis system based on off-chain storage provided by an embodiment of the present invention. In this embodiment, the genealogy analysis system 100 based on off-chain storage can be installed in an electronic device. According to the functions implemented, the genealogy analysis system 100 based on off-chain storage may include an information acquisition module 101, an information association analysis module 102, an information update module 103 and an information storage module 104. The module described in the present invention may also be referred to as a unit, which refers to a series of computer program segments that can be executed by a processor of an electronic device and can perform fixed functions, which are stored in the memory of the electronic device.
[0085] In the embodiment of the present invention, the information collection module 101 includes collecting personal information and clan information, completing the personal information to obtain target personal information, and verifying the clan information to obtain target clan information.
[0086] In an embodiment of the present invention, the information association analysis module 102 includes performing a first information association calculation between the received target personal information to obtain a user association relationship, and performing a second information association calculation between the received target clan information to obtain a clan association relationship, and generating a family tree association tree based on the target personal information, the target clan information, the user association relationship and the clan association relationship.
[0087] In the embodiment of the present invention, the information updating module 103 includes performing link prediction on the received family tree association tree, optimizing the family tree association tree according to the result of the link prediction, and obtaining a target family tree association tree.
[0088] In an embodiment of the present invention, the information storage module 104 includes using a preset blockchain technology to encrypt the associated nodes in the received target family tree association tree to obtain encrypted information, and chain-store the encrypted information to obtain storage information.
[0089] In detail, each module described in the off-chain storage-based genealogy analysis system 100 described in the embodiment of the present invention adopts the same technical means as the off-chain storage-based genealogy analysis method described in the accompanying drawings when used, and can produce the same technical effects, which will not be repeated here.
[0090] In combination with specific embodiments, the following describes the various components and specific workflows of the off-chain storage-based family tree analysis system:
[0091] The information collection module 101 is used to collect personal information and clan information, complete the personal information to obtain target personal information, and verify the clan information to obtain target clan information.
[0092] In an embodiment of the present invention, the personal information includes name information, address information, birth information, school information, work information, contact information, communication information, marital status, political status, height and weight; the clan information includes clan branch names, lineage relationships, migration history, important mission deeds and other information.
[0093] See also Figure 2 As shown, in the embodiment of the present invention, when the information collection module performs the function of collecting personal information and clan information, it is specifically used to:
[0094] S21, obtaining a mobile device corresponding to the user, extracting a data interface corresponding to the mobile device, and setting an information collection time;
[0095] S22, calculating the information collection efficiency according to the information collection time, and collecting information from the mobile device using the information collection module based on the data interface and the information collection efficiency to obtain collected information;
[0096] S23, classifying the collected information to obtain personal information and clan information.
[0097] In an embodiment of the present invention, the mobile device refers to an electronic device that can be carried and moved, such as a mobile phone and a tablet computer, etc., and the information corresponding to the user, such as registration information, enrollment information and verification information, etc., is extracted according to the APP on the mobile device; the data interface includes an HDMI A Type interface, a USB interface and a lightning interface, etc.; the information collection time refers to a pre-set time length for collecting information, for example, ten minutes is a time length.
[0098] In the embodiment of the present invention, the information collection efficiency is calculated using the following formula:
[0099] T=te n +k
[0100]
[0101] Among them, F represents the information collection efficiency, T represents the information collection time, n represents the pause time between the information collection times, a represents the average collection time corresponding to the information collection time, b and t both represent preset calculation parameters, and k represents a preset time coefficient.
[0102] In an embodiment of the present invention, the information collection module is used to collect information from the data interface corresponding to the mobile device according to the information collection efficiency to obtain collected information; information attributes of the collected information are extracted, and the collected information is classified according to the information attributes based on a step-by-step classification method to obtain an information type; the information type is matched with a target personal information type corresponding to the personal information or a target clan information type corresponding to the clan information, and the collected information corresponding to the successfully matched information type is classified into personal information or clan information to obtain personal information and clan information.
[0103] See also Figure 3 As shown, in the embodiment of the present invention, when the information collection module performs the function of completing the personal information to obtain the target personal information, it is specifically used to:
[0104] S31, traversing the information attributes corresponding to the personal information to obtain a non-empty information set and an empty information set;
[0105] S32, sorting the non-empty information set to obtain a sequence information set;
[0106] S33, performing median filling on the empty information set according to the non-empty information set and the sequence information set to obtain a filled information set;
[0107] S34: Aggregate the non-empty information set, the sequence information set, and the filled information set to obtain target personal information.
[0108] In an embodiment of the present invention, the forEach method or the pre-order traversal method can be used to traverse the information attributes corresponding to the personal information. When the information attributes corresponding to the personal information are missing, the personal information is divided into an empty information set; when the information attributes corresponding to the personal information are not missing, the personal information is divided into a non-empty information set; the personal information in the non-empty information set can be sorted in alphabetical order to obtain a sequential information set.
[0109] In the embodiment of the present invention, performing median filling on the empty information set according to the non-empty information set and the sequential information set refers to performing attribute filling on the missing attributes in the empty information set according to the non-empty information set and the sequential information set in a median manner to obtain a filling attribute, and summarizing all the filling attributes to obtain a filling information set. Specifically, the following formula can be used for median filling:
[0110]
[0111] Among them, x c represents the cth filling attribute, I represents the non-empty information set, I * represents the sequential information set, and C represents the total number of information attributes in the empty information set.
[0112] In the embodiment of the present invention, the information attributes corresponding to the personal information in the three sets of the non-empty information set, the sequential information set and the filled information set are integrated (merged) in the order of the information attributes corresponding to the initial personal information to obtain the target personal information.
[0113] In the embodiment of the present invention, when the information collection module performs the function of verifying the clan information to obtain the target clan information, it is specifically used to:
[0114] Acquire a target attribute, and use the clan attribute corresponding to the clan information to perform matching calculation with the target attribute to obtain an attribute matching value;
[0115] Determine whether the attribute matching value is greater than a preset target matching value;
[0116] When the attribute matching value is less than or equal to the target matching value, it indicates that the lineage information verification fails;
[0117] When the attribute matching value is greater than the target matching value, it indicates that the clan information verification is successful, and the clan information is used as the target clan information.
[0118] In the embodiment of the present invention, the target attributes include clan surname, lineage relationship, name, and family migration, etc.; further, the following formula is used for matching calculation:
[0119]
[0120] Where r represents the attribute matching value, d j represents the jth clan attribute in the clan information, h j represents the target attribute corresponding to the j-th clan attribute, J represents the total number of the clan attributes, and T represents the transposition symbol.
[0121] In an embodiment of the present invention, the target attribute value refers to a pre-set standard attribute value. For example, the target attribute value is set to 85%; when the attribute matching value is less than or equal to 85%, it indicates that the clan information verification has failed, and the clan information is updated and the updated clan information is used as the target clan information; when the attribute matching value is greater than 85%, it indicates that the clan information verification has succeeded, and the clan information is directly used as the target clan information.
[0122] In an embodiment of the present invention, after obtaining the target personal information and the target clan information, the information acquisition module transmits the target personal information and the target clan information to the information association analysis module. Specifically, the data transmission interface of the information association analysis module is obtained, and the target personal information and the target clan information are transmitted from the information acquisition module to the information association analysis module through the data transmission interface using a data transmission protocol, wherein the data transmission protocol can be a TCP protocol.
[0123] In the embodiment of the present invention, the personal information is improved to accurately obtain the target personal information, and the clan information is verified to ensure the accuracy of the target clan information, thereby improving the accuracy of the information and improving the computer processing efficiency.
[0124] The information association analysis module 102 is used to perform a first information association calculation between the received target personal information to obtain a user association relationship, and to perform a second information association calculation between the received target clan information to obtain a clan association relationship, and to generate a family tree association tree based on the target personal information, the target clan information, the user association relationship and the clan association relationship.
[0125] In the embodiment of the present invention, when the information association analysis module performs the function of performing the first information association calculation between the received target personal information to obtain the user association relationship, it is specifically used to:
[0126] Randomly select an information center from the target personal information, and use the target personal information other than the information center in the target personal information as the candidate information center;
[0127] Calculating the correlation between the information center and the to-be-selected information center, and determining whether the correlation is greater than a preset target correlation;
[0128] When the correlation degree is less than or equal to the target correlation degree, it is determined that the correlation degree between the information center and the selected information center is low;
[0129] When the correlation degree is greater than the target correlation degree, it is determined that the correlation degree between the information center and the selected information center is higher, correlation information between the information center and the selected information center is extracted, and user correlation relationship is analyzed according to the correlation information.
[0130] In the embodiment of the present invention, the correlation degree is calculated using the following formula:
[0131]
[0132] Wherein, w represents the degree of association, z m represents the mth information center to be selected, Z represents the information center, and M represents the total number of the information centers to be selected.
[0133] In an embodiment of the present invention, the target correlation refers to a pre-set standard correlation. For example, the standard correlation is set to 90%. Specifically, when the correlation is less than or equal to 90%, it means that the correlation does not meet the standard, that is, the correlation between the information center and the selected information center is low, there is no correlation information or the correlation information is small, and the user correlation relationship cannot be analyzed; when the correlation is greater than 90%, it means that the correlation meets the standard, that is, the correlation between the information center and the selected information center is high. At this time, the correlation information between the information center and the selected information center is extracted, and then the user correlation is analyzed based on the correlation information. For example, the correlation information is address information, and it is analyzed based on the address information whether it is the same address and long-term residence, and then the user correlation may be a parent-child relationship, a husband-wife relationship, a sister relationship, etc.
[0134] In the embodiment of the present invention, the method steps of performing the second information association calculation between the received target clan information to obtain the clan association relationship are similar to the method steps of performing the first information association calculation between the received target personal information by the above-mentioned information association analysis module to obtain the user association relationship, and will not be elaborated here.
[0135] In the embodiment of the present invention, when the information association analysis module performs the function of generating a family tree association tree according to the target personal information, the target family information, the user association relationship and the family association relationship, it is specifically used to:
[0136] Performing an initial information connection between the target personal information according to the user association relationship to obtain a first connection information chain, and performing an initial information connection between the target clan information according to the clan association relationship to obtain a second connection information chain;
[0137] sorting the first connection information chain and the second connection information chain respectively to obtain a first sequence and a second sequence, and analyzing a connection relationship between the first connection information chain and the second connection information chain based on the first sequence and the second sequence;
[0138] Performing information connection on the first connection information chain and the second connection information chain according to the connection relationship to obtain a target connection information chain;
[0139] The target connection information chain is sorted to obtain an information sequence, and a family tree association tree is generated according to the information sequence and the target connection information chain.
[0140] In an embodiment of the present invention, performing initial information connection between the target personal information according to the user association relationship refers to connecting the target personal information having the user association relationship between them in a tree form to obtain a first connection information chain, for example, parallel connection of peer relationships, up and down connection of parent-child relationships, etc.; performing initial information connection between the target clan information according to the clan association relationship refers to connecting the target clan information having the clan association relationship between them in a tree form to obtain a second connection information chain, for example, parallel connection of same-clan relationships, up and down connection of derived relationships, etc.
[0141] In an embodiment of the present invention, the first connection information chain and the second connection information chain may be sorted in chronological order to obtain a first sequence and a second sequence; and based on the first sequence and the second sequence, a connection relationship between the first connection information chain and the second connection information chain may be analyzed using a preset association algorithm, wherein the association algorithm may be an FP-growth algorithm or an Eclat algorithm, etc.
[0142] Furthermore, the first connection information chain and the second connection information chain having the connection relationship are connected and summarized to obtain a target connection information chain; the target connection information chain is sorted in chronological order to obtain an information sequence; the target connection information chains are connected in a tree form in the order of the information sequence to obtain a genealogy association tree.
[0143] In an embodiment of the present invention, the information association analysis module performs association calculations on the target personal information and the target clan information, and can accurately obtain user association relationships and clan association relationships; and can accurately generate a family tree association tree based on the target personal information, the target clan information, the user association relationship and the clan association relationship, thereby improving information association efficiency, reducing storage space loss, and thereby improving information search efficiency.
[0144] The information updating module 103 is used to perform link prediction on the received family tree association tree, and optimize the family tree association tree according to the result of link prediction to obtain a target family tree association tree.
[0145] In the embodiment of the present invention, when the information updating module performs the function of link prediction on the received family tree association tree, it is specifically used to:
[0146] Perform node division on the associated nodes in the family tree association tree to obtain positive samples and negative samples, and randomly extract a first edge node and a second edge node from the positive samples and the negative samples respectively;
[0147] Scoring the first edge node, the second edge node, and the negative sample using a preset link prediction algorithm to obtain a first score, a second score, and an edge score;
[0148] Calculating a first performance indicator according to the first score and the second score, and sorting the positive samples according to the edge scores to obtain a sample sequence;
[0149] A second performance indicator is calculated according to the sample sequence and the number of negative samples, and link prediction performance is analyzed according to the first performance indicator and the second performance indicator.
[0150] In an embodiment of the present invention, the associated nodes in the genealogical association tree can be used as a test set, and the positive samples and negative samples corresponding to the test set can be divided according to a pre-set goal, wherein the positive sample is the target node and the remaining non-target nodes are negative samples; the link prediction algorithm can be a method based on node features or a method based on machine learning, etc.
[0151] Furthermore, the first performance indicator refers to the AUC indicator, which is the probability that the first score of the positive sample is higher than the second score of the negative sample; the second performance indicator refers to the ranking score, which is the ranking of each edge in the positive sample in the unknown edge corresponding to the negative sample; specifically, the first performance indicator is calculated using the following formula:
[0152]
[0153] Among them, AUC represents the first performance indicator, g 1 indicates that the first score is higher than the second score, g 2 indicates that the first score is equal to the second score, and G indicates the number of tests between the first score and the second score.
[0154] In the embodiment of the present invention, the first scores corresponding to the positive samples are compared with the edge scores in order according to the edge scores to obtain a sample sequence; further, the second performance index is calculated using the following formula:
[0155]
[0156] Where, β represents the second performance index, l i represents the order of the i-th sample in the sample sequence, and L represents the number of negative samples.
[0157] In an embodiment of the present invention, when the first performance indicator is closer to 0.5 and the second performance indicator is smaller, it means that the link prediction performance is better; when the first performance indicator is less close to 0.5 or the second performance indicator is larger, it means that the link prediction performance is worse.
[0158] In an embodiment of the present invention, the information updating module performs the optimization processing of the genealogy association tree according to the result of link prediction to obtain the function of the target genealogy association tree, which refers to judging whether the link prediction performance meets the standard. When the link prediction performance meets the standard, it indicates that there is no need to optimize the genealogy association tree, and the genealogy association tree is directly used as the target genealogy association tree; when the link prediction performance does not meet the standard, it indicates that the genealogy association tree needs to be optimized. Specifically, the edge folding algorithm is used to fold some associated nodes in the genealogy association tree, thereby realizing the optimization of the genealogy association tree, and the optimized genealogy association tree is used as the target genealogy association tree.
[0159] In an embodiment of the present invention, link prediction is performed on the family tree association tree, and the family tree association tree is optimized according to the result of the link prediction, so that the target family tree association tree can be accurately obtained, the accuracy of the information is ensured, the efficiency of family tree analysis and management is improved, and the computer processing process is accelerated.
[0160] The information storage module 104 is used to encrypt the received associated nodes in the target family tree association tree using the preset blockchain technology to obtain encrypted information, and to store the encrypted information in a chain to obtain storage information.
[0161] In the embodiment of the present invention, when the information storage module performs the function of encrypting the associated nodes in the received target family tree association tree using the preset blockchain technology to obtain the encrypted information, it is specifically used to:
[0162] Extracting time information corresponding to the associated nodes in the target family tree associated tree, and using the associated nodes other than the time information in the associated nodes as business information;
[0163] Performing a hash operation on the business information to obtain a hash value, and encapsulating the hash value and the time information to obtain a block header;
[0164] Taking the target genealogy association tree as a block body, and connecting the block header and the block body to obtain a block;
[0165] Aggregating a number of the blocks according to the time information using blockchain technology to obtain an information blockchain;
[0166] The information blockchain is encrypted using a preset encryption algorithm to obtain encrypted information.
[0167] In an embodiment of the present invention, the associated node includes address information, identity information, time information, etc., and the address information and the identity information are both used as business information; the business information is hashed using a Merkle tree algorithm to obtain a hash value; the hash value and the time information are encapsulated using a forEach method to obtain a block header; finally, several of the blocks are connected according to the time order in the time information to obtain an information blockchain.
[0168] In the embodiment of the present invention, the encryption algorithm refers to:
[0169]
[0170] Wherein, f represents the encrypted information, K represents the preset re-encrypted ciphertext, and p s represents the sth block information in the information blockchain, p α represents the αth block information in the information blockchain, p γ represents the γth block information in the information blockchain, and S represents a preset encryption parameter.
[0171] In an embodiment of the present invention, the information storage module performs the chain storage of the encrypted information to obtain the storage information by setting the storage density and the pointer direction, and stores the encrypted information in a chain storage structure based on the storage density and the pointer direction to obtain the storage information, wherein the chain structure storage method includes a linked list and other forms.
[0172] In an embodiment of the present invention, the associated nodes in the target family tree association tree are encrypted, so that the encrypted information can be accurately obtained and the accuracy of the information can be ensured; the encrypted information is chain-stored, so that the stored information can be accurately obtained, and the efficiency of information management and family tree analysis can be improved.
[0173] The embodiment of the present invention can accurately collect personal information and clan information through the information collection module; improve the integrity of personal information by completing the information of personal information; ensure the accuracy of clan information by verifying the information of clan information; calculate the information association between target personal information and target clan information through the information association analysis module, accurately obtain the user association relationship and clan association relationship, and improve the relevance between information; accurately generate a genealogy association tree through the target personal information, target clan information, user association relationship and clan association relationship, and improve the accuracy and relevance of information management; perform link prediction on the genealogy association tree through the information update module, optimize the genealogy association tree according to the result of link prediction, accurately obtain the target genealogy association tree, and ensure the accuracy of the target genealogy association tree; encrypt the associated nodes in the target genealogy association tree through the information storage module, accurately obtain the encrypted information, and store the encrypted information in a chain, accurately obtain the stored information, and then improve the information management efficiency and the efficiency of genealogy analysis. Therefore, the genealogy analysis system based on off-chain storage proposed by the present invention can solve the problem of low efficiency when performing genealogy analysis.
[0174] like Figure 4 FIG. 1 is a flow chart of a family tree analysis method based on off-chain storage provided by an embodiment of the present invention. In an embodiment of the present invention, the family tree analysis method based on off-chain storage includes:
[0175] S401, the information collection module collects personal information and clan information, performs information completion on the personal information to obtain target personal information, and performs information verification on the clan information to obtain target clan information;
[0176] S402, the information association analysis module performs a first information association calculation on the received target personal information to obtain a user association relationship, and performs a second information association calculation on the received target clan information to obtain a clan association relationship;
[0177] S403, the information association analysis module generates a family tree association tree according to the target personal information, the target family information, the user association relationship and the family association relationship;
[0178] S404, the information updating module performs link prediction on the received family tree association tree, and optimizes the family tree association tree according to the result of the link prediction to obtain a target family tree association tree;
[0179] S405, the information storage module uses the preset blockchain technology to encrypt the received associated nodes in the target family tree association tree to obtain encrypted information, and stores the encrypted information in a chain to obtain storage information.
[0180] An electronic device for implementing a genealogy analysis system based on off-chain storage is provided in one embodiment of the present invention. The electronic device may include a processor, a memory, a communication bus, and a communication interface. It may also include a computer program stored in the memory and executable on the processor, such as a genealogy analysis program based on off-chain storage.
[0181] In some embodiments, the processor may be composed of an integrated circuit, for example, a single packaged integrated circuit, or a plurality of packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and combinations of various control chips. The processor is the control core (Control Unit) of the electronic device, and uses various interfaces and lines to connect the various components of the entire electronic device, and executes or executes programs or modules stored in the memory (for example, executing a genealogy analysis program based on off-chain storage, etc.), and calls data stored in the memory to execute various functions of the electronic device and process data.
[0182] The memory includes at least one type of readable storage medium, and the readable storage medium includes flash memory, mobile hard disk, multimedia card, card-type memory (for example: SD or DX memory, etc.), magnetic memory, disk, optical disk, etc. In some embodiments, the memory may be an internal storage unit of an electronic device, such as a mobile hard disk of the electronic device. In other embodiments, the memory may also be an external storage device of an electronic device, such as a plug-in mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device. Further, the memory may also include both an internal storage unit of the electronic device and an external storage device. The memory can be used not only to store application software and various types of data installed in the electronic device, such as the code of a genealogy analysis program based on off-chain storage, but also to temporarily store data that has been output or is to be output.
[0183] The communication bus may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is configured to realize connection communication between the memory and at least one processor, etc.
[0184] The communication interface is used for communication between the above-mentioned electronic device and other devices, including a network interface and a user interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is generally used to establish a communication connection between the electronic device and other electronic devices. The user interface may be a display (Display), an input unit (such as a keyboard (Keyboard)), and optionally, the user interface may also be a standard wired interface, a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode, organic light-emitting diode) touch device, etc. Among them, the display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the electronic device and to display a visual user interface.
[0185] The figure only shows an electronic device with components. Those skilled in the art will understand that the structure shown in the figure does not constitute a limitation on the electronic device, and may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.
[0186] For example, although not shown, the electronic device may also include a power source (such as a battery) for supplying power to each component. Preferably, the power source may be logically connected to the at least one processor through a power management method, so as to implement functions such as charging management, discharging management, and power consumption management through the power management method. The power source may also include any components such as one or more DC or AC power sources, recharging methods, power failure detection circuits, power converters or inverters, power status indicators, etc. The electronic device may also include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.
[0187] It should be understood that the embodiment is for illustration only and the scope of the patent application is not limited to this structure.
[0188] The family tree analysis program based on off-chain storage stored in the memory of the electronic device is a combination of multiple instructions. When running in the processor, it can achieve:
[0189] An information collection module is used to collect personal information and clan information, complete the personal information to obtain target personal information, and verify the clan information to obtain target clan information;
[0190] An information association analysis module, configured to perform a first information association calculation between the received target personal information to obtain a user association relationship, and perform a second information association calculation between the received target clan information to obtain a clan association relationship, and generate a family tree association tree based on the target personal information, the target clan information, the user association relationship and the clan association relationship;
[0191] An information updating module, used for performing link prediction on the received family tree association tree, optimizing the family tree association tree according to the result of link prediction, and obtaining a target family tree association tree;
[0192] The information storage module is used to encrypt the associated nodes in the received target family tree association tree using the preset blockchain technology to obtain encrypted information, and to store the encrypted information in a chain to obtain storage information, wherein the encrypted nodes in the received target family tree association tree are encrypted using the preset blockchain technology to obtain encrypted information, including:
[0193] Extracting time information corresponding to the associated nodes in the target family tree associated tree, and using the associated nodes other than the time information in the associated nodes as business information;
[0194] Performing a hash operation on the business information to obtain a hash value, and encapsulating the hash value and the time information to obtain a block header;
[0195] Taking the target genealogy association tree as a block body, and connecting the block header and the block body to obtain a block;
[0196] Aggregating a number of the blocks according to the time information using blockchain technology to obtain an information blockchain;
[0197] Encrypting the information blockchain using a preset encryption algorithm to obtain encrypted information;
[0198] The encryption algorithm is:
[0199]
[0200] Wherein, f represents the encrypted information, K represents the preset re-encrypted ciphertext, and p s represents the sth block information in the information blockchain, p αrepresents the αth block information in the information blockchain, p γ represents the γth block information in the information blockchain, and S represents a preset encryption parameter.
[0201] Specifically, the specific implementation system of the processor for the above instructions can refer to the description of the relevant steps in the corresponding embodiment of the accompanying drawings, which will not be repeated here.
[0202] Furthermore, if the module / unit integrated in the electronic device is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. The computer-readable storage medium can be volatile or non-volatile. For example, the computer-readable medium may include: any entity or method capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, and a read-only memory (ROM).
[0203] The present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor of an electronic device, the computer program can implement:
[0204] An information collection module is used to collect personal information and clan information, complete the personal information to obtain target personal information, and verify the clan information to obtain target clan information;
[0205] An information association analysis module, configured to perform a first information association calculation between the received target personal information to obtain a user association relationship, and perform a second information association calculation between the received target clan information to obtain a clan association relationship, and generate a family tree association tree based on the target personal information, the target clan information, the user association relationship and the clan association relationship;
[0206] An information updating module, used for performing link prediction on the received family tree association tree, optimizing the family tree association tree according to the result of link prediction, and obtaining a target family tree association tree;
[0207] The information storage module is used to encrypt the associated nodes in the received target family tree association tree using the preset blockchain technology to obtain encrypted information, and to store the encrypted information in a chain to obtain storage information, wherein the encrypted nodes in the received target family tree association tree are encrypted using the preset blockchain technology to obtain encrypted information, including:
[0208] Extracting time information corresponding to the associated nodes in the target family tree associated tree, and using the associated nodes other than the time information in the associated nodes as business information;
[0209] Performing a hash operation on the business information to obtain a hash value, and encapsulating the hash value and the time information to obtain a block header;
[0210] Taking the target genealogy association tree as a block body, and connecting the block header and the block body to obtain a block;
[0211] Aggregating a number of the blocks according to the time information using blockchain technology to obtain an information blockchain;
[0212] Encrypting the information blockchain using a preset encryption algorithm to obtain encrypted information;
[0213] The encryption algorithm is:
[0214]
[0215] Wherein, f represents the encrypted information, K represents the preset re-encrypted ciphertext, and p s represents the sth block information in the information blockchain, p α represents the αth block information in the information blockchain, p γ represents the γth block information in the information blockchain, and S represents a preset encryption parameter.
[0216] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, methods and systems can be implemented in other ways. For example, the method embodiments described above are only illustrative, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.
[0217] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0218] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional modules.
[0219] It is obvious to those skilled in the art that the present invention is not limited to the details of the above exemplary embodiments, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.
[0220] Therefore, no matter from which point of view, the embodiments should be regarded as illustrative and non-restrictive, and the scope of the present invention is not limited only according to the above description, and it is intended that all changes within the meaning and scope of equivalent elements within the scope of protection are included in the present invention.
[0221] The blockchain referred to in this invention is a new application mode of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.
[0222] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is the theory, system, technology and application method of using digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0223] In addition, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or methods stated in the method can also be implemented by one unit or method through software or hardware. The words first, second, etc. are used to indicate names, and do not indicate any particular order.
[0224] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention.
Claims
1. A family tree analysis system based on off-chain storage, characterized in that: The system includes an information collection module, an information association analysis module, an information update module and an information storage module, specifically: An information collection module is used to collect personal information and clan information, complete the personal information to obtain target personal information, and verify the clan information to obtain target clan information; An information association analysis module, configured to perform a first information association calculation between the received target personal information to obtain a user association relationship, and perform a second information association calculation between the received target clan information to obtain a clan association relationship, and generate a family tree association tree based on the target personal information, the target clan information, the user association relationship and the clan association relationship; When the information association analysis module performs the function of generating a family tree association tree according to the target personal information, the target clan information, the user association relationship and the clan association relationship, it is specifically used to: perform initial information connection between the target personal information according to the user association relationship to obtain a first connection information chain, and perform initial information connection between the target clan information according to the clan association relationship to obtain a second connection information chain; sort the first connection information chain and the second connection information chain respectively to obtain a first sequence and a second sequence, and analyze the connection relationship between the first connection information chain and the second connection information chain based on the first sequence and the second sequence; perform information connection between the first connection information chain and the second connection information chain according to the connection relationship to obtain a target connection information chain; Sorting the target connection information chain to obtain an information sequence, and generating a family tree association tree according to the information sequence and the target connection information chain; An information updating module is used to perform link prediction on the received family tree association tree, optimize the family tree association tree according to the result of link prediction, and obtain a target family tree association tree; when the information updating module performs the function of performing link prediction on the received family tree association tree, it is specifically used to: perform node division on the associated nodes in the family tree association tree to obtain positive samples and negative samples, and randomly extract a first edge node and a second edge node from the positive samples and the negative samples respectively; score the first edge node, the second edge node and the negative sample using a preset link prediction algorithm to obtain a first score, a second score and an edge score; calculate a first performance indicator according to the first score and the second score, and sort the positive samples according to the edge score to obtain a sample sequence; The first performance index is calculated using the following formula: Among them, AUC represents the first performance indicator, g 1 indicates that the first score is higher than the second score, g 2 indicates that the first score is equal to the second score, and G indicates the number of tests between the first score and the second score; Calculating a second performance indicator according to the sample sequence and the number of negative samples, and analyzing link prediction performance according to the first performance indicator and the second performance indicator; The second performance index is calculated using the following formula: Where, β represents the second performance index, l i represents the order of the i-th sample in the sample sequence, and L represents the number of negative samples; The information storage module is used to encrypt the associated nodes in the received target family tree association tree using the preset blockchain technology to obtain encrypted information, and to store the encrypted information in a chain to obtain storage information, wherein the encrypted nodes in the received target family tree association tree are encrypted using the preset blockchain technology to obtain encrypted information, including: Extracting time information corresponding to the associated nodes in the target family tree associated tree, and using the associated nodes other than the time information in the associated nodes as business information; Performing a hash operation on the business information to obtain a hash value, and encapsulating the hash value and the time information to obtain a block header; Taking the target genealogy association tree as a block body, and connecting the block header and the block body to obtain a block; Aggregating a number of the blocks according to the time information using blockchain technology to obtain an information blockchain; The information blockchain is encrypted using a preset encryption algorithm to obtain encrypted information.
2. The family tree analysis system based on off-chain storage according to claim 1, characterized in that: The encryption algorithm is: Wherein, f represents the encrypted information, K represents the preset re-encrypted ciphertext, and p s represents the sth block information in the information blockchain, p α represents the αth block information in the information blockchain, p γ represents the γth block information in the information blockchain, and S represents a preset encryption parameter.
3. The family tree analysis system based on off-chain storage according to claim 1, characterized in that: When executing the function of collecting personal information and clan information, the information collection module is specifically used to: Obtain the mobile device corresponding to the user, extract the data interface corresponding to the mobile device, and set the information collection time; Calculate the information collection efficiency according to the information collection time, and collect information from the mobile device using the information collection module based on the data interface and the information collection efficiency to obtain collected information; The information collection efficiency is calculated using the following formula: T=you n +k Wherein, F represents the information collection efficiency, T represents the information collection time, n represents the pause time between the information collection times, a represents the average collection time corresponding to the information collection time, b and t both represent preset calculation parameters, and k represents a preset time coefficient; The collected information is classified to obtain personal information and clan information.
4. The family tree analysis system based on off-chain storage according to claim 1, characterized in that: When the information collection module performs the function of completing the personal information to obtain the target personal information, it is specifically used to: Traversing the information attributes corresponding to the personal information to obtain a non-empty information set and an empty information set; Sorting the non-empty information set to obtain a sequence information set; Perform median filling on the empty information set according to the non-empty information set and the sequence information set to obtain a filled information set; The following formula can be used to fill the median: Among them, x c represents the cth filling attribute, I represents the non-empty information set, I * represents the sequential information set, and C represents the total number of information attributes in the empty information set; The non-empty information set, the sequence information set and the filled information set are aggregated to obtain target personal information.
5. The family tree analysis system based on off-chain storage according to claim 1, characterized in that: When the information collection module performs the function of verifying the clan information and obtaining the target clan information, it is specifically used to: Acquire a target attribute, and use the clan attribute corresponding to the clan information to perform matching calculation with the target attribute to obtain an attribute matching value; The matching calculation is performed using the following formula: Where r represents the attribute matching value, d j represents the jth clan attribute in the clan information, h j represents the target attribute corresponding to the j-th clan attribute, J represents the total number of clan attributes, represents the transpose symbol; Determine whether the attribute matching value is greater than a preset target matching value; When the attribute matching value is less than or equal to the target matching value, it indicates that the lineage information verification fails; When the attribute matching value is greater than the target matching value, it indicates that the clan information verification is successful, and the clan information is used as the target clan information.
6. The family tree analysis system based on off-chain storage according to claim 1, characterized in that: When the information association analysis module performs the function of performing the first information association calculation between the received target personal information to obtain the user association relationship, it is specifically used to: Randomly select an information center from the target personal information, and use the target personal information other than the information center in the target personal information as the candidate information center; Calculating the correlation between the information center and the to-be-selected information center, and determining whether the correlation is greater than a preset target correlation; The correlation is calculated using the following formula: Wherein, w represents the degree of association, z m represents the mth information center to be selected, Z represents the information center, and M represents the total number of the information centers to be selected; When the correlation degree is less than or equal to the target correlation degree, it is determined that the correlation degree between the information center and the selected information center is low; When the correlation degree is greater than the target correlation degree, it is determined that the correlation degree between the information center and the selected information center is higher, correlation information between the information center and the selected information center is extracted, and user correlation relationship is analyzed according to the correlation information.
7. A genealogy analysis method based on off-chain storage, characterized in that: The method comprises: The information collection module collects personal information and clan information, completes the personal information to obtain target personal information, and verifies the clan information to obtain target clan information; The information association analysis module performs a first information association calculation between the received target personal information to obtain a user association relationship, and performs a second information association calculation between the received target clan information to obtain a clan association relationship; when the information association analysis module performs the function of generating a genealogy association tree according to the target personal information, the target clan information, the user association relationship and the clan association relationship, it is specifically used to: perform initial information connection between the target personal information according to the user association relationship to obtain a first connection information chain, and perform initial information connection between the target clan information according to the clan association relationship to obtain a second connection information chain; sort the first connection information chain and the second connection information chain respectively to obtain a first sequence and a second sequence, and analyze the connection relationship between the first connection information chain and the second connection information chain based on the first sequence and the second sequence; perform information connection between the first connection information chain and the second connection information chain according to the connection relationship to obtain a target connection information chain; perform information sorting on the target connection information chain to obtain an information sequence, and generate a genealogy association tree according to the information sequence and the target connection information chain; The information association analysis module generates a family tree association tree according to the target personal information, the target family information, the user association relationship and the family association relationship; when the information update module performs the function of link prediction on the received family tree association tree, it is specifically used to: divide the associated nodes in the family tree association tree to obtain positive samples and negative samples, and randomly extract the first edge node and the second edge node from the positive samples and the negative samples respectively; score the first edge node, the second edge node and the negative sample using a preset link prediction algorithm to obtain a first score, a second score and an edge score; calculate a first performance indicator according to the first score and the second score, and sort the positive samples according to the edge score to obtain a sample sequence; The first performance index is calculated using the following formula: Among them, AUC represents the first performance indicator, g 1 indicates that the first score is higher than the second score, g 2 indicates that the first score is equal to the second score, and G indicates the number of tests between the first score and the second score; Calculating a second performance indicator according to the sample sequence and the number of negative samples, and analyzing link prediction performance according to the first performance indicator and the second performance indicator; The second performance index is calculated using the following formula: Where, β represents the second performance index, l i represents the order of the i-th sample in the sample sequence, and L represents the number of negative samples; The information updating module performs link prediction on the received family tree association tree, optimizes the family tree association tree according to the result of the link prediction, and obtains a target family tree association tree; The information storage module uses the preset blockchain technology to encrypt the associated nodes in the received target family tree association tree to obtain encrypted information, and stores the encrypted information in a chain to obtain storage information.
8. An electronic device, characterized in that: The electronic device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can perform the functions of the off-chain storage-based genealogy analysis system as described in any one of claims 1 to 6.
9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the functions of the family tree analysis system based on off-chain storage as described in any one of claims 1 to 6 are realized.
Citation Information
Patent Citations
Heritage album entry management system and its registration using method
CN107993048A
Family tree recording method and device based on block chain, and electronic equipment
CN108804699A