Method, apparatus, and storage medium for entity structuring and disambiguation
By combining the training model with a structured entity knowledge base, the problem of entity ambiguity in text data is solved, entity clarification and information supplementation are achieved, and the accuracy of text understanding is improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-08
- Publication Date
- 2026-03-24
AI Technical Summary
Existing technologies suffer from ambiguity in text data and fail to effectively handle the relationships between entities, leading to unclear text understanding.
The first and second trained models are used for entity label classification and relationship classification. The entity structured knowledge base is used for disambiguation, and the most similar entity is determined by calculating the similarity of the representation vectors.
It effectively eliminates entity ambiguity in text data, improves the clarity and information richness of entity references, and achieves entity structuring.
Smart Images

Figure CN115906841B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of text disambiguation, and more particularly, to a method, device and storage medium for entity structuring and disambiguation. BACKGROUND
[0002] In the understanding of text data, a common problem is that each entity in the text is prone to ambiguity. For example, when a pronoun appears in the text data, it is easy to confuse which entity the pronoun refers to. For example, when multiple references appear in the text data, it is easy to confuse whether different references refer to the same entity. For example, the reference "home" is the same entity as the reference "certain community x building xx house" in the previous text. When the foregoing situations occur, the understanding of the text data is prone to ambiguity, which is not conducive to the understanding and analysis of the text data and its application. When the entity in the text data is not clearly referred to, the prior art does not complete or structure it, and does not consider the association between entities. Overall, the prior art is not perfect in the aspect of eliminating ambiguity in text data. SUMMARY
[0003] The present application aims to overcome at least one of the above-mentioned defects of the prior art, and provides a method, device and storage medium for entity structuring and disambiguation, to solve the problem that the prior art does not consider the association between entities in the process of eliminating ambiguity in text data, resulting in imperfection.
[0004] The technical solution adopted by the present application comprises:
[0005] In a first aspect, the present application provides a method for entity structuring and disambiguation, comprising: collecting text data; the text data comprising a plurality of first entities; inputting the text data into a trained first training model to cause the first training model to output label classification of all first entities in the text data; the label classification comprising explicit reference and implicit reference; when the label classification of the first entity is explicit reference, inputting the first entity with explicit reference into a constructed entity structuring knowledge base to cause the entity structuring knowledge base to output a result most similar to the first entity with explicit reference as a disambiguation result of the first entity with explicit reference; when the label classification of the first entity is implicit reference, inputting the first entity with implicit reference into a trained second training model to cause the second training model to output a relationship classification related thereto and another first entity corresponding to each related relationship classification; the relationship classification comprising equivalent relationship and similar relationship; when the first entity with implicit reference has a relationship classification of equivalent relationship, inputting another first entity having equivalent relationship with the first entity into the constructed entity structuring knowledge base to cause the entity structuring knowledge base to output a result most similar to the another first entity as a disambiguation result of the first entity with implicit reference; when the first entity with implicit reference only has a relationship classification of similar relationship, inputting the first entity with implicit reference and another first entity having similar relationship with the first entity into the constructed entity structuring knowledge base to cause the entity structuring knowledge base to output a result most similar to both the first entity with implicit reference and the another first entity as a disambiguation result of the first entity with implicit reference.
[0006] The method for entity structuring and disambiguation provided by the present application is mainly used for processing ambiguity of the first entity in the text data. The first entity refers to entities of the same type. The trained first training model can be used to output label classification of the first entity, including explicit reference and implicit reference. Both the first entity with explicit reference and the first entity with implicit reference are processing objects of the method provided by the present application. The trained second training model can be used to output relationship classification of the first entity. The method provided by the present application uses the associated relationship of the first entity. Another first entity having an associated relationship with the first entity can be used to solve the problem of implicit reference, so that the information of the entity with implicit reference is clearer and richer. The another first entity having an associated relationship with the first entity, or only the another first entity or the first entity with explicit reference can be input into the entity structuring knowledge base, so as to obtain a result most similar to the another first entity as a disambiguation result of the first entity with implicit reference / first entity with explicit reference, and structure the first entity. The method provided by the present application uses the associated relationship of the entity and combines the knowledge base to further supplement and structure the first entity in the text data, which can effectively eliminate the ambiguity of the unclear entity.
[0007] Further, the referentially explicit first entity is input into the constructed entity structured knowledge base to enable the entity structured knowledge base to output the most similar result to the referentially explicit first entity, specifically including: after the referentially explicit first entity is input into the constructed entity structured knowledge base, the referentially explicit first entity and the entity data in the entity structured knowledge base are subjected to characterization vector similarity calculation, and the entity data with the highest similarity is output as the most similar result to the referentially explicit first entity; another first entity with which there is an equivalence relationship is input into the constructed entity structured knowledge base to enable the entity structured knowledge base to output the most similar result to the other first entity, specifically including: after the other first entity with which there is an equivalence relationship is input into the constructed entity structured knowledge base, the other first entity with which there is an equivalence relationship and the entity data in the entity structured knowledge base are subjected to characterization vector similarity calculation, and the entity data with the highest similarity is output as the most similar result to the other first entity.
[0008] In the entity structured knowledge base, the input other entity or first entity needs to be subjected to characterization vector similarity calculation with the entity data in the knowledge base to obtain the entity data with the highest similarity as the disambiguation result of the first entity, and for the referentially explicit first entity, the output result is the structured result of the first entity, obtaining more detailed and clear information.
[0009] Further, the referentially explicit first entity and the other entity with which there is a similar relationship are input into the constructed entity structured knowledge base to enable the entity structured knowledge base to output the most similar result to the referentially explicit first entity and the other first entity, specifically including: the referentially explicit first entity and the other entity with which there is a similar relationship are spliced and then input into the constructed entity structured knowledge base, the spliced entity data and the entity data in the entity structured knowledge base are subjected to characterization vector similarity calculation, and the entity data with the highest similarity is output as the most similar result to the referentially explicit first entity and the other first entity.
[0010] When the first entity is a referentially ambiguous entity and the only relevant relationship is a similar relationship, the referentially ambiguous first entity and the other entity with which there is a similar relationship need to be spliced as a whole and then input into the constructed entity structured knowledge base to make the reference of the referentially ambiguous first entity with no equivalence relationship clearer.
[0011] Further, the trained first training model is obtained by inputting the label-labeled historical text data into the first training model for training; the label labeling is to divide all the first entities in the historical text data into referentially explicit entities or referentially ambiguous entities.
[0012] Further, the training process of the first training model specifically comprises: inputting the historical text data after label annotation into the first training model, so that the first training model obtains the word segmentation representation, the sentence segmentation representation and the position representation of the historical text data, and inputs the obtained word segmentation representation, sentence segmentation representation and position representation into the CRF layer of the first training model, so that the CRF layer outputs the label of each first entity, compares the output label of each first entity with the label annotation classification of the same first entity, performs back propagation according to the comparison result and a loss function of the first training model, iteratively updates the parameters of the first training model until the function value of the loss function is the minimum value, and obtains the trained first training model.
[0013] Further, the trained second training model is obtained by inputting the historical text data after relationship annotation into the second training model for training; the relationship annotation is to divide the relationship between at least two first entities in the historical text data into an equivalent relationship or a similar relationship.
[0014] Further, the training process of the second training model specifically comprises: inputting the historical text data after relationship annotation into the second training model, so that the second training model obtains the word segmentation representation of the historical text data, divides the historical text data into head entity index representation and tail entity index representation according to the position of the first entity, determines the mask index of the historical text data according to the region between the first entities, inputs the word segmentation representation, head entity index representation, tail entity index representation and mask index into the softmax layer of the second training model, so that the softmax layer outputs the relationship between at least two first entities, compares the output relationship between each two first entities with the relationship annotation classification of the same two first entities, performs back propagation according to the comparison result and a loss function of the second training model, iteratively updates the parameters of the second training model until the function value of the loss function is the minimum value, and obtains the trained second training model.
[0015] Further, the entity structured knowledge base comprises a plurality of entity data; each entity data comprises a first entity and a representation vector corresponding to the first entity; and the representation vector of the first entity is obtained by inputting the first entity into the first training model.
[0016] In a second aspect, the present application provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the entity structuring and disambiguation method as described above when executing the computer program.
[0017] In a third aspect, the present application provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the entity structuring and disambiguation method as described above.
[0018] Compared with the prior art, the present application has the following advantages:
[0019] The method for entity structuring and disambiguation provided by the present application is used for processing the ambiguity of the first entity in the text data, and supplementing and structuring the first entity, so that the reference of the first entity is more clear and explicit. The method uses two trained models to obtain the label classification and relationship classification of the first entity, and uses the associated relationship of the first entity to supplement the problem of unclear reference of the first entity, so that the information of the entity with unclear reference is more clear and rich. The first entity and another first entity having an associated relationship, or only the other first entity or the first entity with explicit reference, are input into an entity structuring knowledge base, so that the closest result is obtained as the disambiguation result of the first entity with unclear / explicit reference. The method provided by the present application uses the associated relationship of the entity, and combines the knowledge base to further supplement and structure the first entity in the text data, so that the ambiguity of the unclear entity can be effectively eliminated. BRIEF DESCRIPTION OF DRAWINGS
[0020] Figure 1 FIG. 1 is a flowchart of the structuring and disambiguation method steps S110-S180 in the embodiment 1 of the present application.
[0021] Figure 2 FIG. 2 is a flowchart of the training method steps T110-T140 of the first training model in the embodiment 1 of the present application.
[0022] Figure 3 FIG. 3 is a schematic diagram of the example processing process of the first training model in the embodiment 1 of the present application.
[0023] Figure 4 FIG. 4 is a flowchart of the training method steps D110-D140 of the second training model in the embodiment 1 of the present application.
[0024] Figure 5 FIG. 5 is a schematic diagram of the example processing process of the second training model in the embodiment 1 of the present application.
[0025] Figure 6 FIG. 6 is a schematic diagram of the example annotation of the text data in the embodiment 2 of the present application. DETAILED DESCRIPTION
[0026] The drawings of the present application are only used for illustrative description, and cannot be understood as a limitation of the present application. In order to better illustrate the following embodiments, some components in the drawings may be omitted, enlarged or reduced, and do not represent the size of the actual product; it is understandable for those skilled in the art that some known structures and their descriptions in the drawings may be omitted.
[0027] Embodiment 1
[0028] This embodiment provides a method for entity structuring and disambiguation, which can be used to disambiguate and structure entities in text data, making the reference of entities clearer, making it easier and faster to determine the meaning of the entities, and structuring entities helps to provide more information related to the entities.
[0029] like Figure 1 As shown, the method includes the following steps:
[0030] S110, Collect text data;
[0031] Text data refers to data to be processed. Text data includes several primary entities, which are entities of the same type, such as people, items, or addresses in the text data.
[0032] S120. Input the text data into the trained first training model so that the first training model outputs the label classification of all first entities in the text data;
[0033] Tag classification includes explicit and implicit referential categories. An explicit referential first entity refers to a specific and unique thing that can be identified from the content of the first entity, while an implicit referential first entity refers to a specific and unique thing that cannot be identified from the content of the first entity.
[0034] Specifically, such as Figure 2 As shown, the training process of the first training model includes the following steps:
[0035] T110, Obtain historical text data;
[0036] T120. Input the labeled historical text data into the first training model;
[0037] The labeling process categorizes all first entities in historical text data into those with explicit or implicit referential meanings. In a specific implementation, the first training model is a BERT pre-trained model.
[0038] T130. The first training model obtains the word segmentation representation, sentence segmentation representation, and position representation of historical text data, and inputs the obtained word segmentation representation, sentence segmentation representation, and position representation into the CRF layer of the first training model so that the CRF layer outputs the label of each first entity.
[0039] Taking the first entity as the address as an example, such as Figure 3As shown, the text data "I live in Jing'an community on November 5th" is input into the first training model, the first training model obtains the word segmentation features, sentence segmentation features and position features in the text data, and inputs the three into the CRF layer, so that the CRF layer outputs the B-I-O information of each character and the label of the first entity. B-I-O means that each element is labeled as "B-X", "I-X" or "O". Among them, "B-X" means that the segment where the element is located belongs to X type and the element is at the beginning of the segment, "I-X" means that the segment where the element is located belongs to X type and the element is at the middle position of the segment, and "O" means not belonging to any type. For example, Figure 3 As shown, since the first entity is an address, i.e. "Jing'an community" in the text data, the characters "I", "live", "in" and "11", "month", "5", "day" all belong to "O", "Jing" belongs to the beginning of the address loc and is labeled as "B-loc", "An", "small" and "district" belong to the middle position of the address loc and are labeled as "I-loc".
[0040] T140, compare the output label of each first entity with the label of the same first entity, and perform back propagation according to the comparison result and the loss function of the first training model, and iteratively update the parameters of the first training model until the function value of the loss function is the minimum value, to obtain the trained first training model.
[0041] In this step, the loss function of the first training model is selected as the cross entropy loss function, i.e. loss = ∑ i P labell og P pred , wherein P label is the value corresponding to the label annotated category, and P pred is the value corresponding to the output label.
[0042] S130, judging each first entity: judging whether the label category of the first entity is unambiguous or not, if yes, executing step S140; if no, executing step S150;
[0043] S140, inputting the unambiguous first entity into the constructed entity structured knowledge base, so that the entity structured knowledge base outputs the most similar result to the unambiguous first entity as the disambiguation result of the unambiguous first entity, and repeating step S130 until all first entities are judged;
[0044] The entity structured knowledge base comprises a plurality of entity data, each entity data comprising a first entity and a representation vector corresponding to the first entity, and the representation vector of the first entity is obtained by inputting the first entity into a first training model. The entity structured knowledge base is a knowledge base constructed by a network crawler or information obtained from other information open platforms. The entity data in the knowledge base is structured data.
[0045] S150, inputting the first entity referring to the ambiguous entity into the trained second training model, so as to make the second training model output a relationship classification related thereto and another first entity corresponding to each related relationship classification.
[0046] The relationship classification comprises an equivalence relationship and a similarity relationship. When the relationship between the two first entities is an equivalence relationship, it means that the things referred to by the two first entities are the same and equivalent. When the relationship between the two first entities is a similarity relationship, it means that the things referred to by the two first entities are similar and close, but not the same.
[0047] Specifically, as shown in Figure 4 The training process of the second training model comprises the following steps:
[0048] D110, obtaining historical text data;
[0049] D120, inputting the historical text data with relationship annotation into the second training model;
[0050] The relationship annotation is to divide the relationship between at least two first entities in the historical text data into an equivalence relationship or a similarity relationship. In a specific embodiment, the second training model is a Bi-LSTM (Bidirectional Long Short-Term Memory Network) model.
[0051] D130, the second training model obtains a word segmentation representation of the historical text data, divides the historical text data into a head entity index representation and a tail entity index representation according to the positions of the first entities, and determines a mask index of the historical text data according to the regions between the first entities; inputting the word segmentation representation, the head entity index representation, the tail entity index representation and the mask index into the softmax layer of the second training model, so as to make the softmax layer output the relationship between the at least two first entities;
[0052] Taking the first entity as an address as an example, as shown in Figure 5As shown, the text data "I live in Jing'an Community and arrive home at 11 o'clock" is input into the second training model. The second training model obtains the word segmentation features in the text data and divides the historical text data into head entity index representations and tail entity index representations according to the head entity position and tail entity position of the first entity. In this text data, both "Jing'an Community" and "home" are the first entities. When obtaining the head entity index representation, "Jing" is the first character of the first entity "Jing'an Community" with a prior position, that is, it belongs to the head entity position. Therefore, the head entity index of "Jing" is E0, and the character index positions before it are arranged in sequence as E -3 、E -2 and E -1 , and the character index positions after it are arranged in sequence as E1 to E9. When obtaining the tail entity index representation, "home" is the first character of the first entity "home" with a posterior position, that is, it belongs to the tail entity position. Therefore, the tail entity index is E0, and the character index positions before it are arranged in sequence as E -11 ~E -1 , and the character index position after it is arranged as E1. The historical text data is divided into mask representations according to the region between the first entities. The mask index from the start of the appearance of the first entity "Jing'an Community" to the end of the first entity "home" is E2, the mask index before the position of the first entity "Jing'an Community" is E1, and the mask index after the position of the first entity "home" is E3.
[0053] D140. Compare the relationship between every two output first entities with the classification of the relationship annotation of the same two first entities. According to the comparison result and the loss function of the second training model, perform backpropagation and iteratively update the parameters of the second training model until the function value of the loss function is the minimum value, and obtain the trained second training model.
[0054] In this step, the cross-entropy loss function is selected as the loss function of the second training model, that is, loss = ∑ i P label log P pred , where P label is the value corresponding to the classification of the relationship annotation, and P pred is the value corresponding to the output relationship.
[0055] S160. Judge each first entity with unclear reference: Judge whether there is a relationship classification of equivalent relationship for the first entity with unclear reference. If so, execute step S170; if not, execute step S180;
[0056] S170. Input another first entity that has an equivalent relationship with the first entity whose referent is ambiguous into the constructed entity structured knowledge base, so that the entity structured knowledge base outputs the result that is most similar to the other first entity, as the disambiguation result of the first entity whose referent is ambiguous. Repeat step S160 until all first entities whose referents are ambiguous are judged.
[0057] S180. The first entity with ambiguous referent and another entity with a similar relationship are concatenated and input into the constructed entity structured knowledge base, so that the output of the entity structured knowledge base is most similar to both the first entity with ambiguous referent and the other first entity, and this is used as the disambiguation result of the first entity with ambiguous referent.
[0058] Specifically, the method of combining an ambiguous first entity with another entity that has a similar relationship to it can be to input the entity structured knowledge base in the form of "another similar entity + an ambiguous first entity".
[0059] The entity structuring and disambiguation method provided in this embodiment is used to handle potential ambiguities in text data regarding a first entity, and to supplement and structure the information of the first entity, making its referent clearer. This method utilizes two trained models to obtain the label classification and relationship classification of the first entity. Using the association relationships of this first entity, another first entity can be used to compensate for the ambiguity in the referent of the first entity, making the information of the ambiguous entity clearer and richer. Another first entity with which the first entity has an association, or simply another first entity or a first entity with a clear referent, is input into the entity structuring knowledge base to obtain the closest result, which serves as the disambiguation result for the ambiguous / clear referent of the first entity. The method provided by this invention utilizes entity association relationships and, in conjunction with a knowledge base, can further supplement and structure the first entity in text data, effectively eliminating the ambiguity of unclear entities.
[0060] Example 2
[0061] Based on the same concept as in Embodiment 1, this embodiment provides a method for address structuring and disambiguation.
[0062] The method includes the following steps:
[0063] S210. Collect text data containing addresses;
[0064] S120. Input the text data into the trained first training model so that the first training model outputs the label classification of all address entities in the text data.
[0065] The tag categories include two tags: location_clear and location_unclear, which represent explicit address reference and implicit address reference, respectively.
[0066] like Figure 6 As shown, for example, the labels for “XX Community”, “XX Garden”, and “XX Store” are location_clear, while the labels for “Company”, “Home”, and “Market” are location_unclear.
[0067] S230. For each address entity, determine whether the label classification of the address entity is clearly descriptive. If yes, proceed to step S240; otherwise, proceed to step S250.
[0068] S240. Input the first entity labeled location_clear into the constructed entity structured knowledge base so that the entity structured knowledge base outputs the result that is most similar to the first entity of location_clear, and use it as the disambiguation result of the first entity of location_clear. Repeat step S130 until all first entities are judged.
[0069] In this embodiment, the entity structured knowledge base is a knowledge base of the address list of institutions in the region built by methods such as web crawling and connecting to the public open platform API of the map. The knowledge base includes several institutions, each of which contains detailed structured addresses, latitude and longitude, contact numbers, etc. Each institution has been assigned a representation vector by the first training model.
[0070] S250. Input the first entity labeled location_unclear into the trained second training model so that the second training model outputs the relation classification associated with it, and another address entity corresponding to each relation classification.
[0071] Relationship classification includes two labels: equal and near, which refer to equivalence relations and similarity relations, respectively. For example... Figure 6 As shown, for example, "XX Community" and "Home" refer to the same address, so the relationship between the two is classified as equal. Similarly, "XX Garden" and "Company" refer to adjacent addresses, so the relationship between the two is classified as near.
[0072] S260. For each location_unclear first entity, determine whether there is an equivalence relation classification for the location_unclear first entity. If yes, proceed to step S170; otherwise, proceed to step S180.
[0073] S270. Input another address entity that has an equal relationship with the address entity of the location_unclear into the constructed entity structured knowledge base so that the entity structured knowledge base outputs the result that is most similar to the other address entity as the disambiguation result of the address entity of the location_unclear. Repeat step S260 until all address entities of the location_unclear are judged.
[0074] S280. The address entity of location_unclear and another entity that has a near relationship with it are concatenated and input into the constructed entity structured knowledge base, so that the output of the entity structured knowledge base is the closest to the first entity of location_unclear and the other first entity, and is used as the disambiguation result of the first entity of location_unclear.
[0075] Specifically, the first entity of location_unclear and another entity that has a near relationship with it can be concatenated into the entity structured knowledge base in the form of "another entity with a similar address + an entity with an ambiguous address reference".
[0076] Obviously, the above embodiments of the present invention are merely examples for clearly illustrating the technical solution of the present invention, and are not intended to limit the specific implementation of the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the claims of the present invention should be included within the protection scope of the claims of the present invention.
Claims
1. A method for entity structuring and disambiguation, characterized in that, include: Collect text data; the text data includes several first entities; The text data is input into a trained first training model so that the first training model outputs the label classification of all first entities in the text data; the label classification includes explicit and implicit referents. When the label of the first entity is classified as having a clear reference, the first entity with a clear reference is input into the constructed entity structured knowledge base so that the output of the entity structured knowledge base is the closest to the first entity with a clear reference, which is used as the disambiguation result of the first entity with a clear reference. When the label classification of the first entity is ambiguous, the first entity with ambiguous referent is input into the trained second training model so that the second training model outputs the relation classification related to it, as well as another first entity corresponding to each relation classification; the relation classification includes equivalence relation and similarity relation; When there is an equivalent relation classification for a first entity with an ambiguous referent, another first entity with an equivalent relation is input into the constructed entity structured knowledge base so that the entity structured knowledge base outputs the result that is closest to the other first entity, which is used as the disambiguation result for the ambiguous first entity. When the first entity with ambiguous referent only has a similar relationship classification, the first entity with ambiguous referent and another entity with similar relationship with it are input into the constructed entity structured knowledge base, so that the entity structured knowledge base outputs a result that is most similar to both the first entity with ambiguous referent and the other first entity, as the disambiguation result of the first entity with ambiguous referent.
2. The method for entity structuring and disambiguation according to claim 1, characterized in that, The first entity with a clear referent is input into the constructed entity structured knowledge base so that the output of the entity structured knowledge base is the closest to the first entity with a clear referent. Specifically, this includes: After inputting the clearly identified first entity into the constructed entity structured knowledge base, the similarity of the representation vectors of the clearly identified first entity and the entity data in the entity structured knowledge base is calculated, and the entity data with the highest similarity is output as the result that is closest to the clearly identified first entity. Input another first entity that has an equivalent relationship with it into the constructed entity structured knowledge base, so that the entity structured knowledge base outputs a result that is most similar to the other first entity, specifically including: After inputting another first entity with which it has an equivalent relationship into the constructed entity structured knowledge base, the other first entity with which it has an equivalent relationship is compared with the entity data in the entity structured knowledge base to calculate the similarity of the representation vectors. The entity data with the highest similarity is output as the result that is most similar to the other first entity.
3. The method for entity structuring and disambiguation according to claim 1, characterized in that, The ambiguous first entity and another entity with a similar relationship to it are input into the constructed entity structured knowledge base, so that the entity structured knowledge base outputs a result that is most similar to both the ambiguous first entity and the other first entity. Specifically, this includes: The first entity with ambiguous referent and another entity with a similar relationship are concatenated and input into the constructed entity structured knowledge base. The concatenated entity data and the entity data in the entity structured knowledge base are used to calculate the similarity of the representation vectors. The entity data with the highest similarity is output as the result that is most similar to both the first entity with ambiguous referent and the other first entity.
4. The method for entity structuring and disambiguation according to any one of claims 1 to 3, characterized in that, The first training model is obtained by inputting labeled historical text data into the first training model for training; The labeling is used to classify all first entities in historical text data into entities with clear referents or entities with unclear referents.
5. The method for entity structuring and disambiguation according to claim 4, characterized in that, The training process of the first training model specifically includes: inputting labeled historical text data into the first training model so that the first training model can obtain word segmentation representation, sentence segmentation representation, and position representation of the historical text data; inputting the obtained word segmentation representation, sentence segmentation representation, and position representation into the CRF layer of the first training model so that the CRF layer outputs a label for each first entity; comparing the output label of each first entity with the classification of the label annotation of the same first entity; performing backpropagation based on the comparison result and the loss function of the first training model; iteratively updating the parameters of the first training model until the function value of the loss function is minimized, thereby obtaining the trained first training model.
6. The method for entity structuring and disambiguation according to any one of claims 1 to 3, characterized in that, The trained second training model is obtained by inputting historical text data with relation annotations into the second training model for training; The relationship labeling is used to classify the relationship between at least two first entities in the historical text data into equivalence relations or similar relations.
7. The method for entity structuring and disambiguation according to claim 6, characterized in that, The training process of the second training model specifically includes: inputting historical text data with relation annotations into the second training model so that the second training model can obtain the word segmentation representation of the historical text data; dividing the historical text data into head entity index representation and tail entity index representation according to the position of the first entity; determining the mask index of the historical text data according to the region between the first entities; inputting the word segmentation representation, head entity index representation, tail entity index representation and mask index into the softmax layer of the second training model so that the softmax layer outputs the relationship between at least two first entities; comparing the output relationship between each pair of first entities with the classification of the relationship annotation of the same two first entities; performing backpropagation based on the comparison result and the loss function of the second training model; iteratively updating the parameters of the second training model until the function value of the loss function is minimized, thus obtaining the trained second training model.
8. The method for entity structuring and disambiguation according to any one of claims 1 to 3, characterized in that, The entity structured knowledge base includes several entity data; each entity data includes a first entity and a representation vector corresponding to the first entity; the representation vector of the first entity is obtained by inputting the first entity into a first training model.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the entity structuring and disambiguation method according to any one of claims 1 to 8.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the entity structuring and disambiguation method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Method and apparatus for automatic entity disambiguation
US20070067285A1
System and method for resolving entity coreference
US20130311467A1