Method for determining a relationship and controller
By directly matching or calculating generational differences and relationship weights in the matching database, the problem of low efficiency in kinship verification under traditional manual processing methods is solved, and efficient and accurate kinship determination is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUANGDONG TOBACOO JIANGMEN CO LTD
- Filing Date
- 2026-02-27
- Publication Date
- 2026-06-05
AI Technical Summary
Traditional manual processing methods are inefficient for verifying and reporting kinship relationships. They are time-consuming and labor-intensive when dealing with massive amounts of employee information, making it difficult to efficiently determine kinship relationships.
By obtaining basic relationship information, a matching database is used for matching. If the match is successful, the kinship relationship is directly determined. If the match fails, the generational difference or relationship weight is calculated, and the kinship relationship is finally determined by combining preset rules and thresholds.
It improves the efficiency of determining kinship, shortens the determination time, and ensures that kinship can still be accurately determined when matching fails.
Smart Images

Figure CN122152910A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data mining technology, and in particular to a method and controller for determining kinship. Background Technology
[0002] In related technologies and corporate compliance management, kinship verification and reporting is a core task. However, traditional manual processing methods have significant drawbacks. Faced with massive amounts of employee kinship information, manual comparison is time-consuming, labor-intensive, and extremely inefficient. Therefore, improving the efficiency of kinship determination has become an urgent problem to be solved. Summary of the Invention
[0003] This application aims to address at least one of the technical problems existing in the prior art. To this end, this application proposes a method and controller for determining kinship, aiming to improve the efficiency of kinship determination.
[0004] In a first aspect, embodiments of this application provide a method for determining kinship, the method comprising: Obtain basic relationship information, wherein the basic relationship information includes the relationship information between the individual and the target relative; Based on the aforementioned basic relationship information, a matching operation is performed in the matching database to obtain the matching result; When the matching result is successful, a first relationship result matching the basic relationship information is obtained, and the first relationship result includes the kinship relationship between the person and the target relative; If the matching result fails, the generation difference or relationship weight is calculated based on the basic relationship information to obtain the second relationship result; The analysis is performed based on the second relationship result to determine the kinship between the individual and the target relative.
[0005] According to some embodiments of this application, the step of performing matching in the matching library based on the basic relationship information to obtain matching results includes: Information is extracted from the basic relationship information to obtain basic role information and derived role information. The basic role information is the first-level relationship information between the individual and the target relative. The derived role information includes at least one derived relationship information between the individual and the target relative derived layer by layer based on the first-level kinship relationship. The matching results are obtained by matching the first-level relationship information and the derived relationship information in the matching library.
[0006] According to some embodiments of this application, the step of matching in the matching library based on the first-level relationship information and the derived relationship information to obtain a matching result includes: The relationship identifier is obtained by concatenating the first-level relationship information and the derived relationship information. The matching results are obtained by performing a match in the matching database based on the relationship identifier.
[0007] According to some embodiments of this application, the step of calculating the generation difference or relationship weight based on the basic relationship information to obtain the second relationship result includes: The generation difference is calculated based on the first-level relationship information, the derived relationship information, and the preset generation difference calculation rule to obtain the second relationship result; The relationship weight is calculated based on the first-level relationship information, the derived relationship information, and the preset kinship weight to obtain the second relationship result.
[0008] According to some embodiments of this application, the preset generation difference calculation rule includes: When the first-level relationship information is that the person is of the same generation as the individual, the generation of the target relative remains unchanged; When the first-level relationship information is the person's predecessor, the generation of the target relative is calculated by addition; When the first-level relationship information is the next generation of the person, the generation of the target relative is calculated by subtraction; When the derived relationship information is of the same generation as the first-level relationship information or the previous derived relationship information, the generation of the target relative remains unchanged; When the derived relationship information is the first-level relationship information or the previous generation of the previous derived relationship information, the generation of the target relative is calculated by addition; When the derived relationship information is the first-level relationship information or the next generation of the previous derived relationship information, the generation of the target relative is calculated by subtraction.
[0009] According to some embodiments of this application, the preset kinship weight includes: When the first layer of relationship information is the person's in-law, the preset kinship weight is the first preset kinship weight; When the first layer of relationship information is the collateral blood relative of the person, the preset kinship weight is the second preset kinship weight; When the first layer of relationship information is the person's direct blood relative, the preset kinship weight is the third preset kinship weight; When the derived relationship information is the first-level relationship information or the in-law of the previous derived relationship information, the preset kinship weight is the first preset kinship weight; When the derived relationship information is a collateral relative of the first-level relationship information or the previous derived relationship information, the preset kinship weight is the second preset kinship weight; When the derived relationship information is a direct blood relative of the first-level relationship information or the previous derived relationship information, the preset kinship weight is the third preset kinship weight; Wherein, the first preset relative weight is less than the second preset relative weight, and the second preset relative weight is less than the third preset relative weight.
[0010] According to some embodiments of this application, the step of analyzing the second relationship result to determine the kinship between the individual and the target relative includes: When the second relationship result is obtained by calculating the generation difference, the kinship between the person and the target relative is determined by judging the second relationship result and the first preset threshold. If the second relationship result is obtained by calculating the relationship weight, the kinship between the person and the target relative is determined by judging the second relationship result and the second preset threshold.
[0011] According to some embodiments of this application, determining the kinship between the individual and the target relative by judging the second relationship result and the first preset threshold includes: When the absolute value of the second relationship result is less than or equal to the first preset threshold, the kinship between the person and the target relative is determined to be that of close relatives; When the absolute value of the second relationship result is greater than the first preset threshold, the kinship between the person and the target relative is determined to be that of distant relatives.
[0012] According to some embodiments of this application, determining the kinship between the individual and the target relative by judging through the second relationship result and the second preset threshold includes: When the result of the second relationship is less than the second preset threshold, the relationship between the person and the target relative is determined to be that of distant relatives; When the second relationship result is greater than or equal to the second preset threshold, the kinship between the person and the target relative is determined to be that of close relatives.
[0013] Secondly, embodiments of this application provide a controller, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the kinship determination method described in the first aspect when running the computer program.
[0014] Thirdly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions for performing the kinship determination method as described in the first aspect above.
[0015] Fourthly, embodiments of this application provide a computer program product, including a computer program or computer instructions, wherein the computer program or computer instructions are stored in a computer-readable storage medium, a processor of a computer device reads the computer program or computer instructions from the computer-readable storage medium, and the processor executes the computer program or computer instructions, causing the computer device to perform the kinship determination method as described in the first aspect above.
[0016] According to the technical solution of the embodiments of this application, at least the following beneficial effects are achieved: This application proposes a method and controller for determining kinship, applied in the field of data mining technology. The method includes: acquiring basic relationship information, wherein the basic relationship information includes the relationship information between the individual and a target relative; performing matching in a matching database based on the basic relationship information to obtain a matching result; when the matching result is successful, obtaining a first relationship result matching the basic relationship information, the first relationship result including the kinship relationship between the individual and the target relative; when the matching result fails, performing generational difference calculation or relationship weight calculation based on the basic relationship information to obtain a second relationship result; and analyzing the second relationship result to determine the kinship relationship between the individual and the target relative based on the analysis result. This application performs matching in a matching database based on basic relationship information. If the matching is successful, the first relationship result can be obtained immediately, avoiding unnecessary complex calculations and greatly shortening the determination time. If the matching fails, the second relationship result is obtained by using generational difference calculation or relationship weight calculation, and the kinship relationship is determined based on this result, thus improving the efficiency of kinship determination.
[0017] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description
[0018] The accompanying drawings are used to provide a further understanding of the technical solutions of this application and constitute a part of the specification. They are used together with the embodiments of this application to explain the technical solutions of this application and do not constitute a limitation on the technical solutions of this application.
[0019] Figure 1 This is a schematic diagram of an implementation environment for determining kinship according to one embodiment of this application; Figure 2 This is a flowchart of a kinship determination method provided in one embodiment of this application; Figure 3 This is a flowchart of a kinship determination method provided in another embodiment of this application; Figure 4 This is a flowchart of a kinship determination method provided in another embodiment of this application; Figure 5 This is a schematic diagram of a controller for performing a kinship determination method according to an embodiment of this application. Detailed Implementation
[0020] The embodiments of this application are described in detail below. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain this application, and should not be construed as limiting this application.
[0021] In the description of this application, it should be understood that the orientation descriptions, such as up, down, front, back, left, right, etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this application.
[0022] In the description of this application, "several" means one or more, "more than" means two or more, "greater than," "less than," and "exceeding" are understood to exclude the stated number, while "above," "below," and "within" are understood to include the stated number. The use of "first" and "second" in the description is merely for distinguishing technical features and should not be construed as indicating or implying relative importance, or implicitly indicating the number of indicated technical features, or implicitly indicating the order of the indicated technical features.
[0023] In the description of this application, unless otherwise expressly defined, terms such as "setup," "installation," and "connection" should be interpreted broadly, and those skilled in the art can reasonably determine the specific meaning of the above terms in this application in conjunction with the specific content of the technical solution.
[0024] In some cases, verifying and reporting kinship relationships is a core task in corporate compliance management. However, the traditional manual processing methods have significant drawbacks. Faced with massive amounts of employee kinship information, manually comparing each case is time-consuming, labor-intensive, and extremely inefficient. Therefore, improving the efficiency of kinship determination has become an urgent problem to be solved.
[0025] Based on the above, this application proposes a method and controller for determining kinship, aiming to improve the efficiency of kinship determination.
[0026] The various embodiments of the kinship determination method of this application will be further described below with reference to the accompanying drawings.
[0027] It is understood that the kinship determination method provided in this embodiment of the invention can be applied to any computer device with data processing and computing capabilities, and this computer device can be various types of terminals or servers. When the computer device in the embodiment is a server, the server is an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. Optionally, the terminal can be a smartphone, tablet computer, laptop computer, or desktop computer, but it is not limited to these.
[0028] like Figure 1 The diagram shown is a schematic representation of an implementation environment provided by an embodiment of the invention. (Refer to...) Figure 1 The implementation environment includes at least one terminal 102 and a server 101. The terminal 102 and the server 101 can be connected via a network, either wirelessly or via a wired connection, to complete data transmission and exchange.
[0029] Server 101 can be a standalone physical server, a server cluster or distributed system consisting of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms.
[0030] Additionally, server 101 can also be a node server in a blockchain network. Blockchain is a novel application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanisms, and encryption algorithms.
[0031] Terminal 102 can be a smartphone, tablet computer, laptop computer, desktop computer, smart speaker, smartwatch, etc., but is not limited to these. Terminal 102 and server 101 can be directly or indirectly connected via wired or wireless communication, and this embodiment of the invention does not impose any limitations.
[0032] Exemplary based on Figure 1 The implementation environment shown in this embodiment of the invention provides a method for determining kinship. The following description uses the application of this method to server 101 as an example. It can be understood that this method for determining kinship can also be applied to terminal 102.
[0033] like Figure 2 As shown, Figure 2 This is a flowchart of a kinship determination method provided in one embodiment of this application; the executing entity of the kinship determination method can be any of the aforementioned computer devices, and may include, but is not limited to, steps S110, S120, S130, S140 and S150.
[0034] Step S110: Obtain basic relationship information, which includes the relationship information between the individual and the target relative; Step S120: Perform a match in the matching database based on the basic relationship information to obtain the matching result; Step S130: When the matching result is successful, the first relationship result matching the basic relationship information is obtained. The first relationship result includes the kinship relationship between the person and the target relative. Step S140: When the matching result fails, calculate the generation difference or relationship weight based on the basic relationship information to obtain the second relationship result; Step S150: Analyze the results of the second relationship to determine the kinship between the individual and the target relative.
[0035] In one embodiment, firstly, basic relationship information is obtained, including the relationship information between the applicant and the target relative. Next, a matching process is performed in a matching database based on the basic relationship information to obtain a matching result. If the matching result is successful, a first relationship result matching the basic relationship information is obtained, which includes the kinship relationship between the applicant and the target relative. If the matching result fails, a second relationship result is obtained by calculating the generational difference or relationship weight based on the basic relationship information. Analysis is then performed based on the second relationship result, and the kinship relationship between the applicant and the target relative is determined based on the analysis results. Because this application performs matching in a matching database based on the basic relationship information, a first relationship result can be obtained immediately if the matching is successful, avoiding unnecessary complex calculations and greatly shortening the determination time. If the matching fails, a second relationship result is obtained by calculating the generational difference or relationship weight, and the kinship relationship is determined based on this result. Therefore, the efficiency of kinship determination can be improved.
[0036] For example, the basic relationship information obtained is "my mother's mother". Based on the basic relationship information of "my mother's mother", a match is performed in the matching database to determine that "my mother's mother" is the maternal grandmother. The first relationship result is close relatives, and the matching result is successful.
[0037] For example, the basic relationship information obtained is the son of one's mother's mother's sister. Matching is performed in the matching database based on the basic relationship information of "the son of one's mother's mother's sister". If the matching result fails, the generation difference or relationship weight is calculated based on the basic relationship information of "the son of one's mother's mother's sister" to determine the kinship relationship.
[0038] Understandably, this application can determine whether a target relative needs to be reported by combining the legal and policy definitions of direct blood relatives, collateral blood relatives within three generations, and close relatives by marriage with the kinship relationship between the identified target relative and the applicant. For example, when the target relative is identified as a close relative of the applicant, the target relative needs to be reported; when the target relative is identified as a distant relative of the applicant, the relationship does not need to be reported.
[0039] like Figure 3 As shown, Figure 3 This is a flowchart of a kinship determination method provided in another embodiment of this application; regarding the above step S120, it may include, but is not limited to, steps S210 and S220.
[0040] Step S210: Extract information from the basic relationship information to obtain basic role information and derived role information. The basic role information is the first-level relationship information between the individual and the target relative. The derived role information includes at least one derived relationship information between the individual and the target relative derived layer by layer based on the first-level kinship relationship. Step S220: Match the first-level relationship information and the derived relationship information in the matching database to obtain the matching result.
[0041] For example, the first-level relationship information is daughter, and the derived relationship information is spouse and mother; the first-level relationship information is daughter, and the derived relationship information is spouse, mother and father; the first-level relationship information is spouse, and the derived relationship information is sister and daughter.
[0042] like Figure 4 As shown, Figure 4 This is a flowchart of a kinship determination method provided in another embodiment of this application; regarding the above step S220, it may include, but is not limited to, steps S310 and S320.
[0043] Step S310: Concatenate the first-level relationship information and the derived relationship information to obtain the relationship identifier; Step S320: Perform a match in the matching database based on the relationship identifier to obtain the matching result.
[0044] Understandably, when the first-level relationship information is "mother" and the derived relationship information is "mother", the first-level relationship information and the derived relationship information are concatenated to obtain the relationship identifier "the mother of my mother". Based on "the mother of my mother", a matching is performed in the matching database to obtain the matching result, and it is determined that "the mother of my mother" is the maternal grandmother, which is a close relative.
[0045] For example, if the first-level relationship information is daughter, and the derived relationship information is spouse and mother, concatenating the first-level relationship information and the derived relationship information yields the relationship identifier of the mother of one's daughter's spouse; if the first-level relationship information is daughter, and the derived relationship information is spouse, mother, and father, concatenating the first-level relationship information and the derived relationship information yields the relationship identifier of the father of one's daughter's spouse's mother; if the first-level relationship information is spouse, and the derived relationship information is sister and daughter, concatenating the first-level relationship information and the derived relationship information yields the relationship identifier of the daughter of one's spouse's sister.
[0046] Additionally, it is understood that step S140 above includes the following steps: The generation difference is calculated based on the basic role information, the derived role information, and the preset generation difference calculation rules to obtain the second relationship result.
[0047] It is understandable that the aforementioned preset backup difference calculation rules include: When the first-level relationship information is the same generation as the individual, the generation of the target relative remains unchanged; When the first-level relationship information is the person's previous generation, the generation of the target relative is calculated by addition; When the first-level relationship information is the next generation of the person, the generation of the target relative is calculated by subtraction; When the derived relationship information is of the same generation as the first-level relationship information or the previous derived relationship information, the generation of the target relative remains unchanged; When the derived relationship information is the first-level relationship information or the previous generation of the previous derived relationship information, the generation of the target relative is calculated by addition; When the derived relationship information is the first-level relationship information or the next generation of the previous derived relationship information, the generation of the target relative is calculated by subtraction.
[0048] Understandably, when the derived role information includes multiple derived relationship information between the individual and the target relative derived layer by layer based on the first-level kinship relationship, the first derived relationship information is compared with the first-level relationship information to determine the generation, the second derived relationship information is compared with the first derived relationship information to determine the generation, the third derived relationship information is compared with the second derived relationship information to determine the generation, and so on.
[0049] For example, the first-level relationship information is "daughter", and the derived relationship information is "spouse and mother". The relationship identifier is "the mother of the spouse of my daughter". The first-level relationship information "daughter" is the next generation of the individual. The generation of the target relative is subtracted by 1. The "spouse" in the derived relationship information is the same generation as the "daughter" in the first-level relationship information. The generation of the target relative remains unchanged. The "mother" in the derived relationship information is the previous generation of the "spouse" in the derived relationship information. The generation of the target relative is added by 1. Therefore, the result of the second relationship is 0. Thus, the kinship relationship with the individual is determined based on the result of the second relationship.
[0050] For example, the first-level relationship information is the spouse, and the derived relationship information is the sister and daughter. The relationship identifier is "the daughter of the sister of the spouse". The first-level relationship information "spouse" is of the same generation as the individual, and the generation of the target relative remains unchanged. The "sister" in the derived relationship information is of the same generation as the "spouse" in the first-level relationship information, and the generation of the target relative remains unchanged. The "daughter" in the derived relationship information is of the next generation of the "sister" in the derived relationship information. The generation of the target relative is subtracted by 1. Therefore, the second relationship result is -1, and the kinship relationship with the individual is determined based on the second relationship result.
[0051] In addition, it is understandable that when the second relationship result is obtained by calculating the generational difference, the kinship between the individual and the target relative is determined by judging the second relationship result and the first preset threshold.
[0052] It is understandable that if the absolute value of the second relationship result is less than or equal to the first preset threshold, the kinship between the individual and the target relative is determined to be that of close relatives; if the absolute value of the second relationship result is greater than the first preset threshold, the kinship between the individual and the target relative is determined to be that of distant relatives.
[0053] It is understood that the size of the first preset threshold mentioned above can be 2, and can be set according to the actual situation. This application embodiment does not specifically limit it.
[0054] For example, the first preset threshold is 2, the first-level relationship information is spouse, the derived relationship information is sister and daughter, the relationship identifier is "the daughter of the sister of my spouse", the first-level relationship information "spouse" is of the same generation as myself, the generation of the target relative remains unchanged, the "sister" in the derived relationship information is of the same generation as the "spouse" in the first-level relationship information, the generation of the target relative remains unchanged, the "daughter" in the derived relationship information is of the next generation of the "sister" in the derived relationship information, the generation of the target relative is subtracted, the generation is -1, therefore, the second relationship result is -1, the absolute value of the second relationship result is 1 and less than the first preset threshold, and the kinship between myself and the target relative is determined to be close relatives.
[0055] For example, the first preset threshold is 2, the first-level relationship information is uncle, the derived relationship information is spouse, mother and father, and the relationship identifier is "the father of the mother of the spouse of the person's uncle". The first-level relationship information "uncle" is the person's predecessor. The generation of the target relative is calculated by addition, and the generation is increased by 1. The "spouse" in the derived relationship information is the same generation as the "uncle" in the first-level relationship information. The generation of the target relative remains unchanged. The "mother" in the derived relationship information is the predecessor of the "spouse" in the derived relationship information. The generation of the target relative is calculated by addition, and the generation is increased by 1. The "father" in the derived relationship information is the predecessor of the "mother" in the derived relationship information. The generation of the target relative is calculated by addition, and the generation is increased by 1. Therefore, the second relationship result is +3. The absolute value of the second relationship result is 3 and is greater than the first preset threshold. It is determined that the person and the target relative are distant relatives.
[0056] Additionally, it is understood that step S140 above includes the following steps: The relationship weights are calculated based on the first-level relationship information, the derived relationship information, and the preset kinship weights to obtain the second relationship result.
[0057] It is understandable that the aforementioned pre-defined kinship weights include: When the first-level relationship information is the individual's in-laws, the preset kinship weight is the first preset kinship weight; When the first-level relationship information is the individual's collateral blood relatives, the preset kinship weight is the second preset kinship weight; When the first-level relationship information is the individual's direct blood relatives, the preset kinship weight is the third preset kinship weight; When the derived relationship information is a first-level relationship information or a relative by marriage of the previous derived relationship information, the preset kinship weight is the first preset kinship weight; When the derived relationship information is a collateral relative of the first-level relationship information or the previous derived relationship information, the preset kinship weight is the second preset kinship weight; When the derived relationship information is the first-level relationship information or the direct blood relative of the previous derived relationship information, the preset kinship weight is the third preset kinship weight; Among them, the first preset relative weight is less than the second preset relative weight, and the second preset relative weight is less than the third preset relative weight.
[0058] Understandably, when the derived role information includes multiple derived relationship information between the individual and the target relative derived layer by layer based on the first-level kinship relationship, the first derived relationship information is weighted according to the kinship weight of the first-level relationship information, the second derived relationship information is weighted according to the kinship weight of the first derived relationship information, the third derived relationship information is weighted according to the kinship weight of the second derived relationship information, and so on.
[0059] Understandably, lineal relatives refer to relatives with a direct blood relationship, including grandparents, maternal grandparents, parents, children, grandchildren, maternal grandchildren, as well as adoptive parents and adopted children, stepparents and stepchildren who have formed a support relationship, etc.; collateral relatives refer to relatives within three generations with an indirect blood relationship and who share the same ancestry, including siblings, uncles, aunts, cousins, nephews, nieces, etc.; relatives by marriage refer to close relatives by marriage, including the blood relatives of one's spouse, the spouses of blood relatives, the spouses of blood relatives, etc.
[0060] For example, the first-level relationship information is daughter, the derived relationship information is spouse and mother, and the relationship identifier is "the mother of my daughter's spouse". The first-level relationship information "daughter" is my direct blood relative, and the preset kinship weight is the third preset kinship weight. The "spouse" in the derived relationship information is related to the "daughter" in the first-level relationship information by marriage, and the preset kinship weight is the first preset kinship weight. The "mother" in the derived relationship information is related to the "spouse" in the derived relationship information by direct blood, and the preset kinship weight is the third preset kinship weight. Therefore, by multiplying the determined kinship weights, the second relationship result is obtained, and the kinship relationship with myself is determined based on the second relationship result.
[0061] For example, the first-level relationship information is spouse, and the derived relationship information is brother, spouse, and younger brother. The relationship identifier is "the younger brother of the wife of the brother of the spouse of the person". The first-level relationship information "spouse" is the person's relative by marriage, and the preset kinship weight is the first preset kinship weight. The "brother" in the derived relationship information and the "spouse" in the first-level relationship information are collateral relatives, and the preset kinship weight is the second preset kinship weight. The "spouse" in the derived relationship information and the "brother" in the derived relationship information are relatives by marriage, and the preset kinship weight is the first preset kinship weight. The "younger brother" in the derived relationship information and the "spouse" in the derived relationship information are collateral relatives, and the preset kinship weight is the second preset kinship weight. Therefore, by multiplying the obtained kinship weights, the second relationship result is obtained, and the kinship relationship with the person is determined based on the second relationship result.
[0062] It is understood that the first preset relative weight can be 0.6, the second preset relative weight can be 0.8, and the third preset relative weight can be 1. These can be set according to actual needs. This application embodiment does not specifically limit the specific size of the first preset relative weight, the second preset relative weight, and the third preset relative weight.
[0063] For example, the first-level relationship information is daughter, and the derived relationship information is spouse and mother. The relationship identifier is "the mother of my daughter's spouse". The first-level relationship information "daughter" is my direct blood relative, with a preset kinship weight of 1. The "spouse" in the derived relationship information is related to the "daughter" in the first-level relationship information by marriage, with a preset kinship weight of 0.6. The "mother" in the derived relationship information is related to the "spouse" in the derived relationship information by direct blood, with a preset kinship weight of 1. Therefore, by multiplying the determined kinship weights, the second relationship result is 0.6, and the kinship relationship with myself is determined based on the second relationship result.
[0064] For example, the first-level relationship information is the spouse, and the derived relationship information is the older brother, spouse, and younger brother. The relationship identifier is "the younger brother of each of the wives of the person's spouse". The first-level relationship information "spouse" is the person's relative by marriage, with a preset kinship weight of 0.6. The "older brother" in the derived relationship information is a collateral blood relative of the first-level relationship information "spouse", with a preset kinship weight of 0.8. The "spouse" in the derived relationship information is a relative by marriage of the "older brother" in the derived relationship information, with a preset kinship weight of 0.6. The "younger brother" in the derived relationship information is a collateral blood relative of the "spouse" in the derived relationship information, with a preset kinship weight of 0.8. Therefore, by multiplying the determined kinship weights, the second relationship result is 0.2304, and the kinship relationship with the person is determined based on the second relationship result.
[0065] In addition, it is understandable that when the second relationship result is obtained through relationship weight calculation, the kinship between the individual and the target relative is determined by judging the second relationship result and the second preset threshold.
[0066] It is understandable that if the result of the second relationship is less than the second preset threshold, the relationship between the individual and the target relative is determined to be that of distant relatives; if the result of the second relationship is greater than or equal to the second preset threshold, the relationship between the individual and the target relative is determined to be that of close relatives.
[0067] It is understood that the second preset threshold mentioned above can be 0.3, and can be set according to the actual situation. This application embodiment does not specifically limit it.
[0068] For example, the second preset threshold is 0.3, the first-level relationship information is daughter, the derived relationship information is spouse and mother, the relationship identifier is "the mother of the spouse of my daughter", the first-level relationship information "daughter" is my direct blood relative, the preset kinship weight is 1, the "spouse" in the derived relationship information is related to the "daughter" in the first-level relationship information by marriage, the preset kinship weight is 0.6, the "mother" in the derived relationship information is related to the "spouse" in the derived relationship information by direct blood relative, the preset kinship weight is 1. Therefore, by multiplying the determined kinship weights, the second relationship result is 0.6, which is greater than the second preset threshold, thus determining that the kinship relationship between myself and the target relative is close relatives.
[0069] For example, the second preset threshold is 0.3, the first-level relationship information is spouse, the derived relationship information is brother, spouse and younger brother, the relationship identifier is "the younger brother of each of the wives of the person's spouse", the first-level relationship information "spouse" is the person's relative by marriage, the preset kinship weight is 0.6, the "brother" in the derived relationship information and the first-level relationship information "spouse" are collateral relatives, the preset kinship weight is 0.8, the "spouse" in the derived relationship information and the "brother" in the derived relationship information are relatives by marriage, the preset kinship weight is 0.6, the "younger brother" in the derived relationship information and the "spouse" in the derived relationship information are collateral relatives, the preset kinship weight is 0.8. Therefore, by multiplying the determined kinship weights, the second relationship result is 0.2304, which is less than the second preset threshold, thus determining that the person's kinship with the target relative is a distant relative.
[0070] Based on the kinship determination methods of the above embodiments, the following presents an overall embodiment of the kinship determination method of this application.
[0071] Example 1: 1. Precise Matching Layer: A predefined relationship database is constructed based on relevant policy documents, and common kinship relationships (such as spouse, parents, children, siblings, grandparents, etc.) are structurally encoded. A unique identifier and attribute label (such as direct / collateral, blood relatives / in-laws) are assigned to each relationship, and a precise matching dictionary is built.
[0072] The rapid matching mechanism allows the system to directly search the precise matching database when it obtains a clear kinship tag. Upon successful matching, the system immediately outputs the judgment result and associates it with the corresponding reporting requirements and risk level.
[0073] The data input interface supports multi-source data input, including information filled in by employees themselves, data from the human resources system, and OCR recognition results of documents, ensuring the diversity and accuracy of data sources.
[0074] 2. Fuzzy derivation layer: The role and generation difference model defines a role coordinate system centered on "the individual," and sets basic role information (such as the individual, spouse, parents, and children) and derived role information (such as the spouse's parents and children's spouses). It is derived by calculating the generation difference between the target relative and the individual (e.g., parents are +1, children are -1) and combining it with relationships such as marriage and procreation.
[0075] The multi-level relationship chain decomposition algorithm automatically breaks down relationship chains for complex relationships that are not predefined. By deducing the role type and seniority difference at each level, it ultimately determines whether the person belongs to a "close relative" or a "specific relationship person who needs to be reported".
[0076] When the input multi-level kinship relationship cannot be accurately matched in the predefined relational database, the system calls the fuzzy inference algorithm: The first step is to initialize the starting point of the derivation, which is fixed as "myself".
[0077] The second step is to process the selected kinship roles hierarchically. Starting with the first selected kinship role (e.g., "father"), the calculation is performed layer by layer, with two tasks done at each level: (1) Identifier of splicing relationship.
[0078] If it is the first level (for example, only "father" is selected): directly use the system identifier of "father" as the current "relationship identifier".
[0079] If it is a later level (for example, the second level selected "younger brother"): combine the identifier of the previous level with the identifier of the current level (for example, father+younger_brother→father_younger_brother).
[0080] (2) Determine and deduce kinship attributes.
[0081] If the predefined relationship database is queried, and the concatenated relationship identifier can be accurately matched in the matching database (e.g., father_younger_brother corresponds to "uncle"), the kinship information is directly confirmed (e.g., the kinship name is "uncle", the generation is the previous generation, and they are close relatives).
[0082] If an exact match cannot be found in the relation database (e.g., if father_younger_brother_wife_sister is not found in the database), the kinship information is "estimated" according to the following rules: Relative Name: The relative name calculated in the previous step + "of" + the common name of the current role (for example, if the previous step was "aunt", and the current role is "sister", then the current relative name is "aunt's sister".
[0083] Generation: Calculated using the generation of the relatives in the previous step - if the current role is "son / daughter", the generation is reduced by 1, representing the next generation; if the current role is "father / mother", the generation is increased by 1, representing the previous generation.
[0084] Whether they are close relatives: It is determined by the absolute value of the generation. If the absolute value of the generation is ≤2, that is, within three generations, they are considered close relatives. Otherwise, they are not close relatives and are classified as "distant relatives".
[0085] The third step is to optimize kinship names. After all levels of derivation calculations are completed, the system will perform another "colloquial optimization": if the complete kinship chain (such as "the daughter of the sister of the spouse of my father's brother") has a corresponding common name (such as "cousins"), it will be replaced with a more easy-to-pronounce name; otherwise, the name derived in the second step (such as "aunt's sister") will be used.
[0086] 3. Kinship Knowledge Base: The rule base is constructed by integrating legal and policy definitions for direct blood relatives, collateral blood relatives within three generations, and close relatives by marriage, creating a standardized knowledge base. This knowledge base includes relationship definitions, reporting requirements, risk levels, and other information, serving as the basis for the two-tiered judgment process.
[0087] A dynamic update mechanism allows for flexible adjustments to relationship determination criteria based on policy changes or business needs. Version management ensures the traceability and consistency of rules.
[0088] Example 2: (S1) During the input phase, the user obtains basic relationship information between "self" and "target relative" through interface selection or automatic system parsing. For example, if the user inputs "spouse" and "brother", the relationship is identified as "the brother of my spouse".
[0089] (S2) Exact matching: The system first searches in the exact matching database. If a match fails (e.g., "my spouse's brother" is not predefined), it proceeds to the fuzzy inference layer.
[0090] (S3) Fuzzy derivation: Calculate the role type and generation difference at each level. The generation difference between the spouse and the individual is 0, and the generation difference between the brother and the spouse is 0. The resulting second relationship is 0, which is less than 2. Finally, it is deduced that "the brother of the individual's spouse" belongs to the collateral relatives within three generations and needs to be reported.
[0091] (S4) Output the result: The system outputs the judgment result "Belongs to close relatives, needs to be reported", and visualizes the relationship derivation path. At the same time, it issues an early warning for high-risk conflicts.
[0092] (S5) Review optimization: Feedback the results of manual review to the system to continuously optimize the accuracy of the precise matching library and fuzzy inference algorithm.
[0093] Example 3: (S1) During the input phase, the user obtains basic relationship information between "self" and "target relative" through interface selection or automatic system parsing. For example, if the user inputs "spouse" and "brother", the relationship is identified as "the brother of my spouse".
[0094] (S2) Exact matching: The system first searches in the exact matching database. If a match fails (e.g., "my spouse's brother" is not predefined), it proceeds to the fuzzy inference layer.
[0095] (S3) Fuzzy derivation: Calculate the role type and kinship weight at each level. The spouse and the individual are related by marriage, with a kinship weight of 0.6. The brother and spouse are collateral relatives, with a kinship weight of 0.8. The resulting second relationship result is 0.48, which is greater than 0.3. Finally, it is deduced that "the brother of the individual's spouse" belongs to collateral relatives by marriage within three generations and needs to be reported.
[0096] (S4) Output the result: The system outputs the judgment result "Belongs to close relatives, needs to be reported", and visualizes the relationship derivation path. At the same time, it issues an early warning for high-risk conflicts.
[0097] (S5) Review optimization: Feedback the results of manual review to the system to continuously optimize the accuracy of the precise matching library and fuzzy inference algorithm.
[0098] It is worth noting that this application has the following beneficial effects: 1. Significantly improves accuracy, with a two-layer mechanism ensuring accurate identification of common relationships and efficient derivation of complex relationships; 2. Significantly improves work efficiency, greatly reducing manual verification time, shortening the manual screening that originally required several hours to be completed in seconds; 3. Significantly improves compliance, fully conforming to policy and regulatory requirements, ensuring the compliance and consistency of the determination of relatives' household registration; 4. Has good scalability, with the knowledge base and algorithm model supporting dynamic updates, adaptable to policy changes and business needs in different industries.
[0099] Based on the kinship determination methods described in the above embodiments, the following presents various embodiments of the controller, computer-readable storage medium, and computer program product of this application.
[0100] like Figure 5 As shown, Figure 5 This is a schematic diagram of a controller for performing a kinship determination method according to an embodiment of this application. The controller 700 implemented in this application includes: a processor 710, a memory 720, and a computer program stored in the memory 720 and executable on the processor 710, wherein... Figure 5 The example uses a processor 710 and a memory 720.
[0101] The processor 710 and memory 720 can be connected via a bus or other means. Figure 5 Taking the example of a connection between China and Israel via a bus.
[0102] Memory 720, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory 720 may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory 720 may optionally include remotely located memories 720 relative to processor 710, which can be connected to controller 700 via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0103] Those skilled in the art will understand that Figure 5 The device structure shown does not constitute a limitation on the controller 700 and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0104] exist Figure 5 In the controller 700 shown, the processor 710 can be used to call the control program stored in the memory 720 to implement the above-described kinship determination method. Specifically, the non-transitory software program and instructions required to implement the kinship determination method of the above embodiment are stored in the memory 720. When executed by the processor 710, the kinship determination method of the above embodiment is executed.
[0105] It is worth noting that, since the controller 700 of this application embodiment can execute the kinship determination method of any of the above embodiments, the specific implementation method and technical effect of the controller 700 of this application embodiment can refer to the specific implementation method and technical effect of the kinship determination method of any of the above embodiments.
[0106] Furthermore, one embodiment of this application provides a computer-readable storage medium storing computer-executable instructions for performing the aforementioned kinship determination method. Exemplarily, the above-described method is executed... Figures 2 to 4 The methods and steps in the text.
[0107] It is worth noting that, since the computer-readable storage medium of this application embodiment can execute the kinship determination method of any of the above embodiments, the specific implementation method and technical effect of the computer-readable storage medium of this application embodiment can refer to the specific implementation method and technical effect of the kinship determination method of any of the above embodiments.
[0108] Furthermore, one embodiment of this application also provides a computer program product, including a computer program or computer instructions, which are stored in a computer-readable storage medium. A processor of a computer device reads the computer program or computer instructions from the computer-readable storage medium and executes the computer program or computer instructions, causing the computer device to perform the aforementioned kinship determination method. Exemplarily, the above-described method is executed... Figures 2 to 4 The methods and steps in the text.
[0109] It is worth noting that, since the computer program product of this application embodiment can execute the kinship determination method of any of the above embodiments, the specific implementation method and technical effect of the computer program product of this application embodiment can refer to the specific implementation method and technical effect of the kinship determination method of any of the above embodiments.
[0110] It will be understood by those skilled in the art that all or some of the steps and systems in the methods disclosed above can be implemented as software, firmware, hardware, and suitable combinations thereof. Some or all of the physical components can be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, which can include computer storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer. Furthermore, as is known to those skilled in the art, communication media typically include computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.
[0111] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.
[0112] In the several embodiments provided in this application, it should be understood that the disclosed systems, instruments, and methods can be implemented in other ways. For example, the instrument embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the shown or discussed mutual couplings, direct couplings, or communication connections may be through some interfaces; indirect couplings or communication connections between instruments or units may be electrical, mechanical, or other forms. Units described as separate components may or may not be physically separate, and components shown as units may or may not be physical units, i.e., they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0113] It should also be understood that the various implementation methods provided in this application can be combined arbitrarily to achieve different technical effects.
[0114] The above provides a detailed description of the preferred embodiments of this application. However, this application is not limited to the above-described embodiments. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of this application. All such equivalent modifications or substitutions are included within the scope defined by the claims of this application.
Claims
1. A method for determining kinship, characterized in that, The method includes: Obtain basic relationship information, wherein the basic relationship information includes the relationship information between the individual and the target relative; Based on the aforementioned basic relationship information, a matching operation is performed in the matching database to obtain the matching result; When the matching result is successful, a first relationship result matching the basic relationship information is obtained, and the first relationship result includes the kinship relationship between the person and the target relative; If the matching result fails, the generation difference or relationship weight is calculated based on the basic relationship information to obtain the second relationship result; The analysis is performed based on the second relationship result to determine the kinship between the individual and the target relative.
2. The method according to claim 1, characterized in that, The step of performing a match in the matching database based on the basic relationship information to obtain a matching result includes: Information is extracted from the basic relationship information to obtain basic role information and derived role information. The basic role information is the first-level relationship information between the individual and the target relative. The derived role information includes at least one derived relationship information between the individual and the target relative derived layer by layer based on the first-level kinship relationship. The matching results are obtained by matching the first-level relationship information and the derived relationship information in the matching library.
3. The method according to claim 2, characterized in that, The step of matching in the matching database based on the first-level relationship information and the derived relationship information to obtain the matching result includes: The relationship identifier is obtained by concatenating the first-level relationship information and the derived relationship information. The matching results are obtained by performing a match in the matching database based on the relationship identifier.
4. The method according to claim 2, characterized in that, The step of calculating the generation difference or relationship weight based on the basic relationship information to obtain the second relationship result includes: The generation difference is calculated based on the first-level relationship information, the derived relationship information, and the preset generation difference calculation rule to obtain the second relationship result; The relationship weight is calculated based on the first-level relationship information, the derived relationship information, and the preset kinship weight to obtain the second relationship result.
5. The method according to claim 4, characterized in that, The preset generational difference calculation rules include: When the first-level relationship information is that the person is of the same generation as the individual, the generation of the target relative remains unchanged; When the first-level relationship information is the person's predecessor, the generation of the target relative is calculated by addition; When the first-level relationship information is the next generation of the person, the generation of the target relative is calculated by subtraction; When the derived relationship information is of the same generation as the first-level relationship information or the previous derived relationship information, the generation of the target relative remains unchanged; When the derived relationship information is the first-level relationship information or the previous generation of the previous derived relationship information, the generation of the target relative is calculated by addition; When the derived relationship information is the first-level relationship information or the next generation of the previous derived relationship information, the generation of the target relative is calculated by subtraction.
6. The method according to claim 4, characterized in that, The preset kinship weights include: When the first layer of relationship information is the person's in-law, the preset kinship weight is the first preset kinship weight; When the first layer of relationship information is the collateral blood relative of the person, the preset kinship weight is the second preset kinship weight; When the first layer of relationship information is the person's direct blood relative, the preset kinship weight is the third preset kinship weight; When the derived relationship information is the first-level relationship information or the in-law of the previous derived relationship information, the preset kinship weight is the first preset kinship weight; When the derived relationship information is a collateral relative of the first-level relationship information or the previous derived relationship information, the preset kinship weight is the second preset kinship weight; When the derived relationship information is a direct blood relative of the first-level relationship information or the previous derived relationship information, the preset kinship weight is the third preset kinship weight; Wherein, the first preset relative weight is less than the second preset relative weight, and the second preset relative weight is less than the third preset relative weight.
7. The method according to claim 1, characterized in that, The step of analyzing the second relationship result to determine the kinship between the individual and the target relative includes: When the second relationship result is obtained by calculating the generation difference, the kinship between the person and the target relative is determined by judging the second relationship result and the first preset threshold. If the second relationship result is obtained by calculating the relationship weight, the kinship between the person and the target relative is determined by judging the second relationship result and the second preset threshold.
8. The method according to claim 7, characterized in that, The step of determining the kinship between the individual and the target relative by judging the second relationship result and the first preset threshold includes: When the absolute value of the second relationship result is less than or equal to the first preset threshold, the kinship between the person and the target relative is determined to be that of close relatives; When the absolute value of the second relationship result is greater than the first preset threshold, the kinship between the person and the target relative is determined to be that of distant relatives.
9. The method according to claim 7, characterized in that, The step of determining the kinship between the individual and the target relative by judging through the second relationship result and the second preset threshold includes: When the result of the second relationship is less than the second preset threshold, the relationship between the person and the target relative is determined to be that of distant relatives; When the second relationship result is greater than or equal to the second preset threshold, the kinship between the person and the target relative is determined to be that of close relatives.
10. A controller, characterized in that, include: The device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, performs the kinship determination method as described in any one of claims 1 to 9.