Entity alignment method and device, electronic device, and storage medium
By converting corpus words into word vectors and performing multiple clusterings, different references to the same entity are determined based on the combination of category labels. This solves the problem of dependence on standard libraries in existing technologies, realizes the recognition of multiple expression styles of the same entity and reduces the number of entity types, thereby improving the construction efficiency of knowledge graphs.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-11-26
- Publication Date
- 2026-03-27
AI Technical Summary
Existing entity alignment methods rely on standard entity libraries, which cannot handle new entities not in the library, and string matching conditions are stringent, making it impossible to accurately identify different references to the same entity.
By converting corpus words into word vectors, multiple clustering is used to obtain category label combinations. Based on the similarity of category label combinations, different referents of the same entity are determined, and a mapping relationship is established.
It can find multiple representations of the same entity without relying on a standard library, reducing the number of entity types, reducing the sparsity of the knowledge graph, and providing a foundation for the construction of knowledge graphs.
Smart Images

Figure CN110837568B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data processing, in particular to an entity alignment method and device, electronic equipment and computer readable storage medium. BACKGROUND
[0002] An entity refers to an objective existence and can be distinguished from each other, including specific people, things, abstract concepts or connections, and a knowledge base contains multiple categories of entities. Entity alignment refers to finding different references that are different in writing but represent the same entity.
[0003] At present, entity alignment is mainly performed through entity linking based on string matching. Based on a standard reference string library, a standard reference string is searched in a to-be-matched reference string. If the standard reference string can be found in the to-be-matched reference string, a mapping relationship is established between the to-be-matched reference string and the standard reference string, that is, the to-be-matched reference string and the standard reference string belong to different references of the same entity and can be combined. For example, the standard reference "New York" and the to-be-matched reference "New York New York", "New York New York" contains "New York", and a mapping relationship { "New York New York": "New York"} is established.
[0004] The above method needs a complete standard entity library and cannot handle new entities not in the library. In addition, string matching requires that the to-be-matched string accurately contains the standard product name, which is too harsh a condition, so the current entity alignment method cannot accurately identify whether it belongs to different references of the same entity. SUMMARY
[0005] The purpose of the embodiments of the present application is to provide an entity alignment method to solve the problem that the existing entity alignment method must rely on a standard entity library.
[0006] In one aspect, the present application provides an entity alignment method, which comprises:
[0007] obtaining a to-be-processed corpus word set;
[0008] converting each corpus word in the corpus word set into a corresponding word vector;
[0009] performing multiple clustering on all word vectors according to different category numbers to obtain a category label combination of the word vector corresponding to each corpus word;
[0010] determining a plurality of corpus words with a same proportion of category label combinations greater than a threshold value as different entity references of the same entity according to the category label combinations of different corpus words.
[0011] In an embodiment, the converting each corpus word in the set of corpus words into a corresponding word vector comprises:
[0012] The word embedding model is constructed by training a plurality of corpus words.
[0013] In an embodiment, after the converting each corpus word in the set of corpus words into a corresponding word vector by the constructed word embedding model, the method further comprises:
[0014] performing a word segmentation operation on the corpus word for which the word vector cannot be obtained to obtain a plurality of word segments of the corpus word;
[0015] Converting each word segment into a corresponding word vector using the constructed word embedding model;
[0016] superimposing the word vectors corresponding to each word segment in the corpus word to obtain the word vector corresponding to the corpus word.
[0017] In an embodiment, the performing multiple clustering on all word vectors according to different category numbers to obtain a category label combination corresponding to the word vector of each corpus word comprises:
[0018] determining the category in which each word vector is located at different category numbers by performing multiple clustering on all word vectors according to the category numbers.
[0019] For each word vector, the category label combination of the word vector is obtained according to the category in which the word vector is located at different category numbers.
[0020] In an embodiment, the obtaining, for each word vector, the category label combination of the word vector according to the category in which the word vector is located at different category numbers comprises:
[0021] labeling a plurality of categories obtained by each clustering to obtain a label corresponding to each category at different category numbers;
[0022] For each word vector, the category label combination of the word vector is obtained according to the category in which the word vector is located at different category numbers and the label of the category.
[0023] In an embodiment, the determining, according to the category label combinations of different corpus words, a plurality of corpus words with the same proportion of category label combinations greater than a threshold as different entity references of the same entity comprises:
[0024] According to the category label combinations of different corpus words, the same proportion of category label combinations between any two corpus words is calculated.
[0025] The same proportion of the corpus words greater than the threshold value is divided into different entity references of the same entity.
[0026] In an embodiment, after the same proportion of the corpus words greater than the threshold value is determined as different entity references of the same entity according to the category label combination of different corpus words, the method further comprises:
[0027] Obtaining an entity standard reference from the different entity references of the same entity;
[0028] Establishing a mapping relationship between the entity standard reference and the remaining entity references of the same entity.
[0029] In another aspect, the present application also provides an entity alignment device, the device comprising:
[0030] A data acquisition module is configured to acquire a set of corpus words to be processed;
[0031] A vector conversion module is configured to convert each corpus word in the set of corpus words into a corresponding word vector;
[0032] A label combination module is configured to perform multiple clustering on all word vectors according to different category numbers to obtain a category label combination of the word vector corresponding to each corpus word;
[0033] A corpus selection module is configured to determine a plurality of corpus words with the same proportion of the category label combination greater than a threshold value as different entity references of the same entity according to the category label combination of different corpus words.
[0034] Further, the present application also provides an electronic device, the electronic device comprising:
[0035] A processor;
[0036] A memory for storing processor-executable instructions;
[0037] The processor is configured to perform the above-mentioned entity alignment method.
[0038] In addition, the present application also provides a computer readable storage medium, the storage medium stores a computer program, the computer program can be executed by the processor to complete the above-mentioned entity alignment method.
[0039] The technical solution provided in the application above converts the corpus words into word vectors, performs multiple clustering on all word vectors according to different category numbers, and thus obtains the category label combination of each corpus word. Corpus words with basically the same category label combination can be considered as different entity designations of the same entity, so that the multiple expression styles of the same entity can be found without relying on a standard library, the types of entities are reduced, and the construction of a knowledge graph is prepared. BRIEF DESCRIPTION OF DRAWINGS
[0040] In order to more clearly illustrate the technical solutions of the embodiments of the application, the drawings needed to be used in the embodiments of the application will be briefly introduced as follows.
[0041] Figure 1 An application scenario diagram of the entity alignment method provided in the embodiments of the application is shown in FIG. 1.
[0042] Figure 2 A flowchart of the entity alignment method provided in the embodiments of the application is shown in FIG. 2.
[0043] Figure 3 A detailed flowchart of step 230 in the corresponding embodiment is shown in FIG. 3. Figure 2 A detailed flowchart of step 232 in the corresponding embodiment is shown in FIG. 4.
[0044] Figure 4 A detailed flowchart of step 232 in the corresponding embodiment is shown in FIG. 4. Figure 3 A detailed flowchart of step 232 in the corresponding embodiment is shown in FIG. 4.
[0045] Figure 5 A block diagram of the entity alignment device provided in the embodiments of the application is shown in FIG. 5. DETAILED DESCRIPTION
[0046] The technical solutions in the embodiments of the application will be described below with reference to the drawings in the embodiments of the application.
[0047] Similar labels and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. Meanwhile, in the description of the application, the terms "first", "second", and the like are only used for differentiation and cannot be understood as indicating or implying relative importance.
[0048] Entity alignment can not only reduce the types of entities, but also reduce the sparsity of a knowledge graph. The knowledge graph is an important technical means for analyzing entity relationships. The foundation of constructing the knowledge graph is to determine entities and relationships. Due to the diversity of natural language expressions, different designations of the same entity exist, so in order to reduce the sparsity of the graph and reduce the types of entities, entity alignment is an important prerequisite for constructing the knowledge graph.
[0049] Figure 1This is a schematic diagram illustrating an application scenario of the entity alignment method provided in an embodiment of this application. For example... Figure 1 As shown, this application scenario includes server 110. Server 110 can be a server, server cluster, or cloud computing center. Server 110 can use the entity alignment method provided in the embodiment to find different entity references for the same entity, thereby reducing the number of entity types and facilitating the subsequent construction of the knowledge graph.
[0050] In one embodiment, the above application scenario may further include a client 120, which can be a personal computer (PC), tablet computer, smartphone, personal digital assistant (PDA), etc., running the application. The server 110 can obtain a large number of articles from the client 120 and extract corpus words from them. Then, the server 110 can use the method provided in this application to perform entity alignment.
[0051] This application also provides an electronic device. The electronic device may be... Figure 1 The server shown is 110. (For example...) Figure 1 As shown, server 110 may include processor 111; memory 112 for storing executable instructions of processor 111; wherein processor 111 is configured to execute the entity alignment method provided in this application.
[0052] The memory 112 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable red-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk.
[0053] This application also provides a computer-readable storage medium storing a computer program that can be executed by a processor 111 to perform the entity alignment method provided in this application.
[0054] Figure 2 This is a flowchart illustrating the entity alignment method provided in an embodiment of this application. For example...Figure 2 As shown in the above figure, the method can include steps 210-240.
[0055] In step 210, a set of corpus words to be processed is obtained.
[0056] For example, the set of corpus words to be processed can be extracted from a large number of articles by an entity extraction algorithm. The set of corpus words to be processed includes a large number of corpus words, and the corpus words need to be aligned with entities. Entity alignment refers to finding different entity references belonging to the same entity, that is, finding different expressions of the same semantics.
[0057] The server can directly obtain the set of corpus words to be processed from the external device, or obtain a large number of articles from the external device, and then extract the set of corpus words by the entity extraction algorithm. Entity extraction can also be referred to as named entity recognition, which extracts atomic information elements in the text, such as names, organization / institution names, geographic locations, events / dates, character values, and amount values. The entity extraction task includes entity detection and classification, that is, finding named entities and then classifying them. For example, the set of corpus words to be processed can be extracted according to a specified category such as "use scenarios of a certain product". As shown in Table 1 below, some of the extracted corpus words are shown.
[0058] Table 1: Examples of extracted corpus words
[0059] Id (number) entity mention 0001 hot summer 0002 hot summer 0003 hot summer 0004 go on a trip 0005 go on a trip
[0060] As can be seen from the above figure, 0001-0003 are different references of the same scenario entity, and 0004 and 0005 are different references of the same scenario entity. If entity alignment is not performed, there will be 5 different scenarios in the graph, so entity alignment plays an important role in the construction of a knowledge graph.
[0061] In step 220, each corpus word in the set of corpus words is converted into a corresponding word vector.
[0062] The word vector refers to representing the corpus word in the form of a numerical vector. Converting the corpus word in the text into a word vector can also be referred to as word embedding, so the present embodiment can convert the corpus word into a word vector using an existing word embedding method. In an embodiment, the word2vec algorithm can be used to convert the corpus word into a word vector. Word2vec is an NLP tool launched by Google in 2013, which has the feature of vectorizing all words, so that the relationship between words can be quantitatively measured, and the relationship between words can be mined.
[0063] In an embodiment, each corpus word in the set of corpus words can be converted into a corresponding word vector by using a constructed word embedding model.
[0064] The word embedding model can be a CBOW (Continuous Bag-of-Words) model and a Skip-Gram model. The input of the CBOW model is a word vector corresponding to a context-related word of a specific word, and the output is a word vector of the specific word. The Skip-Gram model and the CBOW have opposite ideas, that is, the input is a word vector of a specific word, and the output is a context word vector corresponding to the specific word. Therefore, the corpus word can be converted into a word vector by using the existing word embedding model.
[0065] In an embodiment, if all corpus words can obtain a word vector through the word embedding model, the word vector conversion is completed. Otherwise, a word segmentation operation is performed on the corpus words that cannot obtain a word vector to obtain a plurality of segmented words of the corpus words, each segmented word is converted into a corresponding word vector by using the constructed word embedding model, and the word vectors corresponding to each segmented word in the corpus words are superimposed to obtain a word vector corresponding to the corpus words.
[0066] The superimposition of the word vectors corresponding to each segmented word can be adding the word vectors of all segmented words of the same corpus word, and taking the addition result as the word vector of the corpus word.
[0067] For example, the corpus word "traveling out" can be segmented into "traveling out" and "tourism" by using the jieba word segmenter. "Traveling out" is converted into a word vector (0, 0, 0, 0, 0, 0, 0, 1, 1, 1), and "tourism" is converted into a word vector (1, 1, 1, 0, 0, 0, 0, 0, 0, 0). Therefore, "traveling out" can be represented as (1, 1, 1, 0, 0, 0, 0, 1, 1, 1).
[0068] In step 230, all word vectors are clustered multiple times according to different category numbers to obtain a category label combination corresponding to the word vector of each corpus word.
[0069] The category number refers to the number of classifications set during clustering. Assuming that the total number of corpus words is N, the category number k can be selected according to the formula k = Alpha*N. Wherein, Alpha is a category coefficient, and the value is [0.01, 0.02, 0.03, …, 0.19, 0.20].
[0070] Wherein, the clustering of all word vectors can adopt Kmeans clustering algorithm. 1, first select a k value, that is, hope to get k sets of all word vectors after clustering. 2, randomly select k data points as the center from all word vectors. 3, for each data point in all word vectors, calculate the distance (such as Euclidean distance) between each data point and each center, and divide it into the set to which the center belongs. 4, after all data is divided into good sets, there are k sets in total. Then recalculate the center of each set. 5, if the distance between the newly calculated center and the original center is less than a certain threshold set (indicating that the position of the newly calculated center changes little, tends to be stable, or converges), it can be considered that the clustering has reached the expected result, and the algorithm terminates. 6, if the new center and the original center distance changes greatly, it needs to iterate 3-5 steps.
[0071] Thereby, different k values can be selected to realize multiple clustering of all word vectors. Each clustering can obtain a class label of the word vector. The class label combination of a certain word vector can be considered as a set composed of the class labels of the word vector in multiple clustering. For example, the corpus word "off-season", the class label of the first clustering is 1, the class label of the second clustering is 372, the class label of the third clustering is 2, and the class label of the fourth clustering is 19. Therefore, the class label combination of the corpus word "off-season" can be considered as [1, 372, 2, 19]. Through the above method, the class label combination of the word vector corresponding to each corpus word can be obtained.
[0072] In step 240, according to the class label combination of different corpus words, a plurality of corpus words with the same proportion of class label combination greater than a threshold value are determined as different entity designations of the same entity.
[0073] In an embodiment, the threshold value can be 50%. If the same proportion of the class label combination of any two corpus words is greater than 50%, it can be considered that the two corpus words belong to different entity designations of the same entity. According to the need, the threshold value can be 60%, 70%.
[0074] For example, the class label combination of "off-season" is [1, 372, 2, 19], the class label combination of "off-season period" is [1, 372, 2, 365], and "off-season" and "off-season period" have the same three class labels "1, 372, 2", so the same proportion P of the class label combination is 3 / 4=75%. At this time, the same proportion is greater than the set threshold value 50%, and it can be considered that "off-season" and "off-season period" belong to different entity designations of the same entity. That is, "off-season" and "off-season period" belong to different writings of the same semantic.
[0075] In an embodiment, after step 240, the method further comprises: obtaining an entity standard designation from different entity designations of the same entity; and establishing a mapping relationship between the entity standard designation and the rest of the entity designations of the same entity.
[0076] The entity standard designation refers to a standard name of naming. The entity standard designation of an entity can be considered as a selection of a user from different entity designations of the entity, as shown in Table 2.
[0077] Table 2: An example of an entity standard designation.
[0078] entity mention voting group standard mention off-season 1 off-season off-season 1 off-season outdoor work 2 outdoor work outdoor work 2 outdoor work
[0079] As can be seen from Table 2, "off-season" and "off-season period" are different entity designations of the same entity, and the standard designation can be selected as "off-season"; "outdoor work" and "outdoor work" are different entity designations of the same entity, and the standard designation can be selected as "outdoor work".
[0080] Then, a mapping relationship between the standard name of naming and other entity designations in the same group can be established, that is, a mapping relationship between "off-season period" and "off-season" is established, and a mapping relationship between "outdoor work" and "outdoor work" is established. The established mapping relationship can be used for subsequent construction of a knowledge graph.
[0081] The above technical solution converts the corpus words into word vectors, and clusters all the word vectors according to different category numbers multiple times, so as to obtain a category label combination of each corpus word. Corpus words with basically the same category label combination can be considered as different entity designations of the same entity. Thus, without relying on a standard library, multiple expression styles of the same entity can be found, the number of entities is reduced, and the construction of a knowledge graph is prepared.
[0082] In an embodiment, as shown in Figure 3 The above step 230 can specifically include steps 231 and 232.
[0083] In step 231, by updating the category number multiple times, all the word vectors are clustered according to the category number multiple times, and the category in which each word vector is located is determined at different category numbers.
[0084] The server can perform a first clustering of all word vectors using the K-means clustering algorithm, based on a set number of categories k1, resulting in k1 categories and determining the category of each word vector. Then, the number of categories is updated, and a second clustering of all word vectors using the K-means clustering algorithm, based on a set number of categories k2, is performed, resulting in k2 categories and determining the category of each word vector. This process can be repeated s times, updating the number of categories and determining the category to which each word vector is assigned in each clustering iteration.
[0085] In step 232, for each word vector, the category label combination of the word vector is obtained according to the category in which the word vector belongs when the number of categories is different.
[0086] During clustering, word vectors that are close in distance are grouped into the same category. Therefore, if two word vectors are grouped into the same category in multiple clustering iterations, they can be considered semantically similar. Thus, the corpus words corresponding to these two word vectors belong to different entity references of the same entity. Based on this principle, this embodiment summarizes the categories to which each word vector is grouped in each clustering iteration to obtain the category label combination of that word vector. This facilitates comparison of the similarity ratio of category label combinations of different word vectors. If the similarity ratio of the category label combinations of two word vectors is large, it can be considered that these two word vectors have been grouped into the same category multiple times, and their semantics are similar. If the similarity ratio is greater than a threshold (e.g., 0.5), it can be determined that the corpus words corresponding to these two word vectors belong to different spellings of the same entity.
[0087] In one embodiment, such as Figure 4 As shown, step 232 above may include steps 2321 and 2322.
[0088] In step 2321, the multiple categories obtained from each clustering are labeled to obtain the label corresponding to each category when the number of categories is different.
[0089] For example, clustering all word vectors according to the number of categories k1 yields k1 categories. These k1 categories can be sequentially labeled with numbers 1, 2, 3, 5...k1. Similarly, clustering all word vectors according to the number of categories k2 yields k2 categories. These k2 categories can also be sequentially labeled with numbers 1, 2, 3, 5...k2. This process is repeated for each clustering, labeling all resulting categories. A label refers to the tagging content used to indicate a category; for example, it can be a number. Labels can also be other text or other string formats as needed.
[0090] In step 2322, for each word vector, a category label combination of the word vector is obtained according to the number of different categories, the category in which the word vector is located, and the label of the category.
[0091] Table 3 is the category label of the corpus word obtained by four times of clustering. As shown in Table 3, in the first time of clustering, the label of the category in which “off-season” is located is 1; in the second time of clustering, the label of the category in which “off-season” is located is 372; in the third time of clustering, the label of the category in which “off-season” is located is 2; in the fourth time of clustering, the label of the category in which “off-season” is located is 19. In the first time of clustering, the label of the category in which “off-season period” is located is 1; in the second time of clustering, the label of the category in which “off-season period” is located is 372; in the third time of clustering, the label of the category in which “off-season period” is located is 2; in the fourth time of clustering, the label of the category in which “off-season period” is located is 365.
[0092] Table 3 Category label of corpus word obtained by four times of clustering
[0093] entity mention class label 1 class label 2 class label 3 class label 4 off-season 1 372 2 19 off-season 1 372 2 365 outdoor work 2 373 233 164 outdoor work 2 373 350 143 sleep poorly 3 115 51 156 weather is good 4 120 2 175
[0094] Wherein, [1, 372, 2, 19] can be considered as the category label combination of “off-season”; [1, 372, 2, 365] can be considered as the category label combination of “off-season period”. In this way, according to the label of the category in which the word vector is located in each time of clustering, the category label combination of the word vector can be obtained.
[0095] Suppose that the category label combination of “off-season” is [1, 372, 2, 19] and the category label combination of “off-season period” is [1, 372, 2, 365], it can be seen that in the first, second and third times of clustering, “off-season” and “off-season period” are divided into the same category, and in the fourth time of clustering, they are divided into different categories. According to the voting method, the probability that “off-season” and “off-season period” are divided into the same category is 75%. Similarly, the probability that “off-season” and “weather is really good” are divided into the same category is P=1 / 4=0.25. Assuming that the threshold is 0.5, “off-season” and “off-season period” can be considered as different entity designations of the same entity.
[0096] Figure 5 is a block diagram of an entity alignment device provided by an embodiment of the present application. The entity alignment device can be used as a server in the implementation environment shown in the figure to perform the entity alignment method provided above. As shown in the figure, the entity alignment device includes a data acquisition module 510, a vector conversion module 520, a label combination module 530, and a corpus selection module 540. Figure 1 Figure 5 The entity alignment device includes a data acquisition module 510, a vector conversion module 520, a label combination module 530, and a corpus selection module 540.
[0097] The data acquisition module 510 is configured to acquire a set of corpus words to be processed.
[0098] The vector conversion module 520 is configured to convert each corpus word in the set of corpus words into a corresponding word vector.
[0099] The label combination module 530 is configured to perform multiple clustering on all the word vectors according to different category numbers, to obtain a category label combination of the word vector corresponding to each corpus word.
[0100] The corpus selection module 540 is configured to determine, as different entity designations of the same entity, a plurality of corpus words with a same proportion of category label combinations greater than a threshold according to the category label combinations of different corpus words.
[0101] The functions and effects of the modules in the above apparatus are specifically described in the implementation process of the corresponding steps in the above entity alignment method, and will not be described here.
[0102] In several embodiments provided in the present application, the disclosed apparatus and method can also be implemented in other ways. The apparatus embodiments described above are only schematic, for example, the flowcharts and block diagrams in the drawings show the possible implementation architectures, functions and operations of the apparatus, method and computer program product according to the embodiments of the present application. In this regard, each block in the flowcharts or block diagrams can represent a module, a program segment or a part of code, which contains one or more executable instructions for implementing the specified logical functions. In some alternative implementations, the functions noted in the blocks can occur in different orders from those described in the drawings. For example, two consecutive blocks can actually be executed substantially in parallel, and sometimes they can be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and the combination of blocks in the block diagrams and / or flowcharts, can be implemented by a dedicated hardware-based system for performing the specified functions or actions, or can be implemented by a combination of dedicated hardware and computer instructions.
[0103] In addition, each functional module in the embodiments of the present 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.
[0104] If the functions are implemented in the form of software function modules and sold or used as independent products, the functions can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application can be embodied in the form of a software product, and the computer software product is stored in a storage medium, and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the embodiments of the method of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes.
Claims
1. A method for aligning entities, characterized in that, The method includes: Obtain the set of words in the corpus to be processed; Each word in the corpus word set is converted into a corresponding word vector; Based on different numbers of categories, all word vectors are clustered multiple times to obtain the category label combination of the word vector corresponding to each corpus word; each clustering is a process of multiple iterations; each clustering yields a category label for the word vector, and the category label of the word vector is the set of category labels of the word vector formed by multiple clusterings; Based on the combination of category labels of different corpus words, multiple corpus words with the same category label combination in proportion greater than a threshold are identified as different entity references of the same entity; The step of performing multiple clustering operations on all word vectors according to different numbers of categories to obtain the category label combination of the word vector corresponding to each corpus word includes: performing multiple clustering operations on all word vectors according to the number of categories by updating the number of categories multiple times to determine the category of each word vector at different numbers of categories; and for each word vector, obtaining the category label combination of the word vector according to the category of the word vector at different numbers of categories. The step of determining multiple corpus words with a similar proportion greater than a threshold based on the category label combinations of different corpus words as different entity references of the same entity includes: calculating the similar proportion of the category label combinations between any two corpus words based on the category label combinations of different corpus words; and classifying the corpus words with a similar proportion greater than a threshold as different entity references of the same entity.
2. The method according to claim 1, characterized in that, The step of converting each corpus word in the corpus word set into a corresponding word vector includes: For each word in the corpus word set, obtain the corresponding word vector through the constructed word embedding model.
3. The method according to claim 2, characterized in that, After obtaining the word vector corresponding to each word in the corpus word set through the constructed word embedding model, the method further includes: For corpus words whose word vectors cannot be obtained, perform word segmentation to obtain several word segments of the corpus words; Using the established word embedding model, each word segment is converted into a corresponding word vector; The word vectors corresponding to each word segment in the corpus are superimposed to obtain the word vectors corresponding to the corpus words.
4. The method according to claim 1, characterized in that, For each word vector, the category label combination of the word vector is obtained according to the category in which the word vector belongs for different numbers of categories, including: Each clustering operation generates multiple categories, which are then labeled to obtain the label for each category when the number of categories changes. For each word vector, the category label combination of the word vector is obtained based on the category in which the word vector belongs and the label of the category for different number of categories.
5. The method according to claim 1, characterized in that, After determining multiple corpus words with the same category label combination greater than a threshold as different entity references of the same entity based on the category label combination of different corpus words, the method further includes: Obtain the entity standard designation from different entity designations of the same entity; For the same entity, establish a mapping relationship between the standard reference of the entity and the references of other entities of the same entity.
6. A solid alignment device, characterized in that, The device includes: The data acquisition module is used to acquire the set of words in the corpus to be processed; The vector conversion module is used to convert each word in the corpus word set into a corresponding word vector; The label combination module is used to perform multiple clusterings on all word vectors according to different numbers of categories to obtain the category label combination of the word vector corresponding to each corpus word; each clustering is a process of multiple iterations; each clustering yields a category label for the word vector, and the category label of the word vector is the set formed by the category labels of the word vector during multiple clusterings; The corpus selection module is used to identify multiple corpus words with the same category label combination in greater than a threshold as different entity references of the same entity based on the category label combination of different corpus words; The tag combination module is also used to perform multiple clusterings on all word vectors according to the number of categories by updating the number of categories multiple times, and determine the category of each word vector when the number of categories is different; for each word vector, the category tag combination of the word vector is obtained according to the category of the word vector when the number of categories is different. The corpus selection module is also used to calculate the same proportion of the category label combination between any two corpus words based on the category label combination of different corpus words; and to classify corpus words with the same proportion greater than a threshold into different entity references of the same entity.
7. An electronic device, characterized in that, The electronic device includes: processor; Memory used to store processor-executable instructions; The processor is configured to execute the entity alignment method according to any one of claims 1-5.
8. A computer-readable storage medium, characterized in that, The storage medium stores a computer program that can be executed by a processor to perform the entity alignment method according to any one of claims 1-5.
Citation Information
Patent Citations
Domain entity disambiguation method for fusing word vectors and topic model
CN107861939A
Model training method, named entity recognition method, device, equipment and medium
CN110276075A
Commodity futures news public opinion analysis method and system
CN110377696A
Text label determination method and device
CN106611052A
A method and a device for entity alignment in a knowledge map
CN108984661A