Method, device, equipment and medium for extracting attribute values ​​across data structures

By calculating the syntax and semantic similarity between nodes and target data, automatically matching attributes and paths, extracting missing attribute values ​​and sorting them, the problems of slow extraction of attribute values ​​and high maintenance costs in the existing technology are solved, and more efficient and accurate attribute value extraction is achieved.

CN118690208BActive Publication Date: 2025-05-02SHENZHEN INST OF COMPUTING SCI
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410839018.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-26
Publication Date
2025-05-02
Estimated Expiration
2044-06-26

AI Technical Summary

Technical Problem

In the process of data integration and knowledge graph construction, the attribute value extraction speed is slow and difficult to cover all application scenarios, resulting in high maintenance costs.

Method used

By obtaining the data set of graph structure and table structure, compute the syntax and semantic similarity between nodes and target data, automatically match attributes and paths, extract missing attribute values, and sort to determine batch attribute values.

Benefits of technology

Improve the speed and accuracy of attribute value extraction, reduce matching costs, and enhance the speed and flexibility of missing attribute extraction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118690208B_ABST
    Figure CN118690208B_ABST
Patent Text Reader

Abstract

The present application is applicable to the field of big data technology, and in particular, relates to a method, device, equipment and medium for extracting attribute values ​​across data structures. The method calculates a first similarity value representing the grammatical similarity between nodes in the graph data and target data based on the attribute value of target data in the target data set and the characteristic value of graph data, determines a first candidate node, matches the existing attributes in the target data with the first characteristic path of the first candidate node, determines a first candidate matching node, calculates a second similarity value representing the semantic similarity between the first candidate matching node and the target data based on the characteristic vector of the first candidate matching node and the attribute vector of the target data, determines a first matching node representing the same entity as the target data, matches the missing attributes in the target data with the second characteristic path of the first matching node, determines the first candidate attribute value, sorts, and determines the batch attribute values ​​corresponding to the missing attributes. The speed of attribute value extraction is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application is applicable to the field of big data technology, and in particular relates to a method, device, equipment and medium for extracting attribute values ​​across data structures. Background Art

[0002] In the process of data integration and knowledge graph construction, attribute value extraction is a key task, which aims to locate and extract the attribute values ​​of specific entities from the knowledge graph to enrich and improve the existing data set. The attribute value extraction methods of the existing technology mainly rely on predefined logical rules. These rules can be formulated by domain experts based on domain knowledge and experience to describe how to extract the corresponding attribute values ​​from specific paths in the knowledge graph. However, the methods based on predefined logical rules usually need to rely on manual operations and invest a lot of time and effort to discover and formulate rules. At the same time, due to the diversity and complexity of application scenarios, it is difficult to formulate logical rules that can cover all situations. In addition, when the application requirements or data change slightly, it may be necessary to modify all the original logical rules or previous attribute value extraction results, which increases a lot of workload and maintenance costs. Therefore, how to improve the speed of attribute value extraction has become an urgent problem to be solved. Summary of the invention

[0003] In view of this, embodiments of the present application provide a method, apparatus, device and medium for extracting attribute values ​​across data structures to solve the problem of increasing the speed of extracting attribute values.

[0004] In a first aspect, an embodiment of the present application provides a method for extracting attribute values ​​across data structures, the method comprising:

[0005] Obtaining a data set corresponding to graph data of a graph structure and a table structure, determining attributes of target data in the data set and corresponding attribute values, and determining a feature value of each node in the graph data, wherein the attributes include existing attributes and missing attributes;

[0006] Calculate, according to the attribute value of the target data and the feature value of each node in the graph data, a first similarity value representing the grammatical similarity between each node in the graph data and the target data, and determine, according to the first similarity value, a first candidate node in the graph data;

[0007] For any first candidate node, determine a first characteristic path starting from the first candidate node, match the existing attributes in the target data with the first characteristic path, and determine the first candidate node corresponding to the first characteristic path matching the existing attributes in the target data as the first candidate matching node;

[0008] For any first candidate matching node, calculate a second similarity value representing the semantic similarity between the first candidate matching node and the target data according to the feature vector of the first candidate matching node and the attribute vector of the target data, and determine a first matching node representing the same entity as the target data according to the second similarity value;

[0009] For any matching node, determine a second feature path with the first matching node as the starting point, match the missing attributes in the target data with the second feature path, determine the feature value corresponding to the second path matching the missing attributes in the target data as the first candidate attribute value, sort all the first candidate attribute values ​​to obtain a first sorting result, and determine the batch attribute values ​​corresponding to the missing attributes in the target data based on the first sorting result.

[0010] In a second aspect, an embodiment of the present application provides a device for extracting attribute values ​​across data structures, the device comprising:

[0011] A first acquisition module is used to acquire graph data corresponding to the graph structure and a data set corresponding to the table structure, determine the attributes of the target data in the data set and the corresponding attribute values, and determine the characteristic values ​​of each node in the graph data, wherein the attributes include existing attributes and missing attributes;

[0012] A first calculation module, configured to calculate a first similarity value representing a grammatical similarity between each node in the graph data and the target data according to an attribute value of the target data and a feature value of each node in the graph data, and determine a first candidate node in the graph data according to the first similarity value;

[0013] A first matching module is used to determine, for any first candidate node, a first characteristic path starting from the first candidate node, match the existing attributes in the target data with the first characteristic path, and determine that the first candidate node corresponding to the first characteristic path matching the existing attributes in the target data is the first candidate matching node;

[0014] A second calculation module is used to calculate, for any first candidate matching node, a second similarity value representing the semantic similarity between the first candidate matching node and the target data according to the feature vector of the first candidate matching node and the attribute vector of the target data, and determine, according to the second similarity value, a first matching node representing the same entity as the target data;

[0015] The second matching module is used to determine, for any matching node, a second feature path starting from the first matching node, match the missing attribute in the target data with the second feature path, determine the feature value corresponding to the second path matching the missing attribute in the target data as a first candidate attribute value, sort all the first candidate attribute values ​​to obtain a first sorting result, and determine batch attribute values ​​corresponding to the missing attribute in the target data according to the first sorting result.

[0016] In a third aspect, an embodiment of the present application provides a computer device, comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method for extracting attribute values ​​across data structures as described in the first aspect is implemented.

[0017] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method for extracting attribute values ​​across data structures as described in the first aspect is implemented.

[0018] Compared with the prior art, the embodiments of the present application have the following beneficial effects: the present application calculates a first similarity value representing the grammatical similarity between each node in the graph data and the target data based on the attribute value of the target data in the target data set and the feature value of the graph data, determines a first candidate node based on the first similarity value, matches the existing attributes in the target data with the first feature path corresponding to the first candidate node to obtain the first candidate matching node, calculates a second similarity value representing the semantic similarity between the first candidate matching node and the target data based on the feature vector of the first candidate matching node and the attribute vector of the target data, determines a first matching node representing the same entity as the target data based on the second similarity value, matches the missing attributes in the target data with the second feature path corresponding to the first matching node to obtain the first candidate attribute value, sorts all the first candidate attribute values, and determines batch attribute values ​​that match the missing attributes. Among them, the first candidate node with grammatical similarity to the target data is screened through the first similarity value, the first candidate node is screened through the existing attributes, and the first matching node with both grammatical similarity and semantic similarity to the target data is screened through the second similarity value, thereby realizing automatic matching of attributes and paths and reducing matching costs. On the basis of improving the speed and flexibility of screening the first matching node, the accuracy of the screened first matching node is also improved. At the same time, the missing attribute is matched with the second feature path corresponding to the first matching node to obtain the first candidate attribute value, and the missing attribute is sorted to obtain batch attribute values ​​corresponding to the missing attribute. On the basis of improving the speed and flexibility of extracting the attribute value of the missing attribute, the accuracy of the extracted attribute value is also improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art 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 creative labor.

[0020] Figure 1 This is a schematic diagram of an application environment of a cross-data structure attribute value extraction method provided in Example 1 of the present application;

[0021] Figure 2 It is a flowchart of a method for extracting attribute values ​​across data structures provided in Example 2 of the present application;

[0022] Figure 3 It is a schematic diagram of a data set corresponding to a table structure provided in Example 2 of the present application;

[0023] Figure 4 A schematic diagram of a graph structure corresponding to graph data provided in Embodiment 2 of the present application;

[0024] Figure 5 It is a flowchart of a method for extracting attribute values ​​across data structures provided in Example 3 of the present application;

[0025] Figure 6 It is a flowchart of a method for extracting attribute values ​​across data structures provided in Embodiment 4 of the present application;

[0026] Figure 7 This is a flowchart of a method for extracting attribute values ​​across data structures provided in Example 5 of the present application;

[0027] Figure 8 This is a flowchart of a method for extracting attribute values ​​across data structures provided in Example 6 of the present application;

[0028] Fig. 9 This is a flow chart of a method for extracting attribute values ​​across data structures provided in Embodiment 7 of the present application;

[0029] Fig.10 This is a flow chart of a method for extracting attribute values ​​across data structures provided in Example 8 of the present application;

[0030] Fig.11 It is a structural diagram of a device for extracting attribute values ​​across data structures provided in Embodiment 9 of the present application;

[0031] Fig.12It is a structural diagram of a computer device provided in Example 10 of the present application. DETAILED DESCRIPTION

[0032] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0033] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.

[0034] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0035] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.

[0036] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0037] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0038] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Artificial intelligence is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.

[0039] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.

[0040] It should be understood that the size of the serial numbers of the steps in the following embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0041] In order to illustrate the technical solution of the present application, a specific embodiment is provided below for illustration.

[0042] The first embodiment of the present application provides a method for extracting attribute values ​​across data structures, which can be applied in the following situations: Figure 1 In an application environment, a server communicates with a client, the server provides a cross-data structure attribute value extraction service, and the client triggers an attribute value extraction task to the server. The client includes but is not limited to a PDA, a desktop computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a cloud computer device, a personal digital assistant (PDA), and other devices. The computer device corresponding to the server can be implemented with an independent server or a server cluster consisting of multiple servers.

[0043] See also Figure 2 , is a flow chart of a cross-data structure attribute value extraction method provided in Example 2 of the present application. The cross-data structure attribute value extraction method is applied to Figure 1 The server in the example connects to the client to obtain the graph data corresponding to the graph structure and the data set corresponding to the table structure sent by the client. Figure 2 As shown, the attribute value extraction method may include the following steps:

[0044] Step S201, obtaining graph data corresponding to the graph structure and a data set corresponding to the table structure, determining the attributes of the target data in the data set and the corresponding attribute values, and determining the feature value of each node in the graph data.

[0045] In the embodiments of the present application, a data set may refer to a collection of text-type data in a table structure, wherein the data set includes multiple data records that record data information, each data record consists of a single or multiple attributes and corresponding attribute values, an attribute may refer to a variable or field that describes the characteristics of a data record, and an attribute value may refer to a specific numerical value of a corresponding attribute, wherein an attribute may include existing attributes and missing attributes, an existing attribute may refer to an attribute that has a corresponding attribute value, a missing attribute may refer to an attribute that does not have a corresponding attribute value, and the target data may refer to a data record containing a missing attribute. Graph data may refer to a knowledge graph of a graph structure composed of nodes, edges, node features, and edge relationship types, wherein a node may represent an entity or object in a knowledge graph, an edge may represent a relationship between nodes, a node feature may refer to data associated with a node (entity) that is used to represent the characteristics or state of a node, and a node feature value is the specific numerical value of the corresponding node feature.

[0046] like Figure 3 As shown, it is a schematic diagram of a table structure corresponding to a data set provided in Example 2 of the present application. The target data set includes 3 target data. tid refers to the serial number of each target data, and the serial numbers are t1, t2 and t3 respectively. eid refers to the serial number of the entity represented by each target data. It can be seen from the figure that the 3 data records correspond to 2 entities, that is, t1 and t3 correspond to the same entity e1, and t2 corresponds to entity e2. Each target data includes 6 attributes: name, gender, email address, address, age and spouse's name. Among them, the existing attributes of each target data include name, gender, email address and address, and the missing attributes include age and spouse's name.

[0047] like Figure 4 As shown, it is a schematic diagram of graph data corresponding to a graph structure provided in Example 2 of the present application. The graph data is a knowledge graph composed of nodes, edges, node features and edge relationship types. The knowledge graph includes 3 nodes, namely v1, v2 and v3. Each node represents an entity in the knowledge graph. For example, for node v3, the node includes 3 features: name, gender and age. The feature values ​​corresponding to each feature are "A3, female, 24" respectively.

[0048] Step S202, calculates a first similarity value representing the grammatical similarity between each node in the graph data and the target data based on the attribute value of the target data and the feature value of each node in the graph data, and determines a first candidate node in the graph data based on the first similarity value.

[0049] In an embodiment of the present application, grammatical similarity may refer to the similarity between the surface form or structure of the nodes in the graph data and the target data. The first similarity value is a score that represents the grammatical similarity between the nodes in the graph data and the target data. The first candidate node may refer to a node obtained by screening according to the first similarity value.

[0050] Specifically, the first similarity value of the syntactic similarity between each node in the graph data and the target data can be calculated according to the Jaccard similarity coefficient, and all the nodes in the graph data can be screened according to a preset threshold and the first similarity value, and the nodes with the first similarity value higher than the preset threshold are determined as the first candidate nodes.

[0051] Step S203, for any first candidate node, determine a first feature path starting from the first candidate node, match the existing attributes in the target data with the first feature path, and determine the first candidate node corresponding to the first feature path that matches the existing attributes in the target data as the first candidate matching node.

[0052] In the embodiment of the present application, a feature path may refer to a path consisting of nodes, features of nodes, and corresponding feature values ​​in graph data, for example, Figure 4 As shown, for node v3, a feature path of node v3 may refer to a feature path composed of node v3, the node's feature "name" and the corresponding feature value "A3", and the feature path may be recorded as ρ = (v3, v14). The first feature path may refer to a path composed of the first candidate node, the feature of the first candidate node and the corresponding feature value. The first candidate matching node may refer to a node obtained by screening according to existing attributes in the target data.

[0053] Specifically, for any first candidate node, all first feature paths starting from the first candidate node are determined, and the existing attributes in the target data are matched with the first feature paths. If all the existing attributes in the target data can find a first feature path starting from the first candidate node, the first candidate node is determined to be the first candidate matching node.

[0054] Step S204, for any first candidate matching node, calculate a second similarity value representing the semantic similarity between the first candidate matching node and the target data based on the feature vector of the first candidate matching node and the attribute vector of the target data, and determine the first matching node representing the same entity as the target data based on the second similarity value.

[0055] In an embodiment of the present application, a feature vector may refer to the vector form of a feature value of a first candidate matching node, an attribute vector may refer to the vector form of an attribute value corresponding to an existing attribute in the target data, semantic similarity may refer to the similarity between the first candidate matching node and the target data in meaning or context, the second similarity value is a score representing the semantic similarity between the first candidate matching node and the target data, and the first matching node may refer to a node representing the same entity as the target data.

[0056] Specifically, the second similarity value of the semantic similarity between the first candidate matching node and the target data may be calculated according to cosine similarity, the second similarity values ​​of all first candidate matching nodes may be sorted, and the first candidate matching node with the largest second similarity value may be determined as the first matching node.

[0057] Step S205: for any matching node, determine a second feature path starting from the first matching node, match the missing attributes in the target data with the second feature path, determine the feature value corresponding to the second path that matches the missing attributes in the target data as the first candidate attribute value, sort all the first candidate attribute values ​​to obtain a first sorting result, and determine the batch attribute values ​​corresponding to the missing attributes in the target data based on the first sorting result.

[0058] In an embodiment of the present application, the second feature path may refer to a path consisting of a first matching node, features of the first matching node, and corresponding feature values; the first candidate attribute value may refer to a feature value of a node in the graph data obtained by screening missing attributes in the target data; the first sorting result may refer to the result of sorting all first candidate attribute values; and the batch attribute value may refer to the attribute value corresponding to the missing attribute in the target data.

[0059] Specifically, for any first matching node, all second feature paths starting from the first matching node are determined, and the missing attributes in the target data are matched with the second feature paths. If a second feature path starting from the first matching node can be found for the missing attribute in the target data, then the feature value represented by the last node in the second feature path is determined to be the first candidate attribute value. Since there may be multiple first matching nodes for each target data, and each first matching node may have multiple second feature paths, for any missing attribute in the target data, there are multiple first candidate attribute values ​​after matching with the second feature path. All first candidate attribute values ​​corresponding to the missing attribute can be sorted by a preset sorting model, and the attribute value with the highest ranking can be selected as the batch attribute value corresponding to the missing attribute.

[0060] For example, for Figure 3 The target data t2 in Figure 4The vertex representing the same entity as the target data is v2. For the missing attribute "age", Figure 4 The only second feature path that matches “age” can be found, that is, ρ = (v2, v13), and the attribute value corresponding to the missing attribute “age” is “24”.

[0061] Optionally, after obtaining the first candidate attribute value corresponding to the missing attribute in the target data, all first candidate attribute values ​​of the missing attribute are formed into a first candidate attribute value set corresponding to the missing attribute.

[0062] In the embodiment of the present application, a first candidate node having grammatical similarity with the target data is screened through a first similarity value, the first candidate node is screened through existing attributes, and a first matching node having both grammatical similarity and semantic similarity with the target data is screened through a second similarity value, thereby realizing automatic matching of attributes and paths and reducing matching costs. While improving the speed and flexibility of screening the first matching node, the accuracy of the screened first matching node is also improved. At the same time, the missing attribute is matched with the second feature path corresponding to the first matching node to obtain the first candidate attribute value, and the missing attribute is sorted to obtain batch attribute values ​​corresponding to the missing attribute. While improving the speed and flexibility of extracting the attribute value of the missing attribute, the accuracy of the extracted attribute value is also improved.

[0063] See also Figure 5 , is a flow chart of a cross-data structure attribute value extraction method provided in Example 3 of the present application. Figure 3 As shown, in the above step S202, according to the attribute value of the target data and the feature value of each node in the graph data, a first similarity value representing the grammatical similarity between each node in the graph data and the target data is calculated, and according to the first similarity value, a first candidate node in the graph data is determined, which may include the following steps:

[0064] Step S501: The attribute values ​​corresponding to all existing attributes in the target data are combined into an attribute value set.

[0065] Step S502: for any node in the graph data, determine the first subgraph data corresponding to the node, and form a feature value set with the feature values ​​of all nodes in the first subgraph data.

[0066] Step S503: Calculate the intersection of the attribute value set and the feature value set, and calculate the union of the attribute value set and the feature value set.

[0067] Step S504: taking the ratio of the intersection to the union as the first similarity value of the node, and determining the first candidate node according to the first similarity values ​​of all nodes in the graph data and a preset threshold.

[0068] In an embodiment of the present application, the attribute value set may refer to the set of attribute values ​​of all existing attributes in the target data, the first sub-graph data may refer to the graph data for any node, including the node and all neighbors of the node, and the feature value set may refer to the set of feature values ​​of all nodes in the first sub-graph data.

[0069] For example, the attribute values ​​corresponding to all existing attributes in the target data are formed into an attribute value set, recorded as Set(t), the feature values ​​of all nodes in the first subgraph data are formed into a feature value set, recorded as Set(v), and the first similarity value is recorded as Jacc(t,v). Then, the first similarity value of the grammatical similarity between each node in the graph data and the target data is calculated according to the Jaccard similarity coefficient, which can be expressed as According to the preset threshold and the first similarity value, all nodes in the graph data are screened, and nodes whose first similarity values ​​are higher than the preset threshold are determined as first candidate nodes.

[0070] In an embodiment of the present application, a first similarity value of a set of attribute values ​​corresponding to an existing attribute and a set of feature values ​​corresponding to any node is calculated based on the Jaccard similarity coefficient, and a first candidate node is obtained based on the first similarity value. A first candidate node having a higher grammatical similarity with the graph data is screened out, thereby improving the accuracy of the screened out first matching node.

[0071] See also Figure 6 , is a flow chart of a cross-data structure attribute value extraction method provided in Example 4 of the present application. Figure 6 As shown, in the above step S204, for any first candidate matching node, according to the feature vector of the first candidate matching node and the attribute vector of the target data, a second similarity value representing the semantic similarity between the first candidate matching node and the target data is calculated, and according to the second similarity value, a first matching node representing the same entity as the target data is determined, which may include the following steps:

[0072] Step S601: for any first candidate matching node, determine the second subgraph data corresponding to the first candidate matching node, and vectorize the feature values ​​of all nodes in the second subgraph data to obtain a feature vector.

[0073] Step S602: vectorize the attribute values ​​corresponding to all existing attributes in the target data to obtain an attribute vector.

[0074] Step S603, calculating the cosine similarity value between the feature vector and the attribute vector, taking the cosine similarity value as the second similarity value of the first candidate matching node, sorting the second similarity values ​​of all first candidate matching nodes, and determining the first matching node representing the same entity as the target data.

[0075] In an embodiment of the present application, the second sub-graph data may refer to graph data for any first candidate matching node, including the first candidate matching node and all neighbors of the first candidate matching node, the feature vector may refer to the vector form of the feature values ​​of all nodes in the second sub-graph data, and the attribute vector may refer to the vector form of the attribute values ​​of all existing attributes in the target data.

[0076] For example, the eigenvalues ​​of all nodes in the second subgraph data are vectorized to obtain the eigenvector, which is recorded as e w , vectorize the attribute values ​​corresponding to all existing attributes in the target data to obtain the attribute vector, denoted as e t , the second similarity value is recorded as sem(t,v), then the second similarity value between the feature vector and the attribute vector is calculated according to the cosine similarity, which can be expressed as sem(t,v)=maxcos(e w ,e t ), sorting the second similarity values ​​of all first candidate matching nodes, and determining the first candidate matching node with the largest second similarity value as the first matching node.

[0077] In an embodiment of the present application, a second similarity value between an attribute vector corresponding to an existing attribute and a feature vector corresponding to any first candidate matching node is calculated based on cosine similarity, an optimal first matching node is obtained based on the second similarity value, and semantic similarity is screened based on grammatical similarity. This improves the speed and flexibility of screening the first matching nodes and also improves the accuracy of the screened first matching nodes.

[0078] See also Figure 7 , is a flow chart of a cross-data structure attribute value extraction method provided in Example 5 of the present application, such as Figure 7 As shown, the attribute value extraction method may further include the following steps:

[0079] Step S701, obtain an inverted index constructed based on all nodes in the graph data and the characteristic edges in all node characteristic paths.

[0080] Step S702: Acquire a matching data structure and a candidate data structure.

[0081] Step S703, after adding or deleting the target feature edge in the graph data to obtain the updated graph data, determine the associated node according to the target feature edge and the inverted index, and determine the associated feature path starting from the associated node according to the associated node.

[0082] In an embodiment of the present application, an inverted index may refer to a pre-built index structure for storing the mapping relationship between all nodes in graph data and the feature edges corresponding to the nodes, which may include a key value and an array corresponding to the key value. The key value may be used to store the inverted index item of the node, and the array corresponding to the key value may be used to store the feature edges corresponding to the node in the inverted index item. The candidate data structure may refer to a pre-built mapping table for recording the mapping relationship between all target data and the first matching node corresponding thereto, and the matching data structure may refer to a pre-built mapping table for recording the mapping relationship between all target data and the first candidate node corresponding thereto. The feature edge may refer to a feature edge in a feature path, and each feature edge may represent a feature of a node, for example, Figure 4 As shown, node v3 includes three feature edges, namely "edges corresponding to name, age and gender", the target feature edge may refer to the feature edge to be added or deleted in the graph data, the associated feature path may refer to the feature path containing the target feature edge, and the associated node may refer to the first node in the associated feature path.

[0083] Specifically, after adding or deleting a target feature edge in the graph data to obtain updated graph data, the target feature edge is used as an index item to query the inverted index, determine that the node corresponding to the target feature edge is the associated node, and determine that the feature path starting from the associated node is the associated feature path.

[0084] Step S704, when matching missing attributes for the associated feature paths corresponding to the associated nodes, determine that the target data corresponding to the associated nodes queried in the matching data structure is the first data to be modified, and determine the incremental attribute value corresponding to the missing attribute in the first data to be modified according to the associated feature paths.

[0085] In the embodiment of the present application, the first data to be modified may refer to target data with the first matching node as an associated node, and the incremental attribute value may refer to an attribute value corresponding to a missing attribute in the first data to be modified.

[0086] Because the first matching node representing the same entity as the target data calculated in the above steps S201 to S204 is determined based on the existing attributes of the target data and has nothing to do with missing attributes, after adding or deleting the target feature edge in the associated feature path to obtain the updated graph data, when matching the missing attributes for the associated feature path corresponding to the associated node, it will not affect the result of the first matching node corresponding to the first data to be modified obtained by the previous matching.

[0087] Specifically, after adding or deleting the target feature edge in the graph data to obtain the updated graph data, when matching the missing attributes of the associated feature paths corresponding to the associated nodes, the associated nodes are used as query conditions to query the matching data structure, and the target data corresponding to the associated nodes are determined to be the first data to be modified, and based on the associated feature paths, the incremental attribute values ​​corresponding to the missing attributes in the first data to be modified are determined.

[0088] Step S705, when matching existing attributes of the associated feature paths corresponding to the associated nodes, determine that the target data corresponding to the associated nodes queried in the candidate data structure is the second data to be modified, and recalculate the attribute values ​​corresponding to the missing attributes in the second data to be modified according to the update graph data to obtain the incremental attribute values ​​corresponding to the missing attributes in the second data to be modified.

[0089] In the embodiment of the present application, the second data to be modified may refer to target data with the first candidate node as an associated node, and the incremental attribute value may refer to the attribute value corresponding to the missing attribute in the second data to be modified.

[0090] Because the first matching node representing the same entity as the target data calculated in the above steps S201 to S204 is determined according to the existing attributes of the target data, after adding or deleting the target feature edge in the associated feature path to obtain the updated graph data, when the existing attributes are matched for the associated feature path corresponding to the associated node, it will affect the result of the first matching node corresponding to the second data to be modified obtained by the previous matching.

[0091] Specifically, after adding or deleting the target feature edge in the graph data to obtain the updated graph data, the candidate data structure is queried with the associated node as the query condition, and the target data corresponding to the associated node is determined to be the second data to be modified. According to the updated graph data, the attribute value corresponding to the missing attribute in the second data to be modified is recalculated to obtain the incremental attribute value corresponding to the missing attribute in the second data to be modified.

[0092] In the embodiment of the present application, by maintaining three auxiliary structures, namely, an inverted index, a candidate data structure, and a matching data structure, after adding or deleting a target feature edge in the graph data to obtain updated graph data, there is no need to recalculate the batch attribute values ​​corresponding to the missing attributes extracted from all target data. Instead, the target data affected by the update in the data set is located based on the auxiliary data structure, and only these targets are updated accordingly based on the matched attribute types, thereby reducing the amount of target data that needs to be processed during the update process, thereby reducing the workload and improving the update speed.

[0093] See also Figure 8 , is a flow chart of a cross-data structure attribute value extraction method provided in Example 6 of the present application. Figure 8As shown, after adding or deleting the target feature edge in the graph data to obtain the updated graph data in the above step S703, the attribute value extraction method may further include the following steps:

[0094] Step S801: if a target feature edge is added to the graph data, the target feature edge is written into a blank key value of the inverted index, and the associated node is written into the array corresponding to the key value.

[0095] Step S802: If the target feature edge is deleted in the graph data, the key value and data corresponding to the target feature edge are removed from the inverted index.

[0096] In an embodiment of the present application, specifically, after adding or deleting a target feature edge in the graph data to obtain an updated graph data, if the target feature edge is added to the graph data, the target feature edge is written into a blank key value of the inverted index, and the associated nodes are written into an array corresponding to the key value; if the target feature edge is deleted from the graph data, the key value and data corresponding to the target feature edge are removed from the inverted index to update the inverted index.

[0097] In an embodiment of the present application, after the target feature edge is added or deleted in the graph data to obtain the updated graph data, the inverted index is updated. By maintaining the inverted index, when it is necessary to query the node corresponding to the feature edge, it can be directly obtained through the inverted index without traversing the entire graph data, thereby improving the query efficiency and ensuring that when the feature edge changes, all related nodes can be updated in time, maintaining the consistency of the graph data, and ensuring accurate results when querying or analyzing.

[0098] See also Fig. 9 , is a flow chart of a cross-data structure attribute value extraction method provided in Example 7 of the present application. Fig. 9 As shown, in the above step S704, determining the incremental attribute value corresponding to the missing attribute in the first data to be modified according to the associated feature path may include the following steps:

[0099] Step S901, obtaining the feature value of the last node in the associated feature path, and updating the first candidate attribute value corresponding to the first data to be modified according to the feature value of the last node in the associated feature path to obtain a second candidate attribute value.

[0100] Step S902: sort the second candidate attribute values ​​to obtain a second sorting result, and determine the incremental attribute value corresponding to the missing attribute in the first data to be modified according to the second sorting result.

[0101] In an embodiment of the present application, the first candidate attribute value may refer to a feature value obtained by filtering out missing attributes in the first data to be modified, the second candidate attribute value may refer to a feature value obtained by filtering out missing attributes in the updated first data to be modified, and the second sorting result may refer to the result of sorting all second candidate attribute values.

[0102] Specifically, if a target feature edge is added to the graph data, the feature value of the last node in the associated feature path is added to the first candidate attribute value set corresponding to the first data to be modified, and an updated first candidate attribute value set is obtained. If the target feature edge is deleted from the graph data, the feature value of the last node in the associated feature path is deleted from the first candidate attribute value set corresponding to the first data to be modified, and an updated first candidate attribute value set is obtained. All second candidate attribute values ​​corresponding to the missing attributes in the first data to be modified are reordered according to a preset sorting model, and the highest-ranked attribute value is selected as the incremental attribute value corresponding to the missing attribute in the first data to be modified.

[0103] In the embodiment of the present application, after adding or deleting the target feature edge in the graph data to obtain the updated graph data, if the missing attribute matching is performed on the associated feature path, the first candidate attribute value corresponding to the missing attribute in the first data to be modified is updated, and the updated candidate attribute value is reordered to obtain the incremental attribute value corresponding to the missing attribute in the first data to be modified. Therefore, after adding or deleting the target feature edge in the graph data to obtain the updated graph data, when the missing attribute matching is performed on the associated feature path corresponding to the associated node, it is not necessary to recalculate the batch attribute values ​​corresponding to the missing attribute extracted from all the target data, but the affected first data to be modified is located according to the associated nodes, the associated feature path and the matching data structure, and only the first data to be modified is quickly recalculated, which reduces the amount of data that needs to be processed during the update process, thereby reducing the workload and improving the update speed.

[0104] See also Fig.10 , is a flow chart of a cross-data structure attribute value extraction method provided in Example 8 of the present application. Fig.10 As shown, in the above step S705, the attribute value corresponding to the missing attribute in the second data to be modified is recalculated according to the update graph data to obtain the incremental attribute value corresponding to the missing attribute in the second data to be modified, which may include the following steps:

[0105] Step S1001, obtaining update graph data, determining a characteristic value of each node in the update graph data, and determining an attribute of the second data to be modified and a corresponding attribute value.

[0106] Step S1002, calculate a third similarity value representing the grammatical similarity between each node in the update graph data and the second data to be modified based on the attribute value of the second data to be modified and the feature value of each node in the update graph data, and determine the second candidate node in the update graph data based on the third similarity value.

[0107] Step S1003: updating the first candidate node corresponding to the second data to be modified in the candidate data structure according to the second candidate node to obtain an updated candidate data structure.

[0108] In the embodiment of the present application, the third similarity value may refer to a score representing the syntactic similarity between a node in the update graph data and the second data to be modified, and the second candidate node may refer to a node obtained by screening according to the second similarity value.

[0109] Specifically, the process of obtaining the second candidate node according to the feature value of each node in the updated graph data and the attribute value of the second data to be modified can refer to the above steps S201 to S202, or the contents of steps S501 to S504. After obtaining the second candidate node corresponding to the second data to be modified, the first candidate node corresponding to the second data to be modified in the candidate data structure is updated to obtain an updated candidate data structure.

[0110] Step S1004, for any second candidate node, determine a third feature path with the second candidate node as the starting point, match the existing attributes in the second data to be modified with the third feature path, and determine that the second candidate node corresponding to the third feature path that matches the existing attributes in the second data to be modified is the second candidate matching node.

[0111] Step S1005, for any second candidate matching node, calculate the fourth similarity value representing the semantic similarity between the second candidate matching node and the second data to be modified based on the feature vector of the second candidate matching node and the attribute vector of the second data to be modified, and determine the second matching node representing the same entity as the second data to be modified based on the fourth similarity value.

[0112] Step S1006: Update the first matching node corresponding to the second data to be modified in the matching data structure according to the second matching node to obtain an updated matching data structure.

[0113] In an embodiment of the present application, the third feature path may refer to a path composed of a second candidate node, features of the second candidate node and corresponding feature values, the second candidate matching node may refer to a node obtained by screening according to existing attributes in the second data to be modified, the fourth similarity value may refer to a score representing the semantic similarity between the second candidate matching node and the second data to be modified, and the second matching node may refer to a node representing the same entity as the second data to be modified.

[0114] Specifically, the process of determining the second matching node representing the same entity as the second data to be modified can refer to the above-mentioned steps S203 to S204, or the contents of steps S601 to S603. After obtaining the second matching node corresponding to the second data to be modified, the first matching node corresponding to the second data to be modified in the matching data structure is updated to obtain an updated matching data structure.

[0115] Step S1007, for any second matching node, determine the fourth characteristic path with the second matching node as the starting point, match the missing attribute in the second data to be modified with the fourth characteristic path, determine the characteristic value corresponding to the fourth characteristic path matching the missing attribute in the second data to be modified as the third candidate attribute value, sort all the third candidate attribute values ​​to obtain a third sorting result, and determine the incremental attribute value corresponding to the missing attribute in the second data to be modified according to the third sorting result.

[0116] In an embodiment of the present application, the fourth feature path may refer to a path composed of the second matching node, the features of the second matching node and the corresponding feature values, the third candidate attribute value may refer to the feature value obtained by screening the missing attributes in the second data to be modified, and the third sorting result may refer to the result of sorting all third candidate attribute values.

[0117] Specifically, the process of determining the incremental attribute value corresponding to the missing attribute in the second data to be modified may refer to the content in the above step S205.

[0118] In an embodiment of the present application, after adding or deleting a target feature edge in the graph data to obtain updated graph data, if existing attribute matching is performed on the associated feature path, the second candidate node, the second matching node, and the incremental attribute value corresponding to the missing attribute in the second data to be modified corresponding to the second data to be modified are recalculated based on the updated graph data, and the candidate data structure is updated based on the second candidate node, and the matching data structure is updated based on the second matching node. Therefore, after adding or deleting a target feature edge in the graph data to obtain updated graph data, when existing attribute matching is performed on the associated feature path corresponding to the associated node, it is not necessary to recalculate the batch attribute values ​​corresponding to the missing attributes extracted from all target data. Instead, the affected second data to be modified is located based on the associated nodes, the associated feature path, and the candidate data structure, and only the second data to be modified is quickly recalculated, thereby reducing the amount of data that needs to be processed during the update process, thereby reducing the workload and improving the update speed.

[0119] Corresponding to the cross-data structure attribute value extraction method of the above embodiment, Fig.11The structure block diagram of the cross-data structure attribute value extraction device provided by the ninth embodiment of the present application is shown. The cross-data structure attribute value extraction device is applied to Figure 1 The server in the embodiment of the present invention is connected to the client to obtain the graph data corresponding to the graph structure and the data set corresponding to the table structure sent by the client. For the convenience of explanation, only the parts related to the embodiment of the present application are shown.

[0120] See also Fig.11 , the attribute value extraction device comprises:

[0121] The first acquisition module 1101 is used to acquire graph data corresponding to the graph structure and a data set corresponding to the table structure, determine the attributes of the target data in the data set and the corresponding attribute values, and determine the characteristic values ​​of each node in the graph data, wherein the attributes include existing attributes and missing attributes;

[0122] A first calculation module 1102 is used to calculate a first similarity value representing the grammatical similarity between each node in the graph data and the target data according to the attribute value of the target data and the feature value of each node in the graph data, and determine a first candidate node in the graph data according to the first similarity value;

[0123] A first matching module 1103 is used to determine, for any first candidate node, a first characteristic path starting from the first candidate node, match the existing attributes in the target data with the first characteristic path, and determine that the first candidate node corresponding to the first characteristic path matching the existing attributes in the target data is the first candidate matching node;

[0124] A second calculation module 1104 is used to calculate, for any first candidate matching node, a second similarity value representing the semantic similarity between the first candidate matching node and the target data according to the feature vector of the first candidate matching node and the attribute vector of the target data, and determine, according to the second similarity value, a first matching node representing the same entity as the target data;

[0125] The second matching module 1105 is used to determine, for any matching node, a second feature path starting from the first matching node, match the missing attribute in the target data with the second feature path, determine the feature value corresponding to the second path matching the missing attribute in the target data as a first candidate attribute value, sort all the first candidate attribute values ​​to obtain a first sorting result, and determine batch attribute values ​​corresponding to the missing attribute in the target data based on the first sorting result.

[0126] Optionally, the first calculation module 1102 includes:

[0127] A first forming unit, configured to form an attribute value set from attribute values ​​corresponding to all existing attributes in the target data;

[0128] A second forming unit is used to determine, for any node in the graph data, first subgraph data corresponding to the node, and form a feature value set from the feature values ​​of all nodes in the first subgraph data;

[0129] a third calculation unit, configured to calculate an intersection of the attribute value set and the feature value set, and calculate a union of the attribute value set and the feature value set;

[0130] The first determination unit is used to use the ratio of the intersection to the union as the first similarity value of the node, and determine the first candidate node according to the first similarity values ​​of all nodes in the graph data and a preset threshold.

[0131] Optionally, the second calculation module 1104 includes:

[0132] A first vectorization unit is used to determine, for any first candidate matching node, second subgraph data corresponding to the first candidate matching node, and vectorize the feature values ​​of all nodes in the second subgraph data to obtain a feature vector;

[0133] A second vectorization unit, used for vectorizing attribute values ​​corresponding to all existing attributes in the target data to obtain an attribute vector;

[0134] The second determination unit is used to calculate the cosine similarity value between the feature vector and the attribute vector, use the cosine similarity value as the second similarity value of the first candidate matching node, sort the second similarity values ​​of all first candidate matching nodes, and determine the first matching node that represents the same entity as the target data.

[0135] Optionally, the attribute value extraction device further includes:

[0136] A second acquisition module is used to acquire an inverted index constructed according to all nodes in the graph data and feature edges in all node feature paths;

[0137] A third acquisition module is used to acquire a matching data structure and a candidate data structure, wherein the matching data structure represents a mapping relationship between all target data and their corresponding first matching nodes, and the candidate data structure represents a mapping relationship between all target data and their corresponding first candidate nodes;

[0138] A third determination module is used to determine an associated node according to the target feature edge and the inverted index after adding or deleting a target feature edge in the graph data to obtain updated graph data, and determine an associated feature path starting from the associated node according to the associated node;

[0139] A first incremental extraction module is used to determine, when matching missing attributes for the associated feature path corresponding to the associated node, that the target data corresponding to the associated node queried in the matching data structure is the first data to be modified, and determine, according to the associated feature path, an incremental attribute value corresponding to the missing attribute in the first data to be modified;

[0140] The second incremental extraction module is used to determine that the target data corresponding to the associated node queried in the candidate data structure is the second data to be modified when matching the existing attributes of the associated feature path corresponding to the associated node, and recalculate the attribute value corresponding to the missing attribute in the second data to be modified according to the update graph data to obtain the incremental attribute value corresponding to the missing attribute in the second data to be modified.

[0141] Optionally, the attribute value extraction device further includes:

[0142] A first updating module, configured to write the target feature edge into a blank key value of the inverted index and write the associated node into an array corresponding to the key value if the target feature edge is added to the graph data;

[0143] The second updating module is used to remove the key value and data corresponding to the target feature edge from the inverted index if the target feature edge is deleted in the graph data.

[0144] Optionally, the first incremental extraction module includes:

[0145] A third updating unit is used to obtain a feature value of the last node in the associated feature path, and update the first candidate attribute value corresponding to the first data to be modified according to the feature value of the last node in the associated feature path to obtain a second candidate attribute value;

[0146] The fourth determining unit is used to sort the second candidate attribute values ​​to obtain a second sorting result, and determine the incremental attribute value corresponding to the missing attribute in the first data to be modified according to the second sorting result.

[0147] Optionally, the second incremental extraction module includes:

[0148] a fourth acquisition unit, configured to acquire update graph data, determine a characteristic value of each node in the update graph data, and determine an attribute of the second data to be modified and a corresponding attribute value;

[0149] a fourth calculation unit, configured to calculate, according to the attribute value of the second data to be modified and the feature value of each node in the update graph data, a third similarity value representing the grammatical similarity between each node in the update graph data and the second data to be modified, and determine, according to the third similarity value, a second candidate node in the update graph data;

[0150] a fourth updating unit, configured to update the first candidate node corresponding to the second data to be modified in the candidate data structure according to the second candidate node, so as to obtain an updated candidate data structure;

[0151] A third matching unit is used to determine, for any second candidate node, a third characteristic path starting from the second candidate node, match the existing attributes in the second data to be modified with the third characteristic path, and determine that the second candidate node corresponding to the third characteristic path matching the existing attributes in the second data to be modified is the second candidate matching node;

[0152] a fifth calculating unit, configured to calculate, for any second candidate matching node, a fourth similarity value representing the semantic similarity between the second candidate matching node and the second data to be modified according to the feature vector of the second candidate matching node and the attribute vector of the second data to be modified, and determine, according to the fourth similarity value, a second matching node representing the same entity as the second data to be modified;

[0153] a fifth updating unit, configured to update, according to the second matching node, the first matching node corresponding to the second data to be modified in the matching data structure, to obtain an updated matching data structure;

[0154] A fourth matching unit is used to determine, for any second matching node, a fourth characteristic path with the second matching node as the starting point, match the missing attribute in the second data to be modified with the fourth characteristic path, determine that the characteristic value corresponding to the fourth characteristic path matching the missing attribute in the second data to be modified is a third candidate attribute value, sort all the third candidate attribute values ​​to obtain a third sorting result, and determine, based on the third sorting result, an incremental attribute value corresponding to the missing attribute in the second data to be modified.

[0155] It should be noted that the information interaction, execution process and other contents between the above-mentioned modules are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.

[0156] Fig.12 This is a schematic diagram of the structure of a computer device provided in Example 10 of the present application. Fig.12As shown, the computer device of this embodiment includes: at least one processor ( Fig.12 Only one is shown), a memory, and a computer program stored in the memory and executable on at least one processor, wherein when the processor executes the computer program, the steps in any of the above-mentioned cross-data structure attribute value extraction method embodiments are implemented.

[0157] The computer device may include, but is not limited to, a processor and a memory. Those skilled in the art will appreciate that Fig.12 These are merely examples of computer devices and do not constitute limitations on the computer devices. The computer devices may include more or fewer components than those shown in the figure, or a combination of certain components, or different components. For example, they may also include a network interface, a display screen, and an input device.

[0158] The processor may be a CPU, or other general-purpose processors, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0159] The memory includes a readable storage medium, an internal memory, etc., wherein the internal memory may be the memory of a computer device, and the internal memory provides an environment for the operation of an operating system and computer-readable instructions in the readable storage medium. The readable storage medium may be a hard disk of a computer device, and in other embodiments may also be an external storage device of a computer device, for example, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on a computer device. Further, the memory may also include both an internal storage unit of a computer device and an external storage device. The memory is used to store an operating system, an application program, a boot loader (BootLoader), data, and other programs, such as program codes of computer programs, etc. The memory may also be used to temporarily store data that has been output or is to be output.

[0160] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned device can refer to the corresponding process in the above-mentioned method embodiment, which will not be repeated here. If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned method embodiment when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may at least include: any entity or device capable of carrying computer program code, recording medium, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electric carrier signals and telecommunication signals.

[0161] The present application implements all or part of the processes in the above-mentioned embodiment method, and may also be completed through a computer program product. When the computer program product runs on a computer device, the computer device can implement the steps in the above-mentioned method embodiment when executing the computer program product.

[0162] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0163] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0164] In the embodiments provided in the present application, it should be understood that the disclosed devices / computer equipment and methods can be implemented in other ways. For example, the device / computer equipment embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0165] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0166] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A method for extracting attribute values ​​across data structures, characterized in that: The attribute value extraction method comprises: Obtaining a data set corresponding to graph data of a graph structure and a table structure, determining the attributes of target data in the data set and the corresponding attribute values, and determining the feature values ​​of each node in the graph data, wherein the attributes include existing attributes and missing attributes, and the data set refers to a collection of text type data of a table structure; Calculate, according to the attribute value of the target data and the feature value of each node in the graph data, a first similarity value representing the grammatical similarity between each node in the graph data and the target data, and determine, according to the first similarity value, a first candidate node in the graph data; For any first candidate node, determine a first characteristic path starting from the first candidate node, match the existing attributes in the target data with the first characteristic path, and determine the first candidate node corresponding to the first characteristic path matching the existing attributes in the target data as the first candidate matching node, wherein the first characteristic path is a path consisting of the first candidate node, the features of the first candidate node and the corresponding feature values; For any first candidate matching node, calculate a second similarity value representing the semantic similarity between the first candidate matching node and the target data according to the feature vector of the first candidate matching node and the attribute vector of the target data, and determine a first matching node representing the same entity as the target data according to the second similarity value; For any matching node, determine a second feature path with the first matching node as the starting point, match the missing attribute in the target data with the second feature path, determine the feature value corresponding to the second feature path matching the missing attribute in the target data as the first candidate attribute value, sort all the first candidate attribute values ​​to obtain a first sorting result, and determine the batch attribute values ​​corresponding to the missing attribute in the target data based on the first sorting result, wherein the second feature path is a path composed of the first matching node, the features of the first matching node and the corresponding feature values.

2. The cross-data structure attribute value extraction method according to claim 1, characterized in that: The step of calculating a first similarity value representing the grammatical similarity between each node in the graph data and the target data according to the attribute value of the target data and the feature value of each node in the graph data, and determining a first candidate node in the graph data according to the first similarity value includes: The attribute values ​​corresponding to all existing attributes in the target data form an attribute value set; For any node in the graph data, determine first subgraph data corresponding to the node, and form a feature value set with feature values ​​of all nodes in the first subgraph data; Calculating the intersection of the attribute value set and the feature value set, and calculating the union of the attribute value set and the feature value set; The ratio of the intersection to the union is used as the first similarity value of the node, and the first candidate node is determined according to the first similarity values ​​of all nodes in the graph data and a preset threshold.

3. The cross-data structure attribute value extraction method according to claim 1, characterized in that: The step of calculating, for any first candidate matching node, a second similarity value representing the semantic similarity between the first candidate matching node and the target data according to the feature vector of the first candidate matching node and the attribute vector of the target data, and determining, according to the second similarity value, a first matching node representing the same entity as the target data, includes: For any first candidate matching node, determine the second subgraph data corresponding to the first candidate matching node, and vectorize the feature values ​​of all nodes in the second subgraph data to obtain a feature vector; Vectorize the attribute values ​​corresponding to all existing attributes in the target data to obtain an attribute vector; The cosine similarity value between the feature vector and the attribute vector is calculated, the cosine similarity value is used as the second similarity value of the first candidate matching node, the second similarity values ​​of all first candidate matching nodes are sorted, and the first matching node representing the same entity as the target data is determined.

4. The cross-data structure attribute value extraction method according to claim 1, characterized in that: The attribute value extraction method further includes: Obtain an inverted index constructed based on all nodes in the graph data and feature edges in all node feature paths; Acquire a matching data structure and a candidate data structure, wherein the matching data structure represents a mapping relationship between all target data and their corresponding first matching nodes, and the candidate data structure represents a mapping relationship between all target data and their corresponding first candidate nodes; After adding or deleting a target feature edge in the graph data to obtain updated graph data, determining an associated node according to the target feature edge and the inverted index, and determining an associated feature path starting from the associated node according to the associated node; When matching missing attributes for the associated feature path corresponding to the associated node, determining that the target data corresponding to the associated node queried in the matching data structure is the first data to be modified, and determining the incremental attribute value corresponding to the missing attribute in the first data to be modified according to the associated feature path; When matching existing attributes of the associated feature path corresponding to the associated node, it is determined that the target data corresponding to the associated node queried in the candidate data structure is the second data to be modified, and the attribute values ​​corresponding to the missing attributes in the second data to be modified are recalculated according to the update graph data to obtain the incremental attribute values ​​corresponding to the missing attributes in the second data to be modified.

5. The cross-data structure attribute value extraction method according to claim 4, characterized in that: After adding or deleting the target feature edge in the graph data to obtain the updated graph data, the method further includes: If the target feature edge is added to the graph data, the target feature edge is written into a blank key value of the inverted index, and the associated node is written into an array corresponding to the key value; If the target feature edge is deleted from the graph data, the key value and data corresponding to the target feature edge are removed from the inverted index.

6. The cross-data structure attribute value extraction method according to claim 4, characterized in that: The step of determining, according to the associated feature path, an incremental attribute value corresponding to a missing attribute in the first data to be modified includes: Obtaining a feature value of the last node in the associated feature path, and updating a first candidate attribute value corresponding to the first data to be modified according to the feature value of the last node in the associated feature path to obtain a second candidate attribute value; The second candidate attribute values ​​are sorted to obtain a second sorting result, and according to the second sorting result, an incremental attribute value corresponding to the missing attribute in the first data to be modified is determined.

7. The cross-data structure attribute value extraction method according to claim 4, characterized in that: The step of recalculating the attribute value corresponding to the missing attribute in the second data to be modified according to the update graph data to obtain the incremental attribute value corresponding to the missing attribute in the second data to be modified includes: Acquire update graph data, determine a characteristic value of each node in the update graph data, and determine an attribute of the second data to be modified and a corresponding attribute value; Calculate, according to the attribute value of the second data to be modified and the feature value of each node in the update graph data, a third similarity value representing the grammatical similarity between each node in the update graph data and the second data to be modified, and determine, according to the third similarity value, a second candidate node in the update graph data; According to the second candidate node, updating the first candidate node corresponding to the second data to be modified in the candidate data structure to obtain an updated candidate data structure; For any second candidate node, determine a third characteristic path starting from the second candidate node, match the existing attributes in the second data to be modified with the third characteristic path, and determine the second candidate node corresponding to the third characteristic path matching the existing attributes in the second data to be modified as the second candidate matching node; For any second candidate matching node, calculate a fourth similarity value representing the semantic similarity between the second candidate matching node and the second data to be modified according to the feature vector of the second candidate matching node and the attribute vector of the second data to be modified, and determine a second matching node representing the same entity as the second data to be modified according to the fourth similarity value; According to the second matching node, updating the first matching node corresponding to the second data to be modified in the matching data structure to obtain an updated matching data structure; For any second matching node, determine a fourth feature path with the second matching node as the starting point, match the missing attribute in the second data to be modified with the fourth feature path, determine the feature value corresponding to the fourth feature path that matches the missing attribute in the second data to be modified as the third candidate attribute value, sort all the third candidate attribute values ​​to obtain a third sorting result, and determine the incremental attribute value corresponding to the missing attribute in the second data to be modified based on the third sorting result.

8. A device for extracting attribute values ​​across data structures, characterized in that: The attribute value extraction device comprises: A first acquisition module is used to acquire a data set corresponding to the graph data of the graph structure and the table structure, determine the attributes of the target data in the data set and the corresponding attribute values, and determine the characteristic values ​​of each node in the graph data, wherein the attributes include existing attributes and missing attributes, and the data set refers to a collection of text type data of the table structure; A first calculation module, configured to calculate a first similarity value representing a grammatical similarity between each node in the graph data and the target data according to an attribute value of the target data and a feature value of each node in the graph data, and determine a first candidate node in the graph data according to the first similarity value; A first matching module is used to determine, for any first candidate node, a first characteristic path starting from the first candidate node, match the existing attributes in the target data with the first characteristic path, and determine that the first candidate node corresponding to the first characteristic path matching the existing attributes in the target data is the first candidate matching node, wherein the first characteristic path is a path consisting of the first candidate node, the features of the first candidate node and the corresponding feature values; A second calculation module is used to calculate, for any first candidate matching node, a second similarity value representing the semantic similarity between the first candidate matching node and the target data according to the feature vector of the first candidate matching node and the attribute vector of the target data, and determine, according to the second similarity value, a first matching node representing the same entity as the target data; The second matching module is used to determine, for any matching node, a second feature path starting from the first matching node, match the missing attribute in the target data with the second feature path, determine the feature value corresponding to the second feature path matching the missing attribute in the target data as the first candidate attribute value, sort all the first candidate attribute values ​​to obtain a first sorting result, and determine the batch attribute values ​​corresponding to the missing attribute in the target data according to the first sorting result, wherein the second feature path is a path composed of the first matching node, the features of the first matching node and the corresponding feature values.

9. A computer device, characterized in that: The computer device includes a processor, a memory, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the method for extracting attribute values ​​across data structures as described in any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method for extracting attribute values ​​across data structures as described in any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Data analysis method based on knowledge graph

    CN117932089A

  • Entity error correction method and device for structured data, equipment and medium

    CN118152381A