Identification and resolution knowledge graph construction method based on adversarial neural network
By training and cleaning adversarial neural networks, an identifier parsing knowledge graph based on adversarial neural networks is constructed. This solves the problems of low efficiency and low accuracy of traditional methods in large-scale data processing, and achieves efficient and accurate entity and relation extraction, thereby improving the quality of the knowledge graph.
Patent Information
- Application Number
- CN202411340889.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-25
- Publication Date
- 2025-11-11
- Estimated Expiration
- 2044-09-25
AI Technical Summary
Traditional knowledge graph construction methods are inefficient and have poor scalability when dealing with large-scale data. They cannot effectively identify and process complex and ambiguous information, resulting in low accuracy in entity and relation extraction, which reduces the efficiency and quality of knowledge graph construction.
We employ an adversarial neural network-based identifier resolution method. Through data cleaning, entity recognition, relation extraction, and triple construction, combined with graph database storage, we utilize the adversarial neural network training to acquire the discriminator and generator capabilities, and construct a complete knowledge graph.
It improves efficiency and scalability in large-scale data processing, effectively identifies and processes complex and ambiguous information in text, enhances the accuracy of entity and relation extraction, and improves the efficiency and quality of knowledge graph construction.
Smart Images

Figure CN119537601B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of Internet technology, and in particular to a method for constructing a knowledge graph based on identifier parsing using adversarial neural networks. Background Technology
[0002] In an industrial internet or Internet of Things (IoT) environment, there are a large number of devices and data resources in different systems, and there are complex upstream and downstream dependencies or functional collaboration relationships between devices.
[0003] Traditional knowledge graph construction methods, such as rule-based or template-based methods, cannot achieve higher efficiency and better scalability when processing large-scale data. In key steps such as entity recognition and relation extraction, they cannot effectively identify and process complex and ambiguous information in text, which reduces the accuracy of entity and relation extraction. At the same time, it reduces the efficiency and quality of knowledge graph construction.
[0004] Therefore, this invention proposes a method for constructing a knowledge graph based on identifier parsing using an adversarial neural network. Summary of the Invention
[0005] This invention provides a knowledge graph construction method based on adversarial neural networks for identifier parsing. This method addresses the shortcomings of existing technologies, which cannot achieve higher efficiency and better scalability when processing large-scale data. In key steps such as entity recognition and relation extraction, the method cannot effectively identify and process complex and ambiguous information in text, thus reducing the accuracy of entity and relation extraction. At the same time, it reduces the efficiency and quality of knowledge graph construction.
[0006] On one hand, this invention provides a method for constructing a knowledge graph based on identifier parsing using an adversarial neural network, comprising:
[0007] Step 1: Obtain various types of data related to identifier resolution, and clean and transform the various types of data related to identifier resolution;
[0008] Step 2: Perform entity recognition on the cleaned and transformed data based on the BERT model to obtain entity recognition results, and extract semantic relationships between entities from the text using a recurrent neural network to obtain relationship extraction results;
[0009] Step 3: Based on the entity recognition results and relation extraction results, construct "entity-relation-entity" triples to form a preliminary knowledge graph, and store the preliminary knowledge graph using a graph database;
[0010] Step 4: Use the preliminary knowledge graph as a dataset to train the adversarial neural network. Employ an alternating training strategy and introduce a Self-Attention mechanism to obtain the discriminant's discrimination ability and the generator's data generation ability.
[0011] Step 5: Based on the discriminant's discrimination ability and the generator's data generation ability, obtain the entities and relations trained by the adversarial neural network, and transform them into nodes and edges in the knowledge graph to construct a complete knowledge graph.
[0012] According to the present invention, a method for constructing a knowledge graph based on an adversarial neural network for identifier resolution is provided, which acquires various types of data related to identifier resolution and cleans and transforms the various types of data related to identifier resolution, including:
[0013] Obtain various types of data related to identifier resolution from the identifier database, and combine these data into a dataset.
[0014] The dataset is cleaned and transformed. Based on the cleaned and transformed dataset, entity names or other identifying text information that is not entity names are obtained, and the entity names or other identifying text information that is not entity names are mapped to unique entity IDs.
[0015] The relationship between entities is determined based on the unique entity ID;
[0016] Obtain relationship descriptions from other identifying text information that is not entity name, perform standardization processing, and obtain consistent relationship labels.
[0017] According to the present invention, a method for constructing a knowledge graph based on an adversarial neural network for identifier parsing, which determines the relationship between entities based on the unique entity ID, includes:
[0018] The entity name feature and entity attribute feature are determined based on the unique entity ID, and the initial entity feature is generated based on the entity name feature and entity attribute feature.
[0019] The initial entity features are input into a deep neural network based on relation representation to extract the relation features of the entities;
[0020] Obtain the Manhattan distance between entities, determine the similarity between entities based on the Manhattan distance, and select the two entities with the highest similarity as the aligned entities;
[0021] Obtain the target relationship features between aligned entities, and determine the feature loss term based on the difference between the target relationship features and the preset entity relationships;
[0022] The local relation feature description components and global relation feature description components between aligned entities are determined based on the feature loss term;
[0023] Obtain the entity representations corresponding to the local relation feature description components and the global relation feature description components respectively;
[0024] The predicted missing relation of the aligned entity is determined based on the entity representation, and the preset retention relation of the aligned entity is determined based on the predicted missing relation and the preset relation table.
[0025] Obtain the granular feature representation information of each aligned entity, and obtain the node feature representation information between aligned entities based on the granular feature representation information;
[0026] Based on the node feature representation information between aligned entities, the relationship node feature representation information between aligned entities is determined according to a pre-constructed adaptive connection matrix based on the relationship type;
[0027] The relationship type between the aligned nodes is determined based on the feature representation information of the relationship nodes, and the matching relationship is obtained from the preset reserved relationships based on the relationship type.
[0028] According to the present invention, a method for constructing a knowledge graph based on an adversarial neural network for identifier parsing involves obtaining entity names or other identifying text information (not entity names) from a cleaned and transformed dataset, and mapping this identifying text information to unique entity IDs, including:
[0029] Extract all information containing entity names or other identifying text information that is not entity names from the cleaned and transformed data, and determine the specific description and attributes of the entity names or other identifying text information that is not entity names based on all information containing entity names or other identifying text information that is not entity names.
[0030] Based on the specific description and attributes of the entity name or other identifying text information, determine the type and attribute value of the entity name or other identifying text information, and obtain a unique identifier for each entity name or other identifying text information.
[0031] The reverse mapping method is used to map the unique identifier of the entity name or other identifying textual information that is not the entity name to the original entity name.
[0032] According to the present invention, a method for constructing a knowledge graph based on an adversarial neural network for identifier parsing involves performing entity recognition on the cleaned and transformed data using the BERT model to obtain entity recognition results, and extracting semantic relationships between entities from the text using a recurrent neural network to obtain relationship extraction results, including:
[0033] The cleaned and transformed data is converted into input text in a uniform format, and the input text is then converted into a fixed-length sequence.
[0034] The corresponding pre-trained BERT model is determined based on the text features of the input text, and the transformed input text is then input into the pre-trained BERT model.
[0035] Based on the output of the BERT model, obtain one or more labels for each word in the input text, identify entities in the input text based on the one or more labels, obtain entity recognition results, and perform classification.
[0036] For the classified entities, semantic relationships between entities are extracted from the text using a recurrent neural network to obtain the relationship extraction results.
[0037] According to the present invention, a method for constructing a knowledge graph based on an adversarial neural network for identifier parsing constructs "entity-relation-entity" triples based on entity recognition results and relation extraction results to form a preliminary knowledge graph, and stores the preliminary knowledge graph using a graph database, including:
[0038] The entity recognition results are converted into triples, where each entity contains a unique ID, category, and text description;
[0039] The relation extraction results are converted into triples, where each triple contains two attributes: antecedent and consequent.
[0040] Organize the transformed entities and relations into a graph structure, and obtain the node corresponding to each entity and the edge corresponding to each relation;
[0041] A preliminary knowledge graph is formed based on the nodes corresponding to each entity and the edges corresponding to each relationship, and the preliminary knowledge graph is stored using a graph database.
[0042] According to the present invention, a method for constructing a knowledge graph based on an adversarial neural network for identifier parsing is provided. The preliminary knowledge graph is used as a dataset to train the adversarial neural network. An alternating training strategy is employed, and a self-attention mechanism is introduced to obtain the discriminative ability of the discriminator and the data generation ability of the generator. The method includes:
[0043] Define an adversarial neural network based on a discriminator network and a generator network;
[0044] When training the discriminator network, the discriminator predicts whether the input sample comes from the real knowledge graph. At the same time, the loss function output by the discriminator is optimized based on cross-entropy.
[0045] When training the generator network, the generator generates samples that correspond to real knowledge graph data. The goal of the generator is to maximize the confusion rate of the discriminator in correctly classifying the samples generated by the generator.
[0046] An alternating training strategy is adopted and a self-attention mechanism is introduced. The discriminant's discrimination ability and the generator's data generation ability are obtained based on cross-entropy optimization and confusion rate.
[0047] According to the present invention, a method for constructing a knowledge graph based on an adversarial neural network for identifier parsing is provided. This method acquires entities and relations trained by the adversarial neural network based on the discriminant's discriminative ability and the generator's data generation ability, and transforms them into nodes and edges in the knowledge graph to construct a complete knowledge graph. The method includes:
[0048] Based on the discriminant's discrimination ability and the generator's data generation ability, the text entities and relationships obtained after training the adversarial neural network are acquired.
[0049] Obtain the location of text entities and relationships, and use a clustering algorithm to cluster entities and relationships with similar attributes;
[0050] Get the types of text entities and relations, and define the link relationships between entities and relations;
[0051] The clustering results and links are transformed into nodes and edges in a knowledge graph. The generated nodes and edges are stored in a knowledge graph database to construct a complete knowledge graph.
[0052] According to the present invention, a method for constructing a knowledge graph based on an adversarial neural network for identifier parsing further includes, before using the preliminary knowledge graph as a dataset to train the adversarial neural network:
[0053] Obtain unlabeled samples from the knowledge graph;
[0054] Calculate the expected loss rate for unlabeled samples identified as positive samples and the expected loss rate for unlabeled samples identified as negative samples:
[0055] ;
[0056] in, This represents the expected loss rate when unlabeled samples are considered positive samples. Represented as a set of unlabeled triples, Let represent the total number of unlabeled triples, where i represents the i-th unlabeled sample, and ln represents the natural logarithm. Let S be the loss factor, S be the decision function, and t be the time series factor. Let represent the splitting weight of the i-th unlabeled sample in the normal sample. This is represented as the decision weight factor of the i-th unlabeled sample in the normal sample;
[0057] ;
[0058] in, This represents the expected loss rate when unlabeled samples are identified as negative samples. This represents the number of unlabeled triples in the set of positive samples. This is represented as the decision weight factor for the i-th unlabeled sample in the negative state samples;
[0059] Calculate the first difference between the expected loss rate of unlabeled samples identified as positive samples and the expected loss rate of unlabeled samples identified as negative samples;
[0060] If the first difference is not within the preset difference range, it is determined that the number of samples is insufficient, and a reminder to resample negative samples is issued.
[0061] Compared with the prior art, the beneficial effects of this application are as follows:
[0062] By performing entity recognition and relation extraction on preprocessed identifier parsing data and constructing "entity-relation-entity" triples, a preliminary knowledge graph is formed. Based on adversarial neural networks, the trained entities and relations are obtained and transformed into nodes and edges in the knowledge graph, thus constructing a complete knowledge graph. This approach has higher efficiency and better scalability when processing large-scale data. In key steps such as entity recognition and relation extraction, it can effectively identify and process complex and ambiguous information in text, improving the accuracy of entity and relation extraction. At the same time, it improves the efficiency and quality of knowledge graph construction. Attached Figure Description
[0063] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0064] Figure 1 This is a flowchart illustrating the method for constructing a knowledge graph based on an adversarial neural network according to an embodiment of the present invention.
[0065] Figure 2 This is a schematic diagram of the process for cleaning and transforming various types of data related to identifier resolution, provided by an embodiment of the present invention. Detailed Implementation
[0066] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0067] Example 1:
[0068] This invention provides a method for constructing a knowledge graph based on identifier parsing using an adversarial neural network, such as... Figure 1 As shown, the method mainly includes the following steps:
[0069] Step 1: Obtain various types of data related to identifier resolution, and clean and transform the various types of data related to identifier resolution;
[0070] Step 2: Perform entity recognition on the cleaned and transformed data based on the BERT model to obtain entity recognition results, and extract semantic relationships between entities from the text using a recurrent neural network to obtain relationship extraction results;
[0071] Step 3: Based on the entity recognition results and relation extraction results, construct "entity-relation-entity" triples to form a preliminary knowledge graph, and store the preliminary knowledge graph using a graph database;
[0072] Step 4: Use the preliminary knowledge graph as a dataset to train the adversarial neural network. Employ an alternating training strategy and introduce a Self-Attention mechanism to obtain the discriminant's discrimination ability and the generator's data generation ability.
[0073] Step 5: Based on the discriminant's discrimination ability and the generator's data generation ability, obtain the entities and relations trained by the adversarial neural network, and transform them into nodes and edges in the knowledge graph to construct a complete knowledge graph.
[0074] In this embodiment, identifier resolution refers to the process of uniquely identifying and describing items, concepts, or entities. It is typically used in databases to record and manage information. These identifiers can be strings, numbers, color codes, or other forms of symbols.
[0075] In this embodiment, data cleaning includes:
[0076] Remove missing values: Check the dataset for missing identifiers, such as entity IDs or relationship labels, and perform appropriate processing, such as deleting records with missing values or imputing them with appropriate values.
[0077] Remove duplicate values: For duplicate records with the same identification information, perform deduplication to reduce data redundancy and noise.
[0078] Outlier handling: Identify and process outlier information in the data, such as incorrect formatting, non-compliant or out-of-range values.
[0079] In this embodiment, the data transformation includes:
[0080] Text data vectorization: For identifier data containing text information (such as entity names, relationship descriptions, etc.), BERT text embedding technology is used to convert it into a vector representation so that it can be processed by neural network models.
[0081] Identification information encoding: For categorized identification information (such as entity type, relationship type, etc.), one-hot encoding is used for encoding.
[0082] In this embodiment, BERT is a pre-trained language representation model used to encode natural language text, thereby enabling natural language understanding tasks such as text classification, named entity recognition, semantic role filling, sentiment analysis, machine translation, and speech recognition.
[0083] In this embodiment, entity recognition is an information extraction technique used to identify entities with specific meanings in text. Entities in the field of identifier resolution typically include, but are not limited to, companies, devices, products, and logos. The goal of entity recognition is to find and classify these entities in text, thereby helping to understand the topic and context of the text.
[0084] Relation extraction: Relation extraction refers to the process of identifying semantic relationships between entities in text. After entity identification, relation extraction further analyzes how entities are related to each other. These relationships can be:
[0085] Interaction relationship: such as device A and device B interacting;
[0086] Location relationship: such as the location of equipment or products in a warehouse, production line, or geographical area;
[0087] Ownership: such as a piece of equipment or product belonging to a certain company.
[0088] In this embodiment, recurrent neural networks are typically used to process sequential data. They utilize a "memory" mechanism to pass the hidden state from the previous time step to the hidden state at the current time step, thereby enabling the extraction of relationships from the sequential data.
[0089] In this embodiment, the "entity-relationship-entity" triple is a data structure used to describe the relationship between entities. The "entity-relationship-entity" triple can be written as ER-E or ERE. For example, "city-own-university" can be written as "city E -- R -- university E".
[0090] In this embodiment, the graph database is a database based on a graph model, capable of efficiently storing, querying, and managing graph data. Graph databases use a graphical approach to represent relationships between entities, rather than using tables and columns. Graph databases typically use triangular tables to represent relationships between entities, called graphs. Each node (also called a vertex) in the graph represents an entity, and edges represent relationships between entities. Common graph databases include Neo4j, OrientDB, and ArangoDB.
[0091] In this embodiment, a knowledge graph is a system for organizing and representing human knowledge and relationships in a graphical way, organizing various forms of knowledge such as language, facts, and concepts into an organized structure and relationships. A knowledge graph consists of multiple components, including entities, attributes, relationships, types, and ontology. Entities are the basic units in a knowledge graph, representing things or concepts in the real world. Attributes are a set of part-of-speech terms describing entities, such as a person's occupation, gender, or date of birth. Relationships are the connections between entities, used to describe the relationships between them, such as the relationship between a student and a teacher, or a car and a driver. Types are a set of terms classifying entities, such as people, places, and times. An ontology is a set of rules defining entities, attributes, and relationships, used to describe the structure and semantics of the knowledge graph.
[0092] In this embodiment, the basic architecture of the adversarial neural network includes two main components: a generator and a discriminator. These two components compete with each other, forming a dynamic "game". This mechanism is derived from the concept of a "zero-sum game" in game theory, where the gain of one side means the loss of the other side.
[0093] Generator: The generator's task is to produce data samples from random noise, which should mimic the distribution of real data as closely as possible. It takes random noise as input and outputs a sample designed to deceive the discriminator into believing it is real.
[0094] Discriminator: A discriminator is a classifier whose goal is to distinguish between real data and fake data generated by the generator. It takes a data sample as input and outputs a probability value representing the probability that the sample is real data.
[0095] In this embodiment, the Self-Attention mechanism is used to extract local dependencies in sequence data.
[0096] The beneficial effects of the above technical solution are as follows: by performing entity recognition and relation extraction on the preprocessed identifier parsing related data, and constructing "entity-relationship-entity" triples to form a preliminary knowledge graph, and training based on adversarial neural networks to obtain trained entities and relations, and transforming them into nodes and edges in the knowledge graph, a complete knowledge graph can be constructed. It can have higher efficiency and better scalability when processing large-scale data. In key steps such as entity recognition and relation extraction, it can effectively identify and process complex and ambiguous information in text, improve the accuracy of entity and relation extraction, and at the same time improve the construction efficiency and quality of knowledge graph.
[0097] Example 2:
[0098] Based on Example 1, this embodiment of the invention acquires various types of data related to identifier resolution, and cleans and transforms the various types of data related to identifier resolution, such as... Figure 2 As shown, it includes:
[0099] S01: Obtain various types of data related to identifier resolution from the identifier database, and combine these various types of data related to identifier resolution into a dataset;
[0100] S02: Clean and transform the dataset, obtain entity names or other identifying text information that is not entity names based on the cleaned and transformed dataset, and map the entity names or other identifying text information that is not entity names to a unique entity ID;
[0101] S03: Determine the relationship between entities based on the unique entity ID;
[0102] S04: Obtain the relationship description from other identifying text information that is not the entity name, perform standardization processing, and obtain consistent relationship labels.
[0103] In this embodiment, the identifier database is a type of database used to store and manage the identity information of entity objects. The identifier database typically contains a primary key to uniquely identify each entity object, as well as other attributes to describe the detailed information of the entity object.
[0104] In this embodiment, a dataset is a set of organized data samples. A dataset typically consists of a set of data, which can be numbers or text.
[0105] In this embodiment, an entity refers to a thing or concept with independent meaning in the real world. It can be a concrete object, an abstract concept, or a natural phenomenon, such as a table, a car, a country, or music.
[0106] In this embodiment, other identifying text information may be: binary code text information, image and video text information, and audio text information.
[0107] In this embodiment, relationship description refers to the text information that does not contain entity names, which usually includes some relationship descriptions to describe the relationship between different concepts. These relationship descriptions can be simple words or phrases, or more complex sentences or paragraphs. For example, when mentioning the relationship between one person and another in a document, simple relationship descriptions such as "are friends" or "are siblings" can be used, or more specific descriptions can be used to express the relationship, such as "she is his mother".
[0108] In this embodiment, entity ID mapping is a method for establishing an association between unstructured data such as objects, concepts, and entities in the real world and specific records in a computer database. In entity ID mapping, each entity is assigned a unique ID, which is usually relative to a certain reference system. This reference system can be physical, such as a geographical location or postal code, or logical, such as a product model or customer number.
[0109] The beneficial effects of the above technical solution are: cleaning and transforming various datasets related to identifier resolution to obtain entity names or other identifying text information and mapping them to unique entity IDs can improve data consistency and accuracy, and help to better understand and analyze the data.
[0110] Example 3:
[0111] Based on Embodiment 2, this embodiment of the invention determines the relationship between entities according to the unique entity ID, including:
[0112] The entity name feature and entity attribute feature are determined based on the unique entity ID, and the initial entity feature is generated based on the entity name feature and entity attribute feature.
[0113] The initial entity features are input into a deep neural network based on relation representation to extract the relation features of the entities;
[0114] Obtain the Manhattan distance between entities, determine the similarity between entities based on the Manhattan distance, and select the two entities with the highest similarity as the aligned entities;
[0115] Obtain the target relationship features between aligned entities, and determine the feature loss term based on the difference between the target relationship features and the preset entity relationships;
[0116] The local relation feature description components and global relation feature description components between aligned entities are determined based on the feature loss term;
[0117] Obtain the entity representations corresponding to the local relation feature description components and the global relation feature description components respectively;
[0118] The predicted missing relation of the aligned entity is determined based on the entity representation, and the preset retention relation of the aligned entity is determined based on the predicted missing relation and the preset relation table.
[0119] Obtain the granular feature representation information of each aligned entity, and obtain the node feature representation information between aligned entities based on the granular feature representation information;
[0120] Based on the node feature representation information between aligned entities, the relationship node feature representation information between aligned entities is determined according to a pre-constructed adaptive connection matrix based on the relationship type;
[0121] The relationship type between the aligned nodes is determined based on the feature representation information of the relationship nodes, and the matching relationship is obtained from the preset reserved relationships based on the relationship type.
[0122] In this embodiment, entity name features refer to the information or characteristics that can be obtained based on the entity's name or title, such as:
[0123] Entity type: Describes the type of entity, such as product, service, or location.
[0124] Entity name: The name or designation that describes the entity itself, such as "Apple", "Starbucks Coffee", or "Sanlitun, Beijing".
[0125] Entity aliases: Describes the alternative names or nicknames of an entity in other contexts, such as "headquarters building" or "world's largest bookstore chain".
[0126] Entity’s main purpose: Describe the main purpose or function of the entity, such as “mobile phone”, “TV remote control”, “bus route map”.
[0127] Entity characteristics: Describe some characteristics of the entity, such as "apple" is a red oval fruit, "TV remote control" has multiple buttons, and "bus route map" shows the bus route.
[0128] In this embodiment, entity attribute features refer to a set of properties or characteristics that describe an entity, such as:
[0129] Geographic location features: Characteristics that describe the spatial location of an entity, such as longitude, latitude, and altitude.
[0130] Physical property characteristics: Characteristics that describe the physical properties of an entity, such as size, shape, color, and density.
[0131] Time attribute characteristics: Characteristics that describe the time attributes of an entity, such as production date, useful life, and expiration date.
[0132] Social attributes: These describe the characteristics of an entity in terms of social relationships, such as brand, manufacturer, distributor, and user group.
[0133] In this embodiment, the initial entity features refer to the basic attributes of an entity when it is created, that is, the most basic features of the entity, such as a person's name or a place name.
[0134] In this embodiment, the relation-based deep neural network is a neural network model that can learn the relationships between entities. It can encode the semantic information between entities into the output of the neural network. Relation-based deep neural networks typically use a multilayer perceptron as the main neural network structure and take the relationships between entities as input, encoding the relationships between entities into the output of the neural network. Examples include bidirectional Gated Recurrent Neural Network and Graph Convolutional Network.
[0135] In this embodiment, extracting entity relation features refers to automatically identifying the relationships between entities from unstructured data. Entity relation features refer to the relationships between entities, such as:
[0136] The relationship between entity A and entity B is one of "ownership", meaning that entity B belongs to entity A.
[0137] The relationship between entity A and entity B is one of "inclusion", meaning that entity A is included in entity B.
[0138] The relationship between entity A and entity B is one of "temporal sequence", meaning that entity B occurs after entity A.
[0139] In this embodiment, the Manhattan distance between entities refers to the shortest path distance between two entities, that is, the actual physical distance between entities.
[0140] In this embodiment, aligning entities refers to precisely placing multiple objects on the same plane or ensuring that their positions and orientations meet certain specific requirements.
[0141] In this embodiment, aligning the target relationship features between entities refers to determining the relationship between a set of entities when processing them. For example, in a shopping list application, the relationship between a product and its buyer needs to be displayed along with its name. Therefore, it is necessary to determine the relationship between the product and the buyer (e.g., "the buyer bought this product") and associate it with the product name.
[0142] In this embodiment, the feature loss term refers to the phenomenon of feature representation being lost or weakened due to insufficient data, noise interference, or other reasons when training a model using a machine learning algorithm.
[0143] In this embodiment, the local relationship feature description component between aligned entities refers to the attributes or variables used to describe the local relationship features between entities. These features can affect aspects such as the entity's behavior, interaction, or appearance. For example, for a robot, its movement speed may be affected by factors such as battery level, terrain complexity, and weather. Therefore, the local relationship feature description component between aligned entities can be:
[0144] Location information: The location information of an entity in three-dimensional space, including coordinates, height, angle, etc.
[0145] Pose information: Information about the position and orientation of an entity relative to other objects or the scene in its frame of reference.
[0146] Motion information: Information about the changes in an entity's position over time, including velocity, acceleration, and displacement.
[0147] In this embodiment, the global relationship feature description component between aligned entities refers to the component that describes the global relationship between two or more entities, such as:
[0148] Common ancestor: Two entities share the same parent concept or category.
[0149] Similarity: Two entities have similar characteristics or attributes; they may belong to the same category or be in a similar environment.
[0150] Dependency: An entity depends on the existence or behavior of another entity.
[0151] Interaction: There is an interaction between two entities, which may affect each other's behavior or state.
[0152] Coexistence: Two entities can coexist in the same environment, even if they do not have a direct dependency relationship.
[0153] In this embodiment, entity representation refers to a way of describing an entity, linking the entity with its related features and attributes. Entity representation can be text description, graphical representation, or others, such as:
[0154] Text description: Use natural language or other character-based languages to describe the attributes and characteristics of an entity, such as "a human being is an animal that walks upright".
[0155] Graphical representation: Using icons, lines, shapes, etc. to represent the attributes and characteristics of entities, such as using rectangles to represent rooms, circles to represent tables, and triangles to represent chairs.
[0156] In this embodiment, the predicted missing relationship between entities refers to the situation where, given an entity, other entities may lack certain features or attributes from that entity. For example, given a person entity, it is possible to predict the lack of certain attributes, such as time, location, and organizational structure, between other entities (such as locations or organizations) and that person entity.
[0157] In this embodiment, the pre-defined reservation relationship between entities refers to a logically necessary relationship between entities, describing a relationship that must exist between them. For example, in a reservation system, the relationship between a person entity ("guest") and an order entity ("order") can be defined as "order is related to a guest". This means that each order must be associated with a specific guest, and the relationship between guests and orders is one-to-many. This can be achieved by associating one guest with multiple orders, but one order cannot be associated with multiple guests.
[0158] In this embodiment, the granularity features of an entity refer to information describing the entity's most basic attributes and states, such as:
[0159] Human entity: Name, gender, date of birth.
[0160] Vehicle details: brand, model, color, year.
[0161] Order entity: order number, customer name, product list, total price.
[0162] Address entities: address, city, province, country.
[0163] In this embodiment, the adaptive connection matrix based on relationship type refers to first defining a relationship type for each relationship type. This can be achieved by associating each relationship with a known parent class or keyword. For example, the "friend" relationship can be associated with the "relationship" type in "social network". Then, a connection matrix representing the relationship between entities is constructed. This matrix is a two-dimensional array in which each row and each column represents a relationship type. Each element in the matrix is associated with the corresponding relationship type and indicates whether the type appears in any relationship of the current entity. If an entity does not have a specific relationship type associated with a certain relationship, the value "none" or "undetermined" is placed in the corresponding position.
[0164] In this embodiment, aligning the node feature representation information between entities refers to the way of using nodes to represent entities when drawing entity relationship diagrams or charts. A node is an abstract representation of an entity and can be used to describe the relationship between entities.
[0165] In this embodiment, the relationship node feature representation information between aligned entities refers to visual elements in the graphical user interface that represent the relationship between entities, such as:
[0166] Directed edge: Draw a directed edge on the screen that connects two entities. The relationship between the entities can be represented by an arrow or other symbols.
[0167] Circular Node: A circular node is drawn on the screen to represent an endpoint of an entity. When a user clicks on the node, they can view the entities associated with it and the relationships between them.
[0168] In this embodiment, an adaptive connection matrix based on the relationship type is used to map aligned entities to the node feature representation information between them, and to determine the relationship node feature representation information between aligned entities. For each entity, we need to find the cell of the adaptive connection matrix associated with it and extract the feature vector and other information related to the entity from the cell.
[0169] The beneficial effects of the above technical solution are: the relationship type between aligned nodes is determined based on the relationship node feature representation information, and the matching relationship is obtained from the preset reserved relationship based on the relationship type. By using the predefined relationship type, it can help to quickly locate the related entities. At the same time, it can avoid the trouble of manually arranging all entities and ensure that the relationship between entities is always displayed correctly.
[0170] Example 4:
[0171] Based on Example 3, this embodiment of the invention obtains entity names or other identifying text information (not entity names) from the cleaned and transformed dataset, and maps the entity names or other identifying text information (not entity names) to unique entity IDs, including:
[0172] Extract all information containing entity names or other identifying text information that is not entity names from the cleaned and transformed data, and determine the specific description and attributes of the entity names or other identifying text information that is not entity names based on all information containing entity names or other identifying text information that is not entity names.
[0173] Based on the specific description and attributes of the entity name or other identifying text information, determine the type and attribute value of the entity name or other identifying text information, and obtain a unique identifier for each entity name or other identifying text information.
[0174] The reverse mapping method is used to map the unique identifier of the entity name or other identifying textual information that is not the entity name to the original entity name.
[0175] In this embodiment, information containing entity names refers to extracting named entities from the text. These entities can be names of people, places, organizations, or proper nouns. Their values are usually unique and context-dependent. For example, in the sentence "Dr. Johnson and his research team are studying climate change," "Dr. Johnson" is an entity with the value Dr. Johnson.
[0176] In this embodiment, the attributes of an entity refer to the characteristics or properties that an entity possesses. For example, in a named entity recognition system, the attributes of an entity may include: name, job title, and professional field.
[0177] In this embodiment, entity type refers to the category to which an entity belongs. Entity type can be used to classify and organize entities. Entity types are usually divided according to certain rules, such as the entity's function, purpose, time range, etc. Common entity types include: person name entities, place name entities, and organization entities.
[0178] In this embodiment, entity attribute values refer to the characteristics or descriptions of an entity. Entity attribute values can be specific numerical values, text, dates, or other data, or they can be the performance of an entity on certain indicators. For example, if an entity is a phone number, its entity attribute value is the actual value of the number; if an entity is a person's name, its entity attribute value is their full name.
[0179] The beneficial effects of the above technical solution are: determining the specific description and attributes of an entity based on information including the entity name, associating them with the entity type and attribute values, and obtaining a unique identifier for each entity. The unique identifier can reduce errors caused by similar entity names, and at the same time, it can ensure the uniqueness and consistency of entities, which helps to improve the quality and reliability of data.
[0180] Example 5:
[0181] Based on Example 4, this embodiment of the invention performs entity recognition on the cleaned and transformed data using the BERT model to obtain entity recognition results, and extracts semantic relationships between entities from the text using a recurrent neural network to obtain relationship extraction results, including:
[0182] The cleaned and transformed data is converted into input text in a uniform format, and the input text is then converted into a fixed-length sequence.
[0183] The corresponding pre-trained BERT model is determined based on the text features of the input text, and the transformed input text is then input into the pre-trained BERT model.
[0184] Based on the output of the BERT model, obtain one or more labels for each word in the input text, identify entities in the input text based on the one or more labels, obtain entity recognition results, and perform classification.
[0185] For the classified entities, semantic relationships between entities are extracted from the text using a recurrent neural network to obtain the relationship extraction results.
[0186] In this embodiment, uniformly formatted input text refers to a set of text data with the same structure and attributes, all of which are about the same topic or field, such as product descriptions, service descriptions, or organizational charters.
[0187] In this embodiment, a fixed-length sequence refers to a sequence with a fixed length and a fixed number of elements, where the position of each element in the sequence is fixed and the intervals between elements are also the same.
[0188] In this embodiment, text features refer to key information extracted from the text, which can be used to describe the content and semantics of the text.
[0189] In this embodiment, the BERT model is a pre-trained language representation model that can be self-supervised pre-trained using a large amount of unlabeled data and generate general language understanding capabilities.
[0190] The beneficial effects of the above technical solution are: converting the preprocessed data into a fixed-length sequence and inputting it into the corresponding pre-trained BERT model for entity recognition; determining the semantic relationships between entities based on recurrent neural networks after recognition; extracting useful information more efficiently; quickly determining and understanding the semantic relationships between various entities; and transforming unstructured information into structured data, which helps to build high-quality knowledge graphs and enhances the searchability and scalability of knowledge graphs.
[0191] Example 6:
[0192] Based on Example 5, this embodiment of the invention constructs "entity-relationship-entity" triples based on entity recognition results and relation extraction results to form a preliminary knowledge graph, and stores the preliminary knowledge graph using a graph database, including:
[0193] The entity recognition results are converted into triples, where each entity contains a unique ID, category, and text description;
[0194] The relation extraction results are converted into triples, where each triple contains two attributes: antecedent and consequent.
[0195] Organize the transformed entities and relations into a graph structure, and obtain the node corresponding to each entity and the edge corresponding to each relation;
[0196] A preliminary knowledge graph is formed based on the nodes corresponding to each entity and the edges corresponding to each relationship, and the preliminary knowledge graph is stored using a graph database.
[0197] In this embodiment, the entity recognition result is converted into a triplet form. For example, if the entity recognition result is "human", it can be represented as (1, "human", "John Doe").
[0198] In this embodiment, the relation extraction result is converted into a triple form. For example, the relation "purchase-product" can be represented as (("person", "purchase"), ("person", "product")).
[0199] In this embodiment, the node corresponding to the entity can be a simple representation of the entity or relationship.
[0200] In this embodiment, the edge corresponding to each relationship can connect two nodes and represent the relationship between them.
[0201] The beneficial effects of the above technical solution are: converting entity recognition results and relation extraction results into triples and obtaining corresponding nodes and edges to form a preliminary knowledge graph, which can quickly locate relevant information of specific entities and save time searching in text.
[0202] Example 7:
[0203] Based on Example 6, this embodiment of the invention uses the preliminary knowledge graph as a dataset to train an adversarial neural network, employs an alternating training strategy and introduces a Self-Attention mechanism to obtain the discriminative ability of the discriminator and the data generation ability of the generator, including:
[0204] Define an adversarial neural network based on a discriminator network and a generator network;
[0205] When training the discriminator network, the discriminator predicts whether the input sample comes from the real knowledge graph. At the same time, the loss function output by the discriminator is optimized based on cross-entropy.
[0206] When training the generator network, the generator generates samples that correspond to real knowledge graph data. The goal of the generator is to maximize the confusion rate of the discriminator in correctly classifying the samples generated by the generator.
[0207] An alternating training strategy is adopted and a self-attention mechanism is introduced. The discriminant's discrimination ability and the generator's data generation ability are obtained based on cross-entropy optimization and confusion rate.
[0208] In this embodiment, the input to the discriminator network is a randomly generated sample, and the output is the probability of whether the sample comes from a real knowledge graph.
[0209] In this embodiment, the generator network takes samples from a real knowledge graph as input and outputs the probability of seeing different samples of the same sample in the real knowledge graph.
[0210] In this embodiment, cross-entropy is a commonly used machine learning loss function used to measure the difference between the predicted output and the actual label during the training process. It is typically used in classification problems, where the model's goal is to minimize the cross-entropy between the predicted output and the true label.
[0211] In this embodiment, optimization refers to using optimization algorithms such as gradient descent to minimize the loss function. During the optimization process, an early stopping strategy can be adopted. Early stopping can prevent the model from overfitting the training data, which would lead to poor performance in testing and real-world applications.
[0212] In this embodiment, the confusion rate is a useful metric for evaluating classifier performance by comparing the actual labels with the predicted labels to determine the accuracy of the classifier.
[0213] The beneficial effects of the above technical solution are: defining an adversarial neural network based on a discriminator network and a generator network, training the discriminator network and the generator network, and obtaining the discriminator's discrimination ability and the generator's data generation ability based on cross-entropy optimization and confusion rate can improve the robustness and generalization ability of the model, so that the knowledge graph subsequently constructed can still maintain high accuracy and stability when facing noisy data or abnormal situations.
[0214] Example 8:
[0215] Based on Embodiment 7, this embodiment of the invention obtains entities and relations trained by the adversarial neural network according to the discriminant's discrimination ability and the generator's data generation ability, and transforms them into nodes and edges in a knowledge graph to construct a complete knowledge graph, including:
[0216] Based on the discriminant's discrimination ability and the generator's data generation ability, the text entities and relationships obtained after training the adversarial neural network are acquired.
[0217] Obtain the locations of text entities and relationships, and perform clustering;
[0218] Get the types of text entities and relations, and define the link relationships between entities and relations;
[0219] The clustering results and links are transformed into nodes and edges in a knowledge graph. The generated nodes and edges are stored in a knowledge graph database to construct a complete knowledge graph.
[0220] In this embodiment, the position of text entities and relations refers to the position of the entity in the text and the starting point of the relation associated with it.
[0221] In this embodiment, the types of entities and relationships refer to the specific meanings they represent. Entities can have various types, such as names of people, places, and organizations, while relationships can represent logical relationships between entities, such as temporal relationships, spatial relationships, and causal relationships. Depending on the application requirements, the types of entities and relationships will also be different. For example, in a system representing news reports, entity types may include names of people, places, and organizations, while relationship types may include event relationships and temporal relationships.
[0222] In this embodiment, the link relationship between entities refers to the association between two or more entities. This association can be achieved through direct or indirect connections between entities. For example, there is a link relationship between one person's name and another person's name because their names are both used to identify a person. Similarly, there may be a link relationship between a city and a country because they are different ways of identifying a region.
[0223] In this embodiment, converting clustering results into nodes in a knowledge graph means that each location information can be converted into a location node in the knowledge graph. A location node associated with a location is created in the graph and marked as a specific location or geographical region. For example, suppose we have a knowledge graph to represent the business activities of a certain city. The location of each business activity can be converted into a location node in the knowledge graph and marked as a specific city in the graph.
[0224] The beneficial effects of the above technical solution are: by obtaining the location and type of entity text and relationships, determining link relationships and clustering, and constructing a complete knowledge graph, the efficiency of knowledge graph construction can be improved, and the level of intelligence of identifier resolution can also be improved.
[0225] Example 9:
[0226] Based on Example 8, this embodiment of the invention further includes the following before training the adversarial neural network using the preliminary knowledge graph as a dataset:
[0227] Obtain unlabeled samples from the knowledge graph;
[0228] Calculate the expected loss rate for unlabeled samples identified as positive samples and the expected loss rate for unlabeled samples identified as negative samples:
[0229] ;
[0230] in, This represents the expected loss rate when unlabeled samples are considered positive samples. Represented as a set of unlabeled triples, Let represent the total number of unlabeled triples, where i represents the i-th unlabeled sample, and ln represents the natural logarithm. Let S be the loss factor, S be the decision function, and t be the time series factor. Let represent the splitting weight of the i-th unlabeled sample in the normal sample. This is represented as the decision weight factor of the i-th unlabeled sample in the normal sample;
[0231] ;
[0232] in, This represents the expected loss rate when unlabeled samples are identified as negative samples. This represents the number of unlabeled triples in the set of positive samples. This is represented as the decision weight factor for the i-th unlabeled sample in the negative state samples;
[0233] Calculate the first difference between the expected loss rate of unlabeled samples identified as positive samples and the expected loss rate of unlabeled samples identified as negative samples;
[0234] If the first difference is not within the preset difference range, it is determined that the number of samples is insufficient, and a reminder to resample negative samples is issued.
[0235] In this embodiment, in the knowledge graph, unlabeled samples refer to instances without clearly labeled category information. These unlabeled samples may not be labeled for various reasons, such as omissions in the data collection process, data labeling errors, and uncertainties in the data generation process.
[0236] In this embodiment, the expected loss rate of a positive sample refers to the probability that the model correctly predicts an instance when it is a positive sample, minus the probability that the instance is misclassified as a negative sample. This describes the balance between the benefits of correctly identifying a positive sample and the losses caused by incorrectly classifying it as a negative sample.
[0237] In this embodiment, the expected loss rate of negative samples refers to the probability that the model correctly predicts an instance when it is a negative sample, minus the probability that the instance is misclassified as a positive sample. It describes the balance between the benefits of correctly classifying a negative sample as a negative sample and the losses caused by incorrectly classifying it as a positive sample.
[0238] In this embodiment, probability difference refers to the probability difference between two events.
[0239] The beneficial effect of the above technical solution is that obtaining the probability difference between the expected loss rate of an unlabeled sample being identified as a positive sample and the expected loss rate of an unlabeled sample being identified as a negative sample can better balance the number of positive and negative samples and avoid the situation where some categories are ignored.
[0240] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0241] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for constructing a knowledge graph based on identifier parsing using an adversarial neural network, characterized in that, include: Step 1: Obtain various types of data related to identifier resolution, and clean and transform the data, specifically including: Obtain various types of data related to identifier resolution from the identifier database, and combine these data into a dataset. The dataset is cleaned and transformed. Based on the cleaned and transformed dataset, entity names or other identifying text information that is not entity names are obtained, and the entity names or other identifying text information that is not entity names are mapped to unique entity IDs. Determining the relationship between entities based on the unique entity ID specifically includes: The entity name feature and entity attribute feature are determined based on the unique entity ID, and the initial entity feature is generated based on the entity name feature and entity attribute feature. The initial entity features are input into a deep neural network based on relation representation to extract the relation features of the entities; Obtain the Manhattan distance between entities, determine the similarity between entities based on the Manhattan distance, and select the two entities with the highest similarity as the aligned entities; Obtain the target relationship features between aligned entities, and determine the feature loss term based on the difference between the target relationship features and the preset entity relationships; The local relation feature description component and the global relation feature description component between aligned entities are determined based on the feature loss term. The local relation feature description component refers to the attribute or variable used to describe the local relation features between entities. Obtain the entity representations corresponding to the local relation feature description components and the global relation feature description components, where the global relation feature description components describe the global relationship between two or more entities; The predicted missing relation of the aligned entity is determined based on the entity representation, and the preset retention relation of the aligned entity is determined based on the predicted missing relation and the preset relation table. Here, entity representation refers to a way of describing an entity and associating the entity with its related features and attributes. Obtain the granular feature representation information of each aligned entity, and obtain the node feature representation information between aligned entities based on the granular feature representation information. The granular feature representation information refers to the information describing the most basic attributes and states of the entities. Based on the node feature representation information between aligned entities, the node feature representation information between aligned entities is determined according to the pre-constructed adaptive connection matrix based on the relationship type. Here, the adaptive connection matrix based on the relationship type means that a relationship type needs to be defined for each relationship type first, and then each relationship is associated with a known parent class or key. The relationship type between the aligned nodes is determined based on the feature representation information of the relationship nodes, and the matching relationship is obtained from the preset reserved relationships based on the relationship type; Obtain relation descriptions from other identifying text information that is not entity name, perform standardization processing, and obtain consistent relation labels; Step 2: Perform entity recognition on the cleaned and transformed data based on the BERT model to obtain entity recognition results, and extract semantic relationships between entities from the text using a recurrent neural network to obtain relationship extraction results; Step 3: Based on the entity recognition results and relation extraction results, construct "entity-relation-entity" triples to form a preliminary knowledge graph, and store the preliminary knowledge graph using a graph database; Step 4: Use the preliminary knowledge graph as a dataset to train the adversarial neural network. Employ an alternating training strategy and introduce a Self-Attention mechanism to obtain the discriminant's discrimination ability and the generator's data generation ability. Step 5: Based on the discriminant's discrimination ability and the generator's data generation ability, obtain the entities and relations trained by the adversarial neural network, and transform them into nodes and edges in the knowledge graph to construct a complete knowledge graph.
2. The method for constructing a knowledge graph based on an adversarial neural network according to claim 1, characterized in that, Based on the cleaned and transformed dataset, obtain entity names or other identifying text information (not entity names) and map this information to unique entity IDs, including: Extract all information containing entity names or other identifying text information that is not entity names from the cleaned and transformed data, and determine the specific description and attributes of the entity names or other identifying text information that is not entity names based on all information containing entity names or other identifying text information that is not entity names. Based on the specific description and attributes of the entity name or other identifying text information, determine the type and attribute value of the entity name or other identifying text information, and obtain a unique identifier for each entity name or other identifying text information. The reverse mapping method is used to map the unique identifier of the entity name or other identifying textual information that is not the entity name to the original entity name.
3. The method for constructing a knowledge graph based on an adversarial neural network according to claim 1, characterized in that, The cleaned and transformed data is used to perform entity recognition on the text based on the BERT model to obtain entity recognition results. Then, semantic relationships between entities are extracted from the text using a recurrent neural network to obtain relationship extraction results, including: The cleaned and transformed data is converted into input text in a uniform format, and the input text is then converted into a fixed-length sequence. The corresponding pre-trained BERT model is determined based on the text features of the input text, and the transformed input text is then input into the pre-trained BERT model. Based on the output of the BERT model, obtain one or more labels for each word in the input text, identify entities in the input text based on the one or more labels, obtain entity recognition results, and perform classification. For the classified entities, semantic relationships between entities are extracted from the input text using a recurrent neural network, resulting in the relationship extraction results.
4. The method for constructing a knowledge graph based on an adversarial neural network according to claim 1, characterized in that, Based on entity recognition and relation extraction results, "entity-relation-entity" triples are constructed to form a preliminary knowledge graph. This preliminary knowledge graph is then stored using a graph database, including: The entity recognition results are converted into triples, where each entity contains a unique ID, category, and text description; The relation extraction results are converted into triples, where each triple contains two attributes: antecedent and consequent. Organize the transformed entities and relations into a graph structure, and obtain the node corresponding to each entity and the edge corresponding to each relation; A preliminary knowledge graph is formed based on the nodes corresponding to each entity and the edges corresponding to each relationship, and the preliminary knowledge graph is stored using a graph database.
5. The method for constructing a knowledge graph based on an adversarial neural network according to claim 1, characterized in that, The preliminary knowledge graph is used as a dataset to train an adversarial neural network. An alternating training strategy and a self-attention mechanism are introduced to obtain the discriminative ability of the discriminator and the data generation ability of the generator, including: Define an adversarial neural network based on a discriminator network and a generator network; When training the discriminator network, the discriminator predicts whether the input sample comes from the real knowledge graph. At the same time, the loss function output by the discriminator is optimized based on cross-entropy. When training the generator network, the generator generates samples that correspond to real knowledge graph data. The goal of the generator is to maximize the confusion rate of the discriminator in correctly classifying the samples generated by the generator. An alternating training strategy is adopted and a self-attention mechanism is introduced. The discriminant's discrimination ability and the generator's data generation ability are obtained based on cross-entropy optimization and confusion rate.
6. The method for constructing a knowledge graph based on an adversarial neural network according to claim 1, characterized in that, Based on the discriminant's discriminative ability and the generator's data generation ability, entities and relations trained by the adversarial neural network are obtained and transformed into nodes and edges in a knowledge graph, constructing a complete knowledge graph, including: Based on the discriminant's discrimination ability and the generator's data generation ability, the text entities and relationships obtained after training the adversarial neural network are acquired. Obtain the locations of text entities and relationships, and perform clustering; Get the types of text entities and relations, and define the link relationships between entities and relations; The clustering results and links are transformed into nodes and edges in a knowledge graph. The generated nodes and edges are stored in a knowledge graph database to construct a complete knowledge graph.
7. The method for constructing a knowledge graph based on an adversarial neural network for identifier parsing according to claim 1, characterized in that, Before using the preliminary knowledge graph as a dataset to train the adversarial neural network, the following steps are also included: Obtain unlabeled samples from the knowledge graph; Calculate the expected loss rate for unlabeled samples identified as positive samples and the expected loss rate for unlabeled samples identified as negative samples: ; in, This represents the expected loss rate when unlabeled samples are considered positive samples. Represented as a set of unlabeled triples, Let represent the total number of unlabeled triples, where i represents the i-th unlabeled sample, and ln represents the natural logarithm. Let S be the loss factor, S be the decision function, and t be the time series factor. Let represent the splitting weight of the i-th unlabeled sample in the normal sample. This is represented as the decision weight factor of the i-th unlabeled sample in the normal sample; ; in, This represents the expected loss rate when unlabeled samples are identified as negative samples. This represents the number of unlabeled triples in the set of positive samples. This is represented as the decision weight factor for the i-th unlabeled sample in the negative state samples; Calculate the first difference between the expected loss rate of unlabeled samples identified as positive samples and the expected loss rate of unlabeled samples identified as negative samples; If the first difference is not within the preset difference range, it is determined that the number of samples is insufficient, and a reminder to resample negative samples is issued.
Citation Information
Patent Citations
Knowledge graph completion method and system based on unstructured information
CN113934847A
Knowledge graph and rule constraint combined data intelligent analysis method and system
CN118606440A