Unsupervised entity alignment method and device, equipment, storage medium and program product

By generating target entities, filtering candidate target entities and using majority voting mechanism alignment, the accuracy problem of unsupervised entity alignment is solved, and efficient entity alignment effect is achieved.

CN120493933APending Publication Date: 2025-08-15SHENZHEN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510470089.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-15
Publication Date
2025-08-15

AI Technical Summary

Technical Problem

The existing unsupervised entity alignment methods have limited accuracy, and methods based on large language models are difficult to effectively transform into suitable forms for entity alignment in an unsupervised environment.

Method used

By generating target entities, the candidate target entities are filtered with pre-trained single language model, and the majority voting mechanism is used for annotation and alignment, combining pre-trained large language models and self-training mechanisms to optimize the parameters of the single language model.

Benefits of technology

Improve the accuracy and consistency of entity alignment, ensure that the final selected entity is the most suitable matching object, and improve the rationality of the overall alignment result.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120493933A_ABST
    Figure CN120493933A_ABST
Patent Text Reader

Abstract

The invention discloses an unsupervised entity alignment method and device, equipment, a storage medium and a program product, and relates to the technical field of natural language process.The unsupervised entity alignment method comprises the steps that a target entity is generated according to obtained knowledge graph data; screening candidate target entities from the target entities by using a pre-trained single language model; and according to a preset majority voting mechanism, annotating and aligning the candidate target entities to obtain an entity alignment result. According to the method, the valuable background information can be extracted from the knowledge graph by using the pre-trained single language model, so that the accuracy of screening the candidate target entity is improved. And a majority voting mechanism is adopted, so that the finally selected entity can be ensured to be the most suitable matching object, and the consistency and rationality of the overall alignment result are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of natural language processing technology, and in particular to an unsupervised entity alignment method, apparatus, device, storage medium, and program product. Background Art

[0002] With the advancement of knowledge graph modeling and construction technologies, the number of knowledge graphs constructed across various fields is increasing. These graphs support a variety of knowledge graph-based applications, including question answering, reasoning, retrieval, and estimation. However, due to the heterogeneity between different knowledge graphs and the incompleteness of data sources, interoperability between knowledge graphs is widely difficult. For example, entity identification is often inconsistent across different knowledge graphs. To address this issue, entity alignment has emerged. Entity alignment aims to connect knowledge graphs by identifying semantically equivalent entities, and is crucial for achieving knowledge graph fusion.

[0003] Entity alignment is crucial in the knowledge graph fusion process, but existing methods suffer from numerous problems. Traditional unsupervised entity alignment methods have limited accuracy, while methods based on large language models face the challenges of transforming the entity alignment problem into a processable form and extracting background knowledge from it to achieve entity alignment in an unsupervised environment. Summary of the Invention

[0004] The main purpose of this application is to provide an unsupervised entity alignment method, device, equipment, storage medium and program product, aiming to solve the technical problem of how to effectively extract background knowledge to achieve entity alignment in an unsupervised environment and improve the accuracy of entity alignment.

[0005] To achieve the above objectives, the present application proposes an unsupervised entity alignment method, which includes: Generate target entities based on the acquired knowledge graph data; Using a pre-trained single language model, screening candidate target entities from the target entities; According to a preset majority voting mechanism, the candidate target entities are annotated and aligned to obtain an entity alignment result.

[0006] In one embodiment, the knowledge graph data includes a source entity, and the step of generating a target entity based on the acquired knowledge graph data includes: Calculating a predicate score based on the attribute and relationship triples of each of the source entities; Calculating entity knowledge frequency according to the number of entities of the relation triples in the predicate score and the total number of source entities; Calculating a comprehensive score based on the predicate score and the entity knowledge frequency, building a mapping relationship based on the comprehensive score and the relationship triples, and determining the relationship triple with the highest comprehensive score according to the mapping relationship; The relation triplets with the highest scores are combined to generate the target entity.

[0007] In one embodiment, the step of screening candidate target entities from the target entities using a pre-trained single language model includes: Inputting the target entity into the pre-trained single language model, and using the pre-trained weights and network structure of the pre-trained single language model to obtain a vector representation of each entity; Calculating the semantic similarity between the source entity and the target entity based on the vector representation of the entity, and sorting all the target entities in descending order according to the semantic similarity to obtain a target entity list; A preset number of target entities are selected from the target entity list as the candidate target entities.

[0008] In one embodiment, after the step of selecting a preset number of target entities from the target entity list as the candidate target entities, the method further includes: Calculating a confidence score for the candidate target entity; Determining whether the confidence score of the candidate target entity is higher than a preset threshold; If so, reducing the preset number of the target entities; If not, then increase the preset number of the target entities.

[0009] In one embodiment, the step of annotating and aligning the candidate target entities according to a preset majority voting mechanism to obtain an entity alignment result includes: Annotating the candidate target entity through a pre-trained large language model to obtain an annotation result; Based on the annotation results, the preset majority voting mechanism is used to count the number of votes for each candidate target entity; Based on the number of votes for each candidate target entity, taking the candidate target entity with the largest number of votes as the entity alignment result; If it is detected that a plurality of candidate target entities have the same number of votes, a final entity alignment result is determined based on the semantic similarity between the source entity and the target entity.

[0010] In one embodiment, after the step of annotating the candidate target entities according to a preset majority voting mechanism to obtain entity alignment results, the following steps are included: Generate negative samples according to preset rules, and use the entity alignment results as positive samples; Calculating a loss value based on the negative sample and the positive sample; Parameters in the pre-trained single language model are updated based on the loss value.

[0011] In addition, to achieve the above objectives, the present application also proposes an unsupervised entity alignment device, which includes: The generation module is used to generate the target entity based on the acquired knowledge graph data; A screening module, configured to screen candidate target entities from the target entities using a pre-trained single language model; The alignment module is used to annotate and align the candidate target entities according to a preset majority voting mechanism to obtain an entity alignment result.

[0012] In addition, to achieve the above-mentioned purpose, the present application also proposes an unsupervised entity alignment device, which includes: a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the computer program is configured to implement the steps of the unsupervised entity alignment method as described above.

[0013] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by the processor, the steps of the unsupervised entity alignment method described above are implemented.

[0014] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, it implements the steps of the unsupervised entity alignment method as described above.

[0015] This application proposes an unsupervised entity alignment method, apparatus, device, storage medium, and program product. The method includes: generating a target entity based on acquired knowledge graph data; screening candidate target entities from the target entity using a pre-trained single-language model; and annotating and aligning the candidate target entities according to a preset majority voting mechanism to obtain an entity alignment result. This method can extract valuable background information from the knowledge graph by using a pre-trained single-language model, thereby improving the accuracy of screening candidate target entities. In addition, the majority voting mechanism can ensure that the entity finally selected is the most appropriate matching object, thereby improving the consistency and rationality of the overall alignment result. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0017] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0018] Figure 1 A flowchart of the first embodiment of the unsupervised entity alignment method of this application is provided; Figure 2 A schematic diagram of the target entity screening process provided in Example 1 of the present application; Figure 3 A flowchart of the second embodiment of the unsupervised entity alignment method of this application is provided; Figure 4 An architectural diagram of the unsupervised entity alignment of a hybrid language model in the unsupervised entity alignment method provided in Examples 1 and 2 of the present application; Figure 5 This is a schematic diagram of the module structure of the unsupervised entity alignment device according to an embodiment of the present application; Figure 6 Schematic diagram of the device structure of the hardware operating environment involved in the unsupervised entity alignment method in the embodiment of the present application.

[0019] The purpose, features and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0020] It should be understood that the specific embodiments described herein are merely used to explain the technical solutions of the present application and are not intended to limit the present application.

[0021] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.

[0022] The main solution of the embodiment of the present application is: generate target entities based on the acquired knowledge graph data; use the pre-trained single language model to filter out candidate target entities from the target entities; annotate and align the candidate target entities according to the preset majority voting mechanism to obtain entity alignment results.

[0023] In this embodiment, for ease of description, the following description is made with a personal computer as the execution subject.

[0024] Due to the limited accuracy of traditional unsupervised entity alignment methods, methods based on large language models face the challenges of how to transform the entity alignment problem into a form suitable for processing, and how to extract background knowledge from it to achieve entity alignment in an unsupervised environment.

[0025] This application provides a solution to screen key triples from the numerous relevant attribute and relationship triples of each entity, and quickly filter out the most promising candidate target entities. This not only effectively eliminates redundant input information, but also retains the key features that distinguish entities, and lays a solid foundation for improving the efficiency of entity alignment. The candidate target entity with the best semantic match is accurately identified from the candidate set filtered by the pre-trained single language model. In addition, a majority voting mechanism is adopted. By repeating the annotation process multiple times and aggregating the results, the accuracy of entity alignment is improved, making the final alignment decision more reliable.

[0026] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, mobile phone, etc., or an electronic device capable of performing the above functions. The following uses a personal computer as an example to illustrate this embodiment and the following embodiments.

[0027] Based on this, the embodiment of the present application provides an unsupervised entity alignment method, referring to Figure 1 , Figure 1 This is a flowchart of the first embodiment of the unsupervised entity alignment method of this application.

[0028] In this embodiment, the unsupervised entity alignment method includes steps S10 to S30: Step S10: Generate a target entity based on the acquired knowledge graph data; It should be noted that knowledge graph data is a collection of information used to construct and represent knowledge graphs. It is mainly composed of entities, relationships, and triples composed of these entities and relationships.

[0029] Additionally, it should be noted that knowledge graph data includes source entities and target entities. A source entity refers to an entity from a specific knowledge graph or data source. In the cross-knowledge graph entity alignment task, the source entity serves as the basis or starting point for comparison. The target entity refers to the candidate object that corresponds to or matches the source entity.

[0030] In this embodiment, since the knowledge graph data may contain noise, redundancy, and semantic ambiguity, and the model performance has high requirements on the quality and format of the input data, it is necessary to initialize the model and preprocess the data before executing step S10. First, select the appropriate LLM (Large Language Model) and SLM (Single Language Model) based on the task requirements. Then, for the selected knowledge graph data, it is organized into the form of KG=(S, P, O) according to the definition. Among them, S represents the entity, P represents the predicate, and O represents the object. And for the selected knowledge graph data, it is organized into the form of KG=(S, P, O) according to the definition. At the same time, the selected knowledge graph data is cleaned to remove noise data and invalid information.

[0031] After initializing the model and preprocessing the data, you can execute the step of "generating target entities based on the acquired knowledge graph data".

[0032] In a feasible implementation, step S10 may include steps S11 to S14: Step S11, calculating a predicate score based on the attributes and relationship triples of each source entity; It should be noted that the attributes of a source entity describe the characteristics of that entity, including but not limited to its identifier, entity name, and category. A source entity's relationship triple consists of a source entity, a predicate, and another entity or attribute value that has a certain relationship with the source entity. In a knowledge graph, a predicate refers to a property or action that describes the relationship between two entities.

[0033] It is understandable that since the entity relationships in the knowledge graph are complex and diverse, and different predicates contribute to the entity alignment task to different degrees, executing step S11 can quantify the importance of each predicate by calculating the predicate score, thereby providing a more reliable basis for subsequent entity alignment.

[0034] Specifically, for each source entity in the knowledge graph data, the predicate score is calculated from its large number of attribute and relationship triples according to the following formula:

[0035] Here, PF(p,e) represents the importance score of predicate p in entity e, triple(e)(p) represents the number of triplets with predicate p in entity e, and |triple(e)(·)| represents the number of all triplets of entity e.

[0036] During the calculation process, the number of times each predicate appears in all triples of the entity and the total number of triples of the entity are accurately counted, so as to obtain the importance score of each predicate in a specific entity.

[0037] Step S12, calculating entity knowledge frequency according to the number of entities in the relation triples in the predicate score and the total number of source entities; It's important to note that entity knowledge frequency refers to how often a particular entity is mentioned or associated through its relation triples (i.e., pairs of entities connected by predicates) in a given knowledge graph. Specifically, it measures an entity's importance or frequency of occurrence in a network. This can be calculated by analyzing the number of relation triples in which the entity participates and its proportion within the entire entity set.

[0038] Specifically, we traverse the entire knowledge graph data and count the number of entities with relation triples containing the predicate p, as well as the total number of source entities in the knowledge graph data. We then calculate the entity knowledge frequency based on the number of entities with relation triples containing the predicate p and the total number of source entities in the knowledge graph data to determine the prevalence of the predicate in the knowledge graph data. The entity knowledge frequency can be calculated using the following formula:

[0039] Among them, IKF(p,kg) is a score that measures the prevalence of predicate p in the knowledge graph KG; |entity(kg)(p)| represents the number of source entities in the knowledge graph KG that have triples containing predicate p; |entity(kg)(·)| represents the total number of source entities in the knowledge graph KG.

[0040] Through the above steps, calculating the entity knowledge frequency not only helps quantify the prevalence and importance of predicates, but also provides strong support for subsequent entity alignment.

[0041] Step S13, calculating a comprehensive score based on the predicate score and the entity knowledge frequency, and filtering out the relation triple with the highest score from the comprehensive score; Specifically, after obtaining the predicate score PF(p,e) and the entity knowledge frequency IKF(p,kg), the composite score for all predicates is calculated using the formula PF-IKF(p,kg)=PF(p,e)×IKF(p,kg). This combines local information (the importance of the predicate within a specific entity) with global information (the predicate's prevalence across the entire knowledge graph) to create a more comprehensive scoring metric. This ensures that the selected predicates are both meaningful for the specific entity and highly representative of the entire knowledge graph.

[0042] Then, the comprehensive scores of all predicates are sorted, and the comprehensive scores and relation triples are mapped one by one to construct a mapping relationship. Subsequently, the top m relation triples with the highest comprehensive scores are selected based on the constructed mapping relationship. When a predicate corresponds to multiple relation triples, simply selecting the first one or selecting according to a fixed rule may introduce bias. This embodiment can reduce the bias caused by such human selection through random selection, and increase the diversity and fairness of the results. In addition, random selection increases the model's adaptability to changes in external conditions, making the final selection more robust and less susceptible to the influence of individual outliers.

[0043] Step S14: Combining the relationship triples with the highest scores to generate the target entity.

[0044] While ensuring the core features, the selected relationship triplets are compressed and optimized to generate text representations (TREs, Translation Relation Embeddings) of the target entities that contain both rich and accurate information and efficient expression, so as to facilitate entity alignment in subsequent tasks.

[0045] Specifically, first, a detailed description of the target entity is constructed based on the relation triples selected in step S13. Then, the description information is converted into TREs using the domain information abbreviation strategy. It should be noted that the integrity of the description information must be maintained during the conversion process to ensure that the TREs are not only concise but also fully reflect the essential characteristics of the target entity. Please refer to Figure 2 , Figure 2 Schematic diagram of the target entity screening process.

[0046] Through the above steps, not only can a detailed and accurate description of the target entity be effectively generated, but it can also be converted into a TREs format that is easy for machines to understand and process, describing the entity in a concise text format with low information loss.

[0047] Step S20, using a pre-trained single language model to filter out candidate target entities from the target entities; It should be noted that a single language model is a language model that focuses on a specific language and is commonly used in tasks such as text classification, sentiment analysis, named entity recognition, and semantic similarity calculation. A candidate target entity is an entity that is most likely to be aligned with or associated with a source entity.

[0048] It is understandable that due to the large number of entities in the knowledge graph and their heterogeneity, direct pairwise comparison is costly and ineffective. Therefore, executing step S20 can significantly improve the efficiency and accuracy of entity alignment by utilizing a pre-trained single language model to quickly screen out the most likely target entities as candidates based on semantic similarity or other features.

[0049] In a feasible embodiment, step S20 may include steps S21 to S23: Step S21: input the target entity into the pre-trained single language model, and use the pre-trained weights and network structure of the pre-trained single language model to obtain a vector representation of each target entity; It should be noted that pre-trained weights refer to the parameters of the neural network model that have been pre-trained on a large-scale dataset.

[0050] Specifically, the TREs for the target entity obtained in step S14 are input into the selected pre-trained monolingual model, and the pre-trained weights and network structure of the pre-trained monolingual model are used to infer a vector representation for each entity. During the inference process, the information in the TREs is converted into a form suitable for model input, such as a natural language description, based on the characteristics and requirements of the pre-trained monolingual model. The text is then segmented into tokens understandable to the model using the tokenizer provided by the pre-trained monolingual model. The segmented results are converted into a numerical form (typically a word index ID) that the model can understand. Furthermore, special tags such as [CLS] and [SEP] are added according to the model's requirements, and positional encoding is added to preserve sequence information. To ensure input consistency, all input sequences are padded to the same length or truncated to a specified maximum length. For the padded portions, an attention mask vector is generated to inform the monolingual model which portions are actual content and which are padded portions. The TREs undergo the aforementioned format conversion and preprocessing to ensure that the pre-trained monolingual model can correctly read and process them.

[0051] Step S22: calculating the semantic similarity between the source entity and the target entity based on the vector representation of the entity, and sorting all the target entities in descending order according to the semantic similarity to obtain a target entity list; It should be noted that semantic similarity refers to the degree of similarity in meaning between two text fragments (such as words, phrases, sentences or paragraphs).

[0052] Specifically, after obtaining the vector representation of each target entity, the central moment difference (CMD) is used to calculate the semantic similarity between the source entity and the target entity. The calculation formula is as follows:

[0053] Where X and Y are bounded random vectors sampled independently and identically from probability distributions p and q, respectively; E(X) and E(Y) are expectations, reflecting the average level of characteristics; ck(X) and ck(Y) are central moment vectors, and different orders reflect the characteristics of distribution such as discreteness and symmetry; k is the order of the central moment, which accumulates from 2 to infinity and comprehensively measures the difference; is the L2 norm, a unified measure of difference; Normalize the differences to make the results comparable.

[0054] In the formula, variables a and b are set to 0 and 1. During the calculation process, the central moment difference between the embedding vectors of the source and target entities is precisely calculated, and the degree of similarity between them is measured by quantifying this difference. Based on the similarity calculation results, all target entities are sorted in descending order of semantic similarity to obtain an ordered list of target entities.

[0055] Step S23 : selecting a preset number of target entities from the target entity list as the candidate target entities.

[0056] Specifically, the first k target entities are selected from the sorted target entity list as candidate target entities. A larger k value will increase the computational complexity of subsequent processing, but may include more potential correctly aligned entities; a smaller value is more computationally efficient, but may miss some correctly aligned entities. Therefore, in this embodiment, the value of k can be adjusted according to task requirements and experience. For example, the k value is adjusted based on the confidence score of the candidate target entity generated by a pre-trained single language model. If the confidence score of the candidate entity exceeds a preset threshold, the k value is reduced; otherwise, the k value is increased.

[0057] Suppose a pre-trained single-language model is fed with the source entity "Company A"; the resulting list of target entities and their confidence scores are: Company A (0.95); A Electronics Co., Ltd. (0.88); and A Innovation Technology Co., Ltd. (0.72). Next, set the initial k to 3 and compare the confidence scores of the first three entities (0.95, 0.88, and 0.72) to a preset threshold T = 0.8, respectively. It can be seen that the confidence scores of the first and second entities are above the preset threshold T, while the confidence scores of the third entity are below it. Therefore, reduce k to 2, retaining only the first two entities with higher confidence scores.

[0058] In the above steps, by dynamically adjusting the k value, we can flexibly control the size of the candidate set based on the confidence scores of the candidate target entities, finding the optimal balance between computational efficiency and result accuracy. This not only improves the flexibility of the entity alignment task but also effectively copes with changes in data quality and task requirements.

[0059] Through the above steps, key relationship triplets are selected from each entity's numerous relevant attributes and relationship triplets based on the PF-IKF score, reducing input information redundancy while retaining key features that distinguish entities. This representation provides an efficient foundation for subsequent operations based on it, enabling single-language models to quickly filter out the most promising candidate target entities based on TREs and pre-trained embeddings. This significantly reduces the search space and prompt length of large language models, successfully overcoming the information overload issues encountered in traditional methods and laying a solid foundation for improving entity alignment efficiency.

[0060] Step S30: annotating and aligning the candidate target entities according to a preset majority voting mechanism to obtain an entity alignment result.

[0061] In this embodiment, a system is first constructed, comprising a single-select entity instruction and a query prompt. The single-select entity instruction defines the entity alignment task as a single-select question and expresses relation triples; the query portion comprises the TREs of the source entity and the TREs of the k candidate target entities selected in step S20. The single-select entity instruction and query prompt are then input into a pre-trained large-scale language model, allowing the pre-trained large-scale language model to select the entity most similar to the source entity from the candidate target entities. However, due to the unstable output of the pre-trained large-scale language model, the output results are subject to a certain degree of uncertainty. Therefore, step S30 is executed to introduce a majority voting mechanism, which statistically analyzes and makes decisions based on multiple inference results to ensure the reliability and accuracy of the final alignment result.

[0062] In a feasible embodiment, step S30 may include steps S31 to S34: Step S31, annotating the candidate target entity using a pre-trained large language model to obtain an annotation result; Specifically, we first formulate the entity alignment task as a single-choice problem, requiring a large language model to select the most similar target entity from candidate target entities. Furthermore, we determine a query hint that contains TREs (concise descriptions of core attribute and relation triples) of the source entity and candidate target entities.

[0063] Next, the multiple-choice question instructions and query prompts are input into the pre-trained large language model, and the pre-trained large language model generates annotation results based on the multiple-choice question instructions and query prompts.

[0064] In addition, in order to reduce the uncertainty of the large language model output, the pre-trained large language model annotation is performed repeatedly. And after each annotation, the result of the pre-trained large language model selection is recorded.

[0065] Step S32: Based on the annotation results, the preset majority voting mechanism is used to count the number of votes for each candidate target entity; Specifically, after completing multiple annotations, a majority voting mechanism is used to count the number of times each candidate target entity was selected. For example: Option A: 4 votes; Option B: 1 vote; Option C: 0 votes; Option D: 0 votes. By counting the voting results of multiple annotations from the large language model, the relative support of the candidate target entity is determined.

[0066] Step S33: Based on the number of votes for each candidate target entity, the candidate target entity with the largest number of votes is used as the entity alignment result; Specifically, based on the votes received by the candidate target entity, the candidate with the most votes is selected from all candidate target entity candidates and used as the entity alignment result. For example, if the input source entity is "Company A", its corresponding candidate entity target A receives 4 votes, and the other options receive 1 vote or 0 votes, the final alignment result will be "Company A".

[0067] Step S34: If it is detected that a plurality of candidate target entities have the same number of votes, a final entity alignment result is determined based on the semantic similarity between the source entity and the target entity.

[0068] Specifically, when multiple candidate target entities are detected with the same number of votes, a pre-trained single-language model is used to calculate the semantic similarity between the source entity and each tied candidate entity, outputting a similarity score for the two entities (e.g., a value between 0 and 1). Finally, the similarity scores of the tied candidate entities are compared, and the one with the highest score is selected as the final similarity result. This similarity result is then used to determine the final aligned entity. For example, if option A is calculated to have a similarity of 0.92 with the source entity and 0.85 with option B, option A is ultimately selected.

[0069] Through the above steps, unsupervised entity alignment based on hybrid language models adopts a majority voting mechanism to address the uncertainty and instability of large language model output. By repeating the large language model annotation process multiple times and aggregating the results, the interference of large language model hallucination on entity alignment results is reduced, making the final alignment decision more reliable.

[0070] Through the above-described embodiment method, a target entity is generated based on the acquired knowledge graph data; a pre-trained single-language model is used to screen candidate target entities from the target entities; and the candidate target entities are annotated and aligned according to a preset majority voting mechanism to obtain an entity alignment result. By using a pre-trained single-language model, this method can extract valuable background information from the knowledge graph, thereby improving the accuracy of screening candidate target entities. Furthermore, the use of a majority voting mechanism can ensure that the entity ultimately selected is the most appropriate match, improving the consistency and rationality of the overall alignment results.

[0071] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above embodiment 1 can be referred to the above introduction and will not be described in detail later. Figure 3 After step S30, the unsupervised entity alignment method further includes steps S301 to S303: Step S301: Generate negative samples according to preset rules, and use the entity alignment results as positive samples; Step S302, calculating a loss value based on the negative sample and the positive sample; Step S303: Update the parameters of the pre-trained single language model based on the loss value.

[0072] Compared to the first embodiment, this embodiment utilizes a self-training mechanism for the single language model, enabling it to continuously extract contextual knowledge from the output of the large language model and optimize its entity similarity measurement capabilities. In each iteration, the single language model is fine-tuned based on the training data generated by the large language model's output distribution, providing the large language model with higher-quality candidate entities in subsequent iterations. This creates a virtuous cycle and significantly improves entity alignment performance.

[0073] Specifically, based on the annotations of a large language model and the results of majority voting, we generate self-training data for a single language model. The entity alignment results determined by majority voting are used as positive samples, and negative samples are selected according to a preset rule. Specifically, candidate target entities are sorted in descending order by hit count, and the hit count order is compared with the similarity order of the single language model. The first entity with an inconsistent order and the smallest similarity ranking (excluding the positive sample) is selected as the negative sample.

[0074] Then, using these positive and negative sample data, the similarity scores of positive and negative samples are compared based on a pairwise marginal loss function to calculate the loss value. Based on the loss value, the parameters of the single language model are updated through backpropagation and optimization algorithms, enabling the single language model to learn from the output of the large language model and improve its ability to measure entity similarity.

[0075] The self-trained single-language model is applied to the next round of target entity selection, repeating steps from "Using the pre-trained single-language model to screen candidate target entities from the target entities" to "Self-training the single-language model." As the number of iterations increases, the single-language model continuously learns and optimizes from the output of the large-scale language model, providing the large-scale language model with higher-quality candidate target entities. The large-scale language model then makes more accurate entity alignment decisions based on these candidates. The two work together to continuously improve entity alignment performance. In practical applications, the appropriate number of iterations can be set based on task requirements and model performance to achieve the desired entity alignment results.

[0076] Through the above-mentioned embodiment method, the entity alignment results are used as positive samples. At the same time, according to the similarity sorting and hit count sorting of the single language model, appropriate negative samples are selected, so that the training data can better reflect the differences between entities, which helps the single language model to learn the entity similarity measurement more accurately, and further improves the accuracy of entity alignment.

[0077] For example, to help understand the implementation process of the unsupervised entity alignment method obtained by combining the above-mentioned embodiment 1 and embodiment 2, please refer to Figure 4 , Figure 4 An architecture diagram of an unsupervised entity alignment method based on a hybrid language model is provided. Specifically: Depend on Figure 4 As can be seen, first, two knowledge graphs KG 1 and KG 2 are input to the pre-trained single language model, and source entities are selected from KG 1 and target entity sets are selected from KG 2. The pre-trained single language model outputs candidate target entities.

[0078] Then, the textual representations of the source and target entities are input into a pre-trained large language model, and the pre-trained large language model is used to annotate or generate embeddings for the candidate target entities to obtain the most similar target entity.

[0079] For example, source entity: [IRI]: [...], [triples]: [...]; Target entity f: [IRI]: [...], [triples]: [...]; Target entity k: [IRI]: [...], [triples]: [...].

[0080] Then, a majority voting mechanism is used to vote on the annotation results of multiple large language models to determine the most likely entity alignment and obtain the initial entity alignment result.

[0081] Use these alignment results to train a single language model (SML), and continuously optimize the alignment results through self-training cycles to obtain updated single language models and improved alignment results. Finally, the steps from "using a pre-trained large language model to annotate or generate embeddings for candidate target entities to obtain the most similar target entity" to "self-training a single language model" are repeated. Each iteration uses the updated SLM for new alignment and optimization. After multiple iterations, the final entity alignment result is obtained. It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the unsupervised entity alignment method of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.

[0082] This application also provides an unsupervised entity alignment device, please refer to Figure 5 , the unsupervised entity alignment device includes: A generation module 10 is used to generate a target entity based on the acquired knowledge graph data; A screening module 20 is configured to screen candidate target entities from the target entities using a pre-trained single language model; The alignment module 30 is configured to annotate and align the candidate target entities according to a preset majority voting mechanism to obtain an entity alignment result.

[0083] The unsupervised entity alignment device provided in this application utilizes the unsupervised entity alignment method described in the aforementioned embodiments to address the technical issues of unsupervised entity alignment. Compared to the prior art, the unsupervised entity alignment device provided in this application offers the same beneficial effects as the unsupervised entity alignment method described in the aforementioned embodiments. Other technical features of the unsupervised entity alignment device are the same as those disclosed in the aforementioned embodiments and are not further elaborated here.

[0084] The present application provides an unsupervised entity alignment device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the unsupervised entity alignment method in the above-mentioned embodiment 1.

[0085] Reference below Figure 6, which shows a schematic diagram of the structure of an unsupervised entity alignment device suitable for implementing embodiments of the present application. The unsupervised entity alignment device in the embodiments of the present application may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), etc., as well as fixed terminals such as digital TVs and desktop computers. Figure 6 The unsupervised entity alignment device shown is merely an example and should not limit the functions and scope of use of the embodiments of the present application.

[0086] like Figure 6 As shown, the unsupervised entity alignment device may include a processing device 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes based on programs stored in a read-only memory 1002 or programs loaded from a storage device 1003 into a random access memory 1004. The random access memory 1004 also stores various programs and data required for the operation of the unsupervised entity alignment device. The processing device 1001, the read-only memory 1002, and the random access memory 1004 are interconnected via a bus 1005. An input / output interface 1006 is also connected to the bus. Typically, the following systems may be connected to the input / output interface 1006: an input device 1007 including, for example, a touchscreen, touchpad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; a storage device 1003 including, for example, a magnetic tape or hard disk; and a communication device 1009. The communication device 1009 can allow the unsupervised entity alignment device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows an unsupervised entity alignment device with various systems, it should be understood that it is not required to implement or have all of the systems shown. More or fewer systems may be implemented or have alternatively.

[0087] In particular, according to the embodiments disclosed in the present application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, the embodiments disclosed in the present application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program comprising program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via a communication device, or installed from a storage device 1003, or installed from a read-only memory 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are performed.

[0088] The unsupervised entity alignment device provided in this application, which employs the unsupervised entity alignment method described in the aforementioned embodiment, can solve the technical problem of how to effectively extract background knowledge to achieve entity alignment in an unsupervised environment and improve the accuracy of entity alignment. Compared to the prior art, the beneficial effects of the unsupervised entity alignment device provided in this application are the same as those of the unsupervised entity alignment method described in the aforementioned embodiment, and the other technical features of the unsupervised entity alignment device are the same as those disclosed in the aforementioned embodiment, and are not further elaborated here.

[0089] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0090] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

[0091] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, a computer program) stored thereon, wherein the computer-readable program instructions are used to execute the unsupervised entity alignment method in the above-mentioned embodiment.

[0092] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.

[0093] The computer-readable storage medium may be included in the unsupervised entity alignment device; or may exist independently without being assembled into the unsupervised entity alignment device.

[0094] The above-mentioned computer-readable storage medium carries one or more programs. When the above-mentioned one or more programs are executed by the unsupervised entity alignment device, the unsupervised entity alignment device: generates a target entity based on the acquired knowledge graph data; uses a pre-trained single language model to filter out candidate target entities from the target entities; annotates and aligns the candidate target entities according to a preset majority voting mechanism to obtain an entity alignment result.

[0095] Computer program code for performing the operations of the present application may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0096] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, program segment or a part of code, and the module, program segment or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented by a dedicated hardware-based system that performs the specified function or operation, or can be implemented by a combination of dedicated hardware and computer instructions.

[0097] The modules described in the embodiments of the present application may be implemented in software or hardware, wherein the name of a module does not necessarily limit the unit itself.

[0098] The computer-readable storage medium provided in this application stores computer-readable program instructions (i.e., a computer program) for executing the unsupervised entity alignment method described above. This computer-readable storage medium addresses the technical problem of effectively extracting background knowledge to achieve entity alignment and improve the accuracy of entity alignment in an unsupervised environment. Compared to the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the unsupervised entity alignment method provided in the above-described embodiments, and are not further elaborated here.

[0099] The present application also provides a computer program product, comprising a computer program, which implements the steps of the above-mentioned unsupervised entity alignment method when executed by a processor.

[0100] The computer program product provided in this application can solve the technical problem of how to effectively extract background knowledge to achieve entity alignment in an unsupervised environment and improve the accuracy of entity alignment. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as those of the unsupervised entity alignment method provided in the above embodiment, and will not be repeated here.

[0101] The above description is only part of the embodiments of the present application and does not limit the patent scope of the present application. All equivalent structural transformations made by using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect application in other related technical fields are included in the patent protection scope of the present application.

Claims

1. An unsupervised entity alignment method, characterized in that The unsupervised entity alignment method comprises: Generate target entities based on the acquired knowledge graph data; Using a pre-trained single language model, screening candidate target entities from the target entities; According to a preset majority voting mechanism, the candidate target entities are annotated and aligned to obtain an entity alignment result.

2. The unsupervised entity alignment method according to claim 1, wherein: The knowledge graph data includes a source entity, and the step of generating a target entity based on the acquired knowledge graph data includes: Calculating a predicate score based on the attribute and relationship triples of each of the source entities; Calculating entity knowledge frequency according to the number of entities of the relation triples in the predicate score and the total number of source entities; Calculating a comprehensive score based on the predicate score and the entity knowledge frequency, building a mapping relationship based on the comprehensive score and the relationship triples, and determining the relationship triple with the highest comprehensive score according to the mapping relationship; The relation triplets with the highest scores are combined to generate the target entity.

3. The unsupervised entity alignment method according to claim 1, wherein: The step of screening candidate target entities from the target entities using the pre-trained single language model includes: Inputting the target entity into the pre-trained single language model, and using the pre-trained weights and network structure of the pre-trained single language model to obtain a vector representation of each target entity; Based on the vector representation of the target entity, calculating the semantic similarity between the source entity and the target entity, and sorting all the target entities in descending order according to the semantic similarity to obtain a target entity list; A preset number of target entities are selected from the target entity list as the candidate target entities.

4. The unsupervised entity alignment method according to claim 3, wherein: After the step of selecting a preset number of target entities from the target entity list as the candidate target entities, the method further includes: Calculating a confidence score for the candidate target entity; Determining whether the confidence score of the candidate target entity is higher than a preset threshold; If so, reducing the preset number of the target entities; If not, then increase the preset number of the target entities.

5. The unsupervised entity alignment method according to claim 3, wherein: The step of annotating and aligning the candidate target entities according to a preset majority voting mechanism to obtain an entity alignment result includes: Annotating the candidate target entity through a pre-trained large language model to obtain an annotation result; Based on the annotation results, the preset majority voting mechanism is used to count the number of votes for each candidate target entity; Based on the number of votes for each candidate target entity, taking the candidate target entity with the largest number of votes as the entity alignment result; If it is detected that a plurality of candidate target entities have the same number of votes, a final entity alignment result is determined based on the semantic similarity between the source entity and the target entity.

6. The unsupervised entity alignment method according to claim 1, wherein: After the step of annotating the candidate target entities according to the preset majority voting mechanism to obtain the entity alignment result, the method further includes: Generate negative samples according to preset rules, and use the entity alignment results as positive samples; Calculating a loss value based on the negative sample and the positive sample; Parameters in the pre-trained single language model are updated based on the loss value.

7. An unsupervised entity alignment device, characterized in that The unsupervised entity alignment device comprises: The generation module is used to generate the target entity based on the acquired knowledge graph data; A screening module, configured to screen candidate target entities from the target entities using a pre-trained single language model; The alignment module is used to annotate and align the candidate target entities according to a preset majority voting mechanism to obtain an entity alignment result.

8. An unsupervised entity alignment device, characterized in that The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the unsupervised entity alignment method according to any one of claims 1 to 6.

9. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the unsupervised entity alignment method according to any one of claims 1 to 6 are implemented.

10. A computer program product, characterized in that The computer program product comprises a computer program, which, when executed by a processor, implements the steps of the unsupervised entity alignment method according to any one of claims 1 to 6.