CN111522891A - Method and device for determining relationship closeness between two entities and electronic equipment - Google Patents

Method and device for determining relationship closeness between two entities and electronic equipment Download PDF

Info

Publication number
CN111522891A
CN111522891A CN202010631578.2A CN202010631578A CN111522891A CN 111522891 A CN111522891 A CN 111522891A CN 202010631578 A CN202010631578 A CN 202010631578A CN 111522891 A CN111522891 A CN 111522891A
Authority
CN
China
Prior art keywords
relationship
entity
entities
link
degree
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010631578.2A
Other languages
Chinese (zh)
Inventor
杨程远
李启睿
苏煜
章鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alipay Hangzhou Information Technology Co Ltd
Original Assignee
Alipay Hangzhou Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alipay Hangzhou Information Technology Co Ltd filed Critical Alipay Hangzhou Information Technology Co Ltd
Priority to CN202010631578.2A priority Critical patent/CN111522891A/en
Publication of CN111522891A publication Critical patent/CN111522891A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases
    • G06F16/288Entity relationship models
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/36Creation of semantic tools, e.g. ontology or thesauri
    • G06F16/367Ontology

Abstract

The specification discloses a method and a device for determining relationship closeness between two entities and electronic equipment. Wherein, the method comprises the following steps: acquiring a first-degree relation data set of a target entity, wherein the first-degree relation data set comprises a plurality of first-degree relation data, and the first-degree relation data is directly related relation data between two entities; determining a link taking a target entity as a starting point according to the first-degree relation data set to obtain a link set, wherein the link comprises a plurality of entities including the target entity, and other entities on the link are directly or indirectly related entities of the target entity; the closeness of relationship of the target entity to the other entities on the link is determined.

Description

Method and device for determining relationship closeness between two entities and electronic equipment
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method and an apparatus for determining closeness of relationship between two entities, and an electronic device.
Background
At present, more and more application scenes develop corresponding Knowledge graphs (Knowledge Graph). Taking enterprise knowledge graph as an example, the enterprise knowledge graph is generated by fusing enterprise data with the knowledge graph. The knowledge graph is composed of nodes (points) and edges (edges), each node represents an entity or concept existing in the real world, and each Edge is a relationship between the entities.
The number of entities in the knowledge graph developed based on the corresponding application scene is not large, so that only a small number of entities related to a certain entity can be found from the knowledge graph; and the knowledge graph does not provide the degree of closeness of the relationship between the entities, and cannot provide technical support for finding out important entities really needing attention from the entities having the relationship with a certain entity in the follow-up process.
Based on this, a new method of determining the closeness of a relationship between two entities is needed.
Disclosure of Invention
In view of this, the embodiments of the present disclosure provide a method for determining closeness of a relationship between two entities, so as to solve the problem that in the prior art, only a small number of entities having a relationship with a certain entity can be found from a knowledge graph; and the knowledge graph does not provide the degree of closeness of the relationship between the entities, and the knowledge graph cannot provide technical support for finding out important entities really needing attention from the related entities of a certain entity in the follow-up process.
The embodiment of the specification adopts the following technical scheme:
an embodiment of the present specification provides a method for determining closeness of relationship between two entities, including: acquiring a first-degree relation data set of a target entity, wherein the first-degree relation data set comprises a plurality of first-degree relation data, and the first-degree relation data is directly related relation data between two entities;
determining a link taking the target entity as a starting point according to the first-degree relation data set to obtain a link set, wherein the link comprises a plurality of entities including the target entity, and the other entities on the link are directly or indirectly related entities of the target entity;
determining a closeness of relationship of the target entity to another entity on the link.
An embodiment of the present specification further provides a method for determining closeness of relationship between two entities, including:
acquiring a first-degree relation data set of a target entity from a block chain network, wherein the first-degree relation data set comprises a plurality of first-degree relation data, and the first-degree relation data are directly related relation data between two entities;
calling a first intelligent contract deployed in the block link network, and executing a step of determining a link taking the target entity as a starting point according to the first-degree relation data set to obtain a link set, wherein the link comprises a plurality of entities including the target entity, and the other entities on the link are directly or indirectly related entities to the target entity;
invoking a second intelligent contract deployed in the blockchain network, and executing a step of determining relationship closeness of the target entity and another entity on the link;
storing the relationship closeness of the target entity with the other entities on the link into the blockchain network.
An embodiment of the present specification further provides an apparatus for determining closeness of relationship between two entities, including:
the system comprises an acquisition module, a first-degree relation module and a second-degree relation module, wherein the first-degree relation module is used for acquiring a first-degree relation data set of a target entity, the first-degree relation data set comprises a plurality of first-degree relation data, and the first-degree relation data is directly related to the relation data between two entities;
the processing module is used for determining a link taking the target entity as a starting point according to the first-degree relation data set to obtain a link set, wherein the link comprises a plurality of entities including the target entity, and other entities on the link are directly or indirectly related to the target entity;
the processing module further determines a closeness of relationship of the target entity to another entity on the link.
Embodiments of the present specification further provide an electronic device, including a memory and a processor, where the memory stores a program and is configured to execute the method for determining closeness of relationship between two entities described above by the processor.
The embodiment of the specification adopts at least one technical scheme which can achieve the following beneficial effects:
acquiring a first-degree relation data set of a target entity, wherein the first-degree relation data set comprises a plurality of first-degree relation data, and the first-degree relation data is directly related relation data between two entities; determining a link taking a target entity as a starting point according to the first-degree relation data set to obtain a link set, wherein the link comprises a plurality of entities including the target entity, and other entities on the link are directly or indirectly related entities of the target entity; the closeness of relationship of the target entity to the other entities on the link is determined. Therefore, a large number of entities related to the target entity can be found out through the first-degree relationship data set, and the relationship closeness between the target entity and the other entities on the link can be determined through one or more pieces of first-degree relationship data corresponding to the target entity and the other entities on the link, so that the important entities really needing attention can be conveniently found out from the entities related to the target entity in the following process, and technical support is provided.
Drawings
The accompanying drawings, which are included to provide a further understanding of the specification and are incorporated in and constitute a part of this specification, illustrate embodiments of the specification and together with the description serve to explain the specification and not to limit the specification in a non-limiting sense. In the drawings:
FIG. 1 is a flowchart illustrating a method for determining closeness of relationship between two entities according to an embodiment of the present disclosure;
FIG. 2 is a schematic diagram of an example link provided by an embodiment of the present specification;
FIG. 3 is a flowchart illustrating a method for determining closeness of relationship between two entities according to an embodiment of the present disclosure;
FIG. 4 is a schematic structural diagram of an apparatus for determining closeness of relationship between two entities according to an embodiment of the present disclosure;
FIG. 5 is a flowchart illustrating another method for determining closeness of relationship between two entities according to an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of an electronic device provided in an embodiment of the present specification.
Detailed Description
In order to make the objects, technical solutions and advantages of the present disclosure more clear, the technical solutions of the present disclosure will be clearly and completely described below with reference to the specific embodiments of the present disclosure and the accompanying drawings. It is to be understood that the embodiments described are only a few embodiments of the present disclosure, and not all embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present specification without any creative effort belong to the protection scope of the present specification.
In the real world, the number of entities having a relationship with a certain entity may be large, and the relationship between a certain entity and its related entities may be complicated. However, in most application scenarios, the number of entities having a relationship with a certain entity is not large, and the degree of the relationship between the certain entity and other entities having a relationship with the certain entity is small (the small degree of the relationship can be understood as that the number of edges connecting the certain entity and other entities is small, and the small degree of the relationship represents that the relationship between the certain entity and other entities is simple), and it is impossible to support a user to find an important entity that really needs to be concerned from a large number of entities having a relationship with the certain entity.
In order to solve the above technical problem, in the method for determining relationship closeness between two entities provided in the embodiment of the present specification, a first-degree relationship data set of a target entity is obtained, where the first-degree relationship data set includes a plurality of first-degree relationship data, and the first-degree relationship data is directly related relationship data between two entities; determining a link taking a target entity as a starting point according to the first-degree relation data set to obtain a link set, wherein the link comprises a plurality of entities including the target entity, and other entities on the link are directly or indirectly related entities of the target entity; the closeness of relationship of the target entity to the other entities on the link is determined. Therefore, a large number of entities related to the target entity can be found out through the first-degree relationship data set, and the relationship closeness between the target entity and the other entities on the link can be determined through one or more pieces of first-degree relationship data corresponding to the target entity and the other entities on the link, so that the important entities really needing attention can be conveniently found out from the entities related to the target entity in the following process, and technical support is provided.
The technical solutions provided by the embodiments of the present description are described in detail below with reference to the accompanying drawings.
The method of the embodiment of the specification can be applied to electronic equipment. The electronic device may be any type of electronic device, including but not limited to: the system comprises a mobile phone, a tablet personal computer, intelligent wearable equipment, a vehicle machine, a personal computer, a large and medium-sized computer, a computer cluster and the like.
Fig. 1 is a flowchart illustrating a method for determining relationship closeness between two entities according to an embodiment of the present disclosure, where as shown in fig. 1, the method for determining relationship closeness between two entities includes the following steps:
step 101, a first-degree relation data set of a target entity is obtained.
The first-degree relation data set belonging to the target entity comprises a plurality of first-degree relation data, and the first-degree relation data are directly related relation data between two entities.
In addition, the first-degree relationship data in the first-degree relationship data set may include first-degree relationship data directly related to the target entity, or may include first-degree relationship data indirectly related to the target entity. It is to be understood that one of the two entities associated with the first degree relationship data directly related to the target entity is the target entity. Any one of two entities associated with the first-degree relationship data indirectly related to the target entity is not the target entity but is an entity indirectly related to the target entity.
Referring to fig. 2, relationship data between two entities connected by each edge in fig. 2 is first-degree relationship data; the target entity is enterprise S, and the entities directly related to enterprise S include: enterprise A, enterprise E, nature A, enterprise T; entities indirectly related to enterprise S are enterprise B, enterprise F, natural person B, enterprise C, natural person C, and enterprise D.
It will be appreciated that the first degree relationship data records the relationship between two entities that are directly related. Wherein, two entities directly related to the first-degree relationship data, one entity is a starting entity, the other entity is a terminating entity, and the first-stage relationship is initiated by the starting entity and ends at the terminating entity. Referring to fig. 2, an entity pointed by an arrow of each edge in fig. 2 is a terminating entity, and an entity deviated by a corresponding arrow is a starting entity. In the first-degree relationship data corresponding to the directly related enterprise S and the enterprise a, the enterprise S is an initial entity, and the enterprise a is a termination entity. In the first-degree relation data corresponding to the directly related enterprise S and the natural person A, the enterprise S is a termination entity, and the natural person A is an initiation entity.
Optionally, each first-degree relationship data may record an ID and a relationship type of an entity associated with the first-degree relationship data, but is not limited thereto, where the relationship type represents what type of relationship between two entities associated with the first-degree relationship data. It should be noted that, when recording the ID of the associated entity, the first-degree relationship data also records whether the ID of the associated entity is the ID of the starting entity or the ID of the terminating entity.
It should be noted that the definition of the relationship type between entities differs based on different application scenarios. Taking the application scenario of the associator of the enterprise as an example, the relationship type may be defined as legal representative, high pipe, shareholder, through shareholder, natural person, phone number, mailbox address, etc.
For example, if a certain degree of relationship data characterizes that "business S is a legal representative of yellow certain", then the ID of the originating entity "business S", the ID of the terminating entity "yellow certain", and the relationship type "legal representative" of the originating entity "business S" and the terminating entity "yellow certain" may be recorded in the certain degree of relationship data.
For example, if a certain degree of relationship data is characterized in that "telephone number of business S is 16866668888", then the ID of the originating entity "business S", the ID of the terminating entity "16866668888", and the relationship type "telephone number" of the originating entity "business S" and the terminating entity "16866668888" may be recorded in the degree of relationship data.
For example, if a certain degree of relationship data represents that "the mailbox address of the business S is 666@1688. com", then the ID of the originating entity "business S", the ID of the terminating entity "666 @1688. com", and the relationship type "mailbox address" of the originating entity "business S" and the terminating entity "666 @1688. com" may be recorded in the degree of relationship data.
For example, if a certain degree of relationship data represents that "the address of the business S is a certain street and a certain building in a certain area of a certain city", then the ID of the starting entity "business S", the ID of the ending entity "a certain street and a certain building in a certain area of a city" and the relationship type "address" of the starting entity "business S" and the ending entity "a certain street and a certain building in a certain area of a city" may be recorded in the certain degree of relationship data.
TABLE 1
Name of field Field value
start_id ID of the initiating entity
start_name Name of the starting entity
end_id ID of terminating entity
end_name Name of terminating entity
rela_type Type of relationship
ext_info Extension information
Optionally, the first-degree relationship data may be recorded as structured data, for example, several fields in table 1 are used to record the first-degree relationship data, where a field start _ ID records an ID of a starting entity, a field start _ name records a name of the starting entity, a field end _ ID records an ID of a terminating entity, a field end _ name records a name of the terminating entity, a field rela _ type records a relationship type, and a field ext _ info may record extended information according to an actual situation, such as a specific address, a phone number, and related attribute information.
Along the above example, a certain degree of relationship data is characterized in that "the enterprise S is a legal representative of a yellow enterprise", then, the ID of the enterprise S recorded by the field start _ ID, the name of the enterprise S recorded by the field start _ name, the ID of the yellow enterprise recorded by the field end _ ID, the yellow enterprise recorded by the field end _ name, the legal representative recorded by the field rela _ type, and the related extension information may be recorded by the field ext _ info.
Step 103, according to the first-degree relationship data set, determining a link using the target entity as a starting point to obtain a link set, where the link includes multiple entities including the target entity, and another entity on the link is an entity directly or indirectly related to the target entity.
In the real world, the number of entities having a relationship with a certain entity may be large, and the relationship between a certain entity and its related entities may be complicated.
In the embodiment of the present specification, the determined first-degree relationship data set includes first-degree relationship data directly or indirectly related to the target entity, and it is understood that all entities related to the target entity can be found through the first-degree relationship data set. Of course, the greater the number of first-degree relationship data in the first-degree relationship data set, the greater the number of entities having a relationship with the target entity, and the greater the number of entities having a relationship with the target entity found based on the first-degree relationship data set. Therefore, a large number of entities related to the target entity can be found based on the first-degree relation data set, and problems existing in the real world can be well solved.
In this embodiment of the present specification, since the first-degree relationship data is relationship data between two directly related entities, querying the first-degree relationship data set may find the first-degree relationship data including a target entity (the target entity is a first entity on a link), and using another entity included in the queried first-degree relationship data as a second entity on a link; then, querying the first-degree relationship data set to find first-degree relationship data containing the second entity but not the first entity (the first entity is the target entity), and using another entity contained in the queried first-degree relationship data as a third entity on a link; in this way, the first-degree relation data set is queried, if the query is successful, the first-degree relation data including the entity queried last time but not including the entity queried historically can be found, and another entity included in the newly found first-degree relation data is used as an entity on one link; if the query fails, the entity which is queried last time is the last entity on a link. Therefore, one or more entities related to the target entity can be determined based on the first-degree relation data set, and then a link starting from the target entity is determined, so that a link set is obtained. The link set may include one or more links starting from the target entity.
Optionally, determining a link starting from the target entity according to the first-degree relationship data set includes determining a first entity related to the target entity; determining the degree of relation between the first entity and the target entity; and starting from the target entity, and sequentially associating two directly related entities in the first entity according to the sequence of the degree of relationship from small to large to obtain the link.
For ease of understanding, the degrees of relationship are presented here: the degree of relationship can be understood as the number of edges between two entities that are related. For two directly related entities, the number of edges connecting the two entities is one, and the degree of relationship between the two directly related entities is 1; for two indirectly related entities, the number of edges connecting the two entities is N, and the degree of relationship between the two indirectly related entities is N, where N is a positive integer greater than 1. Taking fig. 2 as an example, the degree of relationship between the enterprise S and the enterprise T is 1, the degree of relationship between the enterprise S and the natural person B is 2, the degree of relationship between the enterprise S and the natural person C is 3, and the degree of relationship between the enterprise S and the enterprise D is 4.
In the embodiment of the present specification, a first-degree relationship data set is searched, one or more first entities related to a target entity can be obtained, and the degree of relationship between each first entity and the target entity is also difficult to determine; and finally, taking the target entity as a first entity on the link, and associating two directly related entities in the first entity in sequence according to the sequence of the degree of relationship between the first entity and the target entity from small to large to obtain the link.
Continuing with the example of FIG. 2, by querying the first-degree relationship dataset, 4 links are determined. The first-degree propagation link sequentially comprises an enterprise S and an enterprise A; the second-degree transmission link sequentially comprises an enterprise S, an enterprise E and an enterprise B; the three-degree propagation link sequentially comprises an enterprise S, a natural person A, an enterprise F and an enterprise C; the four-degree propagation link sequentially comprises five entities of an enterprise S, an enterprise T, a natural person B, a natural person C and an enterprise D.
In practical situations, some entities may not be entities meeting business requirements, and in order to find an entity meeting business requirements, the target relationship type may be used as a query condition, the first-degree relationship data with the target relationship type is queried, and the entity on the link is determined according to the first-degree relationship data with the target relationship type. Thus, the relationship type between every two adjacent entities on the link with the target entity as the starting point is the target relationship type. The target relation type is determined according to specific service requirements.
Continuing with the example of analyzing the application scenario of the enterprise's affiliates, the user wants to focus on the affiliates that have a relationship type of legal representatives, high-pipe, stockholders, cut-through stockholders, nature, etc. with the enterprise, rather than on the phone number, mailbox address, address of the enterprise. Thus, the target relationship type may be one or more of legal representatives, high-pipe, stockholders, penetrative stockholders, natural persons, etc., and the relationship types of telephone numbers, mailbox addresses, etc. are not targeted relationship types.
Step 105, determining the closeness of relationship between the target entity and another entity on the link.
The link comprises at least two entities, and the other entities on the link are entities on the link except the target entity.
Specifically, one or more first degree relationship data corresponding to the target entity and another entity on the link may be determined; secondly, determining the relationship closeness of two directly related entities corresponding to the first-degree relationship data through analyzing the first-degree relationship data; and finally, calculating the relationship closeness of the target entity and the other entities on the link according to the relationship closeness of the two directly related entities.
The method for determining the relationship closeness between two entities provided in the embodiments of the present specification obtains a first-degree relationship data set of a target entity, where the first-degree relationship data set includes a plurality of first-degree relationship data, and the first-degree relationship data is relationship data between two directly related entities; determining a link taking a target entity as a starting point according to the first-degree relation data set to obtain a link set, wherein the link comprises a plurality of entities including the target entity, and other entities on the link are directly or indirectly related entities of the target entity; the closeness of relationship of the target entity to the other entities on the link is determined. Therefore, a large number of entities related to the target entity can be found out through the first-degree relationship data set, and the relationship closeness between the target entity and the other entities on the link can be determined through one or more pieces of first-degree relationship data corresponding to the target entity and the other entities on the link, so that the important entities really needing attention can be conveniently found out from the entities related to the target entity in the following process, and technical support is provided.
Optionally, on the basis of the foregoing embodiment, a specific implementation manner of step 101 is as follows: acquiring a plurality of original first-degree relation data directly or indirectly related to the target entity; and processing the original first-degree relation data to obtain a plurality of first-degree relation data, and further obtaining a first-degree relation data set of the target entity.
In embodiments of the present specification, raw first-degree relationship data that is directly or indirectly related to a target entity may be extracted from a data source that provides the target entity. Because the data source and the data format of the original first-degree relation data are very different, the original first-degree relation data need to be standardized to obtain standardized first-degree relation data.
Where raw first-degree relationship data may be understood as relationship data describing a particular type of relationship between two directly related entities. Along the above example, "business S is a legal representative of yellow, the" telephone number of business S is 16866668888, "the" address of business S is a street number of a certain city, "is an original first degree relationship data of business S.
Specifically, after a plurality of original first-degree relationship data directly or indirectly related to the target entity are acquired, the plurality of original first-degree relationship data may be processed to obtain a plurality of first-degree relationship data.
Optionally, the multiple original first-degree relationship data may be processed in the following manner to obtain multiple first-degree relationship data: performing ID mapping processing on two entities associated with each of a plurality of original first-degree relationship data, and determining IDs of the two entities associated with each of the plurality of original first-degree relationship data; determining a relationship type between two entities associated with each of the plurality of original first-degree relationship data; and determining a plurality of first-degree relation data according to the IDs of the two entities respectively associated with the plurality of original first-degree relation data and the relation type between the two entities.
It should be noted that, corresponding first-degree relation data can be obtained by processing one original first-degree relation data, and the original first-degree relation data and the first-degree relation data correspond to each other one by one. Taking table 1 as an example, the processed first-degree relationship data may be recorded as structured data. The processed one-degree relationship data is not limited to record the ID of the starting entity, the name of the starting entity, the ID of the terminating entity, the name of the terminating entity, the relationship type, and the extension information.
It can be understood that after the ID mapping processing is performed on the two entities associated with each original one-degree relationship data, the one-degree relationship data of the starting entity and the terminating entity can be uniquely identified by the ID of the starting entity and the ID of the terminating entity, so as to ensure the uniqueness of the one-degree relationship data.
When the entity is subjected to ID mapping, the entity may be assigned with a corresponding ID according to the name of the entity.
In order to ensure the uniqueness of the first-degree relationship data, when the entity is assigned with the corresponding ID, the entity may be assigned with the corresponding ID by combining the name of the entity and the attribute information of the entity. For example, there may be many different natural persons having the same name, and if the natural persons are assigned corresponding IDs based only on the names of the natural persons, the different natural persons may have the same ID. To avoid such a situation as much as possible, an ID specific to a natural person may be generated in combination with the name and certificate information of the natural person.
FIG. 3 is a flowchart illustrating a method for determining closeness of relationship between two entities according to an embodiment of the present disclosure. The present embodiment illustrates one possible implementation of step 105. Referring to fig. 3, determining the closeness of relationship of the target entity to the further entity on the link may specifically comprise the steps of:
in step 301, a first path from a target entity to another entity on a link is determined.
Step 303, on the first path, determining each entity from the target entity to another entity on the link.
And 305, determining the relationship compactness of each two adjacent entities according to the one-degree relationship data corresponding to each two adjacent entities to obtain a relationship compactness set.
And 307, multiplying the relationship closeness in the relationship closeness set to obtain the relationship closeness between the target entity and another entity on the link.
And determining that each entity between the target entity and another entity on the link comprises the target entity and the another entity, wherein each entity is an entity on the first path.
Continuing with the example of fig. 2, when the relationship closeness between the enterprise S and the natural person C on the four-degree propagation link is calculated, it is determined that the relationship closeness weight between the enterprise S and the enterprise T is 0.3, the relationship closeness weight between the enterprise T and the natural person B is 1.0, the relationship closeness weight between the natural person B and the natural person C is 1.0, and then the relationship closeness between the enterprise S and the natural person C is 0.3 × 1.0 × 1.0.
When the relationship compactness of an enterprise S and an enterprise D on a four-degree transmission link is calculated, the relationship compactness weight of the enterprise S and an enterprise T is determined to be 0.3, the relationship compactness weight of the enterprise T and a natural person B is 1.0, the relationship compactness weight of the natural person B and a natural person C is 1.0, the relationship compactness weight of the natural person C and the enterprise D is 0.6, and the relationship compactness of the enterprise S and the enterprise D is 0.3 multiplied by 1.0 multiplied by 0.6.
Optionally, determining the relationship closeness of each two adjacent entities according to the one-degree relationship data corresponding to each two adjacent entities includes: if the quantity of the first-degree relation data corresponding to the two adjacent entities is one, determining the relation closeness of the two adjacent entities according to the relation type in the first-degree relation data; if the number of the first-degree relation data corresponding to the two adjacent entities is multiple, determining a relation compactness according to the relation type in each first-degree relation data; and selecting the relationship compactness with the largest value from the plurality of relationship compactabilities as the relationship compactness of two adjacent entities.
Specifically, the first-degree relationship data set may be queried according to IDs of two adjacent entities, one or more first-degree relationship data including the two adjacent entities may be obtained, the found one or more first-degree relationship data may be analyzed, and relationship closeness between the two adjacent entities may be quantified.
TABLE 2
Name of field Field value
start_id ID of the initiating entity
end_id ID of terminating entity
weight Degree of closeness of relationship
rela_types Aggregated relationship types
ext_info Extension information
Optionally, the relationship quantization data includes an ID of the starting entity, an ID of the terminating entity, a relationship closeness of the starting entity and the terminating entity, and an aggregation relationship type, but is not limited thereto.
It is understood that the two adjacent entities are two directly related entities, and the relationship quantization data of the two directly related entities includes, but is not limited to, an ID of the starting entity, an ID of the terminating entity, a relationship closeness of the starting entity to the terminating entity, and an aggregation relationship type.
Optionally, the relationship quantization data of two directly related entities is recorded as structured data. For example, several fields in table 2 above are used to record relationship quantization data of two directly related entities, where a field start _ ID records an ID of a starting entity, a field end _ ID records an ID of a terminating entity, a field relay _ types records an aggregation relationship type, a field weight records a relationship compactness between the two entities, and a field ext _ info may record extended information such as a specific address, a phone number, and related attribute information according to actual situations.
TABLE 3
Type of relationship Key element
Legal representative Executing a transaction partner has a greater impact than a normal legal person.
Shareholder The strand holding absolute ratio is larger, and the influence is larger when the strand holding ratio is larger; the larger the strand holding ratio is, the larger the influence is; the high tube stockholder effect is relatively large.
High pipe The high management position, the director of the directors and the general manager have great influence.
Penetration of stockholder The larger the strand holding ratio, the larger the influence.
Natural person A relationship type; the number of relationship types; the degree of the relationship between natural people.
Telephone set The more the number of telephone enterprises, the less the influence.
Mailbox The more the number of the enterprises in the same mailbox is, the smaller the influence is.
Address The more the number of enterprises at the same address, the smaller the influence.
It is understood that the greater the closeness of relationship, the closer the relationship characterizing the originating entity and the terminating entity is; conversely, the smaller the closeness of the relationship, the more distant the relationship characterizing the originating entity and the terminating entity.
Alternatively, in quantifying the closeness of the relationship between the starting entity and the entity, two principles may be followed: 1. for the same relationship type, the relationship closeness is related to the attribute information of the associated entity. 2. And aiming at different relation types, transverse comparison is needed, and the quantitative objectivity of relation compactness is ensured as much as possible.
Taking an application scenario as an example of an association party of an analysis enterprise, the factors in table 3 above may be mainly considered when quantifying the relationship closeness of two directly related entities.
Wherein the aggregation relationship type characterizes a plurality of relationship types between the starting entity and the terminating entity. Referring to fig. 2, the relationship types of natural person a and business F include two types, which are a director and a legal, respectively, and at this time, (director, legal representative) is recorded to the field rela _ types.
When multiple relationship types exist between the starting entity and the terminating entity, the first-degree relationship data belonging to the starting entity and the terminating entity are multiple, the relationship types corresponding to different first-degree relationship data are different, and multiple relationship closeness exists correspondingly. For this case, it is necessary to aggregate a plurality of closeness of relationship attributed to the originating entity and the terminating entity. Alternatively, the polymerization may be carried out using the following formula (1).
W=max(W1,W2,W3,……)……(1)
In the formula (1), W1、W2、W3The same is the corresponding relationship compactness of different relationship types, W is the relationship compactness after polymerization1、W2、W3And the relationship compactness with the largest value among the plurality of relationship compactness is W.
Taking FIG. 2 as an example, Nature person A is the director and the legal of Enterprise F; one relationship type between the natural person A and the enterprise F is a director, and the closeness of the relationship corresponding to the director relationship type is 1; the other relationship type of the natural person A and the enterprise F is a legal person, and the relationship compactness corresponding to the legal person relationship type is 0.6; and aggregating the two relationship types, wherein the aggregated relationship compactness of the natural person A and the enterprise F is max (1, 0.6), and recording max (1, 0.6) into the field weight. Where max (1, 0.6) is understood to be the maximum value taken between 1 and 0.6.
TABLE 4
Name of field Field value
start_id ID of the initiating entity
end_id ID of terminating entity
path_weight Compactness of path relationships
path_relas Path relationships
ext_info Extension information
In embodiments of the present description, link data for a first path from a target entity to another entity on a link may be recorded as structured data. For example, several fields in the above table 4 are adopted to record link data, where a field start _ ID records an ID of a starting entity (i.e., an ID of a target entity), a field end _ ID records an ID of a terminating entity (i.e., another entity on a link), a field path _ weight records path relation compactness, a field path _ reload records path relation, and a field ext _ info can record extension information according to actual situations.
Referring to fig. 2, taking another entity on the link as the last entity on the link as an example:
the path relationship closeness of the one-degree propagation link is (0.3), wherein 0.3 is the relationship closeness of the enterprise S and the enterprise a. The path relationship of the first-degree propagation link is (shareholder), wherein the shareholder is the relationship type of the enterprise S and the enterprise a.
The path relationship closeness of the two-degree propagation link is (0.2, 1.0), where 0.2 is the relationship closeness of enterprise S and enterprise E, and 1.0 is the relationship closeness of enterprise E and enterprise B. The path relationship of the two-degree propagation link is (shareholder ), wherein the relationship type of the enterprise S and the enterprise E, and the relationship type of the enterprise E and the enterprise B.
The path relationship closeness of the three-degree propagation link is (0.2, 1.0, 0.3), where 0.2 is the relationship closeness of the enterprise S and the natural person a, 1.0 is the relationship closeness of the natural person a and the enterprise F, and 0.3 is the relationship closeness of the enterprise F and the enterprise C. The path relationship of the three-degree propagation link is (stockholder, (president, legal person representative) and historical stockholder), wherein the stockholder is the relationship type between the enterprise S and the natural person A, (president, legal person representative) is the relationship type between the natural person A and the enterprise F, and the historical stockholder is the relationship type between the enterprise F and the enterprise C. Wherein (president, legal representative) is the aggregation relationship type.
The path relationship closeness of the four-degree propagation link is (0.3, 1.0, 1.0, 0.6), where 0.3 is the relationship closeness of the enterprise S and the enterprise T, 1.0 is the relationship closeness of the enterprise T and the natural person B, 1.0 is the relationship closeness of the natural person B and the natural person C, and 0.6 is the relationship closeness of the natural person C and the enterprise D. The path relationship of the four-degree propagation link is (stockholder, natural person relationship, and legal person representative), wherein the relationship type between the enterprise S and the enterprise T and the relationship type corresponding to the enterprise T and the natural person B are stockholders, the natural person relationship is the relationship type between the natural person B and the natural person C, and the legal person representative is the relationship type between the natural person C and the enterprise D.
It is to be understood that, after determining link data of a first path for recording a target entity to another entity on the link, extracting each relationship affinity of the path relationship affinities from the link data, and multiplying each relationship affinity to obtain an association affinity of the target entity and the other entity on the link.
Taking the four-degree propagation link in fig. 2 as an example, the path weight of the four-degree propagation link is (0.3, 1.0, 1.0, 0.6), and the association affinity of the enterprise S and the enterprise D is a product of four association affinities, i.e., 0.3, 1.0, 1.0, 0.6.
In embodiments of the present specification, the affinity of the target entity to another entity on the link may be recorded as structured data. For example, the link data is recorded using several fields in table 5, where a field start _ ID records the ID of the starting entity (i.e., the ID of the target entity), a field end _ ID records the ID of the terminating entity (i.e., the additional entity on the link), and a field weight records the association affinity of the target entity with the additional entity on the link.
TABLE 5
Name of field Field value
start_id ID of the initiating entity
end_id ID of terminating entity
weight Closeness of association
In the method for determining relationship closeness between two entities provided in the embodiment of the present specification, when determining the relationship closeness between a target entity and another entity on a link, a first path from the target entity to the another entity on the link is first determined, then the relationship closeness between each two adjacent entities on the first path is determined, and finally the relationship closeness between each two adjacent entities is multiplied to obtain the relationship closeness between the target entity and the another entity on the link. Thereby, the closeness of relationship of the target entity to further entities on the link is determined more accurately.
In practical situations, it may happen that the target entity is given a smaller closeness of association with other entities of greater importance with which it is associated. For example, the determined closeness of relationship between two entities that are directly related is not reasonable, resulting in a lesser closeness of association being assigned between the target entity and other entities of greater importance with which it is related. As another example, there are more entities traversed by a first path from the target entity to another entity on the link, which first path is not reasonable to cause the target entity to be assigned a lesser affinity to other entities of greater importance to which it is related. Of course, there may be other factors that contribute to the lesser closeness of association between the target entity and other entities of greater importance to which it is related, and are not limited to the above illustration.
Optionally, on the basis of the foregoing embodiment, after determining the relationship closeness between the target entity and another entity on the link, it may also be determined whether the another entity on the link is a preset entity that needs to perform relationship closeness improvement processing; and if so, improving the relationship closeness of the target entity and the other entities on the link.
Specifically, after determining that the further entity on the link belongs to the preset entity, the association closeness of the target and the further entity on the link is improved. Therefore, the situation that the target entity is endowed with smaller association closeness with other related important entities is avoided as much as possible, and the important entities really needing attention can be found out from the entities related to the target entity more reasonably and accurately.
TABLE 6
One degree Two degrees Three degrees
Parent company Control enterprise of parent company, high management of parent company
Important enterprise stockholder
Important individual shareholder Control enterprise of important individual shareholder, important individual shareholder Important individual shareholder
Subsidiary company
Enterprises with important investments
High pipe High-management control enterprise and high-management relatives High-management relatives' control enterprise
It should be noted that, in different application scenarios, a preset entity that needs to perform the association affinity improvement processing may be set according to an actual service requirement. Taking an application scenario as an example of analyzing an association party of an enterprise, an association party having a relationship type in table 6 above with the enterprise can be set as a preset entity by referring to an association party definition of "enterprise accounting criteria", and if the association party and the enterprise have a relationship type in table 6, policy is applied to the relationship affinity between the enterprise and the association party, so that the relationship affinity between the enterprise and an important association party has a large value, and the important association party of the enterprise can be found out more reasonably and accurately in the following process.
In practical situations, situations may arise which result in a higher closeness of association being assigned between the target entity and other entities with which it is associated, since the link parameters of the first path of the target entity to further entities on the link are not taken into account. Therefore, after determining the relationship closeness between the target entity and the other entity on the link by multiplying the relationship closeness between the target entity and the other entity on the link on the first path from the target entity to the other entity on the link, the relationship closeness between the target entity and the other entity on the link can be reduced according to the link parameters, thereby more reasonably correcting the relationship closeness between the target entity and the other entity on the link. The link parameters include at least one of the following parameters, such as the degree of relation, the number of propagation reversals, but not limited thereto.
In an embodiment of the present specification, each edge in the first path from the target entity to the other entity on the link is directional, and the positive direction of each edge points to the terminating entity for the starting entity to which the edge is connected. In order to determine the propagation reverse times of the first path, the propagation forward direction needs to be defined in advance. The positive propagation direction is defined, for example, as: the direction in which the first entity points to the second entity in the link is the positive direction. Taking fig. 2 as an example, the direction in which the enterprise s points to the enterprise a is the forward propagation direction, the propagation reverse frequency of the three-degree propagation link is 2 times, and the propagation reverse frequency of the four-degree propagation link is 1 time.
It is understood that if the degree of the relationship between the target entity and the other entity on the link is greater, it indicates that the relationship between the target entity and the other entity on the link is more distant. Specifically, a threshold of the degree of relationship may be set according to an actual situation, and if the degree of relationship between the target entity and the other entity on the link is greater than the set threshold, it is determined that the degree of relationship between the target entity and the other entity on the link is greater, and then the closeness of relationship between the determined target entity and the other entity on the link is reduced; and if the degree of the relationship between the target entity and the other entity on the link is not greater than the set threshold, determining that the degree of the relationship between the target entity and the other entity on the link is smaller, and at this time, reducing the determined closeness of the relationship between the target entity and the other entity on the link is not needed.
When the reduction processing is performed based on the degree of the relationship, the change width of the degree of the relationship is proportional to the degree of the relationship. Optionally, a correspondence between the degree of the relationship and the change width of the relationship closeness may be set, and the change width of the relationship closeness reduction processing may be determined based on the correspondence. For example, if the degree of relationship is 4, the change width of the relationship closeness is 0.03, and 0.03 is subtracted from the original relationship closeness in the reduction processing; when the degree of the relation is 3, the change amplitude of the relation compactness is 0.02, and 0.02 is subtracted on the basis of the original relation compactness in the reduction processing; when the degree of relation is 2, the change width of the degree of relation compactness is 0.01, and 0.01 is subtracted from the original degree of relation compactness in the reduction processing.
In this embodiment of the present specification, the number of propagation directions of the first path from the target entity to the other entity on the link is large, and it is also necessary to perform reduction processing on the determined relationship closeness between the target entity and the other entity on the link. Specifically, a threshold of the number of propagation directions may be set according to an actual situation, and if the number of propagation directions of the first path from the target entity to the other entity on the link is greater than the set threshold, it is determined that the number of propagation directions of the first path from the target entity to the other entity on the link is greater, and then the determined relationship closeness between the target entity and the other entity on the link is reduced; if the number of times of the propagation direction of the first path from the target entity to the other entity on the link is not greater than the set threshold, it is determined that the number of times of the propagation direction of the first path from the target entity to the other entity on the link is small, and it is not necessary to perform reduction processing on the determined relationship closeness between the target entity and the other entity on the link.
When the reduction processing is performed based on the propagation direction frequency, the change width of the relationship closeness is proportional to the propagation direction frequency. Optionally, a correspondence between the number of times of the propagation direction and the change width of the relationship compactness may be set, and the change width of the relationship compactness reduction processing may be determined based on the correspondence. For example, if the number of propagation direction times is 4, and the variation width of the relationship closeness is 0.03, 0.03 is subtracted from the original relationship closeness in the reduction processing; when the number of times of the propagation direction is 3, the change amplitude of the relationship compactness is 0.02, and 0.02 is subtracted on the basis of the original relationship compactness in the reduction processing; when the number of times of propagation direction is 2, the change width of the relationship compactness is 0.01, and 0.01 is subtracted from the original relationship compactness in the reduction processing.
It should be noted that the reduction and the increase of the determined relationship closeness of the target entity to another entity on the link may be performed all or only one of them, depending on the actual situation.
On the basis of the above embodiment, after determining the relationship closeness between the target entity and another entity on the link, a core entity meeting a preset condition may be selected from the other entities on the link according to the relationship closeness between the target entity and the other entities on the link, where the preset condition includes at least one of a first condition and a second condition; the first condition is that the association compactness with the target entity is greater than a preset threshold value; the second condition is that after the relevance closeness degrees are sorted in a descending order, the relevance closeness degrees are sorted in front of the relation closeness degrees of the target entities; and generating a core relation network according to the target entity and each core entity. The specific numerical value of the preset threshold and the numerical value of the serial number in the front of the sequence can be set according to the actual situation.
In particular, based on determining the closeness of relationship between the target entity and each of the other entities on the link, a more important core entity related to the target entity may be selected from the link. The core entity is an entity with a high relationship closeness with the target entity. After one or more core entities are selected from the one or more links, a core relationship network may be generated based on the target entity and the respective core entities.
Taking the application scenario of the association party of the enterprise as an example, a core relationship network of the target enterprise can be established, which is beneficial to analyzing the association risk of the enterprise. For example, in addition to financial fraud behavior of a listed business being analyzed from its own financial data, the stakeholders of the listed business are also important dimensions that indirectly characterize their risk. However, the listed enterprises are usually relatively complex in equity investment and the like, and the number of the related parties is extremely large, so that important target related parties can be found by constructing a core relationship network of the listed enterprises, the review range of the listed enterprises is reduced, and the potential risks of the listed enterprises are mined more accurately and efficiently. Of course, the core relationship network can also help the supervisor to determine the important links of the enterprise needing supervision, and the efficiency of the supervisor in searching for the associated transactions of the enterprise is improved.
The embodiment of the specification also provides a device for determining the relationship compactness between two entities. FIG. 4 is a block diagram illustrating an apparatus for determining closeness of relationship between two entities according to an embodiment of the present disclosure. As shown in fig. 4, the apparatus for determining the closeness of relationship between two entities comprises:
the acquiring module 10 acquires a first-degree relationship data set of a target entity, wherein the first-degree relationship data set comprises a plurality of first-degree relationship data, and the first-degree relationship data is directly related relationship data between two entities;
the processing module 20 determines, according to the first-degree relationship data set, a link using the target entity as a starting point to obtain a link set, where the link includes multiple entities including the target entity, and another entity on the link is an entity directly or indirectly related to the target entity;
the processing module 20 further determines the closeness of relationship of the target entity to the further entity on the link.
The apparatuses provided in this specification correspond to the methods provided in this application one to one, and therefore, the apparatuses also have advantageous technical effects similar to the methods, and since the advantageous technical effects of the methods have been described in detail above, the advantageous technical effects of the apparatuses are not described herein again.
Embodiments of the present specification also provide a method for determining closeness of relationship between two entities. The embodiment provides a method for determining the relationship closeness between two entities based on a block chain technology, and for understanding, related knowledge of a block chain is briefly introduced:
a Block Chain Network (Block Chain Network) is a brand new distributed infrastructure and a computing mode, wherein a Block Chain type data structure is used for verifying and storing data, a distributed node consensus algorithm is used for generating and updating the data, a cryptology mode is used for ensuring the safety of data transmission and access, and an intelligent contract consisting of automatic script codes is used for programming and operating the data. The blockchain network is composed of a plurality of nodes, and when each node broadcasts information or blocks to the blockchain network, all the nodes can receive the information or blocks and verify the received blocks. When the ratio of the number of the nodes passing the block verification to the total number of the nodes in the whole block chain network is larger than a preset threshold value, the block chain network is determined to pass the block verification, and all the nodes receive the block and store the block in a local node space. A node may be understood as an electronic device having a storage function, such as a server or a terminal. The blockchain network is mainly divided into a public chain, a federation chain and a private chain.
The Block chain (Block chain) may be understood as a data chain formed by sequentially storing a plurality of blocks, and a Block header of each Block includes a time stamp of the Block, a hash value of previous Block information, and a hash value of the Block information, thereby implementing mutual authentication between the blocks and forming a non-falsifiable Block chain. Each block can be understood as a data block (unit of storage data). The block chain as a decentralized database is a series of data blocks generated by correlating with each other by using a cryptographic method, and each data block contains information of one network transaction, which is used for verifying the validity (anti-counterfeiting) of the information and generating the next block. The block chain is formed by connecting the blocks end to end. If the data in the block needs to be modified, the contents of all blocks after the block need to be modified, and the data backed up by all nodes in the block chain network needs to be modified. Therefore, the blockchain has the characteristic of being difficult to tamper and delete, and the blockchain has reliability as a method for keeping the integrity of the content after the data is stored in the blockchain.
The block chain technology mainly has the following four characteristics:
(1) decentralization: and point-to-point transaction, coordination and cooperation can be realized without the intervention of a third party. In the blockchain network, no mechanism or person can realize the control of global data, and the stop of any node does not influence the overall operation of the system, so that the decentralized network can greatly improve the data security.
(2) Non-tamper-proof property: the block chain verifies and stores data by using an encryption technology, newly adds and updates data by using a distributed consensus algorithm, and needs each node to participate in verification transaction and block output; and all subsequent records need to be changed when any data is modified, and the difficulty in modifying the data of a single node is great.
(3) Transparent and traceability are disclosed: the written block content copies the backup to each node, each node has the latest full database copy and all the record information is public. Any person can query the tile data through the open interface. Each transaction in the block chain is solidified into block data through chain storage, and meanwhile, all transaction records of all blocks are subjected to overlapping HASH (HASH) summarization processing through a cryptographic algorithm, so that any historical transaction data can be traced.
(4) Collective maintainability: the decentralized nature of the blockchain network determines its collective maintainability. Traditional centralization mechanisms typically have three roles: data stores, data managers, and data analysts. The blockchain network is then maintained in a peer-to-peer manner by the participants together. The authority of each party is clear, and the mutual cooperation is realized without giving away the right to a third-party organization.
The key technology of the block chain mainly relates to the following aspects:
(1) a consensus mechanism: since there is no center in the blockchain system, a preset rule is needed to guide each node to reach the agreement on data processing, and all data interaction is performed according to strict rules and consensus.
(2) The cryptography technology comprises the following steps: the cryptography technology is one of the core technologies of the blockchain, and the current blockchain application adopts a plurality of classical algorithms of modern cryptography, which mainly comprise: hash algorithms, symmetric encryption, asymmetric encryption, digital signatures, and the like.
(3) Distributed storage: the block chain is a distributed account book on a point-to-point network, and each participating node independently and completely stores and writes block data information. The advantages of distributed storage over traditional centralized storage are mainly reflected in two aspects: first, data information is backed up on each node, and data loss caused by single point failure is avoided. And secondly, the data on each node is independently stored, so that the historical data can be effectively prevented from being maliciously tampered by others.
(4) Intelligent contract: smart contracts allow for trusted transactions without a third party, and contracts will automatically execute transactions whenever one party achieves a pre-established goal of the agreement. These transactions are traceable and irreversible. The intelligent contract has the advantages of transparency, credibility, automatic execution and forced performance.
Fig. 5 is a flowchart illustrating another method for determining relationship closeness between two entities according to an embodiment of the present specification, where, as shown in fig. 5, the method for determining relationship closeness between two entities includes the following steps:
step 501, a first-degree relation data set of a target entity is obtained from a block chain network, the first-degree relation data set comprises a plurality of first-degree relation data, and the first-degree relation data is directly related to relation data between two entities.
Specifically, the blockchain network is a decentralized and tamper-resistant P2P (Peer to Peer) network, and there are no centralized servers and various hierarchies in the network architecture of the blockchain network, each node is Peer-to-Peer, and the nodes provide network services together. The blockchain network may be, but is not limited to, a public chain network, a private chain network, a federation chain network.
In the embodiment of the present specification, the first-degree relationship data set of the target entity may be stored in the blockchain network in advance in a form of a block, and the first-degree relationship data set of the target entity is protected from being tampered by being stored in the blockchain network, so as to avoid affecting accuracy of a link of the target entity for subsequent analysis and accuracy of calculating relationship closeness between entities as much as possible.
For more discussion on implementations of determining a one-degree-relationship dataset for a target entity, reference may be made to the foregoing embodiments.
Step 503, invoking a first intelligent contract deployed in the block link network, and executing a step of determining a link starting from the target entity according to the first-degree relationship data set to obtain a link set, where the link includes multiple entities including the target entity, and another entity on the link is an entity directly or indirectly related to the target entity.
Optionally, the first intelligent contract deployed in the blockchain network is called, and the following steps are specifically executed: determining a first entity related to the target entity; determining a degree of relationship between the first entity and the target entity; and starting from the target entity, and sequentially associating two directly related entities in the first entity according to the sequence of the degree of relationship from small to large to obtain the link.
For more description of the implementation of determining the link, reference may be made to the foregoing embodiments.
Step 505, invoking a second intelligent contract deployed in the blockchain network, and executing the step of determining the relationship closeness between the target entity and another entity on the link.
Optionally, a second intelligent contract deployed in the blockchain network is called, and the following steps are specifically executed: determining a first path from the target entity to a further entity on the link; determining, on the first path, respective entities from the target entity to further entities on the link; for each entity, determining the relationship compactness of each two adjacent entities according to the one-degree relationship data corresponding to each two adjacent entities to obtain a relationship compactness set; and multiplying the relationship closeness in the relationship closeness set to obtain the relationship closeness of the target entity and other entities on the link.
For more description of implementations for determining closeness of relationship, reference may be made to the foregoing embodiments.
In embodiments of the present description, a blockchain network may include a plurality of network nodes, a first intelligent contract may be deployed in one network node of the blockchain network, and a second intelligent contract may also be deployed in one network node of the blockchain network. The network node where the first intelligent contract is located and the network node where the second intelligent contract is located may be the same or different. The first intelligent contract can perform link calculation based on the first-degree relation data set, and the second intelligent contract can calculate the relation closeness between two entities on the link. The first intelligent contract and the second intelligent contract can be intelligent contracts written by a high-level language of a computer according to actual service requirements; or an intelligent contract created by a user only setting some parameters and triggering conditions based on a specific contract template.
The first intelligent contract and the second intelligent contract in this embodiment are divided from a functional perspective, that is, the first intelligent contract and the second intelligent contract perform different functions. If the partitioning is done programmatically, the first intelligent contract and the second intelligent contract may be two different functional modules in the same intelligent contract. Of course, the first intelligent contract and the second intelligent contract may also be two different intelligent contracts.
In this embodiment, the step of invoking the first intelligent contract to perform the link calculation based on the first-degree relationship data set and the step of invoking the second intelligent contract to perform the calculation of the relationship closeness between the two entities on the link may adopt a specific implementation manner corresponding to the foregoing embodiment.
Step 507, storing the relationship closeness of the target entity and the other entity on the link into the block chain network.
In the embodiment of the present specification, the relationship closeness between the target entity and the other entity on the link is stored in the blockchain network, so that the security of the relationship closeness between the target entity and the other entity on the link can be ensured, and the target entity and the other entity on the link are not easily tampered.
In the method for determining the relationship closeness between two entities provided in the embodiment of the present specification, a large number of entities having a relationship with a target entity may be found out through a one-degree relationship data set, and the relationship closeness between the target entity and another entity on a link may be determined through one or more one-degree relationship data corresponding to the target entity and the another entity on the link, so as to facilitate to subsequently find an important entity really needing attention from the entities having a relationship with the target entity, and provide technical support. Meanwhile, due to the characteristics of non-tamper property and high safety of the block chain, the relationship tightness between the two entities can be determined more accurately, the safety of the relationship tightness between the two entities can be ensured, and the block chain is not easy to tamper.
On the basis of the above embodiment, optionally, the method further includes the following steps: receiving an inquiry request of a service party, wherein the inquiry request is used for inquiring the relationship closeness of the target entity and each other entity on the link; according to the query request, obtaining the relationship closeness of the target entity and each other entity on the link which are stored in advance from the block chain network; and sending the acquired relationship closeness between the target entity and each other entity on the link to the service party.
Specifically, the service party has a requirement that the relationship closeness of the target entity to each other entity on the link is required for service analysis, for example, the service requirement of the service party is a core relationship network that needs to determine the target entity. The relationship closeness between the target entity provided to the service party and each other entity on the link is stored in the block chain network, and due to the characteristics of non-tamper-ability and high security of the block chain, the service party acquires safe and reliable data, and certainly, the core relationship network of the target entity can be accurately established. As an example, the way for a business party to build a core relationship network is as follows: selecting a core entity meeting a preset condition from each other entity on the link according to the relationship closeness between the target entity and each other entity on the link, wherein the preset condition comprises at least one of a first condition and a second condition; the first condition is that the association compactness with the target entity is greater than a preset threshold value; the second condition is that after the relevance closeness degrees are sorted in a descending order, the relevance closeness degrees are sorted in front of the relation closeness degrees of the target entities; and generating a core relation network according to the target entity and each core entity.
Embodiments of the present specification also provide a non-volatile computer storage medium storing computer-executable instructions configured to:
acquiring a first-degree relation data set of a target entity, wherein the first-degree relation data set comprises a plurality of first-degree relation data, and the first-degree relation data is directly related relation data between two entities;
determining a link taking the target entity as a starting point according to the first-degree relation data set to obtain a link set, wherein the link comprises a plurality of entities including the target entity, and the other entities on the link are directly or indirectly related entities of the target entity;
determining a closeness of relationship of the target entity to another entity on the link; alternatively, the computer-executable instructions are configured to:
acquiring a first-degree relation data set of a target entity from a block chain network, wherein the first-degree relation data set comprises a plurality of first-degree relation data, and the first-degree relation data are directly related relation data between two entities;
calling a first intelligent contract deployed in the block link network, and executing a step of determining a link taking the target entity as a starting point according to the first-degree relation data set to obtain a link set, wherein the link comprises a plurality of entities including the target entity, and the other entities on the link are directly or indirectly related entities to the target entity;
invoking a second intelligent contract deployed in the blockchain network, and executing a step of determining relationship closeness of the target entity and another entity on the link;
storing the relationship closeness of the target entity with the other entities on the link into the blockchain network.
The embodiment of the specification also provides electronic equipment. Fig. 6 is a schematic structural diagram of an electronic device provided in an embodiment of the present specification. As shown in fig. 6, the electronic apparatus includes: a processor 11 and a memory 12, the memory 12 storing a program and being configured to perform the following steps by the processor 11:
acquiring a first-degree relation data set of a target entity, wherein the first-degree relation data set comprises a plurality of first-degree relation data, and the first-degree relation data is directly related relation data between two entities;
determining a link taking the target entity as a starting point according to the first-degree relation data set to obtain a link set, wherein the link comprises a plurality of entities including the target entity, and the other entities on the link are directly or indirectly related entities of the target entity;
determining a closeness of relationship of the target entity to another entity on the link; or, configured to perform, by the processor 11, the steps of:
acquiring a first-degree relation data set of a target entity from a block chain network, wherein the first-degree relation data set comprises a plurality of first-degree relation data, and the first-degree relation data are directly related relation data between two entities;
calling a first intelligent contract deployed in the block link network, and executing a step of determining a link taking the target entity as a starting point according to the first-degree relation data set to obtain a link set, wherein the link comprises a plurality of entities including the target entity, and the other entities on the link are directly or indirectly related entities to the target entity;
invoking a second intelligent contract deployed in the blockchain network, and executing a step of determining relationship closeness of the target entity and another entity on the link;
storing the relationship closeness of the target entity with the other entities on the link into the blockchain network.
In the 90 s of the 20 th century, improvements in a technology could clearly distinguish between improvements in hardware (e.g., improvements in circuit structures such as diodes, transistors, switches, etc.) and improvements in software (improvements in process flow). However, as technology advances, many of today's process flow improvements have been seen as direct improvements in hardware circuit architecture. Designers almost always obtain the corresponding hardware circuit structure by programming an improved method flow into the hardware circuit. Thus, it cannot be said that an improvement in the process flow cannot be realized by hardware physical modules. For example, a Programmable Logic Device (PLD), such as a Field Programmable Gate Array (FPGA), is an integrated circuit whose Logic functions are determined by programming the Device by a user. A digital system is "integrated" on a PLD by the designer's own programming without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips. Furthermore, nowadays, instead of manually making an integrated Circuit chip, such Programming is often implemented by "logic compiler" software, which is similar to a software compiler used in program development and writing, but the original code before compiling is also written by a specific Programming Language, which is called Hardware Description Language (HDL), and HDL is not only one but many, such as abel (advanced Boolean Expression Language), ahdl (alternate Language Description Language), traffic, pl (core unified Programming Language), HDCal, JHDL (Java Hardware Description Language), langue, Lola, HDL, laspam, hardsradware (Hardware Description Language), vhjhd (Hardware Description Language), and vhigh-Language, which are currently used in most common. It will also be apparent to those skilled in the art that hardware circuitry that implements the logical method flows can be readily obtained by merely slightly programming the method flows into an integrated circuit using the hardware description languages described above.
The controller may be implemented in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, an Application Specific Integrated Circuit (ASIC), a programmable logic controller, and an embedded microcontroller, examples of which include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320, the memory controller may also be implemented as part of the control logic for the memory. Those skilled in the art will also appreciate that, in addition to implementing the controller as pure computer readable program code, the same functionality can be implemented by logically programming method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers and the like. Such a controller may thus be considered a hardware component, and the means included therein for performing the various functions may also be considered as a structure within the hardware component. Or even means for performing the functions may be regarded as being both a software module for performing the method and a structure within a hardware component.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. One typical implementation device is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functions of the various elements may be implemented in the same one or more software and/or hardware implementations of the present description.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices, or any other non-transmission medium which can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
This description may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only an example of the present specification, and is not intended to limit the present specification. Various modifications and alterations to this description will become apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present specification should be included in the scope of the claims of the present specification.

Claims (15)

1. A method of determining closeness of a relationship between two entities, comprising:
acquiring a first-degree relation data set of a target entity, wherein the first-degree relation data set comprises a plurality of first-degree relation data, and the first-degree relation data is directly related relation data between two entities;
determining a link taking the target entity as a starting point according to the first-degree relation data set to obtain a link set, wherein the link comprises a plurality of entities including the target entity, and the other entities on the link are directly or indirectly related entities of the target entity;
determining a closeness of relationship of the target entity to another entity on the link.
2. The method of claim 1, the determining, from the first-degree relationship data set, a link starting at the target entity comprising:
determining a first entity related to the target entity;
determining a degree of relationship between the first entity and the target entity;
and starting from the target entity, and sequentially associating two directly related entities in the first entity according to the sequence of the degree of relationship from small to large to obtain the link.
3. The method of claim 1, said determining the closeness of relationship of the target entity to the further entity on the link comprising:
determining a first path from the target entity to a further entity on the link;
determining, on the first path, respective entities from the target entity to further entities on the link;
for each entity, determining the relationship compactness of each two adjacent entities according to the one-degree relationship data corresponding to each two adjacent entities to obtain a relationship compactness set;
and multiplying the relationship closeness in the relationship closeness set to obtain the relationship closeness of the target entity and other entities on the link.
4. The method of claim 3, wherein determining the relationship closeness of each two adjacent entities according to the one-degree relationship data corresponding to each two adjacent entities comprises:
if the quantity of the first-degree relation data corresponding to the two adjacent entities is one, determining the relation closeness of the two adjacent entities according to the relation type in the first-degree relation data;
if the number of the first-degree relationship data corresponding to the two adjacent entities is multiple, determining a relationship compactness according to the relationship type in each first-degree relationship data;
and selecting the relationship compactness with the largest value from the plurality of relationship compactabilities as the relationship compactness of two adjacent entities.
5. The method of claim 1, further comprising, after said determining the closeness of relationship of the target entity to the other entity on the link:
judging whether other entities on the link are preset entities needing relationship compactness improving processing or not;
and if so, improving the relationship closeness of the target entity and the other entities on the link.
6. The method of claim 1, further comprising, after said determining the closeness of relationship of the target entity to the other entity on the link:
determining link parameters of a first path from the target entity to another entity on the link, the link parameters including at least one of a degree of relationship, a number of propagation reversals;
and reducing the relationship closeness of the target entity and other entities on the link according to the link parameters.
7. The method of claim 1, the obtaining a first-degree relationship data set of a target entity comprising:
acquiring a plurality of original first-degree relation data directly or indirectly related to the target entity;
and processing the original first-degree relation data to obtain a plurality of first-degree relation data, and further obtaining a first-degree relation data set of the target entity.
8. The method of claim 7, wherein the processing the raw one-degree relationship data into a plurality of one-degree relationship data comprises:
performing ID mapping processing on the two entities associated with the original first-degree relationship data respectively, and determining the IDs of the two entities associated with the original first-degree relationship data respectively;
determining a relationship type between two entities associated with each of the plurality of original first-degree relationship data;
and determining a plurality of first-degree relation data according to the IDs of the two entities respectively associated with the plurality of original first-degree relation data and the relation type between the two entities.
9. The method of any of claims 1-8, further comprising, after said determining a closeness of relationship of said target entity to a further entity on said link:
selecting a core entity meeting a preset condition from each other entity on the link according to the relationship closeness between the target entity and each other entity on the link, wherein the preset condition comprises at least one of a first condition and a second condition; the first condition is that the association compactness with the target entity is greater than a preset threshold value; the second condition is that after the relevance closeness degrees are sorted in a descending order, the relevance closeness degrees are sorted in front of the relation closeness degrees of the target entities;
and generating a core relation network according to the target entity and each core entity.
10. A method of determining closeness of a relationship between two entities, comprising:
acquiring a first-degree relation data set of a target entity from a block chain network, wherein the first-degree relation data set comprises a plurality of first-degree relation data, and the first-degree relation data are directly related relation data between two entities;
calling a first intelligent contract deployed in the block link network, and executing a step of determining a link taking the target entity as a starting point according to the first-degree relation data set to obtain a link set, wherein the link comprises a plurality of entities including the target entity, and the other entities on the link are directly or indirectly related entities to the target entity;
invoking a second intelligent contract deployed in the blockchain network, and executing a step of determining relationship closeness of the target entity and another entity on the link;
storing the relationship closeness of the target entity with the other entities on the link into the blockchain network.
11. The method of claim 10, wherein invoking the first intelligent contract deployed in the blockchain network specifically performs the following steps:
determining a first entity related to the target entity;
determining a degree of relationship between the first entity and the target entity;
and starting from the target entity, and sequentially associating two directly related entities in the first entity according to the sequence of the degree of relationship from small to large to obtain the link.
12. The method of claim 10, wherein invoking the second intelligent contract deployed in the blockchain network specifically performs the following steps:
determining a first path from the target entity to a further entity on the link;
determining, on the first path, respective entities from the target entity to further entities on the link;
for each entity, determining the relationship compactness of each two adjacent entities according to the one-degree relationship data corresponding to each two adjacent entities to obtain a relationship compactness set;
and multiplying the relationship closeness in the relationship closeness set to obtain the relationship closeness of the target entity and other entities on the link.
13. The method of claim 10, further comprising:
receiving an inquiry request of a service party, wherein the inquiry request is used for inquiring the relationship closeness of the target entity and each other entity on the link;
according to the query request, obtaining the relationship closeness of the target entity and each other entity on the link which are stored in advance from the block chain network;
and sending the acquired relationship closeness between the target entity and each other entity on the link to the service party.
14. An apparatus for determining closeness of a relationship between two entities, comprising:
the system comprises an acquisition module, a first-degree relation module and a second-degree relation module, wherein the first-degree relation module is used for acquiring a first-degree relation data set of a target entity, the first-degree relation data set comprises a plurality of first-degree relation data, and the first-degree relation data is directly related to the relation data between two entities;
the processing module is used for determining a link taking the target entity as a starting point according to the first-degree relation data set to obtain a link set, wherein the link comprises a plurality of entities including the target entity, and other entities on the link are directly or indirectly related to the target entity;
the processing module further determines a closeness of relationship of the target entity to another entity on the link.
15. An electronic device comprising a memory and a processor, the memory storing a program and configured to perform the method of determining relationship closeness between two entities of any of claims 1-9 or the method of determining relationship closeness between two entities of any of claims 10-13 by the processor.
CN202010631578.2A 2020-07-03 2020-07-03 Method and device for determining relationship closeness between two entities and electronic equipment Pending CN111522891A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010631578.2A CN111522891A (en) 2020-07-03 2020-07-03 Method and device for determining relationship closeness between two entities and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010631578.2A CN111522891A (en) 2020-07-03 2020-07-03 Method and device for determining relationship closeness between two entities and electronic equipment

Publications (1)

Publication Number Publication Date
CN111522891A true CN111522891A (en) 2020-08-11

Family

ID=71911750

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010631578.2A Pending CN111522891A (en) 2020-07-03 2020-07-03 Method and device for determining relationship closeness between two entities and electronic equipment

Country Status (1)

Country Link
CN (1) CN111522891A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106817251A (en) * 2016-12-23 2017-06-09 烟台中科网络技术研究所 A kind of link prediction method and device based on node similarity
CN107889082A (en) * 2017-11-01 2018-04-06 南京邮电大学 A kind of D2D method for discovering equipment using social networks between user
US20190311025A1 (en) * 2014-12-09 2019-10-10 Aiparc Holdings Pte. Ltd. Methods and systems for modeling complex taxonomies with natural language understanding
US20190361966A1 (en) * 2014-12-09 2019-11-28 AlPARC HOLDINGS PTE. LTD. Graphical systems and methods for human-in-the-loop machine intelligence

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190311025A1 (en) * 2014-12-09 2019-10-10 Aiparc Holdings Pte. Ltd. Methods and systems for modeling complex taxonomies with natural language understanding
US20190361966A1 (en) * 2014-12-09 2019-11-28 AlPARC HOLDINGS PTE. LTD. Graphical systems and methods for human-in-the-loop machine intelligence
CN106817251A (en) * 2016-12-23 2017-06-09 烟台中科网络技术研究所 A kind of link prediction method and device based on node similarity
CN107889082A (en) * 2017-11-01 2018-04-06 南京邮电大学 A kind of D2D method for discovering equipment using social networks between user

Similar Documents

Publication Publication Date Title
US11023458B2 (en) Systems and methods for blockchain interlinking and relationships
KR102226257B1 (en) Method and device for writing service data to a blockchain system
US11921682B2 (en) Extracting data from a blockchain network
WO2020063820A1 (en) Asset transaction method, storage medium and computer device
US11823178B2 (en) Optimization of high volume transaction performance on a blockchain
US11940971B2 (en) Blockchain implementing reliability database
CN112840617B (en) Method and computing node for managing blockchain resources, computer readable medium
CN114662159A (en) Data processing method, device and equipment
EP3709568A1 (en) Deleting user data from a blockchain
CN110471982B (en) Data processing method and device based on block chain
US11070563B2 (en) Trace-based transaction validation and commitment
WO2021057482A1 (en) Method and device for generating bloom filter in blockchain
WO2020125224A1 (en) Data structure reading method and apparatus, data structure updating method and apparatus, and electronic device
US20230388136A1 (en) Merkle proof entity
CN113326165B (en) Data processing method and device based on block chain and computer readable storage medium
CN112087530B (en) Method, device, equipment and medium for uploading data to block chain system
CN116663050A (en) Intelligent contract data rapid query method based on database
CN109918369B (en) Data storage method and device
CN114971827A (en) Account checking method and device based on block chain, electronic equipment and storage medium
CN111444204B (en) Synchronous processing method, device, equipment and medium
CN115114372A (en) Data processing method, device and equipment based on block chain and readable storage medium
US20230334344A1 (en) Distributed ledger based machine-learning model management
CN111522891A (en) Method and device for determining relationship closeness between two entities and electronic equipment
Shukla et al. Systematization of knowledge on scalability aspect of blockchain systems
CN113472543A (en) Employment data processing method and device based on block chain, electronic equipment and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40035497

Country of ref document: HK

RJ01 Rejection of invention patent application after publication

Application publication date: 20200811

RJ01 Rejection of invention patent application after publication