Multi-view difficult negative sampling entity alignment method and system combined with ontology embedding
By combining ontology embedding and multi-view hard negative sampling methods, the problems of ambiguous discrimination boundaries and ignored ontology layer information in entity alignment models in knowledge graphs are solved, and high-precision entity alignment and generalization capabilities are achieved for cross-source heterogeneous knowledge graphs.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NINGXIA UNIVERSITY
- Filing Date
- 2026-05-20
- Publication Date
- 2026-06-19
AI Technical Summary
Existing knowledge graph embedding and alignment models suffer from overly simplistic negative sampling mechanisms during training and optimization. This results in models being unable to distinguish entities that are geometrically close but have different semantic categories, leading to ambiguous discrimination boundaries. Furthermore, they neglect ontology layer information, and the hard-coded class conflict rules lack generalization ability across different domain graphs.
We employ a multi-view hard negative sampling method with joint ontology embedding. By connecting the underlying entity features with the upper ontology class space through a cross-view mapping network, we design a multi-dimensional deep hard negative sampling strategy. We mine hard negative samples based on ontology space similarity and feature fusion similarity, dynamically model the exclusion and inclusion relationships between ontology classes, and optimize the training process by combining a course learning annealing mechanism.
It enhances the model's ability to capture fine-grained semantic differences, solves the problem of ambiguous model discrimination boundaries, and improves the entity alignment accuracy and generalization ability of cross-source heterogeneous knowledge graphs.
Smart Images

Figure CN122242498A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of cross-source heterogeneous knowledge graph entity alignment technology in the field of archaeology and cultural heritage, and in particular to a multi-view difficult negative sampling entity alignment method and system with joint ontology embedding. Background Technology
[0002] Knowledge graphs store real-world entities and their relationships in the form of triples (head entity, relation, tail entity). Entity alignment refers to identifying entities pointing to the same real-world entity in multiple heterogeneous knowledge graphs (KGs) and establishing correspondences between them, thereby achieving the fusion and complementarity of knowledge graphs. Knowledge graphs represent real-world entities and their relationships in a structured graph form, playing a crucial role in driving various artificial intelligence applications such as question answering, semantic search, and recommendation systems. Knowledge graphs with ontology information not only record massive amounts of underlying factual data but also possess high-level symbolic abstraction and logical constraint capabilities. This allows software systems to use knowledge graphs to perform consistency checks to identify potential logical conflicts and to use descriptive logic for implicit reasoning, thereby uncovering implicit knowledge not explicitly stated in the data. When performing entity alignment of multi-source knowledge graphs, adding ontology information can significantly improve the accuracy of entity alignment. When constructing a knowledge graph system for exploring the origins of history and cultural heritage, it is usually necessary to integrate heterogeneous data sources from different institutions. Academic literature graphs built based on archaeological documents record the same items but express them differently. By connecting these scattered knowledge graphs, researchers can conduct more comprehensive knowledge mining and reasoning. For example, entity alignment can link specific unearthed specimens in documentary graphs with historical background knowledge in cultural heritage graphs, converging them as the same real-world object. This enriches the semantics of the entire lifecycle of cultural relics, allowing researchers to infer cultural phenomena and the processing techniques used to manufacture artifacts during historical periods. However, in the real world, knowledge graphs are typically constructed independently and continuously evolve. Due to differences in data cataloging standards, naming conventions, and focus dimensions among different institutions, there is significant heterogeneity and data redundancy among graphs from different sources.
[0003] To overcome these limitations and fully leverage the cross-graph associations and knowledge potential, identifying and linking equivalent entities referring to the same real-world object across different knowledge graphs has become a fundamental and crucial task. Existing knowledge graph embedding and alignment models still generally face two problems during training and optimization: First, existing negative sampling mechanisms are too simplistic and easily fall into the "semantic trap of pure geometric distance," selecting negative samples solely based on Euclidean distance in the vector space. This fails to distinguish entities with similar geometric distances but different semantic categories, leading to blurred model discrimination boundaries and an inability to provide training samples with high-value gradients. In the margin-based loss training paradigm, the quality of negative samples directly determines the model's ability to depict high-dimensional decision boundaries. Traditional random negative sampling generates a large number of overly simplistic negative samples, causing gradient vanishing in the later stages of training. To address this issue, some advanced models have proposed… Truncation of uniform negative sampling increases the difficulty of negative samples by finding nearest neighbors in the vector space. However, this purely geometric distance metric means that entities that are close in geometric latent space may have significant differences in their true conceptual semantics. For example, two entities whose names both contain "grape pattern" may be different: one might be a "Western Xia gold artifact," such as a gold plaque with a grape pattern, while the other might be a "Tang Dynasty silverware" or even a "modern replica." If the model relies solely on geometric distance to select negative samples, ignoring the high-level semantic constraints behind the entities, the discrimination ability of the alignment module will be reduced. Furthermore, calculating the global similarity of multiple features in real time on a large-scale graph to find difficult samples incurs extremely high computational costs. Second, there is a semantic difference between the underlying entity features and the high-level ontology concepts. Ignoring the ontology layer information of the knowledge graph, lacking dynamic modeling of the exclusion and inclusion relationships between ontology classes, and the insufficient generalization ability of hard-coded class conflict rules across different domain graphs. Most existing alignment models focus on the triple structure of the instance layer, ignoring the ontology layer of the knowledge graph. Ontology not only provides a high-order classification tree but is also the core constraint for detecting logical errors. Furthermore, the class conflicts indicated by ontology class disjointness are not absolute and static in real-world scenarios. Most class conflicts need to be learned dynamically from the specific knowledge graph context. For example, in a rigorous archaeological graph, the ontology classes "genuine unearthed artifacts" and "modern replicas" are strictly defined as disjoint, but in a broader cultural and creative product graph, they may both be categorized under the more general category of craft exhibits. If traditional hard-coded penalty terms are used to constrain class conflicts, it will limit the model's applicability to different vertical domain graphs. Summary of the Invention
[0004] In view of this, the present invention provides a multi-perspective hard negative sampling entity alignment method and system with joint ontology embedding. It proposes a unified knowledge graph and ontology joint embedding framework to solve the problems of being unable to distinguish entities that are geometrically close but have different semantic categories and the ambiguity of model discrimination boundaries. It designs a multi-dimensional deep hard negative sampling method and proposes a mining strategy based on ontology spatial similarity and feature fusion similarity to actively find entities with high confusion, similar types and structures as negative samples, thereby enhancing the model's ability to capture fine-grained semantic differences and solving the problem of insufficient generalization ability of hard-coded class conflict rules across different domain graphs.
[0005] The technical solution adopted by the embodiments of the present invention to solve its technical problem is as follows:
[0006] The first aspect of this invention provides a multi-view hard negative sampling entity alignment method with joint ontology embedding, comprising:
[0007] Step S1: Define two cross-source heterogeneous knowledge graphs from the archaeology and cultural heritage fields to be aligned as the source graph and the target graph, respectively. Based on the relationships between entities, establish ontology-level triples and instance-level triples, respectively. The ontology layer defines the skeleton class by reconstructing the schema layer of the heterogeneous knowledge graph, and the instance-level entities are cultural relic description information. The relationship set contains all the connection relationship descriptions between cultural relic description information.
[0008] Step S2: Map the entity set and relation set in the source graph and the target graph to a low-dimensional vector space respectively to obtain entity mapping vector and relation mapping vector; for each positive triple, randomly replace the head entity or tail entity to generate a negative triple, and define the instance layer embedding loss based on the distance constraint between the positive triple and the negative triple;
[0009] Step S3: Embed the ontology classes, ontology relations, and ontology layer triples in the source and target graphs into a vector space to obtain ontology class mapping vectors; project the entity mapping vectors onto the ontology concept space through a cross-view mapping network to generate pseudo ontology concept vectors for the entities, and define the cross-view link loss.
[0010] Step S4: Pre-align entity mapping vectors based on the source and target maps to form positive alignment seed pairs. Construct a soft conflict probability matrix based on the co-occurrence statistics of entity types in the known positive alignment seed pairs. The elements in the soft conflict probability matrix are used to represent the coexistence probability or conflict probability between different ontology classes. Dynamically model the exclusion and inclusion relationships between ontology classes using the log-likelihood function and define the likelihood conflict loss.
[0011] Step S5: Construct a candidate entity set from entities in the target graph excluding known alignment seeds. For source entities in the source graph and candidate entities in the target graph, sequentially perform GPU-side three-way feature joint scoring, Top-K candidate recall, CPU-side word similarity ranking, ontology semantic filtering, and feature fusion ranking to obtain and cache difficult negative samples. Specifically, GPU-side three-way feature joint scoring includes entity semantic similarity, structural mean similarity, and ontology type similarity; CPU-side word similarity ranking re-ranks candidates based on the degree of overlap in entity names; ontology semantic filtering filters candidate entities in the ontology concept space that are semantically similar but not the same entity; and feature fusion ranking integrates instance layer features and ontology layer features to select candidate entities as difficult negative samples.
[0012] Step S6: Obtain structured negative samples from the entity neighbor network through random walk sampling, obtain high-difficulty cached negative samples from the difficult negative sample cache, and mix them in a dynamic ratio using a course learning annealing mechanism to form the negative sample set for training in the current batch.
[0013] Step S7: Given a positive alignment seed pair between the source graph and the target graph, and combining it with the current batch of negative samples, map the entity vectors of the source graph to the target graph space; construct an entity alignment loss including entity mapping interval loss and ontology calibration loss, and combine it with instance layer embedding loss, cross-view linking loss and likelihood conflict loss to form a total loss function; train the model parameters using gradient descent to complete entity alignment between cross-source heterogeneous knowledge graphs in the field of archaeology and cultural heritage.
[0014] Preferably, step S2 includes:
[0015] Mapping entities and relations in a knowledge graph to a d-dimensional vector space yields entity-mapped vectors. The mapping vector of the relationship ;
[0016] For each positive triplet Randomly replace its head or tail entity to generate negative triples. ;
[0017] Define instance layer embedding loss :
[0018] ;
[0019] In the formula, d(·) is the L2 distance function. For positive sample boundary margin parameters, For negative sample boundary margin parameters, and These represent the boundary margins for bringing positive samples closer and pushing negative samples away, respectively.
[0020] Preferably, step S3 includes:
[0021] The set of triplets for the source and target maps at the ontology layer The ontology classes and ontology relationships are independently embedded to obtain ontology class mapping vectors. , The spatial dimension embedded in the ontology;
[0022] Utilizing a cross-view mapping network to map entities to vectors Projected onto the ontology concept space, generating a pseudo-ontology representation. :
[0023] ;
[0024] In the formula, L2(·) is the L2 normalization function; The projection weight matrix is... For bias terms;
[0025] Define cross-view link loss :
[0026] ;
[0027] In the formula, Let c' be the pseudo-ontology representation projected onto the negative sample entities, and d(·,·) be the ontology class of the negative sample entities. For cross-view boundary hyperparameters.
[0028] Preferably, step S4 includes:
[0029] Constructing a soft conflict probability matrix Each element in the matrix The value represents the ontology class mapping vector. and The probability of overlap or coexistence;
[0030] Define likelihood conflict loss :
[0031] ;
[0032] In the formula, σ is the loss adjustment factor, and sigmoid(·) is the sigmoid activation function.
[0033] Ideally, step S5, the difficult negative sample selection process, includes:
[0034] Map the entity vectors from the source graph G1 Entity mapping vectors derived from target graph G2 Defined as a positive alignment seed pair between G1 and G2 Non-target map G2 The entity mapping vectors form a candidate entity set;
[0035] GPU-based three-way feature joint scoring: Utilizing the sparse adjacency matrix A to map entity vectors. Perform first-order neighborhood aggregation to obtain the local structure mean vector. The joint score of three features is calculated by large-scale parallel matrix multiplication. :
[0036] ;
[0037] In the formula, , , These are the fusion weight hyperparameters for the three features: entity semantic similarity, structural mean similarity, and ontology type similarity. The candidate entity mapping vector; for The hierarchical path context vector of the ontology class. for The hierarchical path context vector of the ontology class to which it belongs;
[0038] Top-K candidate recall: The three-way inner product is calculated by parallel matrix multiplication using GPU. Based on the time complexity, the K candidate entities with the highest scores are selected from the scores of each element in the candidate entity set to complete the Top-K candidate recall and obtain the Top-K candidate subset.
[0039] Rank the elements in the Top-K candidate subset by CPU-side word similarity and calculate the score. The candidate pool after fine sorting is obtained as follows:
[0040] ;
[0041] In the formula, Tokens(·) is the set of tokens after the entity name has been segmented. and They are respectively and The set of tokens obtained after word segmentation of the name string; is the weighted hyperparameter for Jaccard word similarity;
[0042] Ontology semantic filtering and feature fusion ranking: For entities in the ranked candidate pool, calculate ontology semantic similarity. Perform ontology space filtering and select the top-M entities with the highest scores to form a negative sample candidate pool:
[0043] ;
[0044] In the formula, Let e1 be the pseudo-ontology representation vector projected from the source entity e1 into the ontology concept space using formula (2). Candidate entities in the target graph The pseudo-ontology representation vector after projection using formula (2);
[0045] For entities in the negative sample candidate pool, calculate the comprehensive fusion similarity. Perform a comprehensive sort and select The top-N entities with the highest scores are used as hard negative samples. :
[0046] ;
[0047] In the formula, A learnable mapping matrix for cross-graph alignment; This refers to the hyperparameters for ontology fusion.
[0048] Preferably, a learning annealing mechanism is used to dynamically mix negative samples in a proportional manner to form the current batch of negative samples used for training, including:
[0049] Structured negative samples are obtained by random walk sampling from the neighbor network of entities, and from hard negative samples e neg High-difficulty cached negative samples are obtained from the periodically updated cache, and structured negative samples are mixed with high-difficulty cached negative samples in a dynamic ratio; wherein, the proportion of structured negative samples in each batch is . The decay rate decreases dynamically with each training round:
[0050] ;
[0051] In the formula, This represents the initial proportion of structured negative samples. This represents the lower limit of the proportion of structured negative samples. The threshold for the number of warm-up rounds in the course. The duration of annealing cycles;
[0052] exist < stage, The value inside the parentheses is truncated to 0, and annealing is initiated only after the model has completed basic representation learning.
[0053] Preferably, mapping the entity vectors of the source graph to the target graph space includes:
[0054] During the entity alignment phase, given a positive alignment seed pair and negative sample set , The entity mapping vectors of the source graph G1 are transformed by a learnable transformation matrix. Mapping to the target graph space, define the total alignment loss. :
[0055] ;
[0056] In the formula, For entity mapping interval loss, The cosine calibration loss is used, and α, γ, and β are weighting parameters. , They represent , Difficult negative samples; , Calibration is performed at both the real ontology path vector and the pseudo ontology concept vector levels.
[0057] Ideally, the total loss function Represented as:
[0058] .
[0059] A second aspect of the present invention provides a multi-view hard negative sampling entity alignment system with joint ontology embedding, comprising:
[0060] The acquisition module is used to define two cross-source heterogeneous knowledge graphs in the archaeology and cultural heritage fields to be aligned as the source graph and the target graph, respectively. Based on the relationship between entities, ontology-level triples and instance-level triples are established, where the entity is the cultural relic description information; the relationship set contains all the connection relationship descriptions between the cultural relic description information.
[0061] The entity embedding module is used to map the entity sets and relation sets in the source graph and the target graph to a low-dimensional vector space, respectively, to obtain entity mapping vectors and relation mapping vectors. For each positive triple, the head entity or tail entity is randomly replaced to generate a negative triple, and the instance layer embedding loss is defined based on the distance constraint between the positive triple and the negative triple.
[0062] The ontology embedding module is used to embed ontology classes, ontology relations, and ontology layer triples in the source and target graphs into a vector space to obtain ontology class mapping vectors; the entity mapping vectors are projected onto the ontology concept space through a cross-view mapping network to generate pseudo ontology concept vectors of entities, and the cross-view link loss is defined.
[0063] The relational dynamic modeling module is used to pre-align entity mapping vectors based on the source and target graphs to form positive alignment seed pairs. Based on the co-occurrence statistics of entity types in the known positive alignment seed pairs, a soft conflict probability matrix is constructed. The elements in the soft conflict probability matrix are used to represent the coexistence probability or conflict probability between different ontology classes. The module dynamically models the exclusion and inclusion relationships between ontology classes through the log-likelihood function and defines the likelihood conflict loss.
[0064] The difficult negative sample screening module is used to construct a candidate entity set from entities in the target graph excluding those with known alignment seeds. For source entities in the source graph and candidate entities in the target graph, it sequentially performs GPU-side three-way feature joint scoring, Top-K candidate recall, CPU-side word similarity fine ranking, ontology semantic filtering, and feature fusion ranking to obtain and cache difficult negative samples. Among them, GPU-side three-way feature joint scoring includes entity semantic similarity, structural mean similarity, and ontology type similarity; CPU-side word similarity fine ranking re-ranks candidates based on the degree of overlap of entity names; ontology semantic filtering is used to filter candidate entities that are semantically similar but not the same entity in the ontology concept space; feature fusion ranking is used to combine instance layer features and ontology layer features to select candidate entities as difficult negative samples.
[0065] The hybrid sampling module is used to obtain structured negative samples from the entity neighbor network through random walk sampling, obtain high-difficulty cached negative samples from the difficult negative sample cache, and mix them in a dynamic ratio using a course learning annealing mechanism to form the negative sample set used for training in the current batch.
[0066] The entity alignment module is used to map the entity vectors of the source graph to the target graph space, given a positive alignment seed pair between the source graph and the target graph, and combined with the current batch of negative samples. It constructs an entity alignment loss that includes entity mapping interval loss and ontology calibration loss, and combines it with instance layer embedding loss, cross-view linking loss and likelihood conflict loss to form a total loss function. The model parameters are trained using gradient descent to complete entity alignment between cross-source heterogeneous knowledge graphs in the field of archaeology and cultural heritage.
[0067] As can be seen from the above technical solutions, the multi-view hard negative sampling entity alignment method and system provided by the embodiments of the present invention with joint ontology embedding addresses the problem of the inability to distinguish entities with similar geometric distances but different semantic categories and the ambiguity of model discrimination boundaries in cross-source heterogeneous knowledge graphs in the field of archaeology and cultural heritage by proposing a unified knowledge graph and ontology joint embedding framework. It designs a multi-dimensional deep hard negative sampling method and proposes a mining strategy based on ontology spatial similarity and feature fusion similarity to actively seek entities with high confusion levels of the same type and similar structure as negative samples, thereby enhancing the model's ability to capture fine-grained semantic differences and solving the problem of insufficient generalization ability of hard-coded class conflict rules across different domain graphs. Attached Figure Description
[0068] Figure 1 This is a flowchart of the multi-view difficult negative sampling entity alignment method for joint ontology embedding according to the present invention. Detailed Implementation
[0069] The technical solution and effects of the present invention will be further described in detail below with reference to the accompanying drawings.
[0070] This invention addresses the challenges of complex information in multi-source cultural relic knowledge graphs, where the same relic is described differently, knowledge gaps exist, and cross-graph association deviations occur. It proposes a multi-perspective, difficult negative sampling entity alignment method and system with joint ontology embedding. This improves the accuracy of multi-source knowledge fusion, aligns scattered cultural relic data into entities, and provides technical support for high-quality data fusion accumulation for intelligent applications in the cultural heritage field. The heterogeneous knowledge graph in the archaeological and cultural heritage field referred to in this invention is a multi-source knowledge graph constructed by extracting data from museums, archaeological research institutions, cultural relic display platforms, or cultural relic data management systems. Its entities include not only the relic's ontological information but also traceability information such as its origin, provenance, location, place of excavation, and holding institution.
[0071] This invention aims to construct the discriminative space of the OnEA model through ontology learning and multi-strategy negative sample sampling, enabling entity alignment across heterogeneous knowledge graphs in the archaeology and cultural heritage field. First, a unified knowledge graph and ontology joint embedding framework is proposed. By introducing a cross-view mapping network, the underlying entity features are connected to the upper-level ontology class space. A dynamic class conflict learning mechanism based on the likelihood matrix is designed, enabling the model to learn the exclusion and inclusion relationships between ontology in a data-driven, soft-learning manner. Second, a multi-dimensional, deep-hard negative sampling method is designed, abandoning the single geometric distance truncation sampling and proposing a mining strategy based on ontology space similarity and feature fusion similarity. This actively seeks entities with high confusion levels, similar types, and similar structures as negative samples, enhancing the model's ability to capture fine-grained semantic differences. Finally, a GPU-accelerated dynamic hybrid sampling architecture based on curriculum learning is introduced. A two-stage acceleration algorithm, combining GPU tensor multi-feature scoring and recall with CPU lexical similarity ranking, dynamically evolves the ratio of network topology negative samples to extremely difficult cached negative samples with each training epoch, ensuring smooth convergence and performance improvement of the OnEA model under extreme constraints.
[0072] refer to Figure 1 This invention provides a method for aligning multi-view hard negative sampling entities using joint ontology embedding, the steps of which include:
[0073] Step S1: Define two cross-source heterogeneous knowledge graphs from the archaeology and cultural heritage fields to be aligned as the source graph and the target graph, respectively. Based on the relationships between entities, establish ontology-level triples and instance-level triples, respectively. The ontology layer defines the skeleton class by reconstructing the schema layer of the heterogeneous knowledge graph, and the instance-level entities are cultural relic description information. The relationship set contains all the connection relationship descriptions between cultural relic description information.
[0074] Step S2: Map the entity set and relation set in the source graph and the target graph to a low-dimensional vector space respectively to obtain entity mapping vector and relation mapping vector; for each positive triple, randomly replace the head entity or tail entity to generate a negative triple, and define the instance layer embedding loss based on the distance constraint between the positive triple and the negative triple;
[0075] Step S3: Embed the ontology classes, ontology relations, and ontology layer triples in the source and target graphs into a vector space to obtain ontology class mapping vectors; project the entity mapping vectors onto the ontology concept space through a cross-view mapping network to generate pseudo ontology concept vectors for the entities, and define the cross-view link loss.
[0076] Step S4: Construct a soft conflict probability matrix based on the co-occurrence statistics of entity types of known positive alignment seed pairs; the elements in the soft conflict probability matrix are used to represent the coexistence probability or conflict probability between different ontology classes; dynamically model the exclusion and inclusion relationships between ontology classes through the log-likelihood function, and define the likelihood conflict loss.
[0077] Step S5: Given the source graph G1 and target graph G2 to be aligned, construct a candidate entity set from the entities in G2 excluding the known alignment seeds. For the source entities in the source graph and the candidate entities in the target graph, sequentially perform GPU-side three-way feature joint scoring, Top-K candidate recall, CPU-side word similarity fine ranking, ontology semantic filtering, and feature fusion ranking to obtain and cache difficult negative samples. Among them, GPU-side three-way feature joint scoring includes entity semantic similarity, structural mean similarity, and ontology type similarity; CPU-side word similarity fine ranking re-ranks candidates based on the degree of overlap of entity names; ontology semantic filtering is used to filter candidate entities that are semantically similar but not the same entity in the ontology concept space; feature fusion ranking is used to combine instance layer features and ontology layer features to select candidate entities as difficult negative samples.
[0078] Step S6: Obtain structured negative samples from the entity neighbor network through random walk sampling, obtain high-difficulty cached negative samples from the difficult negative sample cache, and mix them in a dynamic ratio using a course learning annealing mechanism to form the negative sample set for training in the current batch.
[0079] Step S7: Given a positive alignment seed pair between the source graph and the target graph, and combining it with the current batch of negative samples, map the entity vectors of the source graph to the target graph space; construct an entity alignment loss including entity mapping interval loss and ontology calibration loss, and combine it with instance layer embedding loss, cross-view linking loss and likelihood conflict loss to form a total loss function; train the model parameters using gradient descent to complete entity alignment between cross-source heterogeneous knowledge graphs in the field of archaeology and cultural heritage.
[0080] In step S1, an instance layer triple set is constructed based on the entities, relations, and instance layer triples in the source and target graph data; an ontology layer triple set is constructed based on entity type, category label, parent class relation, or ontology class hierarchy relation.
[0081] Step S2, which involves embedding the instance layer triples of the open-domain heterogeneous knowledge graph into a vector space, includes the following specific implementations:
[0082] The input data consists of a set T of triples representing the source and target map instance layers, where each triple is denoted as . Where h is the head entity, r is the relation, and t is the tail entity. The entities and relations in the source and target graphs are mapped to a d-dimensional vector space to obtain the entity mapping vector. relational mapping vector For each positive triplet Randomly replace its head or tail entity to generate negative triples. To capture the relational connectivity between entities, instance-layer graph embedding employs a margin-based limited loss based on the translation assumption, and calculates the instance-layer embedding loss function term according to formula (1). :
[0083] (1)
[0084] Where d(·) is the L2 distance function. For positive sample boundary margin parameters, For negative sample boundary margin parameters, and These represent the boundary margins for bringing positive samples closer and pushing negative samples away, respectively. Loss An effective triplet in a vector space satisfies the condition that the sum of the head entity vector and the relation vector is close to the tail entity vector. At the same time, invalid triples are pushed out of the valid semantic region.
[0085] Step S3, which involves embedding vector spaces into the ontology layer triples of the open-domain heterogeneous knowledge graph, includes the following specific implementations:
[0086] The input data consists of the source and target map ontology layer triples. Each ontology layer triple is denoted as ,in For the head body class, For ontology relations, This is the tail ontology class. Independent embedding of the ontology layer triples yields the ontology class mapping vector. , This refers to the spatial dimension of the ontology embedding. To establish a semantic bridge between the entity vector e and the ontology class mapping vector c, a cross-view mapping network is designed to project the instance layer entity vector e from step S1 onto the ontology concept space, generating a pseudo-ontology representation. :
[0087] (2)
[0088] In the formula, L2(·) is the L2 normalization function, which normalizes the vector to the unit sphere. The projection weight matrix is... This is the bias term. The model minimizes the pseudo-ontology representation. The distance between the head entity h or tail entity t in the positive triple (h,r,t) and the ontology class c to which they actually belong is calculated using the following formula for the cross-view link loss function term. To achieve semantic connection between upper and lower level views:
[0089] (3)
[0090] In the formula, A pseudo-ontology representation of entity projection. Here, c' is the ontology class of the negative sample entity, and d(·,·) is the L2 distance function used to measure the spatial difference between vectors. For hyperparameters across view boundaries. Loss function. The goal is to force the distance between the entity pseudo-ontology representation and its real ontology class in the vector space to be at least smaller than the distance between it and its negative sample ontology class. This effectively narrows the semantic distance between upper and lower view layers, implements constraints, and ensures that the semantic representation of an entity in the instance layer is consistent with the semantic representation of its corresponding ontology class in the ontology layer.
[0091] To establish relaxed constraints, a dynamic conflict-aware soft likelihood learning method is used, whereas traditional alignment models typically utilize hard-coded rules. However, such static constraints lack generalization ability when faced with complex domain graphs. Step S4 of this invention proposes a data-driven adaptive likelihood conflict learning method, specifically implemented as follows:
[0092] The input data consists of an alignment seed set S and an ontology class set C for the source and target graphs. A soft conflict probability matrix is constructed based on the co-occurrence statistics of entities in the alignment seeds. Each element in the matrix The value represents the ontology class vector. and The probability of overlap or coexistence. The likelihood conflict loss function term is calculated using the following formula. Soft constraints are imposed by maximizing its log-likelihood:
[0093] (4)
[0094] In the formula, σ is the loss adjustment factor, and sigmoid(·) is the sigmoid activation function. Adaptive likelihood conflict learning allows the model to dynamically adjust the degree of mutual exclusion or inclusion of classes for different geographic domains. For completely disjoint classes, their inner product... This will naturally push the value towards negative. This soft constraint gives the model a very strong ability to adapt to different domains. Likelihood conflict loss function term This enables the model to adaptively learn the compatibility and conflict between ontology classes based on the actual distribution of different types of entities in open-domain heterogeneous knowledge graphs.
[0095] When calculating entity alignment loss, the quality of negative samples directly determines the discriminative power of the decision boundary. To reduce the semantic bias of geometric distance sampling, a multi-view hard negative sampling method is proposed. Step S5, the specific implementation of multi-view hard negative sample selection, includes:
[0096] Step S51, GPU-based three-way feature joint scoring and Top-K candidate recall: Given two cross-source heterogeneous knowledge graphs in the archaeology and cultural heritage fields that need to be aligned, denoted as source graph G1 and target graph G2 respectively. Entities in source graph G1 are denoted as source entities, and all entities in target graph G2, excluding those with known alignment seeds, constitute the candidate entity set. The input data is the positive alignment seed pair. And the set of all candidate entities in the target graph. The sparse adjacency matrix A is used to analyze the source entities. Perform first-order neighborhood aggregation to obtain the local structure mean vector. , To utilize sparse adjacency matrix entity embedding matrix The local structure mean vector obtained from first-order neighborhood aggregation encodes the neighborhood topological context of the entity. The joint score of the three features is calculated using large-scale parallel matrix multiplication.
[0097] (5)
[0098] In the formula, , , These are the fusion weight hyperparameters for the three features: entity semantic similarity, structural mean similarity, and ontology type similarity, which control the relative contributions of the three signals in the joint scoring on the GPU. The vector represents the candidate entity mapping. In large-scale open-domain knowledge graphs or cross-graph alignment tasks with tens of thousands of entities, real-time computation of the global dense similarity matrix of all candidate entities can lead to the "curse of dimensionality." This application computes the above three-way inner product using GPU parallel matrix multiplication, and uses a partial sorting algorithm to select the K highest-scoring candidate entities from the scores of all candidate entities in O(n·log K) time complexity, thus completing the Top-K candidate recall and obtaining the Top-K candidate subset. For source entity The hierarchical path context vector of the ontology class. Candidate entities The hierarchical path context vector of the ontology class to which it belongs.
[0099] Step S52, CPU-side word similarity fine-tuning: For the Top-K candidate subset, the word segmentation results of entity names are introduced to perform word-level Jaccard similarity re-ranking, calculated according to formula (6). The candidate pool after fine sorting is obtained as follows:
[0100] (6)
[0101] In the formula, Tokens(·) is the set of tokens after the entity name has been segmented. and Source entities With candidate entities The set of lexical units obtained after word segmentation of the name string; in open-domain knowledge graphs, the same real-world object may have aliases, abbreviations, word order differences, or naming granularity differences in different graphs. Lexical similarity ranking can compensate for false recalls caused by relying solely on dense embeddings. is the weighted hyperparameter for Jaccard word similarity, balancing the relative influence of dense semantic scores on the GPU and discrete symbol scores on the CPU.
[0102] Step S53: Ontology semantic filtering and feature fusion ranking. For the ranked candidate pool, calculate the ontology semantic similarity. Ontology space filtering is performed, and the top-M entities with the highest scores are selected to form a negative sample candidate pool; then, for each candidate entity in the negative sample candidate pool, the comprehensive fusion similarity is calculated. Perform a comprehensive sort and select The top-N entities with the highest scores are used as hard negative samples. For the source entity Calculate the dot product of ontology space vectors in the target graph, and then calculate the ontology semantic similarity using the following formula:
[0103] (7)
[0104] Select The top-M entities with the highest scores are used as the negative sample candidate pool. Let e1 be the pseudo-ontology representation vector projected from the source entity e1 into the ontology concept space using formula (2). Candidate entities in the target graph The pseudo-ontology representation vector after projection by formula (2).
[0105] To further enhance the deceptiveness of negative samples, the model needs to comprehensively consider instance network features and ontology path features. Let the set of directed path features of the ontology class to which the entity belongs be . D represents the number of nodes contained in the ontology class hierarchical path, expressed through a mask matrix. Aggregation yields ontology context vectors based on hierarchical paths. .entity and The comprehensive fusion similarity is defined as the mapping vector of each candidate entity in the negative sample candidate pool obtained in the first step of screening. Calculate its relationship with the source entity Overall similarity:
[0106] (8)
[0107] in, It is a learnable mapping matrix for cross-graph alignment, used to project the entity embeddings of the source graph into the vector space of the target graph, eliminating the distribution offset between the embedding spaces of the two graphs; To control the ontology fusion hyperparameters for ontology importance; according to The scores are sorted in descending order, and the top-N entities with the highest scores are selected as the hard negative samples. neg In terms of network structure and high-level concept constraints, it is extremely similar to the positive sample, thus constituting a highly challenging confusing sample.
[0108] This architecture effectively solves the bottleneck of computational efficiency while ensuring extremely high sampling difficulty and multi-dimensionality.
[0109] Because dynamic fusion sampling based on curriculum learning introduces overly difficult semantic negative samples in the early stages of training, it can easily lead to the model getting stuck in local optima or gradient collapse. Therefore, a curriculum learning annealing mechanism is introduced. Step S6 uses the curriculum learning annealing mechanism to dynamically mix structured negative samples and high-difficulty cached negative samples in a certain proportion. The specific implementation includes:
[0110] Each training batch of negative samples consists of two independent sources dynamically mixed in proportion: structured negative samples (of moderate difficulty) obtained from random walk sampling in the entity's neighbor network, and hard negative samples e output from step S5. neg High-difficulty cached negative samples (extremely difficult) are obtained from the periodically updated cache, and structured negative samples are dynamically mixed with high-difficulty cached negative samples. Let the proportion of structured negative samples in each batch be... Then the proportion of high-difficulty cached negative samples is (1- ). The decay rate dynamically decreases with each training round according to the following formula:
[0111] (9)
[0112] In the formula, This represents the initial proportion of structured negative samples. This represents the lower limit of the proportion of structured negative samples. The threshold for the number of warm-up rounds in the course. To control the duration of annealing cycles from linear decay to The smaller the transition rate, the more aggressive the annealing. < stage, Truncation makes the value inside the parentheses equal to 0, i.e. maintain The process remains unchanged; annealing will only begin after the model has completed its basic representation learning. from linear decay to . For the first The dynamic proportion of structured negative samples in each batch of negative samples during training epochs, and its complement. This refers to the proportion of high-difficulty cache negative samples from the GPU Top-K cache; To ensure the initial proportion of structured negative samples in the initial training phase, the model mainly uses easy to medium difficulty samples in this phase, thus ensuring the gradient stability of the embedding space during the initialization phase. This serves as a lower limit for the proportion of structured negative samples in the later stages of training, ensuring that highly difficult cached negative samples gradually dominate in the later stages of training, and continuously strengthening the model's ability to discriminate fine-grained semantic boundaries. and The nesting truncates the decay progress to the [0,1] interval, ensuring Throughout the training process, the training is monotonically non-incremental and bounded, thus achieving a smooth transition from being dominated by structured negative samples to being dominated by high-difficulty cached negative samples, ensuring the stability of training convergence in sparse graph scenarios such as D_W_15K_V1.
[0113] Set initial ratio , the final proportion Before the warm-up period, the model primarily focuses on basic structure sampling. As training progresses, extremely difficult samples gradually take the lead. This smooth transition mechanism ensures the model's convergence stability under extreme pressure. After completing negative sampling, the model enters the joint alignment optimization mapping stage. In the early stages of training, the proportion of structured negative samples is increased to ensure the model obtains a stable basic representation capability. As the training epochs increase, the proportion of high-difficulty cached negative samples is gradually increased, enabling the model to focus on learning fine-grained discrimination boundaries between difficult-to-distinguish cross-graph candidate entities in the later stages of training.
[0114] Step S7, which involves entity mapping alignment training based on positive alignment seed pairs and difficult negative samples, includes the following specific implementation:
[0115] During the entity alignment (mapping) phase, given a positive alignment seed pair Where e1 originates from map G1 and e2 originates from target map G2; negative sample sets corresponding to e1 and e2 are constructed respectively using a hybrid sampling strategy. , N(e1) and N(e2) are both obtained based on the hybrid sampling method in step S5. N(e1) is sampled using G1 as the source map and G2 as the target map; N(e2) is sampled using G2 as the source map and G1 as the target map; the entity vectors of the source map are processed by a learnable transformation matrix. Mapped to the target map space. Total alignment loss. The weighted sum of entity mapping interval loss and ontology calibration loss:
[0116] (10)
[0117] In the formula, For entity mapping interval loss, The cosine calibration loss is used, and α, γ, and β are weighting parameters. , They represent , Difficult negative samples. Guarantee the distance between positive sample pairs after mapping It approaches 0, while the distance from negative samples is greater than the set boundary. (Two terms) The loss is calibrated at both the real ontology path vector and the pseudo ontology concept vector levels. Through iterative optimization of the above multiple joint loss functions, the OnEA model of this invention not only accurately captures the cross-graph correspondence between entities, but also establishes a highly robust entity identity discrimination boundary for complex scenarios such as homonymy and cross-class interference under the continuous pressure and trial and error of difficult negative samples.
[0118] Step S1 Step S2 Step S3 With the above Combining these, we obtain the total loss function. :
[0119] (11)
[0120] Using this total loss function, gradient descent is employed to iteratively train all parameters in the model, thereby completing entity alignment.
[0121] Furthermore, the present invention provides a multi-view hard negative sampling entity alignment system with joint ontology embedding for implementing the aforementioned method, the system comprising:
[0122] The acquisition module is used to define two cross-source heterogeneous knowledge graphs in the archaeology and cultural heritage fields to be aligned as the source graph and the target graph, respectively. Based on the relationship between entities, ontology-level triples and instance-level triples are established, where the entity is the cultural relic description information; the relationship set contains all the connection relationship descriptions between the cultural relic description information.
[0123] The entity embedding module is used to map the entity sets and relation sets in the source graph and the target graph to a low-dimensional vector space, respectively, to obtain entity mapping vectors and relation mapping vectors. For each positive triple, the head entity or tail entity is randomly replaced to generate a negative triple, and the instance layer embedding loss is defined based on the distance constraint between the positive triple and the negative triple.
[0124] The ontology embedding module is used to embed ontology classes, ontology relations, and ontology layer triples in the source and target graphs into a vector space to obtain ontology class mapping vectors; the entity mapping vectors are projected onto the ontology concept space through a cross-view mapping network to generate pseudo ontology concept vectors of entities, and the cross-view link loss is defined.
[0125] The relational dynamic modeling module is used to pre-align entity mapping vectors based on the source and target graphs to form positive alignment seed pairs. Based on the co-occurrence statistics of entity types in the known positive alignment seed pairs, a soft conflict probability matrix is constructed. The elements in the soft conflict probability matrix are used to represent the coexistence probability or conflict probability between different ontology classes. The module dynamically models the exclusion and inclusion relationships between ontology classes through the log-likelihood function and defines the likelihood conflict loss.
[0126] The difficult negative sample screening module is used to construct a candidate entity set from entities in the target graph excluding those with known alignment seeds. For source entities in the source graph and candidate entities in the target graph, it sequentially performs GPU-side three-way feature joint scoring, Top-K candidate recall, CPU-side word similarity fine ranking, ontology semantic filtering, and feature fusion ranking to obtain and cache difficult negative samples. Among them, GPU-side three-way feature joint scoring includes entity semantic similarity, structural mean similarity, and ontology type similarity; CPU-side word similarity fine ranking re-ranks candidates based on the degree of overlap of entity names; ontology semantic filtering is used to filter candidate entities that are semantically similar but not the same entity in the ontology concept space; feature fusion ranking is used to combine instance layer features and ontology layer features to select candidate entities as difficult negative samples.
[0127] The hybrid sampling module is used to obtain structured negative samples from the entity neighbor network through random walk sampling, obtain high-difficulty cached negative samples from the difficult negative sample cache, and mix them in a dynamic ratio using a course learning annealing mechanism to form the negative sample set used for training in the current batch.
[0128] The entity alignment module is used to map the entity vectors of the source graph to the target graph space, given a positive alignment seed pair between the source graph and the target graph, and combined with the current batch of negative samples. It constructs an entity alignment loss that includes entity mapping interval loss and ontology calibration loss, and combines it with instance layer embedding loss, cross-view linking loss and likelihood conflict loss to form a total loss function. The model parameters are trained using gradient descent to complete entity alignment between cross-source heterogeneous knowledge graphs in the field of archaeology and cultural heritage.
[0129] The following evaluation experiment is conducted using the OnEA model of this invention:
[0130] Construction of a Multimodal Heterogeneous Dataset for Western Xia Cultural Relics: In the field of archaeology and cultural heritage, publicly available cultural relic data typically comes from museum exhibition websites, archaeological institute cultural relic appreciation sections, site excavation data, and local museum collection pages. Significant differences exist between these sources in entity naming, section classification, field granularity, text-image organization, and source identification, making it difficult to automatically align the same or similar cultural relics across different knowledge graphs. Specifically, entities in the archaeological and cultural heritage knowledge graph are not limited to the cultural relics themselves, but also include auxiliary entities such as source records, provenance or source website, holding institution, excavation site or location, site, dynasty, cultural type, material, craftsmanship, and ornamentation; relationships are not limited to general semantic relationships, but also include cultural heritage-specific relationships such as category, holding institution, publishing institution, dynasty, culture, material, excavation location, excavation site, source website, collection source, and original classification. During the initial data construction process, the lack of domain constraints can easily lead to two types of problems: First, inconsistencies in the paths or numbers of standardized cultural relic entities and source webpage entities can result in misaligned entity links. Second, background words in long texts can be misidentified as entity attributes; for example, "silver" in "Yinchuan City" might be identified as a material, "bronze" in "Qingtongxia City" as a material, or "Qin Dynasty" and "Tang Dynasty" in historical background descriptions might be identified as the dynasty of the current cultural relic. Therefore, entity alignment in the archaeological and cultural heritage field requires not only general vector space similarity but also semantic constraints in areas such as ontology class, entity type, relation type, source, and location to reduce misalignment caused by visual similarity, similar names, confusing source fields, and misidentification of long texts. To address this issue, the following measures are taken:
[0131] Misalignment Issue: In the initial version, inconsistencies existed in the naming conventions of the dataset target directory, entity numbers, and source entities, which could easily lead to a mismatch between standardized cultural relic entities and source cultural relic entities in ent_links. To resolve this issue, this embodiment treats standardized cultural relic entities and source cultural relic entities as two views, G1 and G2, respectively, and assigns the same WXC number to the same cultural relic record. Subsequently, a one-to-one correspondence is established through ent_links, and the entity set of crossview_link_1 is verified to be consistent with the left side of ent_links, and the entity set of crossview_link_2 is consistent with the right side of ent_links. This avoids misalignment of alignment links caused by path changes, duplicate source pages, or differences in entity naming.
[0132] Dynasty identification error: The initial version directly retrieved dynasty terms from the long text, easily mistaking background descriptions for the age of artifacts. For example, when introducing the geography of Ningxia, it stated "Yellow River water was introduced starting in the Qin Dynasty," which should not be used to determine that the entry dates to the Qin Dynasty. In the improved version, dynasty identification prioritizes titles, columns, explicit short fields, and structured fields; long text is only saved as descriptions.
[0133] Material recognition error: The initial version directly matched words such as "gold," "silver," "copper," and "stone," easily misidentifying place names or background terms as materials. For example, it identified "silver" in "Yinchuan City" as silver and "bronze" in "Qingtongxia City" as bronze. The improved version prioritizes using explicit material fields and object categories for material recognition, avoiding direct extraction of single-word material information from long texts.
[0134] Errors in identifying excavation sites and ruins: The initial version might have written entire paragraphs or long sentences into the excavation site field, resulting in excessively long relation tail entities without entity boundaries. The improved version extracts locations or ruins only when there is a clear context such as "excavated," "excavated," "ruins," "cemetery," "mausoleum area," or "hoard," and removes non-entity prefixes such as "e.g.," "with," "at," and "located in."
[0135] Material Mixing in Cultural Fields: Some source fields contain mixed phrases such as "Tang Dynasty Gold". The initial version may have identified the entire phrase as a cultural entity. After improvement, only culturally specific names such as Yangshao Culture, Qijia Culture, and Western Xia Culture will be identified as cultural entities; if a field contains material information such as "gold," "pottery," or "porcelain," the mixed phrase will not be identified as a cultural entity.
[0136] In this embodiment, both the source graph G1 and the target graph G2 are defined as knowledge graphs in the field of archaeology and cultural heritage. The source graph G1 is a standardized cultural relic graph, and each standardized cultural relic entity is represented in the form of "cultural relic:WXC_number:name"; the target graph G2 is a source cultural relic graph, and each source cultural relic entity is represented in the form of "source cultural relic:WXC_number:name".
[0137] The entity types on the source map G1 side include fine cultural relics, historical relics, pottery, bronzes, porcelain, gold and silver wares, jade, stone carvings, stone tools, calligraphy, paintings, architectural components, miscellaneous items, and general cultural relic categories; it also includes auxiliary entities such as category, dynasty, culture, material, craftsmanship, decoration, institution, location, and site. The entity types on the target map G2 side include source cultural relics, source website, source URL, original collection institution, and original classification. The source website entity refers to the entity that published the cultural relic source information or the webpage source address, such as Ningxia Museum, Ningxia Guyuan Museum, Ningxia Hui Autonomous Region Institute of Cultural Relics and Archaeology, or specific webpage URLs. This entity is used to explain "where the cultural relic information was collected from and who published it." The location entity describes the semantic location associated with the cultural relic in the current or source record; the excavation site entity describes the discovery site, excavation site, or place of excavation of the cultural relic; and the site entity describes archaeological sites such as the Shuidonggou Site, the Gezishan Site, and the Western Xia Imperial Tombs. These three entities support the spatial tracing relationship of "cultural relic—location—site" in the field of archaeology and cultural heritage. The "Collection Institution Entity" refers to the institution that collects, preserves, displays, or publishes the artifacts after the standard artifact catalog has been cleaned, such as the Ningxia Museum and the Ningxia Guyuan Museum. The "Original Collection Institution Entity" is the institution information recorded verbatim on the source webpage, used to preserve the source-side semantics and facilitate comparison with the standard institution entity. The "Original Classification Entity" is the category, collection classification, or display classification recorded on the source webpage, such as "Fine Artifacts / Historical Artifacts" or "Artifact Appreciation / Pottery." It is not necessarily equivalent to the final standardized artifact category, but rather preserves the original classification semantics of the source page. The "Dynasty Entity" refers to the historical period, era, or dynasty to which the artifact belongs, such as the Paleolithic Age, Neolithic Age, Tang Dynasty, Western Xia Dynasty, Ming Dynasty, and Qing Dynasty. The "Cultural Entity" refers to the conceptual entity used to describe the archaeological culture, historical cultural system, or era-specific cultural background to which the artifact belongs, such as the Yangshao Culture, Qijia Culture, and Western Xia Culture; when there is no explicit cultural name, it can be supplemented by the era-specific cultural background, but mixed phrases such as "Tang Dynasty Gold" are not considered cultural entities. Material entities describe the main materials of the artifact, such as pottery, porcelain, bronze, stone, jade, gold, and silver. Craftsmanship entities describe the production or decorative techniques, such as stone carving, relief carving, and raised relief. Ornamental entities describe the themes and patterns on the artifact, such as dragon patterns, cloud patterns, and lotus patterns.
[0138] The standardized knowledge relationships are recorded in the source map G1, mainly including: Category: connecting the standardized cultural relic entity to the category entity; Collection Institution: connecting the standardized cultural relic entity to the standardized institution entity; Issuing Institution: connecting the standardized cultural relic entity to the information issuing institution entity; Material: connecting the standardized cultural relic entity to the material entity; Culture: connecting the standardized cultural relic entity to the culture entity; Dynasty: connecting the standardized cultural relic entity to the dynasty entity; Place of Excavation: connecting the standardized cultural relic entity to the place of excavation, discovery site, or location entity; Excavation Site: connecting the standardized cultural relic entity to the site, cemetery, mausoleum area, or hoard entity; Decorative Theme: connecting the standardized cultural relic entity to the decorative theme entity; Craft: connecting the standardized cultural relic entity to the production technique entity.
[0139] The source tracing relationship is recorded in the target map G2, mainly including: Source website: connecting the source cultural relic entity with the source website or publishing institution entity; Collected from: connecting the source cultural relic entity with the source URL entity; Original holding institution: connecting the source cultural relic entity with the holding or publishing institution entity originally recorded on the webpage; Original classification: connecting the source cultural relic entity with the original column classification entity on the webpage.
[0140] The aforementioned entities and relations are respectively written into instance-level triples, ontology-level triples, and cross-view type link files to ensure that subsequent embodiments conform to the entity types and relation types in the claims. Example of standardized artifact attribute triples:
[0141] Cultural Relic: WXC_000004: Primitive cave dwelling model culture, Yangshao culture;
[0142] Artifact: WXC_000002: Paleolithic Shuidonggou Site (primitive bull head fossil) Material: Stone;
[0143] Example of a standardized three-element group for cultural relic relationships:
[0144] Artifact: WXC_000004: Primitive cave dwelling model; Culture: Yangshao Culture;
[0145] Artifact: WXC_000002: Paleolithic Shuidonggou Site (Primitive Bovine Head Fossil) Material: Stone;
[0146] Artifact: WXC_000003: Site of the transition from the Paleolithic to the Neolithic Age; Excavated site: Pigeon Mountain Site;
[0147] Example of a source-tracing triple:
[0148] Source of cultural relic: WXC_000001: Geographical distribution in Ningxia; Source website: Ningxia Museum;
[0149] Source of cultural relic: WXC_000001: Collected from the source in Ningxia geographical distribution. URL:https: / / nxbwg3.mh.chaoxing.com / engine2 / d / 26983645 / 5772983 / 0 / 4782190?t=11465518&p=1 ;
[0150] Source of cultural relic: WXC_000001: Geographical distribution in Ningxia; Original collection institution: Ningxia Museum;
[0151] Source of cultural relic: WXC_000001: Geographical distribution in Ningxia; Original classification: Fine cultural relic; Historical relic.
[0152] Example of entity alignment link:
[0153] Cultural Relics: WXC_000001: Geographical Distribution in Ningxia;
[0154] The cleaned and standardized cultural relic knowledge graph is used as the source graph G1, and the source knowledge graph that retains the original webpage source records is used as the target graph G2. The entities in G1 include standardized cultural relic entities, excavation site or location entities, site entities, collection institution entities, dynasty entities, culture entities, material entities, craft entities, and decorative entities. The entities in G2 include source cultural relic entities, source website entities, source URL entities, original collection institution entities, and original classification entities.
[0155] Archaeological and cultural heritage relationships include category, holding institution, issuing institution, material, culture, dynasty, excavation location, excavation site, decorative motif, craftsmanship, source website, source, original holding institution, and original classification. These entity types and relationship types collectively constitute the domain constraints for this invention's ontology embedding, cross-view linking, hard negative sample screening, and entity alignment loss calculation.
[0156] Furthermore, before embedding at the instance layer, this invention performs preprocessing and error correction on the archaeological and cultural heritage data: it resolves the mismatch between standardized entities and source entities by using unified numbering; it identifies dynasties and cultures by prioritizing short fact fields; it identifies materials by using category fields and explicit material fields; it identifies locations and sites by using context such as unearthed, excavated, ruins, cemeteries, mausoleum areas, or hoards; and it filters out erroneous identifications caused by long text background descriptions, place names, and mixed phrases.
[0157] To evaluate the OnEA model's ability to handle ontology-level constraints and fine-grained semantic conflicts in real-world industrial scenarios, and to avoid the high homogeneity of entities in naming conventions, attribute distribution, and topological structure that often results from iterative sampling of datasets from different language versions or related items of the same data source, a highly heterogeneous vertical domain benchmark dataset named WXC-HET was constructed to address the heterogeneous knowledge fusion problem in the digital preservation of Western Xia cultural heritage. This dataset originates from two independently constructed knowledge graphs with distinctly different semantic environments: an archaeological academic graph. With cultural and museum exhibition map Archaeological Atlas The data primarily comes from archaeological excavation reports and professional literature published by the Ningxia Institute of Cultural Relics and Archaeology, such as the translated and annotated version of the *Tiansheng Gaijiu Xinlu Ding* and the museum collection registration standards (WW / T0017—2013). This atlas focuses on the physical attributes of the artifacts, such as "remaining length 5cm," "excavation coordinates N38°," stratigraphic information, and academic classification. Its strata construction strictly follows archaeological typology, and the entity naming is highly professional and unique, such as "Western Xia carved brown-glazed porcelain jar." (Cultural Relics Exhibition Atlas) The data was collected from the digital display systems of Ningxia Museum and Guyuan Museum, as well as open domain internet data from Baidu Encyclopedia and Ctrip Travel. The data contains a large amount of unstructured descriptive text and multi-angle images. Its ontology hierarchy is relatively flat, and entity names tend to be popular and social, such as "brown-glazed jar" and "Western Xia porcelain," and it also contains a large amount of noisy data. There is a significant distributional bias in the representation of the same entity. For example, the same gold artifact... It is classified as "metalware - gold jewelry" in China, while The artifact might be categorized as a "court treasure." This cross-graph ontology misalignment and naming discrepancy is the main reason why traditional models based on string similarity or simple geometric distance fail, and it also provides the necessary experimental environment for the difficult negative sampling mechanism proposed in this invention. To support the ontology joint embedding module in the OnEA model, this paper refers to the internationally accepted cultural heritage reference ontology model CIDOC CRM (International Council of Museums Cultural Heritage Concept Reference Model (CIDOC CRM, ISO 21127)) and uses a seven-step method to reconstruct the schema layer of the two graphs. Core class definition: "E22_Man-Made_Object", "E53_Place", and "E39_Actor" are extracted as skeleton classes, and the unique concepts of the Western Xia are mapped to subclasses of "Es74_Group". Relational constraints: Asymmetric logical relationships are defined to explicitly distinguish the "excavation background" and "museum collection background" of the artifacts. Through human expert verification and crowdsourcing assistance, the high-confidence entity alignment mapping between the two graphs is finally labeled. Table 1 shows a statistical comparison between the WXC-HET dataset and mainstream industrial datasets.
[0158] In one specific embodiment, WXC-HET contains 446 aligned entity records, with data sources including the Ningxia Hui Autonomous Region Institute of Cultural Relics and Archaeology, Ningxia Museum, and Ningxia Guyuan Museum; it generates 4691 canonical entity attribute triples, 4011 source entity attribute triples, 2786 canonical entity relationship triples, 1784 source entity relationship triples, 446 entity alignment links, 37 ontology parent-child class relationships, 81 ontology attribute descriptions, 66 ontology mutual exclusion constraints, and 38 ontology class paths.
[0159] To address the "misalignment" issue in the initial version, this embodiment treats the standardized cultural relic entity and the source cultural relic entity as two views, G1 and G2, respectively, and assigns the same WXC number to the same cultural relic record. Subsequently, a one-to-one correspondence is established through ent_links, and it is verified that the entity set of crossview_link_1 is consistent with the left side of ent_links, and the entity set of crossview_link_2 is consistent with the right side of ent_links. This avoids misalignment of alignment links caused by path changes, duplicate source pages, or differences in entity naming.
[0160] To address the "identification error" issue in the initial version, this embodiment employs an archaeological and cultural heritage field correction strategy: For dynasty identification, historical background terms from long texts are not directly used; instead, titles, columns, and clearly defined short fields are prioritized. For material identification, single characters like "gold," "silver," "copper," and "stone" are not directly matched; instead, material fields and artifact categories are prioritized to avoid misidentifying "silver" in "Yinchuan City" or "bronze" in "Qingtongxia City" as materials. For location and site identification, extraction only occurs when the context of "excavated," "excavated," "site," "cemetery," "mausoleum area," or "hoard" appears, and non-entity prefixes such as "like," "with," "at," and "located in" are removed. If material terms such as "gold," "pottery," and "porcelain" are mixed into the cultural field, they are not considered cultural entities.
[0161] After the above processing, the entity types, relation types, ontology files, and supporting data files in the embodiments of the specification are consistent with the archaeological and cultural heritage entity alignment method defined in the claims, thereby supporting the technical effect of the present invention in the scenario of entity alignment of heterogeneous knowledge graphs of archaeological and cultural heritage.
[0162] Table 1 - Statistical Comparison of WXC-HET Dataset with Mainstream Industrial Datasets
[0163] To rigorously evaluate the robustness of the model under different data distributions, this study did not use random partitioning of the training set and test set. In this paper, a bias factor was introduced based on the edit distance of entity names and attribute density to construct a challenging experimental partition. Specifically, all aligned samples were divided into three mutually exclusive subsets: the isomorphic set (sname = 1.0), where the entity names are exactly the same, mainly testing the basic memory ability of the model; the fuzzy set (0.5 < sname < 1.0), where there is partial overlap in names and a large number of text-induced negative samples; and the heterogeneous long-tail set (sname ≤ 0.5), where the entity names are completely different and usually accompanied by missing attributes. This partitioning strategy can effectively avoid the model relying solely on surface text features for shortcut learning, forcing the model to use the difficult negative sampling method proposed in this invention to挖掘深层的结构与视觉语义关联。
[0164] Public Benchmark Datasets and Experimental Settings
[0165] To verify the generalization ability of the OnEA model in different language environments and graph densities, in addition to the self-built Western Xia cultural relic dataset WXC-HET, this application also conducted extensive evaluations on the OpenEA (A benchmarking study of embedding-based entity alignment for knowledge graphs) benchmark dataset. Among them, D_W_15K contains DBpedia (DBpedia Knowledge Graph, an open knowledge graph formed by extracting structured information from resources such as Wikipedia, and entities are usually represented in the form of page URIs.) and Wikidata (Wikidata Knowledge Graph, entity mappings between structured knowledge bases maintained by the community. Among them, the V1sparse version has a lower average degree, simulating a data-sparse scenario, and the V2dense version has a higher average degree, simulating a data-dense scenario. This helps to evaluate the dependence of the model on the graph structure.)
[0166] Experimental Results and Analysis
[0167] This invention analyzed the OnEA model through multiple sets of comparative experiments from three dimensions: the effectiveness of the negative sampling strategy, the gain of multimodal features, and the comparison with existing entity alignment models. The evaluation metrics used were Hits@1, Hits@10, and the mean reciprocal rank MRR. Among them, the OnEA(Base) model is a degraded version of OnEA that ablates the multi-perspective difficult negative sampling and dynamic conflict learning modules (the ablation version after removing the dynamic conflict learning module in step S4 and the multi-perspective difficult negative sampling and curriculum learning hybrid modules in steps S5 - S6).
[0168] Table 2. Impact of different sampling strategies on model performance (D_W_15K dataset, without image features)
[0169] As shown in Table 2, without using multimodal information, the hard negative sampling strategy significantly improves performance compared to random sampling. On the sparse dataset (V1), Hits@1 (the proportion of correctly aligned entities appearing in the first position of the candidate list) is improved by approximately 8.9%, indicating that by mining indistinguishable negative samples in the latent space, the model is forced to learn more robust structural features. On the dense dataset (V2), the improvement is even more significant (+11.7%). This suggests that in cases rich in structural information, simple random negative sampling can easily lead to premature convergence to local optima, while hard samples effectively reshape the decision boundary. Hits@10 represents the proportion of correctly aligned entities appearing in the top 10 positions of the candidate list.
[0170] To verify the effectiveness of the similarity-based hard negative sampling strategy proposed in this invention in multimodal scenarios, the negative sampling strategy of the model was set to a traditional random negative sampling strategy and a multi-view hard negative sampling strategy, respectively. By comparing these two sets of experiments, the improvement of the model's discriminative ability after removing the gain brought by the multimodal features themselves is illustrated. The experimental results are shown in Table 3.
[0171] Table 3 Performance Comparison of Different Sampling Strategies in Multimodal Environments
[0172] As shown in Table 3, even though the model already possesses visual alignment capabilities, the optimization of the negative sampling strategy still plays a decisive role. On the D_W_15K_V1 dataset, compared to random sampling, the OnEA model achieved a significant improvement of 4.32% in the Hits@1 metric, increasing from 78.93% to 83.25%. While introducing image features brings the same entity closer together, it also introduces a large number of visually similar negative samples. For example, artifacts from two different entities may have extremely similar appearances, such as texture and color. Random sampling makes it difficult to select these similar entities as negative samples, causing the model to fail to learn fine-grained distinction boundaries. OnEA's hard sampling mechanism actively mines these visually similar but semantically different entities, forcing the model to not only focus on the overall similarity of the image but also combine structural and attribute information for joint discrimination, thereby correcting misalignment. On the D_W_15K_V2 dataset, which is rich in structural information, the baseline model has already achieved a high accuracy of 86.12%, but OnEA still improves it to 89.01%. This demonstrates that even when the graph structure provides sufficient supervision, optimizing the negative sampling distribution can further converge the embedding space and reduce semantic overlap in high-dimensional spaces. Experimental data also show that simply introducing multimodal features is insufficient; a high-quality negative sampling strategy is an effective method to improve the generalization ability of multimodal entity alignment models.
[0173] To comprehensively evaluate the alignment performance of OnEA in the field of multimodal entity alignment, this invention compares the OnEA model with two current mainstream entity alignment methods. (Table: OpenEA) DW-V1 This refers to dw(D_W_15K_V1) provided in the OpenEA paper. DW-V2 This refers to dw(D_W_15K_V2) provided in the OpenEA paper.
[0174] Table 4 Performance comparison between OnEA and mainstream models:
[0175] Compared to MSNEA (Multi-modal siamese network for entity alignment) and EVA (VisualPivoting for (Unsupervised) Entity Alignment), OnEA achieves an improvement in the MRR metric of DW-V2 (D_W_15K_V2). Simply stacking visual features is insufficient to solve the alignment problem; OnEA effectively filters visual noise by introducing ontological layer constraints and high-quality negative sampling.
[0176] Unlike the homogeneous distribution of public datasets, WXC-HET contains a large number of long-tail entities that cross modalities and contexts. This application employs a bias-aware partitioning strategy and compares the performance of the baseline model OntoEA (see reference OntoEA: Ontology-guided Entity Alignment via Joint Knowledge Graph Embedding) with OnEA on different difficulty subsets. The evaluation metrics are Hits@1 and MRR.
[0177] Table 5. Stratified performance evaluation of OnEA on the WXC-HET dataset
[0178] As shown in Table 5, in the most challenging "heterogeneous long-tail set," the OntoEA model's Hits@1 score was only 18.2%, almost failing. This is mainly because the entities in this set have no overlap at the text level. OnEA, however, by using extracted visual features and deep-hard negative sampling as anchors, combined with ontology-level reasoning, significantly improved the accuracy to 45.6%. This result strongly demonstrates the practical value of OnEA in solving the problem of heterogeneous knowledge fusion.
[0179] Based on the experimental results above, the OnEA model not only achieves state-of-the-art (SOTA) performance on publicly available academic datasets, but also demonstrates excellent anti-interference capabilities and generalization performance in the complex vertical domain of Western Xia cultural relics. Through the organic combination of multimodal feature fusion, ontology joint embedding, and a difficult negative sampling strategy, it effectively solves the challenge of aligning multi-source heterogeneous data in the digital preservation of cultural relics.
[0180] This invention systematically discusses and evaluates the effectiveness and robustness of the multi-view negative sampling method of the OnEA model. Addressing the limitation of general datasets in adapting to the heterogeneous characteristics of vertical domains, a benchmark dataset of Western Xia cultural relics, WXC-HET, encompassing both archaeological and cultural heritage perspectives, is constructed. A bias-aware difficulty partitioning mechanism is designed to recreate realistic industrial scenarios. Dual validation using OpenEA and WXC-HET demonstrates that the proposed multi-view difficult negative sampling strategy not only outperforms mainstream models such as MSNEA on public benchmarks, effectively overcoming the challenge of distinguishing between visually similar but semantically different examples, but also achieves a breakthrough improvement in alignment accuracy in heterogeneous long-tailed difficult examples within vertical domains. Experimental results fully demonstrate that the OnEA model can effectively solve the semantic gap problem of multi-source heterogeneous data, providing solid technical support for the digital protection and knowledge fusion of Western Xia cultural heritage.
[0181] The above-disclosed embodiments are merely preferred embodiments of the present invention and should not be construed as limiting the scope of the invention. Those skilled in the art will understand that implementing all or part of the above-described embodiments and making equivalent changes in accordance with the claims of the present invention are still within the scope of the invention.
Claims
1. A method of multi-view difficult negative sampling entity alignment combined with ontology embedding, characterized in that, include: Step S1: Define two cross-source heterogeneous knowledge graphs from the archaeology and cultural heritage fields to be aligned as the source graph and the target graph, respectively. Based on the relationships between entities, establish ontology-level triples and instance-level triples, where the entity is the cultural relic description information; the relationship set contains all the connection relationships between the cultural relic description information. Step S2: Map the entity set and relation set in the source graph and the target graph to a low-dimensional vector space respectively to obtain entity mapping vector and relation mapping vector; for each positive triple, randomly replace the head entity or tail entity to generate a negative triple, and define the instance layer embedding loss based on the distance constraint between the positive triple and the negative triple; Step S3: Embed the ontology classes, ontology relations, and ontology layer triples in the source and target graphs into a vector space to obtain ontology class mapping vectors; project the entity mapping vectors onto the ontology concept space through a cross-view mapping network to generate pseudo ontology concept vectors for the entities, and define the cross-view link loss. Step S4: Pre-align entity mapping vectors based on the source and target maps to form positive alignment seed pairs. Construct a soft conflict probability matrix based on the co-occurrence statistics of entity types in the known positive alignment seed pairs. The elements in the soft conflict probability matrix are used to represent the coexistence probability or conflict probability between different ontology classes. Dynamically model the exclusion and inclusion relationships between ontology classes using the log-likelihood function and define the likelihood conflict loss. Step S5: Construct a candidate entity set from entities in the target graph excluding known alignment seeds. For source entities in the source graph and candidate entities in the target graph, sequentially perform GPU-side three-way feature joint scoring, Top-K candidate recall, CPU-side word similarity ranking, ontology semantic filtering, and feature fusion ranking to obtain and cache difficult negative samples. Specifically, the GPU-side three-way feature joint scoring includes entity semantic similarity, structural mean similarity, and ontology type similarity; the CPU-side word similarity ranking re-ranks candidates based on the degree of overlap in entity names; the ontology semantic filtering filters candidate entities in the ontology concept space that are semantically similar but not the same entity; and the feature fusion ranking integrates instance-layer features and ontology-layer features to select candidate entities as difficult negative samples. Step S6: Obtain structured negative samples from the entity neighbor network through random walk sampling, obtain high-difficulty cached negative samples from the difficult negative sample cache, and mix them in a dynamic ratio using a course learning annealing mechanism to form the negative sample set for training in the current batch. Step S7: Given a positive alignment seed pair between the source graph and the target graph, and combining it with the current batch of negative samples, map the entity vectors of the source graph to the target graph space; construct an entity alignment loss including entity mapping interval loss and ontology calibration loss, and combine it with instance layer embedding loss, cross-view linking loss and likelihood conflict loss to form a total loss function; train the model parameters using gradient descent to complete entity alignment between cross-source heterogeneous knowledge graphs in the field of archaeology and cultural heritage.
2. The joint ontology embedding multi-view difficult negative sampling entity alignment method of claim 1, wherein, Step S2 includes: Map the entities and relations in the source graph and the target graph to a d-dimensional vector space to obtain entity mapping vectors , relation mapping vectors ; For each positive triple , generate a negative triple by randomly replacing its head entity or tail entity ; Defining instance-level embedding loss : ; where d(·) is the L2 distance function, is a positive sample margin parameter, is a negative sample margin parameter, and denote the margin of pulling in positive samples and pushing away negative samples, respectively.
3. The joint ontology embedding multi-view difficult negative sampling entity alignment method of claim 2, wherein, Step S3 includes: The set of triplets for the source and target maps at the ontology layer The ontology classes and ontology relationships are independently embedded to obtain ontology class mapping vectors. , The spatial dimension embedded in the ontology; Utilizing a cross-view mapping network to map entities to vectors Projected onto the ontology concept space, generating a pseudo-ontology representation. : ; In the formula, L2(·) is the L2 normalization function; The projection weight matrix is... For bias terms; Define cross-view link loss : ; In the formula, Let c' be the pseudo-ontology representation projected onto the negative sample entities, and d(·,·) be the ontology class of the negative sample entities. For cross-view boundary hyperparameters.
4. The multi-view difficult negative sampling entity alignment method with joint ontology embedding as described in claim 3, characterized in that, Step S4 includes: Constructing a soft conflict probability matrix Each element in the matrix The value represents the ontology class mapping vector. and The probability of overlap or coexistence; Define likelihood conflict loss : ; In the formula, σ is the loss adjustment factor, and sigmoid(·) is the sigmoid activation function.
5. The multi-view difficult negative sampling entity alignment method with joint ontology embedding as described in claim 4, characterized in that, Step S5, the difficult negative sample selection process, includes: Map the entity vectors from the source graph G1 Entity mapping vectors derived from target graph G2 Defined as a positive alignment seed pair between G1 and G2 Non-target map G2 The entity mapping vectors form a candidate entity set; GPU-based three-way feature joint scoring: Utilizing the sparse adjacency matrix A to map entity vectors. Perform first-order neighborhood aggregation to obtain the local structure mean vector. The joint score of three features is calculated by large-scale parallel matrix multiplication. : ; In the formula, , , These are the fusion weight hyperparameters for the three features: entity semantic similarity, structural mean similarity, and ontology type similarity. The candidate entity mapping vector; for The hierarchical path context vector of the ontology class. for The hierarchical path context vector of the ontology class to which it belongs; Top-K candidate recall: The three-way inner product is calculated by parallel matrix multiplication using GPU. Based on the time complexity, the K candidate entities with the highest scores are selected from the scores of each element in the candidate entity set to complete the Top-K candidate recall and obtain the Top-K candidate subset. Rank the elements in the Top-K candidate subset by CPU-side word similarity and calculate the score. The candidate pool after fine sorting is obtained as follows: ; In the formula, Tokens(·) is the set of tokens after the entity name has been segmented. and They are respectively and The set of tokens obtained after word segmentation of the name string; is the weighted hyperparameter for Jaccard word similarity; Ontology semantic filtering and feature fusion ranking: For entities in the ranked candidate pool, calculate ontology semantic similarity. Perform ontology space filtering and select the top-M entities with the highest scores to form a negative sample candidate pool: ; In the formula, Let e1 be the pseudo-ontology representation vector projected from the source entity e1 into the ontology concept space using formula (2). Candidate entities in the target graph The pseudo-ontology representation vector after projection using formula (2); For entities in the negative sample candidate pool, calculate the comprehensive fusion similarity. Perform a comprehensive sort and select The top-N entities with the highest scores are used as hard negative samples. : ; In the formula, A learnable mapping matrix for cross-graph alignment; This refers to the hyperparameters for ontology fusion.
6. The multi-view difficult negative sampling entity alignment method with joint ontology embedding as described in claim 5, characterized in that, The negative sample set used for training in the current batch, which is formed by dynamically mixing samples according to a learning annealing mechanism, includes: Structured negative samples are obtained by random walk sampling from the neighbor network of entities, and from hard negative samples e neg High-difficulty cached negative samples are obtained from the periodically updated cache, and structured negative samples are mixed with high-difficulty cached negative samples in a dynamic ratio; wherein, the proportion of structured negative samples in each batch is . The decay rate decreases dynamically with each training round: ; In the formula, This represents the initial proportion of structured negative samples. This represents the lower limit of the proportion of structured negative samples. The threshold for the number of warm-up rounds in the course. The duration of annealing cycles; exist < stage, Truncation sets the value inside the parentheses to 0, and annealing is initiated only after the model has completed basic representation learning. In the early stages of training, the proportion of structured negative samples was higher than that of high-difficulty cached negative samples. As the number of training rounds increased, the proportion of high-difficulty cached negative samples gradually increased.
7. The multi-view difficult negative sampling entity alignment method with joint ontology embedding as described in claim 6, characterized in that, The step of mapping the entity vectors of the source graph to the target graph space includes: During the entity alignment phase, given a positive alignment seed pair and negative sample set , The entity mapping vectors of the source graph G1 are transformed by a learnable transformation matrix. Mapping to the target graph space, define the total alignment loss. : ; In the formula, For entity mapping interval loss, The cosine calibration loss is used, and α, γ, and β are weighting parameters. , They represent , Difficult negative samples; , Calibration is performed at both the real ontology path vector and the pseudo ontology concept vector levels.
8. The multi-view difficult negative sampling entity alignment method with joint ontology embedding as described in claim 7, characterized in that, Total loss function Represented as: 。 9. The multi-view hard negative sampling entity alignment method with joint ontology embedding as described in claim 8, characterized in that: The description of cultural relics includes the name, place of excavation, location of the time, excavation site, dynasty, cultural type, material, craftsmanship and decoration, as well as at least one of the following: the institution holding the relic, the issuing institution, the source website, and the source link; the description of the connection relationship includes words relating the name of the cultural relic to the description information.
10. A multi-view hard negative sampling entity alignment system with joint ontology embedding, characterized in that, The system for implementing the method according to any one of claims 1-9 comprises: The acquisition module is used to define two cross-source heterogeneous knowledge graphs in the archaeology and cultural heritage fields to be aligned as the source graph and the target graph, respectively. Based on the relationship between entities, ontology-level triples and instance-level triples are established, where the entity is the cultural relic description information; the relationship set contains all the connection relationship descriptions between the cultural relic description information. The entity embedding module is used to map the entity sets and relation sets in the source graph and the target graph to a low-dimensional vector space, respectively, to obtain entity mapping vectors and relation mapping vectors. For each positive triple, the head entity or tail entity is randomly replaced to generate a negative triple, and the instance layer embedding loss is defined based on the distance constraint between the positive triple and the negative triple. The ontology embedding module is used to embed ontology classes, ontology relations, and ontology layer triples in the source and target graphs into a vector space to obtain ontology class mapping vectors; the entity mapping vectors are projected onto the ontology concept space through a cross-view mapping network to generate pseudo ontology concept vectors of entities, and the cross-view link loss is defined. The relational dynamic modeling module is used to pre-align entity mapping vectors based on the source and target graphs to form positive alignment seed pairs. Based on the co-occurrence statistics of entity types in the known positive alignment seed pairs, a soft conflict probability matrix is constructed. The elements in the soft conflict probability matrix are used to represent the coexistence probability or conflict probability between different ontology classes. The log-likelihood function is used to dynamically model the exclusion and inclusion relationships between ontology classes, and the likelihood conflict loss is defined. The difficult negative sample screening module is used to construct a candidate entity set from entities in the target graph excluding those with known alignment seeds. For source entities in the source graph and candidate entities in the target graph, it sequentially performs GPU-side three-way feature joint scoring, Top-K candidate recall, CPU-side word similarity ranking, ontology semantic filtering, and feature fusion ranking to obtain and cache difficult negative samples. Specifically, the GPU-side three-way feature joint scoring includes entity semantic similarity, structural mean similarity, and ontology type similarity; the CPU-side word similarity ranking re-ranks candidates based on the degree of overlap in entity names; the ontology semantic filtering filters candidate entities in the ontology concept space that are semantically similar but not the same entity; and the feature fusion ranking combines instance-level features and ontology-level features to select candidate entities as difficult negative samples. The hybrid sampling module is used to obtain structured negative samples from the entity neighbor network through random walk sampling, obtain high-difficulty cached negative samples from the difficult negative sample cache, and mix them in a dynamic ratio using a course learning annealing mechanism to form the negative sample set used for training in the current batch. The entity alignment module is used to map the entity vectors of the source graph to the target graph space, given a positive alignment seed pair between the source graph and the target graph, and combined with the current batch of negative samples. It constructs an entity alignment loss that includes entity mapping interval loss and ontology calibration loss, and combines it with instance layer embedding loss, cross-view linking loss and likelihood conflict loss to form a total loss function. The model parameters are trained using gradient descent to complete entity alignment between cross-source heterogeneous knowledge graphs in the field of archaeology and cultural heritage.