Entity matching method based on attribute importance guidance, electronic equipment and medium

By combining the XGBoost model and the large language model, an entity matching method based on attribute importance is proposed, which solves the problem of low entity matching accuracy in existing technologies and achieves higher matching accuracy and interpretability.

CN121901648APending Publication Date: 2026-04-21ZHEJIANG UNIV +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ZHEJIANG UNIV
Filing Date
2026-01-14
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

Existing entity matching methods have limited generalization ability when faced with large differences in data distribution or missing attributes, and insufficient coordination between semantic reasoning and symbolic logic leads to low accuracy in matching complex related entities.

Method used

By acquiring the attribute features of entity data, a tree structure is generated using the XGBoost model, the attribute importance scores are statistically analyzed, the top K attribute features are selected, and the matching results are output in conjunction with a large language model. Entity matching is then performed using prompt words.

Benefits of technology

It improves the accuracy of entity matching and provides an interpretable quantitative assessment of feature importance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121901648A_ABST
    Figure CN121901648A_ABST
Patent Text Reader

Abstract

The invention discloses an entity matching method based on attribute importance guidance, electronic equipment and a medium. The method comprises the following steps: acquiring entity data to be matched; performing feature extraction on the to-be-matched entity data according to the entity attribute type to obtain entity attribute features; the entity attribute features are input into an XGBoost model, and the XGBoost model outputs a tree structure; according to the split nodes of the tree structure, carrying out statistics to obtain an attribute importance score corresponding to each entity attribute feature; sorting is carried out, and first K entity attribute features are selected; setting cue words according to the attribute features of the first K entities and the values thereof; and in response to the cue word, outputting an entity matching result by the large language model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of artificial intelligence technology, and in particular to an entity matching method, electronic device, and medium based on attribute importance guidance. Background Technology

[0002] Entity matching is a core task in data integration and data cleaning, aiming to identify records from different data sources that point to the same entity in the real world. With the explosive growth of multi-source heterogeneous data, entity matching plays a crucial role in scenarios such as data warehouse construction, knowledge graph fusion, and interoperability of enterprise information systems. Traditional methods mainly rely on rule engines or single similarity models, which are difficult to cope with data noise, heterogeneous attribute expressions, and the complexity of large-scale matching scenarios.

[0003] Existing entity matching methods mainly include rule-based methods, traditional machine learning-based methods, and deep learning-based methods. Rule-based methods use predefined matching rules (such as attribute equality or string edit distance thresholds) for judgment. While offering good interpretability, they are less adaptable to complex relationships and heavily rely on expert knowledge. Traditional machine learning-based methods typically employ feature engineering combined with classifiers (such as SVM and decision trees) for matching decisions. While this improves the automation of matching to some extent, it requires a large amount of labeled data, and feature design is costly. Deep learning-based methods automatically learn semantic features using embedding representations or sequence models (such as BERT and RNN), capturing deeper semantic information. However, they are sensitive to limited sample data and attribute sparsity, and the reasoning process lacks interpretability.

[0004] Current entity matching methods mostly rely on a single model, which has limited generalization ability when there are large differences in data distribution or missing attributes. Furthermore, the lack of coordination between semantic reasoning and symbolic logic leads to low matching accuracy for complex related entities. Summary of the Invention

[0005] To address the shortcomings of existing technologies, embodiments of the present invention provide an entity matching method, electronic device, and medium based on attribute importance guidance.

[0006] In a first aspect, embodiments of the present invention provide an entity matching method based on attribute importance guidance, the method comprising: Retrieve the entity data to be matched; Based on the entity attribute type, feature extraction is performed on the entity data to be matched to obtain entity attribute features; Entity attribute features are input into the XGBoost model, which outputs a tree structure. Based on the split nodes of the tree structure, the attribute importance score corresponding to each entity attribute feature is calculated and sorted, and the top K entity attribute features are selected. Based on the first K entity attribute features and their values, prompt words are set; in response to the prompt words, the large language model outputs entity matching results.

[0007] In a second aspect, embodiments of the present invention provide an electronic device, comprising: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores one or more computer programs that can be executed by the at least one processor, and the one or more computer programs are executed by the at least one processor to enable the at least one processor to perform the above-described attribute importance-guided entity matching method.

[0008] Thirdly, embodiments of the present invention provide a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the above-described entity matching method guided by attribute importance.

[0009] Fourthly, embodiments of the present invention provide a computer program product, including a computer program / instruction, which, when executed by a processor, implements the aforementioned entity matching method guided by attribute importance.

[0010] Compared with the prior art, the beneficial effects of the present invention are as follows: This invention provides an entity matching method based on attribute importance guidance. By inputting entity attribute features into an XGBoost model, the XGBoost model outputs a tree structure. Based on the split nodes of the tree structure, the attribute importance score corresponding to each entity attribute feature is statistically obtained. Based on the attribute importance score, the large language model outputs the entity matching result, providing an interpretable quantitative evaluation of feature importance and improving the accuracy of entity matching. Attached Figure Description

[0011] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0012] Figure 1A flowchart illustrating the attribute importance-guided entity matching method provided in this embodiment of the invention; Figure 2 A schematic diagram of the XGBoost model provided in an embodiment of the present invention; Figure 3 A schematic diagram of a prompt word template based on importance weight provided in an embodiment of the present invention; Figure 4 This is a schematic diagram of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0013] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0014] It should be noted that, unless otherwise specified, the features in the following embodiments and implementation methods can be combined with each other.

[0015] like Figure 1 As shown, this embodiment of the invention provides an entity matching method based on attribute importance, the method comprising the following steps: Step S1: Obtain the entity data to be matched.

[0016] Furthermore, Step S2: Extract features from the entity data to be matched according to the entity attribute type to obtain entity attribute features.

[0017] Specifically, when the entity attribute type is string, extract the text length features, character distribution features, and similarity features of the entity data to be matched; When the entity attribute type is numeric, extract the numeric features of the entity data to be matched.

[0018] Step S3: Input the entity attribute features into the XGBoost model, which outputs a tree structure; based on the split nodes of the tree structure, calculate the attribute importance score corresponding to each entity attribute feature; sort the scores, and select the top K entity attribute features.

[0019] It should be noted that the XGBoost model is an efficient ensemble learning algorithm based on gradient boosting decision trees. Its core idea is to sequentially construct a series of shallow decision trees, with each new tree learning to correct the prediction residual (i.e., gradient direction) of the previous tree. By accumulating the results of multiple trees, the final target is approximated, thus forming a powerful ensemble model.

[0020] Among them, such as Figure 2 As shown, the process of inputting entity attribute features into the XGBoost model, which outputs a tree structure, and calculating the attribute importance score corresponding to each entity attribute feature based on the split nodes of the tree structure includes: Step S301, transfer entity attribute features Its tags A training set is constructed and input into the XGBoost model for training. The training process includes: calculating the loss function in each round of training. Regarding the current predicted output The first and second gradients are calculated; the sum of the first and second gradients of the training samples divided into the left child node and the training samples divided into the right child node under the candidate splitting scheme are statistically calculated, thereby calculating the splitting gain of the node, selecting the candidate splitting scheme with the largest splitting gain for splitting, and thus constructing T decision tree forests in sequence.

[0021] Furthermore, assuming the final XGBoost model has T decision trees, the prediction function is: in, Let t be the t-th decision tree. It is the function space of the decision tree.

[0022] Furthermore, the first-order gradient of the loss function with respect to the current predicted output is calculated during each training round. and second gradient The expression is as follows: The expression for Gain(s) is as follows: In the formula, and Let G represent the sum of the first-order gradients and H represent the sum of the second-order gradients of the training samples assigned to the left child node under the candidate splitting scheme. and Let G represent the sum of the first-order gradients and H represent the sum of the second-order gradients of the training samples divided into right child nodes under the candidate splitting scheme. This represents the sum of the first-order gradients of all samples at a node. This represents the sum of the second-order gradients of all samples at a node. The structure score represents the score of the left child node. The structure fraction represents the right child node. This represents the structural score of the parent node. Gain(s) measures how much the loss function of the entire tree model can be reduced after the split; it is equal to the sum of the scores of the left and right child nodes after the split minus the score of the parent node before the split. This represents the L2 regularization coefficient, which is applied to the weights of the leaf nodes. This represents the complexity penalty coefficient. A node will only split when Gain(s) > 0. Used to control the depth of the decision tree.

[0023] Step S302: Calculate the target entity attribute features in each decision tree based on the gain (Gain(s)). The importance score of local attributes.

[0024] Specifically, for each decision tree t in the XGBoost model, the target entity attribute features in decision tree t are... The local attribute importance score is defined as: the attribute features of the target entity. The sum of the Gain contributed by all split nodes.

[0025] First, traverse all split nodes in the decision tree t. ; For each split node s, check whether the splitting feature used for its splitting is a target entity attribute feature. If so, then the gain Gain(s) from splitting the split node s is added to the target entity attribute feature. The expression for the importance score of local attributes under the current decision tree t is as follows: In the formula, Let represent the set of all split nodes s in decision tree t.

[0026] Step S303: Analyze the target entity attribute features under all decision trees in the XGBoost model. The local attribute importance scores are summed and averaged to obtain the attribute features of the target entity. The global attribute importance score is expressed as follows: Furthermore, the XGBoost model is a forest ensemble of T decision trees, where the global attribute importance score is a weighted average of the local attribute importance scores of all decision trees. For each decision tree t in the XGBoost model, the entity attribute features in that decision tree t are obtained. Corresponding local attribute importance score Thus, for the same entity attribute feature in all decision trees T The entity attribute features are obtained by summing and averaging the local attribute importance scores. Global attribute importance score .

[0027] Step S4: Set prompt words based on the first K entity attribute features and their values; in response to the prompt words, the large language model outputs the entity matching results.

[0028] The large language model is fine-tuned using LoRA, and the specific process includes: For the weight matrix of a large language model For low-rank adaptation, the expression is as follows: In the formula, This represents the updated weight matrix. All parameters are trainable, with rank r ≪ min(d, k), where d represents the dimension of the input features and k represents the dimension of the output features. During the fine-tuning of the large language model, only B and A are updated, while the original weight matrix W is frozen, thus significantly reducing computational cost.

[0029] Furthermore, such as Figure 3 As shown, an attribute importance threshold τ is set, and the attribute importance scores corresponding to all entity attribute features are sorted. Entity attribute features with importance lower than the attribute importance threshold τ are filtered out, and the top K entity attribute features are selected. Prompt words are set based on the top K entity attribute features and their values. For example, the prompt word can be set as follows: Please determine whether the following entities are the same object: Entity A: {attribute1: value1, attribute2: value2, ...} Entity B: {attribute1: value1, attribute2: value2,...} Key attribute comparison: [Attributes are sorted in descending order of importance; attributes with importance < τ are filtered out] For example, the prompt word can be set as follows: Please determine whether the following entities are the same object: Entity A: {Name: Zhang San, Phone: 13800138000, Address: Haidian District, Beijing} Entity B: {Name: Zhang San, Phone: 13800138000, Address: Haidian District} Key attribute comparison: 1. Telephone: 13800138000 (Importance: 0.85) 2. Name: Zhang San / Zhang San (Importance: 0.90) 3. Address: Haidian District, Beijing (Importance: 0.63) like Figure 4 As shown, this application provides an electronic device including a memory 101 for storing one or more programs and a processor 102. When the one or more programs are executed by the processor 102, they implement the method as described in any of the first aspects above.

[0030] The system also includes a communication interface 103. The memory 101, processor 102, and communication interface 103 are electrically connected directly or indirectly to each other to enable data transmission or interaction. For example, these components can be electrically connected to each other via one or more communication buses or signal lines. The memory 101 can be used to store software programs and modules, and the processor 102 executes various functional applications and data processing by executing the software programs and modules stored in the memory 101. The communication interface 103 can be used for signaling or data communication with other node devices.

[0031] The memory 101 may be, but is not limited to, random access memory (RAM), read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), etc.

[0032] The processor 102 can be an integrated circuit chip with signal processing capabilities. The processor 102 can be a general-purpose processor 102, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0033] In the embodiments provided in this application, it should be understood that the disclosed methods and systems can also be implemented in other ways. The method and system embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of methods and systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram and / or flowchart, and combinations of blocks in block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

[0034] In addition, the functional modules in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.

[0035] On the other hand, embodiments of this application provide a computer-readable storage medium storing a computer program thereon. When executed by processor 102, the computer program implements the methods described in any of the first aspects above. If the functions are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0036] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the disclosure herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and embodiments are to be considered exemplary only.

[0037] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope.

Claims

1. An entity matching method guided by attribute importance, characterized in that, The method includes: Retrieve the entity data to be matched; Based on the entity attribute type, feature extraction is performed on the entity data to be matched to obtain entity attribute features; Entity attribute features are input into the XGBoost model, which outputs a tree structure. Based on the split nodes of the tree structure, the attribute importance score corresponding to each entity attribute feature is calculated and sorted, and the top K entity attribute features are selected. Based on the first K entity attribute features and their values, prompt words are set; in response to the prompt words, the large language model outputs entity matching results.

2. The entity matching method based on attribute importance as described in claim 1, characterized in that, The process of extracting features from the entity data to be matched according to the entity attribute type, and obtaining entity attribute features, includes: When the entity attribute type is string, extract the text length feature, character distribution feature, and similarity feature of the entity data to be matched; When the entity attribute type is numeric, extract the numeric features of the entity data to be matched.

3. The entity matching method based on attribute importance as described in claim 1, characterized in that, The process of inputting entity attribute features into the XGBoost model, which outputs a tree structure, and calculating the attribute importance score corresponding to each entity attribute feature based on the split nodes of the tree structure includes: The entity attribute features and their labels are combined to form a training set, which is then input into the XGBoost model for training, thereby serially constructing multiple decision trees. Obtain the local attribute importance score of the target entity attribute features in each decision tree; The global attribute importance score of the target entity's attribute features is obtained by summing and averaging the local attribute importance scores of all target entity attribute features under all decision trees.

4. The entity matching method based on attribute importance as described in claim 3, characterized in that, The process of training an XGBoost model and sequentially constructing multiple decision trees includes: Calculate the first and second gradients of the loss function with respect to the current predicted output during each training round; The sum of the first and second gradients of the training samples assigned to the left child node and the sum of the first and second gradients of the training samples assigned to the right child node under the candidate splitting scheme are statistically analyzed to calculate the splitting gain of the node. The candidate splitting scheme with the largest splitting gain is selected for splitting, thereby constructing a forest of T decision trees in sequence.

5. The entity matching method based on attribute importance as described in claim 4, characterized in that, The expression for calculating the split gain of a node is as follows: ; In the formula, and This represents the sum of the first-order gradients and the sum of the second-order gradients of the training samples assigned to the left child node under the candidate splitting scheme. and This represents the sum of the first-order gradients and the sum of the second-order gradients of the training samples partitioned into the right child nodes under the candidate splitting scheme. Represents the L2 regularization coefficient. This represents the complexity penalty coefficient.

6. The entity matching method based on attribute importance as described in claim 3, characterized in that, The process of obtaining the local attribute importance score of the target entity attribute features in each decision tree includes: For each decision tree, traverse all the split nodes of that decision tree; In response to the splitting feature of the splitting node being the target entity attribute feature, the splitting gain of the splitting node is accumulated into the local attribute importance score of the target entity attribute feature under the current decision tree.

7. The entity matching method based on attribute importance as described in claim 1, characterized in that, The large language model is fine-tuned using LoRA, including: For the weight matrix of a large language model For low-rank adaptation, the expression is as follows: ; In the formula, This represents the updated weight matrix. All are trainable parameters, with rank r≪min(d,k), where d represents the dimension of the input features and k represents the dimension of the output features.

8. An electronic device, characterized in that, include: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores one or more computer programs that can be executed by the at least one processor, the one or more computer programs being executed by the at least one processor to enable the at least one processor to perform the attribute importance-guided entity matching method as described in any one of claims 1-7.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the entity matching method based on attribute importance as described in any one of claims 1-7.

10. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instruction is executed by the processor, it implements the entity matching method based on attribute importance as described in any one of claims 1-7.