Attribute alignment method and device, electronic equipment and storage medium

CN117633240BActive Publication Date: 2026-08-21BEIJING YOUZHUJU NETWORK TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210981332.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-16
Publication Date
2026-08-21
Estimated Expiration
2042-08-16

AI Technical Summary

Technical Problem

[0003]在相关技术中的属性对齐方案普遍存在成本高、对齐效果不佳的问题

Benefits of technology

[0016]从上面所述可以看出,本申请提供的属性对齐方法、装置、电子设备及存储介质,对于异源且已完成实体对齐的第一实体和第二实体,基于其中一实体的属性值对另一实体进行多标签分类预测得到目标第一属性值,以使得异源实体的属性值具有相同的维度;基于实体本身具有的属性值以及分类预测得到的属性值,通过统计的方式确定目标第二属性值;之后再基于第一属性值和目标第二属性值进行属性对齐。本申请的方案基于已有的对齐实体的数据,将已对齐实体的属性值进行充分的利用,能够在较低的实施成本下实现更加的属性对齐效果。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117633240B_ABST
    Figure CN117633240B_ABST
Patent Text Reader

Abstract

The application provides an attribute alignment method and device, electronic equipment and a storage medium. The method comprises: obtaining first entities and second entities respectively from different knowledge graphs and having completed entity alignment; wherein the first entities have first attribute values, and the second entities have second attribute values; performing classification prediction on the second entities according to the first attribute values to obtain target first attribute values corresponding to the second entities; determining at least two target second entities corresponding to the same target first attribute values; performing quantity statistics on the second attribute values of at least part of the target second entities to determine target second attribute values; and aligning the target first attribute values and the target second attribute values.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to an attribute alignment method, apparatus, electronic device, and storage medium. Background Technology

[0002] Knowledge graphs provide powerful data support for various data applications and analysis scenarios. This data capability relies on data consistency, including the uniformity of entities, attribute names, and attribute value formats. Attribute alignment addresses the issue of unifying attributes representing the same meaning in single-source or multi-source knowledge graphs into a single standard attribute name. For example, "birthday" in knowledge graph A and "date of birth" in knowledge graph B both represent the meaning of "date of birth." After attribute alignment, these attribute names will be changed to "date of birth." Attribute alignment is a component of knowledge fusion and a crucial step in knowledge graph construction.

[0003] Attribute alignment schemes in related technologies generally suffer from high costs and poor alignment results. Summary of the Invention

[0004] In view of this, the purpose of this application is to provide an attribute alignment method, apparatus, electronic device and storage medium.

[0005] To achieve the above objectives, this application provides an attribute alignment method, comprising:

[0006] Obtain a first entity and a second entity from different knowledge graphs that have been aligned; wherein the first entity has a first attribute value and the second entity has a second attribute value; Based on the first attribute value, the second entity is classified and predicted to obtain the target first attribute value corresponding to the second entity; Identify at least two target second entities that correspond to the same target first attribute value; The second attribute values ​​of at least some of the target second entities are counted to determine the target second attribute values; Align the first attribute value and the second attribute value of the target.

[0007] In some implementations, the step of classifying and predicting the second entity based on the first attribute value to obtain the target first attribute value corresponding to the second entity includes: Generate input features based on the second entity; Based on the input features and the pre-trained heterogeneous attribute prediction model, the target first attribute value corresponding to the second entity is obtained; wherein, the heterogeneous attribute prediction model is trained by a training dataset constructed based on the first entity and the second entity; any sample in the training dataset includes the training second entity and the first attribute value corresponding to the training second entity.

[0008] In some implementations, generating input features based on the second entity includes: Determine the name information of the second entity; Determine the summary information of the second entity; The text information that determines the second attribute value possessed by the second entity; The input features are generated based on the name information, the summary information, and the text information.

[0009] In some implementations, the step of performing a quantitative analysis on at least a portion of the second attribute values ​​of the target second entity to determine the target second attribute value includes: Count the number of each second attribute value, and determine the second attribute value with the largest number as the target second attribute value.

[0010] In some implementations, determining the second attribute value with the largest quantity as the target second attribute value includes: In response to determining that the proportion of the second attribute value with the largest quantity in all second attribute values ​​exceeds a predetermined proportion threshold, and determining that the total number of second attribute values ​​exceeds a predetermined quantity threshold, the second attribute value with the largest quantity is determined as the target second attribute value.

[0011] In some implementations, the attribute alignment based on the target first attribute value and the target second attribute value includes: Determine the first confidence level of the target's first attribute value; Determine the second confidence level of the target second attribute value; Attribute alignment is performed based on the first confidence level and the second confidence level.

[0012] In some implementations, obtaining the first and second entities, which are respectively from different knowledge graphs and have already undergone entity alignment, includes: Retrieve candidate first and candidate second entities from different knowledge graphs that have already been aligned; Determine the precision and / or recall of the first candidate entity and the second candidate entity; In response to determining that the accuracy meets a predetermined accuracy threshold, and / or determining that the recall meets a predetermined recall threshold, the candidate first entity and the candidate second entity are determined as the first entity and the second entity.

[0013] Based on the same technical concept, this application also provides an attribute alignment device, comprising: The acquisition module is configured to acquire a first entity and a second entity that have been aligned with entities from different knowledge graphs; wherein the first entity has a first attribute value and the second entity has a second attribute value; The classification module is configured to perform classification prediction on the second entity based on the first attribute value to obtain the target first attribute value corresponding to the second entity; The determination module is configured to determine at least two target second entities that correspond to the same target first attribute value; The statistics module is configured to perform a quantity count on at least a portion of the second attribute values ​​of the target second entity to determine the target second attribute values; The alignment module is configured to perform attribute alignment based on the target first attribute value and the target second attribute value.

[0014] Based on the same technical concept, this application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, implements the attribute alignment method as described in any of the above.

[0015] Based on the same technical concept, this application also provides a non-transitory computer-readable storage medium that stores computer instructions for causing a computer to execute the attribute alignment method described in any of the above claims.

[0016] As can be seen from the above, the attribute alignment method, apparatus, electronic device, and storage medium provided in this application, for heterogeneous entities that have already been aligned, perform multi-label classification prediction on the other entity based on the attribute value of one entity to obtain a target first attribute value, so that the attribute values ​​of heterogeneous entities have the same dimension; based on the attribute values ​​inherent in the entity itself and the attribute values ​​obtained from classification prediction, a target second attribute value is determined statistically; then, attribute alignment is performed based on the first attribute value and the target second attribute value. The solution of this application, based on existing aligned entity data, makes full use of the attribute values ​​of the aligned entities, and can achieve better attribute alignment results at a lower implementation cost. Attached Figure Description

[0017] To more clearly illustrate the technical solutions in this application or related technologies, the drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 This is a schematic diagram illustrating an application scenario of an embodiment of this application; Figure 2 This is a schematic diagram of the attribute alignment method according to an embodiment of this application; Figure 3 This is a schematic diagram of the attribute alignment device structure according to an embodiment of this application; Figure 4 This is a schematic diagram of the electronic device structure according to an embodiment of this application. Detailed Implementation

[0019] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with specific embodiments and the accompanying drawings.

[0020] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with specific embodiments and the accompanying drawings.

[0021] The principles and spirit of this application will now be described with reference to several exemplary embodiments. It should be understood that these embodiments are provided merely to enable those skilled in the art to better understand and implement this application, and are not intended to limit the scope of this application in any way. Rather, these embodiments are provided to make this application more thorough and complete, and to fully convey the scope of this application to those skilled in the art.

[0022] According to embodiments of this application, an attribute alignment method, apparatus, electronic device, and storage medium are proposed.

[0023] In this article, it is important to understand that any number of elements in the accompanying figures is for illustrative purposes and not for limitation, and any naming is for distinction only and has no limiting meaning.

[0024] The principles and spirit of this application will be explained in detail below with reference to several representative embodiments.

[0025] Attribute alignment schemes in related technologies generally suffer from high costs and poor alignment results. For example, some technologies directly align the attribute values ​​of heterogeneous entities using text similarity, but this approach fails to fully utilize existing data, resulting in low attribute value utilization and poor alignment performance. Other technologies employ supervised learning models to align the attributes of heterogeneous entities; however, this method relies heavily on extensive annotation of existing data, and whether standardization is done manually or automatically, the overall cost is high.

[0026] To address the problems existing in related technologies, this application provides an attribute alignment scheme. For a first entity and a second entity that are heterogeneous and have already been aligned, a target first attribute value is obtained by performing multi-label classification prediction on the other entity based on the attribute value of one entity, so that the attribute values ​​of the heterogeneous entities have the same dimension. Based on the attribute values ​​inherent in the entity itself and the attribute values ​​obtained from classification prediction, a target second attribute value is determined statistically. Then, attribute alignment is performed based on the first attribute value and the target second attribute value. The scheme of this application, based on existing aligned entity data, makes full use of the attribute values ​​of the aligned entities, and can achieve better attribute alignment results at a lower implementation cost.

[0027] refer to Figure 1 This diagram illustrates an application scenario of the attribute alignment method according to an embodiment of this application. The application scenario includes a terminal device 101, a server 102, and a data processing and storage system 103. The terminal device 101, server 102, and data processing and storage system 103 can all be connected via wired or wireless communication networks. The terminal device 101 includes, but is not limited to, desktop computers, mobile phones, mobile computers, tablet computers, media players, smart wearable devices, personal digital assistants (PDAs), or other electronic devices capable of performing the aforementioned functions. The server 102 and data processing and storage system 103 can be independent physical servers, server clusters or distributed systems composed of multiple physical servers, or cloud servers providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms.

[0028] Server 102 is used to provide attribute alignment services to terminal device 101, and data processing and storage system 103 is used to provide knowledge graph-related data. In some optional embodiments, terminal device 101 can use its local computing and storage resources to implement the methods of the application embodiments and interactively request relevant data required during implementation from server 102 and / or data processing and storage system 103. In other embodiments, server 102 can implement the methods of the application embodiments based on the requests of terminal device 101, using its local computing and storage resources.

[0029] The following is combined with Figure 1 The application scenarios described above are used to illustrate the attribute alignment method according to exemplary embodiments of this application. It should be noted that the above application scenarios are shown only to facilitate understanding of the spirit and principles of this application, and the embodiments of this application are not limited in any way in this regard. Rather, the embodiments of this application can be applied to any applicable scenario.

[0030] First, this application provides an attribute alignment method. (See reference...) Figure 2 The attribute alignment method in this embodiment may include the following steps: Step S201: Obtain a first entity and a second entity from different knowledge graphs that have been aligned; wherein the first entity has a first attribute value and the second entity has a second attribute value.

[0031] In specific implementation, a first entity and a second entity, each from different knowledge graphs and having already undergone entity alignment, are obtained. The first entity and the second entity originate from different knowledge graphs, i.e., heterogeneous entities as described in related technologies. An entity is the most basic element in a knowledge graph, referring to a distinguishable and independently existing thing, such as a person, a city, a plant, or a product. In this embodiment, to distinguish entities from different knowledge graphs, they are referred to as the first entity and the second entity, respectively. It is understood that there can be multiple first entities and second entities.

[0032] In practice, the first entity and the second entity have already completed entity alignment. The main purpose of entity alignment is to determine whether entities from two or more different knowledge graphs point to the same thing. In this embodiment, the first entity and the second entity have already completed entity alignment, meaning it can be determined that both the first entity and the second entity point to the same thing. However, since the first entity and the second entity come from different knowledge graphs, and the description methods and dimensions of entities differ in different knowledge graphs, the first entity and the second entity still need to undergo attribute alignment using the method of this embodiment.

[0033] In specific implementation, both the first entity and the second entity also have attribute values. Based on the general characteristics of knowledge graphs, data in knowledge graphs exists in the form of triples. A common triple can be represented as (entity, attribute, attribute value), where the attribute can be seen as a nominal relationship between the entity and the attribute value; for example, (Li, category, historical figure), the entity is Li, the attribute is its category, and the attribute value is the historical figure to express the specific content of the category. In the embodiments of this application, for clear distinction, the attribute value possessed by the first entity is called the first attribute value, and the attribute value possessed by the second entity is called the second attribute value. It can be understood that in the attribute alignment scheme described in this application, the first attribute value and the second attribute value belong to the same attribute category.

[0034] As an example, this step obtains the first entity G from knowledge graph A. A And the first entity G from knowledge graph B B Among them, G A Having the first attribute value V A G B Having the first attribute value V B .

[0035] The following is a more specific example of a first entity and a second entity: G A : Li; V A Historical figures, people.

[0036] G B : Li Mou; V B Li was a poet from Pingliang during the Tang Dynasty.

[0037] As an optional implementation, to further improve the data quality of the obtained first entity and second entity, the first entity and second entity can also be obtained by the following method: obtaining candidate first entities and candidate second entities from different knowledge graphs that have been aligned; determining the precision and recall rates of the candidate first entities and the candidate second entities; and in response to determining that the precision and recall rates meet a predetermined precision and recall rate threshold, determining the candidate first entities and the candidate second entities as the first entity and the second entity.

[0038] In practice, a certain number of entities from different knowledge graphs that have already undergone entity alignment can be obtained first; in this embodiment, these are referred to as the first candidate entity and the second candidate entity. Then, the precision and recall rates of the overall data for the first and second candidate entities are determined, where precision and recall refer to accuracy and recall rates. Specifically, a precision threshold and a recall threshold can be pre-set for the precision and recall rates, respectively. When at least one of the precision and recall rates meets the corresponding threshold, the first and second candidate entities are determined as the first and second entities to be used subsequently. A higher precision and recall rate indicates higher data quality, which is more conducive to improving the quality of subsequent attribute alignment. The precision and recall thresholds can be set according to specific implementation needs, and their specific values ​​are not limited in this embodiment. For example, both the precision and recall thresholds can be set to 0.8; when either the precision or recall threshold of the first or second candidate entity exceeds 0.8, it is determined as the first and second entity, respectively.

[0039] Step S202: Classify and predict the second entity based on the first attribute value to obtain the target first attribute value corresponding to the second entity.

[0040] In specific implementation, the second entity is classified and predicted based on the first attribute value. That is, based on the setting and description of attribute values ​​in the knowledge graph to which the first entity belongs, the attribute value of the second entity corresponding to the setting and description of attribute values ​​in the knowledge graph to which the first entity belongs is classified and predicted. In this embodiment, the attribute value obtained by classification and prediction is called the target first attribute value. It can be understood that the target first attribute value can be a part of the first attribute value.

[0041] As an optional implementation, the target first attribute value can be obtained using a pre-trained heterogeneous attribute prediction model. Specifically, obtaining the target first attribute value corresponding to the second entity can include the following steps: generating input features based on the second entity; and obtaining the target first attribute value corresponding to the second entity based on the input features and the pre-trained heterogeneous attribute prediction model.

[0042] In specific implementation, the heterogeneous attribute prediction model is trained using a training dataset constructed based on the first entity and the second entity. The training dataset can be constructed based on all or part of the first and second entities that have already undergone entity alignment. Specifically, any sample in this training dataset consists of input data and its corresponding label. For a sample, the input data includes a second entity, which is referred to as the training second entity in this embodiment since it is used to construct the training dataset; the label included in the sample is the first attribute value possessed by the first entity aligned with the training second entity. For example, based on the example in step 201 above, G... A (Li) and G B (Li) has completed entity alignment, then when G B When used as a second entity for training to construct samples, its corresponding label is G. A The tags are: historical figures, people.

[0043] In practice, after obtaining the training dataset using the above method, the heterogeneous attribute prediction model can be trained. The heterogeneous attribute prediction model is a classification prediction model, and its specific model structure and algorithm can be selected according to implementation needs; this application does not impose any limitations. For example, it can be a neural network model, a decision tree model, a support vector machine model, etc.

[0044] In practice, the input to the heterogeneous attribute prediction model is the input features generated based on the second entity, which are used to express the semantic and / or textual characteristics of the second entity.

[0045] As an optional implementation, the input feature can be generated by: determining the name information of the second entity; determining the summary information of the second entity; determining the text information of the second attribute value of the second entity; and generating the input feature based on the name information, the summary information, and the text information.

[0046] The name information is used to express the name of the second entity, enabling the model to extract semantic features subsequently. The summary information, a common concept in knowledge graphs, selects the optimal subset from a large number of triples describing entities in the knowledge graph as a summary, thus better representing the semantic features of the second entity. The textual information of the second attribute value further includes the textual information of the second attribute value inherent in the second entity itself, allowing for further exploration of the correlation between the second entity, the first attribute value, and the second attribute value during subsequent model processing, thereby improving the accuracy of the heterogeneous attribute prediction model. In practice, the name information, summary information, and textual information of the second entity's second attribute value can be encoded into vector form. Combining or concatenating these vectors yields the input features for the heterogeneous attribute prediction model. The encoding methods mentioned above can include one-hot encoding or word vector encoding models such as Word2vec.

[0047] In practice, the input to the heterogeneous attribute prediction model is the input features generated based on the second entity, while the output of the heterogeneous attribute prediction model is the target first attribute value corresponding to the second entity. For example, based on the example in step 201 above, G... B As a second entity, determine G B The name information (Li Mou), summary information, and text information of the second attribute value (Pingliang native, surname Li, Tang Dynasty poet) are used to generate input features according to the aforementioned method. These features are then input into the trained heterogeneous attribute prediction model, which yields the classification prediction result output by the heterogeneous attribute prediction model, i.e., G. B The corresponding target first attribute value V BA For example, V BA Historical figures, people.

[0048] In practical implementation, based on the heterogeneous attribute prediction model, all second entities can be classified and predicted, thereby determining a target first attribute value for each second entity; that is, after this step, each second entity, in addition to its own second attribute value, also has a corresponding target first attribute value determined. For example, based on the example in step 201 above, for the second entity G... B After this step, G B With V B and V BA .

[0049] It should be noted that, in specific implementation, for the entities obtained from different knowledge graphs and which have completed entity alignment, the selection of which entity portion is used as the first entity or the second entity in this application embodiment can be based on implementation needs. As an optional implementation method, entities with fewer attribute values ​​can be used as the first entity, and entities with more attribute values ​​can be used as the second entity. This makes the obtained target first attribute values ​​more accurate and concise during the classification prediction in step 203, which is beneficial to improving the accuracy of the overall method.

[0050] Step S203: Determine at least two target second entities that have the same target first attribute value.

[0051] In specific implementation, after the processing in step 203, all second entities have their corresponding target first attribute values ​​determined. In subsequent steps, attribute alignment will be performed statistically based on the law of large numbers. Therefore, in this step, second entities with the same target first attribute value are identified. For clarity, in this embodiment, second entities with the same target first attribute value are referred to as target second entities. That is, based on the target first attribute value, at least some second entities are clustered, and second entities with the same target first attribute value form an entity set, where each entity in the set corresponds to a single target second attribute value.

[0052] For example, based on the example in step 202 above, according to the second attribute value V of "historical figure" BA Clustering is performed; for clarity, the second attribute value "historical figure" is denoted as v in this example. BA , obtain all those with v BA The set C of the target second entities, C={G B1 G B2 G B3 ...G Bn}; where n is the number of elements with v BA The total number of the target second entities.

[0053] In practice, the above clustering process is performed on each second attribute value to obtain a set of target second entities corresponding to each second attribute value.

[0054] Step S204: Perform a statistical analysis on the second attribute values ​​of at least a portion of the target second entities to determine the target second attribute values.

[0055] In practice, for the set of target second entities corresponding to the second attribute value, a quantity count is performed. The count includes the number of second attribute values ​​of all second entities included in the set of target second entities. Specifically, the quantity of each second attribute value is counted, and the second attribute value with the largest quantity is determined as the target second attribute value.

[0056] For example, based on the examples in steps 201 and 202 above, statistically sorting the second attribute values ​​in the set C of the target second entities in descending order can be represented as: {"Tang Dynasty poets" 70, "Li surname" 40, "Pingliang people" 10}. Then, based on the law of large numbers, the second attribute value with the largest quantity, "Tang Dynasty poets," can be determined as the target second attribute value, denoted as v. B .

[0057] In some optional implementations, when determining the target second attribute value, relevant parameters of the set of target second entities can also be determined to further improve the accuracy of attribute alignment. Specifically, the method for determining the target second attribute value may include: in response to determining that the proportion of the second attribute value with the largest quantity in all second attribute values ​​exceeds a predetermined proportion threshold, and determining that the total number of second attribute values ​​exceeds a predetermined quantity threshold, determining the second attribute value with the largest quantity as the target second attribute value.

[0058] In practical implementation, to ensure sufficient data to guarantee the law of large numbers, the number of target second entities included in the set of second entities can be determined. The target second attribute value is only determined when the number of target second entities exceeds a predetermined proportion threshold. Alternatively, the relative number of the largest second attribute value can be determined. The target second attribute value is only determined when the proportion of the largest second attribute value among all second attribute values ​​exceeds a predetermined proportion threshold. By determining the relevant parameters of the set of target second entities, the law of large numbers is ensured to take effect, thereby resulting in higher accuracy of the determined target second attribute value. Both the proportion threshold and the quantity threshold can be set according to specific implementation needs, and their specific values ​​are not limited in this embodiment.

[0059] For example, based on the previous example, the proportion threshold can be set to 50%, and the quantity threshold can be set to 100. The total number of all second attribute values ​​in the set C of the target second entity is 120, which meets the quantity threshold; the proportion of the second attribute value "Tang Dynasty poet" in all second attribute values ​​is 58%, exceeding the proportion threshold, so the second attribute value "Tang Dynasty poet" can be determined as the target second attribute value v. B .

[0060] Step S205: Align the first attribute value and the second attribute value of the target.

[0061] In practice, attribute alignment is performed based on the determined target first attribute value and target second attribute value. For example, based on the aforementioned example, v BA For: "historical figures", v B If the answer is "a poet of the Tang Dynasty", then it can be determined that v BA With v B Alignment can be determined in any feasible way. BA With v B One of them is used as the result of the attribute alignment. The alignment result is v. BA For example, after attribute alignment, the attribute values ​​of the first and second entities under the category attribute are both uniformly aligned to v. BA .

[0062] In some optional implementations, attribute alignment can be performed based on the confidence levels of the target first attribute value and the target second attribute value. Specifically, this may include the following steps: determining a first confidence level of the target first attribute value; determining a second confidence level of the target second attribute value; and performing attribute alignment based on the first confidence level and the second confidence level.

[0063] In specific implementation, the first confidence level and the second confidence level can be determined in any feasible manner. For example, in the optional embodiment of this application's embodiment of determining the target first attribute value through a heterogeneous attribute prediction model, the probability value output by the heterogeneous attribute prediction model can be used as the first confidence level of the target first attribute value; similarly, in the optional embodiment of this application's embodiment of determining the target second attribute value through a statistical method, the proportion of the target second attribute value among all second attribute values ​​can be used as the second confidence level of the target second attribute value. Then, the first confidence level and the second confidence level can be normalized using mathematical methods to make them comparable, and the one with the higher confidence level can be determined as the attribute alignment result. Furthermore, when the value of either the first confidence level or the second confidence level is absolutely high, the corresponding confidence level can also be directly determined as the attribute alignment result. For example, in the optional embodiment of this application's embodiment of determining the target first attribute value through a heterogeneous attribute prediction model, if the probability value output by the heterogeneous attribute prediction model is sufficiently large (e.g., exceeding 0.9), the first confidence level can be directly determined as the attribute alignment result.

[0064] As can be seen from the above embodiments, the attribute alignment method of this application, for heterogeneous entities that have already been aligned, performs multi-label classification prediction on the other entity based on the attribute value of one entity to obtain a target first attribute value, so that the attribute values ​​of heterogeneous entities have the same dimension; based on the attribute values ​​of the entity itself and the attribute values ​​obtained from classification prediction, a target second attribute value is determined statistically; then, attribute alignment is performed based on the first attribute value and the target second attribute value. The solution of this application, based on existing aligned entity data, makes full use of the attribute values ​​of the aligned entities, and can achieve better attribute alignment results at a lower implementation cost.

[0065] It should be noted that the method in this embodiment can be executed by a single device, such as a computer or server. The method can also be applied in a distributed scenario, where multiple devices cooperate to complete the task. In such a distributed scenario, one of these devices may execute only one or more steps of the method in this embodiment, and the multiple devices will interact with each other to complete the method described.

[0066] It should be noted that the above description describes some embodiments of this application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in a different order than that shown in the above embodiments and still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0067] Based on the same technical concept, embodiments of this application also provide an attribute alignment device. (Reference) Figure 3 The attribute alignment device 300 includes: The acquisition module 301 is configured to acquire a first entity and a second entity that have been aligned with entities from different knowledge graphs; wherein the first entity has a first attribute value and the second entity has a second attribute value. The classification module 302 is configured to perform classification prediction on the second entity based on the first attribute value to obtain the target first attribute value corresponding to the second entity; The determination module 303 is configured to determine at least two target second entities that correspond to the same target first attribute value; The statistics module 304 is configured to perform a quantity count on at least a portion of the second attribute values ​​of the target second entity to determine the target second attribute values; Alignment module 305 is configured to align the target first attribute value and the target second attribute value.

[0068] In some optional embodiments, the classification module 302 is specifically configured to generate input features based on the second entity; and obtain a target first attribute value corresponding to the second entity based on the input features and a pre-trained heterogeneous attribute prediction model; wherein the heterogeneous attribute prediction model is trained using a training dataset constructed based on the first entity and the second entity; and any sample in the training dataset includes a training second entity and a first attribute value corresponding to the training second entity.

[0069] In some optional embodiments, the classification module 302 is specifically configured to: determine the name information of the second entity; determine the summary information of the second entity; determine the text information of the second attribute value of the second entity; and generate the input feature based on the name information, the summary information, and the text information.

[0070] In some optional embodiments, the statistics module 304 is specifically configured to count the number of each second attribute value and determine the second attribute value with the largest number as the target second attribute value.

[0071] In some optional embodiments, the statistics module 304 is specifically configured to determine the second attribute value with the largest quantity as the target second attribute value in response to determining that the proportion of the second attribute value with the largest quantity in all the second attribute values ​​exceeds a predetermined proportion threshold, and determining that the total number of the second attribute values ​​exceeds a predetermined quantity threshold.

[0072] In some optional embodiments, the alignment module 305 is specifically configured to determine a first confidence level of the target first attribute value; determine a second confidence level of the target second attribute value; and perform attribute alignment based on the first confidence level and the second confidence level.

[0073] In some optional embodiments, the acquisition module 301 is specifically configured to acquire candidate first entities and candidate second entities from different knowledge graphs that have completed entity alignment; determine the precision and / or recall of the candidate first entities and the candidate second entities; and, in response to determining that the precision meets a predetermined precision threshold and / or determining that the recall meets a predetermined recall threshold, determine the candidate first entities and the candidate second entities as the first entity and the second entity.

[0074] For ease of description, the above devices are described in terms of function, divided into various modules. Of course, in implementing this application, the functions of each module can be implemented in one or more software and / or hardware.

[0075] The apparatus of the above embodiments is used to implement the corresponding attribute alignment method in any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0076] Based on the same technical concept, this application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the attribute alignment method as described in any of the above embodiments.

[0077] Figure 4 This embodiment illustrates a more specific hardware structure of an electronic device. The device may include a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, memory 1020, input / output interface 1030, and communication interface 1040 are interconnected internally via the bus 1050.

[0078] The processor 1010 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.

[0079] The memory 1020 can be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 1020 can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program code is stored in the memory 1020 and is called and executed by the processor 1010.

[0080] The input / output interface 1030 is used to connect input / output modules to realize information input and output. Input / output modules can be configured as components within the device (not shown in the figure) or externally connected to the device to provide corresponding functions. Input devices may include keyboards, mice, touchscreens, microphones, various sensors, etc., while output devices may include displays, speakers, vibrators, indicator lights, etc.

[0081] The communication interface 1040 is used to connect a communication module (not shown in the figure) to enable communication between this device and other devices. The communication module can communicate via wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).

[0082] Bus 1050 includes a pathway for transmitting information between various components of the device, such as processor 1010, memory 1020, input / output interface 1030, and communication interface 1040.

[0083] It should be noted that although the above-described device only shows the processor 1010, memory 1020, input / output interface 1030, communication interface 1040, and bus 1050, in specific implementations, the device may also include other components necessary for normal operation. Furthermore, those skilled in the art will understand that the above-described device may only include the components necessary for implementing the embodiments of this specification, and not necessarily all the components shown in the figures.

[0084] The electronic devices described above are used to implement the corresponding attribute alignment methods in any of the foregoing embodiments and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0085] Based on the same technical concept, embodiments of this application also provide a non-transitory computer-readable storage medium storing computer instructions for causing the computer to execute the attribute alignment method as described in any of the above embodiments.

[0086] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transfer medium that can be used to store information accessible by a computing device.

[0087] The computer instructions stored in the storage medium of the above embodiments are used to cause the computer to execute the attribute alignment method as described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0088] It should be noted that, unless otherwise defined, the technical or scientific terms used in the embodiments of this application should have the ordinary meaning understood by one of ordinary skill in the art to which this application pertains. The terms "first," "second," and similar terms used in the embodiments of this application do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Terms such as "comprising" or "including" mean that the element or object preceding the word covers the elements or objects listed after the word and their equivalents, without excluding other elements or objects. Terms such as "connected" or "linked" are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. The article "a" or "an" preceding an element does not exclude the presence of multiple such elements.

[0089] While the spirit and principles of this application have been described with reference to several specific embodiments, it should be understood that this application is not limited to the disclosed specific embodiments, and the division of aspects does not imply that features in these aspects cannot be combined for benefit; such division is merely for convenience of expression. This application is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims. The scope of the appended claims is to be interpreted in the broadest sense, thereby encompassing all such modifications and equivalent structures and functions.

Claims

1. An attribute alignment method, characterized in that, include: Obtain a first entity and a second entity from different knowledge graphs that have been aligned; wherein the first entity has a first attribute value and the second entity has a second attribute value; Input features are generated based on the second entity; the input features are used to express the semantic and / or textual features of the second entity; Based on the input features and the pre-trained heterogeneous attribute prediction model, the target first attribute value corresponding to the second entity is obtained; wherein, the heterogeneous attribute prediction model is trained using a training dataset constructed based on the first entity and the second entity; any sample in the training dataset includes a training second entity and the first attribute value corresponding to the training second entity; Identify at least two target second entities that correspond to the same target first attribute value; The second attribute values ​​of at least some of the target second entities are counted to determine the target second attribute values; Align the first attribute value and the second attribute value of the target.

2. The method according to claim 1, characterized in that, The step of generating input features based on the second entity includes: Determine the name information of the second entity; Determine the summary information of the second entity; The text information that determines the second attribute value possessed by the second entity; The input features are generated based on the name information, the summary information, and the text information.

3. The method according to claim 1, characterized in that, The step of statistically analyzing the second attribute values ​​of at least a portion of the target second entities to determine the target second attribute values ​​includes: Count the number of each second attribute value, and determine the second attribute value with the largest number as the target second attribute value.

4. The method according to claim 3, characterized in that, Determining the second attribute value with the largest quantity as the target second attribute value includes: In response to determining that the proportion of the second attribute value with the largest quantity in all second attribute values ​​exceeds a predetermined proportion threshold, and determining that the total number of second attribute values ​​exceeds a predetermined quantity threshold, the second attribute value with the largest quantity is determined as the target second attribute value.

5. The method according to claim 1, characterized in that, The attribute alignment based on the first target attribute value and the second target attribute value includes: Determine the first confidence level of the target's first attribute value; Determine the second confidence level of the target second attribute value; Attribute alignment is performed based on the first confidence level and the second confidence level.

6. The method according to claim 1, characterized in that, The acquisition of the first and second entities, which are respectively from different knowledge graphs and have completed entity alignment, includes: Retrieve candidate first and candidate second entities from different knowledge graphs that have already been aligned; Determine the precision and / or recall of the first candidate entity and the second candidate entity; In response to determining that the accuracy meets a predetermined accuracy threshold, and / or determining that the recall meets a predetermined recall threshold, the candidate first entity and the candidate second entity are determined as the first entity and the second entity.

7. An attribute alignment device, characterized in that, include: The acquisition module is configured to acquire a first entity and a second entity that have been aligned with entities from different knowledge graphs; wherein the first entity has a first attribute value and the second entity has a second attribute value; A classification module is configured to generate input features based on the second entity; the input features are used to express the semantic and / or textual features of the second entity; and obtain the target first attribute value corresponding to the second entity based on the input features and a pre-trained heterogeneous attribute prediction model; wherein the heterogeneous attribute prediction model is trained on a training dataset constructed based on the first entity and the second entity; any sample in the training dataset includes a training second entity and the first attribute value corresponding to the training second entity; The determination module is configured to determine at least two target second entities that have the same target first attribute value; The statistics module is configured to perform quantity statistics on the second attribute values ​​of at least a portion of the target second entities to determine the target second attribute values; The alignment module is configured to align the target first attribute value and the target second attribute value.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the method as described in any one of claims 1 to 6.

9. A non-transitory computer-readable storage medium storing computer instructions, characterized in that, The computer instructions are used to cause the computer to perform the method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Information processing method and device

    CN109960722A

  • Character entity attribute alignment method and system based on attribute value distribution

    CN113361263A