A method and device for identifying entity pairs across graph data and relational data

By acquiring and generating corresponding graph data, identifying matching entity pairs in relational data and graph data, the problem that the prior art cannot match entity pairs between relational data and graph data is solved, and entity recognition across data types is realized.

CN114580390BActive Publication Date: 2025-04-04SHENZHEN INST OF COMPUTING SCI
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210227078.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-08
Publication Date
2025-04-04
Estimated Expiration
2042-03-08

AI Technical Summary

Technical Problem

Existing entity recognition methods are not suitable for matching entity pairs between relational data and graph data, especially since relational data relies on pattern information, while graph data is independent of pattern.

Method used

By acquiring the target relationship data and the target graph data, corresponding second graph data is generated, and matching entity pairs are determined based on the first node and the second node. The method includes generating a single node, multiple nodes, or all node entity pairs match and converting the matching nodes into tuples of relational data.

Benefits of technology

The matching of entity pairs between relational data and graph data is achieved, which solves the problem that traditional methods cannot be applied to graph data, and evaluates the semantic proximity between entities by recursively checking attributes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114580390B_ABST
    Figure CN114580390B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention provides a method and device for identifying entity pairs across graph data and relational data, by obtaining target relational data to be extracted and target first graph data; wherein the target relational data includes at least one tuple, and the target first graph data includes at least one first node; corresponding second graph data is generated according to the target relational data; wherein the second graph data includes at least one second node; the first tuple corresponds to the second node; and entity pairs corresponding to the target first graph data and the target relational data are determined according to the first node and the second node. Entity recognition is studied across relational data and graph data, rather than just on relational data; the matches found by parameter simulation are explainable, explaining why two vertices match based on matching vertex pairs and cumulative scores.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of graph data management technology, and in particular to a method and device for identifying entity pairs across graph data and relational data. Background Art

[0002] Traditional entity recognition mainly studies relational data specified by patterns. A relational database is a database built on the basis of the relational database model. It uses concepts and methods such as set algebra to process data in the database. It is also a table organized into a set of formal descriptive tables. The essence of the table in this form is to load a special collection of data items. The data in these tables can be accessed or reassembled in many different ways without reorganizing the database table. The definition of a relational database results in a table of metadata or a formal description of tables, columns, ranges, and constraints. Each table (sometimes called a relation) contains one or more data types represented by columns. Each row contains a unique data entity, which is the type defined by the column. When creating a relational database, you can define the range of possible values ​​for the data column and further constraints that may be applied to that data value.

[0003] Existing relational data entity recognition systems use machine learning models to train graph embeddings for entity recognition, and entity recognition architectures directly based on machine learning models; transfer and active learning, learning entity recognition models that can be transferred to new tasks. Active learning is used to learn entity recognition rules, and active learning is used to adaptively handle entity recognition workloads.

[0004] However, existing methods are not suitable for entity recognition in relational data and graph data. Entity recognition methods for relational data rely on pattern information and are not suitable for graphs that are independent of the pattern. Summary of the invention

[0005] In view of the above problems, the present application is proposed to provide a method and device for identifying entity pairs across graph data and relational data that overcomes the above problems or at least partially solves the above problems, including:

[0006] A method for identifying entity pairs across graph data and relational data, the method being used to identify entity pairs that match a target node in a target first graph data and a target tuple in a target relational data, comprising:

[0007] Acquire target relationship data and target first graph data to be extracted; wherein the target relationship data includes at least one tuple, and the target first graph data includes at least one first node;

[0008] Generate corresponding second graph data according to the target relationship data; wherein the second graph data includes at least one second node; the first tuple corresponds to the second node;

[0009] According to the first node and the second node, a matching entity pair corresponding to the target first graph data and the target relationship data is determined.

[0010] Preferably, the step of determining, according to the first node and the second node, the matching entity pairs corresponding to the target first graph data and the target relationship data comprises:

[0011] Generate a single node entity pair match based on the first node in the target first graph data and the second node in the second graph data; or; generate multiple node entity pair matches based on the first node in the target first graph data and the second node in the second graph data; or; generate all node entity pair matches based on the first node in the target first graph data and the second node in the second graph data;

[0012] According to the matching of a single node entity pair or multiple node entity pairs or assuming that all node entity pairs are matched, the matching entity pairs in the target first graph data and the relationship data are output.

[0013] Preferably, the step of generating a single node entity pair match based on the first node in the target first graph data and the second node in the second graph data comprises:

[0014] Sorting the second nodes in the second graph data in order;

[0015] Sequentially summing the associations of the second node in the second graph data and the first node in the target first graph data;

[0016] If the summed value reaches the preset value, it is a matching entity pair;

[0017] The successfully matched second node of the second graph data and the first node set in the target first graph data are matched to generate the single node entity pair.

[0018] Preferably, the step of generating a plurality of node entity pair matches based on the first node in the target first graph data and the second node in the second graph data comprises:

[0019] Matching each second node in the second graph data with all first nodes in the target first graph data respectively;

[0020] The second node of the successfully matched second graph data and the first node set in the target first graph data are matched to generate the multiple node entity pairs.

[0021] Preferably, the step of generating all node entity pair matches based on the first node in the target first graph data and the second node in the second graph data comprises:

[0022] Matching all second nodes in the second graph data with all first nodes in the target first graph data;

[0023] The second node of the successfully matched second graph data and the first node set in the target first graph data generate the matching of all node entity pairs.

[0024] Preferably, the step of outputting matching entity pairs in the target first graph data and the relationship data according to matching of a single node entity pair or matching of multiple node entity pairs or matching of all node entity pairs comprises:

[0025] According to the single node entity pair matching, convert the second node in the second graph data that matches the first node in the target first graph data into a tuple of the relational data, and output the matching entity pairs in the target first graph data and the relational data;

[0026] or;

[0027] According to a plurality of node entity pair matches, converting a second node in the second graph data that matches a first node in the target first graph data into a tuple of the relational data, and outputting matching entity pairs in the target first graph data and the relational data;

[0028] or;

[0029] According to the matching of all node entity pairs, the second node in the second graph data that matches the first node in the target first graph data is converted into a tuple of the relational data, and the matching entity pairs in the target first graph data and the relational data are output.

[0030] Preferably, the step of sequentially summing the associations of the second node in the second graph data and the first node in the target first graph data comprises:

[0031] If the sum value does not reach the preset value, it is an unmatched entity pair.

[0032] To implement the present application, a device for identifying entity pairs across graph data and relational data is also provided, wherein the device is used to identify entity pairs that match a target node in a target first graph data and a target tuple in a target relational data, including:

[0033] Data acquisition module: used to acquire target relationship data and target first graph data to be extracted; wherein the target relationship data includes at least one tuple, and the target first graph data includes at least one first node;

[0034] A second graph data generating module: used to generate corresponding second graph data according to the target relationship data; wherein the second graph data includes at least one second node;

[0035] Entity pair matching module: used to determine the matching entity pairs corresponding to the target first graph data and the target relationship data based on the first node and the second node.

[0036] To implement the present application, an electronic device is also included, including a processor, a memory, and a computer program stored in the memory and capable of running on the processor, and when the computer program is executed by the processor, the steps of the entity pair identification method across graph data and relational data are implemented.

[0037] To implement the present application, a computer-readable storage medium is also included, on which a computer program is stored. When the computer program is executed by a processor, the steps of the entity pair identification method across graph data and relational data are implemented.

[0038] This application has the following advantages:

[0039] In an embodiment of the present application, by obtaining target relational data to be extracted and target first graph data; wherein the target relational data includes at least one tuple, and the target first graph data includes at least one first node; generating corresponding second graph data according to the target relational data; wherein the second graph data includes at least one second node; the first tuple corresponds to the second node; determining the matching entity pairs corresponding to the target first graph data and the target relational data according to the first node and the second node. Entity recognition is studied across relational data and graph data, rather than just on relational data; and semantic proximity between entities is "globally" evaluated by recursively checking attributes, while previous work only considered local attributes or features of a single entity. The matches found by parametric simulation are explainable, explaining why two vertices match based on matching vertex pairs and cumulative scores. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the technical solution of the present application, the drawings required for use in the description of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0041] Figure 1 It is a flowchart of the steps of a method for identifying entity pairs across graph data and relational data provided by one embodiment of the present application;

[0042] Figure 2 It is a flowchart of a specific embodiment of a method for identifying entity pairs across graph data and relational data provided by an embodiment of the present application;

[0043] Figure 3 It is a schematic diagram of a SPair working mode algorithm of an entity pair recognition method across graph data and relational data provided by an embodiment of the present application;

[0044] Figure 4 It is a schematic diagram of a VPair working mode algorithm of an entity pair recognition method across graph data and relational data provided by an embodiment of the present application;

[0045] Figure 5 It is a structural block diagram of an entity pair identification device across graph data and relational data provided by an embodiment of the present application;

[0046] Figure 6 It is a structural schematic diagram of a computer device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0047] In order to make the objects, features and advantages of the present application more obvious and understandable, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.

[0048] Reference Figure 1 , shows a flowchart of a method for identifying entity pairs across graph data and relational data provided by an embodiment of the present application, which specifically includes the following steps:

[0049] S110, obtaining target relationship data and target first graph data to be extracted; wherein the target relationship data includes at least one tuple, and the target first graph data includes at least one first node;

[0050] S120, generating corresponding second graph data according to the target relationship data; wherein the second graph data includes at least one second node; and the first tuple corresponds to the second node;

[0051] S130. Determine, based on the first node and the second node, entity pairs corresponding to the target first graph data and the target relationship data that match.

[0052] In an embodiment of the present application, by obtaining target relational data to be extracted and target first graph data; wherein the target relational data includes at least one tuple, and the target first graph data includes at least one first node; generating corresponding second graph data according to the target relational data; wherein the second graph data includes at least one second node; the first tuple corresponds to the second node; determining the matching entity pairs corresponding to the target first graph data and the target relational data according to the first node and the second node. Entity recognition is studied across relational data and graph data, rather than just on relational data; and semantic proximity between entities is "globally" evaluated by recursively checking attributes, while previous work only considered local attributes or features of a single entity. The matches found by parametric simulation are explainable, explaining why two vertices match based on matching vertex pairs and cumulative scores.

[0053] Next, the entity pair identification method across graph data and relational data in this exemplary embodiment will be further described.

[0054] As described in the above step S110, the target relationship data and the target first graph data to be extracted are obtained; wherein the target relationship data includes at least one tuple, and the target first graph data includes at least one first node.

[0055] In one embodiment of the present invention, the specific process of "obtaining target relationship data and target first graph data to be extracted; wherein the target relationship data includes at least one tuple, and the target first graph data includes at least one first node" in step S110 can be further explained in combination with the following description.

[0056] It should be noted that three infinite letter sets Υ, θ and Φ are assumed, which are used for relationship attributes, graph vertex labels and edge labels respectively. The relational data in this application is a relational database, which considers a database model R = (R_1,..,R_n), where R_i is a relational model (A_1,..,A_k), and A_i∈Υ is an attribute. The relationship of the model R is a set of tuples with the attributes A_i (i∈[1,k]) of R. The database D of R is (D_1,..,D_n), where D_i is the relationship of R_i when i∈[1,n].

[0057] It should be noted that graph data (Graph): This application considers a directed labeled graph G = (V, E, L), where (a) V is a finite set of vertices, is the set of edges, and (c) for each vertex v∈V, L(v) is a label in θ. For each edge e∈E, L(e) is a label in Φ. Graph data encodes properties as edges, just like in RDF (Resource Description Framework) data. Intuitively, the edge labels of Φ represent predicates, while the vertex labels of θ represent values.

[0058] As described in the above step S120, corresponding second graph data is generated based on the target relationship data; wherein the second graph data includes at least one second node; and the first tuple corresponds to the second node.

[0059] In one embodiment of the present invention, the specific process of step S120 of "generating corresponding second graph data based on the target relationship data; wherein the second graph data includes at least one second node; the first tuple corresponds to the second node;" can be further explained in combination with the following description.

[0060] It should be noted that RDB2RDF is a method for converting RDB (Relational Database) into RDF graph data. For simplicity, we adopt the RDB2RDF method of the W3C (World Wide Web Consortium) standard here: for a database schema R, we define a canonical mapping f_D. Given a database D of R, it returns a canonical graph G_D = f_D(D), where (1) each tuple t of the relation schema R is mapped to a unique vertex u_t labeled R in G_D; (2) each attribute A in t is mapped to a unique vertex u_t.A, such that L(u_t.A) is the value of tA, and there is an edge (u_t,u_t.A) labeled A in GD; (3) for each attribute A in tuple t that is a foreign key that references another tuple t', there is an edge (u_t,u_t') labeled with a pair of (A,γ), where different γs represent foreign keys.

[0061] In a specific embodiment, the present application first uses the RDB2RDF method to convert the target relational data into graph data (G_D), that is, the second graph data.

[0062] As described in the above step S130, the matching entity pairs corresponding to the target first graph data and the target relationship data are determined according to the first node and the second node.

[0063] In one embodiment of the present invention, the specific process of "determining the matching entity pairs corresponding to the target first graph data and the target relationship data based on the first node and the second node" in step S130 can be further explained in combination with the following description.

[0064] As described in the following steps, a single node entity pair match is generated based on the first node in the target first graph data and the second node in the second graph data; or; multiple node entity pair matches are generated based on the first node in the target first graph data and the second node in the second graph data; or; all node entity pair matches are generated based on the first node in the target first graph data and the second node in the second graph data; based on a single node entity pair match or multiple node entity pair matches or assuming all node entity pair matches, the matching entity pairs in the target first graph data and the relationship data are output. According to a single node entity pair matching, the second node in the second graph data that matches the first node in the target first graph data is converted into a tuple of the relational data, and the matching entity pairs in the target first graph data and the relational data are output; or; according to multiple node entity pair matching, the second node in the second graph data that matches the first node in the target first graph data is converted into a tuple of the relational data, and the matching entity pairs in the target first graph data and the relational data are output; or: according to all node entity pair matching, the second node in the second graph data that matches the first node in the target first graph data is converted into a tuple of the relational data, and the matching entity pairs in the target first graph data and the relational data are output.

[0065] In a specific embodiment of the present application, Figure 2 As shown, the system performs entity recognition according to one of the modes selected by the user. Among them, a single node entity pair matching is generated based on the first node in the target first graph data and the second node in the second graph data, and the second node in the second graph data matching the first node in the target first graph data is converted into a tuple of the relational data based on the single node entity pair matching, and the step of outputting the matching entity pairs in the target first graph data and the relational data is equivalent to SPair (SinglePair, single node matching). The SPair working mode determines whether a node v in the graph and a tuple t in the relational data are the same entity;

[0066] In a specific embodiment of the present application, multiple node entity pair matches are generated based on the first node in the target first graph data and the second node in the second graph data; based on the multiple node entity pair matches, the second node in the second graph data that matches the first node in the target first graph data is converted into a tuple of the relationship data, and the matching entity pairs in the target first graph data and the relationship data are output; which is equivalent to VPair (VertexPair, vertex matching), and the VPair working mode finds all matching entity nodes in the graph for a tuple t in the relationship data.

[0067] In a specific embodiment of the present application, all node entity pair matches are generated based on the first node in the target first graph data and the second node in the second graph data; based on all node entity pair matches, the second node in the second graph data that matches the first node in the target first graph data is converted into a tuple of the relational data, and the matching entity pairs in the target first graph data and in the relational data are output; this is equivalent to APair (All Pair, all node matches), and the APair working mode finds all matching entity nodes in the graph for all tuples in the relational data.

[0068] In one embodiment of the present invention, the specific process of the step of "generating a single node entity pair match based on the first node in the target first graph data and the second node in the second graph data, converting the second node in the second graph data that matches the first node in the target first graph data into a tuple of the relational data based on the single node entity pair match, and outputting the matching entity pairs in the target first graph data and the relational data" can be further explained in combination with the following description.

[0069] As described in the following steps, the second nodes in the second graph data are sorted in order; the associations of the second nodes in the second graph data and the first nodes in the target first graph data are summed up in sequence; if the summed value reaches a preset value, it is a matching entity pair; the second nodes of the second graph data that are successfully matched and the first nodes in the target first graph data are set to generate the single node entity pair match. If the summed value does not reach the preset value, it is an unmatched entity pair, or it is returned for re-matching.

[0070] In a specific embodiment of the present application, Figure 3As shown, the SPair (SinglePair, single node entity pair) working mode calls the algorithm ParaMatch (quasi-matching) to recursively determine whether the first node and the second node in the first graph data and the second graph data represent the same entity: given a pair of (u,v) vertices, it finds the pedigree set S(u,v) of the top-k descendants of u and v, and recursively checks the descendant pairs. For the matching (u′,v′)∈S(u,v), it sums the associations between (u,v) and (u′,v′) and checks whether the total score reaches δ. If so, it returns "true" and the two points represent the same entity. Otherwise, it backtracks and checks other pedigree sets. If there is no pedigree that can prove that the (u,v) node pair is a match, it returns "false", that is, points u and v do not represent the same entity. The algorithm ParaMatch takes a function (h_v,h_ρ,h_r) and a boundary (σ,δ,k) as parameters. Given a tuple t∈D and a vertex v_g in G, it checks if (u_t,v_g) matches (represents the same entity), where G_D is the canonical graph of D and u_t is a vertex in G_D that represents t via the mapping f_D. This algorithm supports SPair mode of operation.

[0071] In a specific embodiment of the present application, ParaMatch is recursive. Given a pair of (u, v) vertices, it finds the pedigree set S(u, v) of the top-k descendants of u and v, and recursively checks the descendant pairs. For matching (u′, v′)∈S(u, v), it sums the associations between (u, v) and (u′, v′) and checks whether the total score reaches δ. If so, it returns "true". Otherwise, it backtracks and checks other pedigree sets. If no pedigree can prove that the (u, v) node pair is a match, it returns "false".

[0072] Among them, this application adopts the following strategies for algorithm optimization:

[0073] (1) ecache (a variable name, corresponding to the algorithm), records V^k_u, the first k descendants selected for each vertex u, and avoids repeated descendant selection.

[0074] (2) cache, which records the current state of candidate matches and the dependencies between candidates. For each candidate match (u, v), cache[u, v] is a pair [φ, W], which is or [true,W], where W is a set of candidate matchings and φ is a Boolean indicating whether (u,v) is invalid (false) or valid (true) given that all candidates in W are valid. Note that: (a) if (u,v) and (u',v') depend on each other, then (u,v) and (u',v') are marked in the cache as [true,W_1] and [true,W_2], respectively, and if (u',v')∈W_1 and (u,v)∈W_2, then both (u,v) and (u',v') meet the definition of parametric simulation. (b) We only need to store matchings of V^k_u vertices in cache[u,v], i.e., |W|≤k; moreover, mutual dependence can be inferred from such W.

[0075] (3) For each top-k descendant u' of u, we sort the vertices v' in V^k_v in descending order of the association between (u',v') and (u,v). When we search for a candidate match v' for u', we follow the order in V^k_v. Intuitively, this helps us decide earlier if we may not be able to get a lineage with a total score of δ and safely return false, since backtracking in descending order will always produce a smaller score.

[0076] (4) When a candidate match (u,v) is invalid, we first determine the candidate (u′,v′) that directly depends on (u,v), that is, (u,v)∈cache[u′,v′].W. (Here it means the W variable under the cache array position [u′,v′]) Then we call ParaMatch to recheck whether (u′,v′) is still valid. Note that this is sufficient to handle mutually dependent candidate matches; in fact, if (u',v') is also invalid, the candidates that indirectly depend on (u',v') are rechecked when the recursive ParaMatch backtracks.

[0077] In a specific embodiment of the present application, the algorithm flow is described as follows: Figure 3 The algorithm ParaMatch is presented in . It returns true if u_t matches v_g, where vertex u_t∈G_D and v_g∈G, and false otherwise. Its workflow is divided into the following three steps.

[0078] (1) Initial stage, such as Figure 3 Lines 1-11 in ParaMatch. ParaMatch starts in two steps. (a) It first checks the labels of (u,v) (e.g. Figure 3(b) The algorithm then constructs a set of candidate matches for each descendant of u (lines 6-11). If the first k descendants of u or v are stored in ecache, it simply initializes V^k_u and V^k_v with ecache[u] and ecache[v], respectively. Otherwise, it calls function h_r to pick the first k descendants of u and v (e.g. Figure 3 After that, it builds a candidate matching set l_u' for each descendant u' of u (i.e., v'∈l_u' if v'∈V^k_v and h_v(u',v')≥σ), and sorts l_u' in descending order of association (e.g. Figure 3 11 in ).

[0079] (2) Matching stage (such as Figure 3 In this phase, ParaMatch inductively checks the first k descendants of u. First, it uses an early termination strategy to check whether the maximum score among all possible pedigrees of (u,v) S(u,v) can reach δ; if not, it confirms that (u,v) is invalid and returns false (e.g. Figure 3 12-14 in ); here v′_{j,1} is the vertex with the maximum h_ρ score among all matches of u′_j. Otherwise, for each selected descendant u', it finds the candidate for u' by checking V^k_v in descending order of l_u' (e.g. Figure 3 For vertex v' in l_u', it first checks whether (u',v') has been verified. If so, it directly uses the previous result. Otherwise, it recursively calls ParaMatch (such as Figure 3 17-19 in ) to check (u',v'). If (u',v') is valid, it accumulates the association with (u,v) in the variable sum and adds (u',v') to the set W (as in Figure 3 21 in ). Then check if the value of sum reaches δ. If so, the algorithm marks (u,v) as [true,W] and returns true (e.g. Figure 3 Otherwise, it checks whether we can find a match for u' among the remaining vertices of l_u' such that the maximum score can reach δ (e.g. Figure 3 25-27 in ).

[0080] (3) Cleaning stage (such as Figure 3 ParaMatch performs the necessary cleanup of cache entries after (u,v) is deemed invalid. It first sets cache[u,v] to (like Figure 3 28 in ), and then reruns ParaMatch to update the stale cache entries that directly depend on (u,v) (such as Figure 3 Finally, it returns false (as in lines 29-31 of Figure 3 32 in ).

[0081] In a specific embodiment of the present application, the functions h_v, h_ρ, and h_r are described as follows: h_v is a point similarity function, and h_ρ is a graph path similarity function. That is, given two points u and v in a graph, h_v(u,v) returns the semantic similarity of the two nodes (a real number between 0 and 1); given two paths ρ_1 and ρ_2 in a graph, h_ρ(ρ_1,ρ_2) returns the semantic similarity of the two paths (a real number between 0 and 1). The similarity function can be specified by a rule or learned by a machine learning model.

[0082] In a specific embodiment of the present application, given a vertex v and an edge k, the function h_r returns the first k descendants of v and the path of each such descendant, thereby representing the important attributes of v. It is performed in two steps: first, a set of m paths is selected from v using the language model M_r, where m is the number of successor nodes of v; then the path resource allocation (PRA) algorithm is used to sort the m paths and return the top-k ones. The following explains these two steps in detail:

[0083] (1) For each outgoing edge e_i of v, the function h_r selects a path ρ_i from v under the guidance of the language model Mr. and adds ρ_i to the set P. For example, at the edge e_1 from v to v_1, h_r initializes ρ_1 = (v, v1), presents e_1 to Mr., and then obtains from Mr. the list E_p1 of all edges adjacent to v_1 and the likelihood of them following the edge e_1. Then from all the outgoing edges of v_1, h_r selects an edge e_2 with the highest likelihood in E_p1, connects v_1 to v_2, and appends v_2 to the path ρ_1. Then e2 is input into Mr. to obtain the prediction list E_p2. This iteration continues until one of the following three conditions is met: (a) Mr. returns a "stop signal", that is, the end-of-sentence label " <eos>”; (b) there are no outgoing edges to choose from; or (c) the path forms a closed cycle (this case will be discarded). Here we use the LSTM (Long Short-Term Memory) network as Mr, because it can model the semantics of the labels on the path in the knowledge graph: given an edge label as input, LSTM can generate a path with reasonable semantic meaning following this edge label.

[0084] (2) Function h_r sorts the paths in P as follows. Given a path ρ = (v_0, v_1, .., v_l), we extend resource allocation and propose PRA to measure whether ρ is a meaningful connection. The formula is as follows:

[0085]

[0086] Here, ch(v_i) represents the set of child nodes of v_i. Intuitively, PRA assumes that resources "flow out" from the starting vertex of the path and are equally divided at each vertex in the middle. After propagation, PRA quantifies the strength of the semantic association of ρ based on the amount of resources that reach v_l from v_0 via ρ. Function h_r selects paths ρ with strong semantic association.

[0087] In one embodiment of the present invention, the specific process of the step of "generating multiple node entity pair matches based on the first node in the target first graph data and the second node in the second graph data, converting the second node in the second graph data that matches the first node in the target first graph data into a tuple of the relational data based on the multiple node entity pair matches, and outputting the matching entity pairs in the target first graph data and the relational data" can be further explained in combination with the following description.

[0088] As described in the following steps, each second node in the second graph data is matched with all first nodes in the target first graph data respectively; the second nodes of the second graph data that are successfully matched and the set of first nodes in the target first graph data are used to generate the multiple node entity pair matches; based on the multiple node entity pair matches, the second nodes in the second graph data that match the first nodes in the target first graph data are converted into tuples of the relational data, and the matching entity pairs in the target first graph data and the relational data are output.

[0089] In a specific embodiment of the present application, multiple node entity matching pairs adopt the VPair working mode entity matching algorithm. The VPair working mode of the system uses the algorithm VParaMatch to calculate all matches (u_t, v_g) of a given tuple t in the database D, where u_t is the vertex representing t in the canonical graph G_D of D, and v_g is the vertex G in the graph. The VParaMatch algorithm takes functions (h_v, h_ρ, h_r) and boundaries (σ, δ, k) as parameters, and takes tuple t∈D as input. Unlike ParaMatch, vertex v_g is not used as input to VParaMatch. VParaMatch simulates the calculation of the set (u_t, v_g) based on the parameters of vg in G. Defined as:

[0090] II(u t )={(u t , v g )|v g ∈G,II(u t , v g )≠θ}

[0091] The specific steps of the algorithm VParaMatch are as follows: Figure 4 As shown, VParaMatch first selects all vertices v_g in G where h_v(u_t, v_g) ≥ σ, and initializes a set C(u_t) with these candidates (u_t, v_g) (as shown in Figure 4 Then sort the pairs in C(u_t) in increasing order of the vertex degree in C(u_t) (e.g. Figure 4 Intuitively, starting from vertices with smaller degrees, VParaMatch can determine more candidate matches as valid or invalid earlier and reduce the running time. Then VParaMatch iteratively checks each (u,v) in the order in which they appear in C(u_t) (e.g. Figure 4 More specifically, it first checks if (u,v) has been confirmed to be valid (lines 7-8); if so, it adds it to Π(u_t). Otherwise, it calls ParaMatch on (u,v) to verify its validity (lines 7-8). Figure 4 VParaMatch builds an inverted index on key information as a grouping strategy for entity recognition: for example, papers published in the same year are in the same group, and then determines whether entities match in the same group.

[0092] As an example, the VPair working mode and the APair working mode encapsulate the entity determination process of a single node pair, and search in parallel for all matching entity nodes of a certain tuple t in the graph, and all matching entity nodes of all tuples in the graph.

[0093] In one embodiment of the present invention, the specific process of the step of "generating multiple node entity pair matches based on the first node in the target first graph data and the second node in the second graph data, converting the second node in the second graph data that matches the first node in the target first graph data into a tuple of the relational data based on all node entity pair matches, and outputting the matching entity pairs in the target first graph data and in the relational data" can be further illustrated in combination with the following description.

[0094] As described in the following steps, all node entity pair matches are generated based on the first node in the target first graph data and the second node in the second graph data; based on all node entity pair matches, the second node in the second graph data that matches the first node in the target first graph data is converted into a tuple of the relational data, and the matching entity pairs in the target first graph data and the relational data are output.

[0095] In a specific embodiment of the present application, all node entity pairs match the APair working mode entity matching algorithm.

[0096] The AllParaMatch algorithm in APair working mode calculates the set Π of all matching tuples and vertices in the database D and the graph G:

[0097]

[0098] Among them, u_t is a vertex in G_D, and v_g is a vertex in G. Unlike ParaMatch and VParaMatch, AParaMatch does not receive u_t and v_g as input.

[0099] Algorithm AParaMatch extends VParaMatch. AParaMatch first initializes a set C of candidate matches (u_t, v_g) such that hv(ut, vg) ≥ σ for all u_t∈V_D and v_g∈V. After that, its remaining steps are exactly the same as those of algorithm VParaMatch.

[0100] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0101] Reference Figure 5 , shows an entity pair identification device across graph data and relational data provided by an embodiment of the present application, which specifically includes the following modules:

[0102] Data acquisition module 510: used to acquire target relationship data and target first graph data to be extracted; wherein the target relationship data includes at least one tuple, and the target first graph data includes at least one first node;

[0103] The second graph data generating module 520 is used to generate corresponding second graph data according to the target relationship data; wherein the second graph data includes at least one second node;

[0104] Entity pair matching module 530: used to determine matching entity pairs corresponding to the target first graph data and the target relationship data based on the first node and the second node.

[0105] In one embodiment of the present invention, the entity pair matching module 530 further includes:

[0106] Entity pair matching submodule: used to generate a single node entity pair matching based on the first node in the target first graph data and the second node in the second graph data; or; generate multiple node entity pair matching based on the first node in the target first graph data and the second node in the second graph data; or; generate all node entity pair matching based on the first node in the target first graph data and the second node in the second graph data;

[0107] Matched entity pair submodule: used to output the matched entity pairs in the target first graph data and the relationship data based on a single node entity pair match or multiple node entity pair match or assuming all node entity pairs match.

[0108] In one embodiment of the present invention, the entity pair matching submodule includes:

[0109] Sorting submodule: used for sorting the second nodes in the second graph data in order;

[0110] A summing submodule: used for summing the associations of the second node in the second graph data and the first node in the target first graph data in sequence;

[0111] Preset value submodule: used to match entity pairs if the summed value reaches the preset value;

[0112] A single node entity pair submodule: used to match the successfully matched second node of the second graph data with the first node set in the target first graph data to generate the single node entity pair.

[0113] Unmatched submodule: If the sum value does not reach the preset value, it is considered an unmatched entity pair.

[0114] Multiple node matching submodules: used to match each second node in the second graph data with all first nodes in the target first graph data respectively;

[0115] Multiple node entity pair submodule: used to match the successfully matched second node of the second graph data with the first node set in the target first graph data to generate the multiple node entity pair matches.

[0116] All matching submodules: used for matching all second nodes in the second graph data with all first nodes in the target first graph data;

[0117] All node entity pairs submodule: used to generate all node entity pairs matching between the second node of the successfully matched second graph data and the first node set in the target first graph data.

[0118] In one embodiment of the present invention, the matching entity pair submodule includes:

[0119] Single-node submodule: used for converting the second node in the second graph data matching the first node in the target first graph data into a tuple of the relational data according to the single-node entity pair matching, and outputting the matching entity pairs in the target first graph data and the relational data;

[0120] or;

[0121] A multi-node submodule: used for converting a second node in the second graph data that matches a first node in the target first graph data into a tuple of the relational data according to a plurality of node entity pair matches, and outputting matching entity pairs in the target first graph data and the relational data;

[0122] or:

[0123] All node submodule: used to convert the second node in the second graph data that matches the first node in the target first graph data into a tuple of the relational data based on the matching of all node entity pairs, and output the matching entity pairs in the target first graph data and the relational data.

[0124] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.

[0125] There are repeated operation steps in this specific embodiment and the above specific embodiment, and this specific embodiment is only briefly described. For other solutions, refer to the description of the above specific embodiment.

[0126] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0127] Reference Figure 6 , showing a computer device of the present application for an entity pair identification method across graph data and relational data, which may specifically include the following:

[0128] The computer device 12 is in the form of a general-purpose computing device, and the components of the computer device 12 may include but are not limited to: one or more processors or processing units 16, a memory 28, and a bus 18 connecting different system components (including the memory 28 and the processing unit 16).

[0129] Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus architectures. By way of example, these architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MAC) bus, an Enhanced ISA bus, an Audio Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.

[0130] The computer device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the computer device 12, including volatile and non-volatile media, removable and non-removable media.

[0131] Memory 28 may include computer system readable media in the form of volatile memory, such as random access memory 30 and / or cache memory 32. Computer device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 34 may be used to read and write to non-removable, non-volatile magnetic media (commonly referred to as a "hard drive"). Although Figure 6 Not shown, a disk drive for reading and writing to a removable non-volatile disk (such as a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (such as a CD-ROM, DVD-ROM or other optical medium) may be provided. In these cases, each drive may be connected to the bus 18 via one or more data medium interfaces. The memory may include at least one program product having a set (e.g., at least one) of program modules 42, which are configured to perform the functions of the various embodiments of the present application.

[0132] A program / utility 40 having a set (at least one) of program modules 42 may be stored in, for example, a memory, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules 42, and program data, each of which or some combination may include an implementation of a network environment. The program modules 42 generally perform the functions and / or methods of the embodiments described herein.

[0133] The computer device 12 may also communicate with one or more external devices 14 (e.g., keyboards, pointing devices, displays 24, cameras, etc.), one or more devices that enable an operator to interact with the computer device 12, and / or any device that enables the computer device 12 to communicate with one or more other computing devices (e.g., network cards, modems, etc.). Such communication may be performed through the I / O interface 22. Furthermore, the computer device 12 may also communicate with one or more networks (e.g., local area networks (LANs)), wide area networks (WANs), and / or public networks (e.g., the Internet) through a network adapter 20. Figure 6 As shown, the network adapter 20 communicates with other modules of the computer device 12 via the bus 18. It should be understood that although Figure 6 Not shown, other hardware and / or software modules may be used in conjunction with the computer device 12, including but not limited to: microcode, device drivers, redundant processing units 16, external disk drive arrays, RAID systems, tape drives, and data backup storage systems 34, etc.

[0134] The processing unit 16 executes various functional applications and data processing by running the programs stored in the memory 28, such as implementing an entity pair recognition method across graph data and relational data provided in an embodiment of the present application.

[0135] That is, when the processing unit 16 executes the program, it implements: obtaining the target relationship data and target first graph data to be extracted; wherein the target relationship data includes at least one tuple, and the target first graph data includes at least one first node; generating corresponding second graph data based on the target relationship data; wherein the second graph data includes at least one second node; the first tuple corresponds to the second node; and determining the matching entity pairs corresponding to the target first graph data and the target relationship data based on the first node and the second node.

[0136] In an embodiment of the present application, the present application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements an entity pair identification method across graph data and relational data as provided in all embodiments of the present application.

[0137] That is, when the program is executed by the processor, it is implemented as follows: obtaining the target relationship data and target first graph data to be extracted; wherein the target relationship data includes at least one tuple, and the target first graph data includes at least one first node; generating corresponding second graph data based on the target relationship data; wherein the second graph data includes at least one second node; the first tuple corresponds to the second node; and determining the matching entity pairs corresponding to the target first graph data and the target relationship data based on the first node and the second node.

[0138] Any combination of one or more computer-readable media may be used. A computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, device, or device.

[0139] Computer-readable signal media may include a data signal propagated in baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including, but not limited to, electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0140] The computer program code for performing the operation of the present application can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" language or similar programming languages. The program code can be executed entirely on the operator's computer, partially on the operator's computer, as an independent software package, partially on the operator's computer, partially on the remote computer, or entirely on the remote computer or server. In the case of a remote computer, the remote computer can be connected to the operator's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (for example, using an Internet service provider to connect through the Internet). The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the various embodiments can be referred to each other.

[0141] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present application.

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

[0143] The above is a detailed introduction to the entity pair identification method and device across graph data and relational data provided by the present application. This article uses specific examples to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, according to the ideas of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.< / eos>

Claims

1. A method for identifying entity pairs across graph data and relational data, the method being used to identify entity pairs that match a target node in a target first graph data and a target tuple in a target relational data, characterized in that: include: Acquire target relationship data and target first graph data to be extracted; wherein the target relationship data includes at least one first tuple, and the target first graph data includes at least one first node; Generate corresponding second graph data according to the target relationship data; wherein the second graph data includes at least one second node; the first tuple corresponds to the second node; Determine the matching entity pairs corresponding to the target first graph data and the target relational data based on the first node and the second node; generate a single node entity pair match based on the first node in the target first graph data and the second node in the second graph data; or; generate multiple node entity pair matches based on the first node in the target first graph data and the second node in the second graph data; or; generate all node entity pair matches based on the first node in the target first graph data and the second node in the second graph data; output the matching entity pairs in the target first graph data and the relational data based on a single node entity pair match or multiple node entity pair matches or assuming all node entity pair matches.

2. The entity pair identification method across graph data and relational data according to claim 1, characterized in that: The step of generating a single node entity pair match based on the first node in the target first graph data and the second node in the second graph data comprises: Sorting the second nodes in the second graph data in order; Sequentially summing the associations of the second node in the second graph data and the first node in the target first graph data; If the summed value reaches the preset value, it is a matching entity pair; The successfully matched second node of the second graph data and the first node set in the target first graph data are matched to generate the single node entity pair.

3. The entity pair identification method across graph data and relational data according to claim 2, characterized in that: The step of generating a plurality of node entity pair matches according to the first node in the target first graph data and the second node in the second graph data comprises: Matching each second node in the second graph data with all first nodes in the target first graph data respectively; The second node of the successfully matched second graph data and the first node set in the target first graph data are matched to generate the multiple node entity pairs.

4. The entity pair identification method across graph data and relational data according to claim 1, characterized in that: The step of generating all node entity pair matches based on the first node in the target first graph data and the second node in the second graph data comprises: Matching all second nodes in the second graph data with all first nodes in the target first graph data; The second node of the successfully matched second graph data and the first node set in the target first graph data generate the matching of all node entity pairs.

5. The entity pair identification method across graph data and relational data according to claim 1, characterized in that: The step of outputting the matching entity pairs in the target first graph data and the relationship data according to the matching of a single node entity pair or the matching of multiple node entity pairs or assuming the matching of all node entity pairs includes: According to the single node entity pair matching, convert the second node in the second graph data that matches the first node in the target first graph data into a tuple of the relational data, and output the matching entity pairs in the target first graph data and the relational data; or; According to a plurality of node entity pair matches, converting a second node in the second graph data that matches a first node in the target first graph data into a tuple of the relational data, and outputting matching entity pairs in the target first graph data and the relational data; or; According to the matching of all node entity pairs, the second node in the second graph data that matches the first node in the target first graph data is converted into a tuple of the relational data, and the matching entity pairs in the target first graph data and the relational data are output.

6. The entity pair identification method across graph data and relational data according to claim 3, characterized in that: The step of sequentially summing the associations of the second node in the second graph data and the first node in the target first graph data comprises: If the sum value does not reach the preset value, it is an unmatched entity pair.

7. An entity pair identification device across graph data and relational data, the device is used to identify entity pairs that match a target node in a target first graph data and a target tuple in a target relational data, characterized in that: include: Data acquisition module: used to acquire target relationship data and target first graph data to be extracted; wherein the target relationship data includes at least one first tuple, and the target first graph data includes at least one first node; A second graph data generating module: used to generate corresponding second graph data according to the target relationship data; wherein the second graph data includes at least one second node; Entity pair matching module: used to determine the matching entity pairs corresponding to the target first graph data and the target relational data based on the first node and the second node; generate a single node entity pair matching based on the first node in the target first graph data and the second node in the second graph data; or; generate multiple node entity pair matching based on the first node in the target first graph data and the second node in the second graph data; or; generate all node entity pair matching based on the first node in the target first graph data and the second node in the second graph data; output the matching entity pairs in the target first graph data and the relational data based on a single node entity pair matching or multiple node entity pair matching or assuming all node entity pair matching.

8. An electronic device, characterized in that: The method comprises a processor, a memory and a computer program stored in the memory and capable of running on the processor, wherein the computer program, when executed by the processor, implements the steps of the entity pair identification method across graph data and relational data as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the entity pair identification method across graph data and relational data as described in any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Semantic search method and device based on legal knowledge graph and electronic equipment

    CN112632226A