Search

CN-121980014-A - Entity relationship joint extraction method and system

CN121980014ACN 121980014 ACN121980014 ACN 121980014ACN-121980014-A

Abstract

The invention relates to the technical field of natural language processing, in particular to a method and a system for entity relationship joint extraction. The semantic drift under long-distance dependence is restrained by the whole sentence semantic focusing unit in the channel dimension convergence span semantic clues, the relative direction and distance information between the entities is converted into a leachable modulation quantity by the entity pair geometric prior injection unit to reduce pairing ambiguity, the main object and object characterization is distinguished by the main object orientation interaction unit to carry out orientation convergence so as to avoid role confusion, and finally, the joint prediction of entity boundaries and relationship types is realized in a unified frame. The system can remarkably improve the stability and accuracy of extraction results under the scene of multi-entity coexistence and relationship overlapping, reduce entity boundary crossing and host-guest inversion errors, directly generate the structured triples without depending on post-processing rules, and provide a more reliable solution for application such as knowledge graph construction, text analysis and the like.

Inventors

  • ZHANG XIAOQIN
  • Nie Shuhan
  • LU YANJUN
  • ZHU XIAOFEI

Assignees

  • 重庆市信息通信咨询设计院有限公司
  • 重庆理工大学

Dates

Publication Date
20260505
Application Date
20260408

Claims (7)

  1. 1. The entity relationship joint extraction method is characterized by comprising the following steps: Acquiring basic semantic representation of an input text; Performing global semantic aggregation on the basic semantic representation to generate a semantic enhancement representation; constructing candidate entity pairs based on the semantic enhancement representation, introducing geometric structure information between the candidate entity pairs, and generating structure-aware entity pair characteristics; Performing role distinguishing and directional interaction of the subject and the object on the structural perceived entity pair characteristics to generate directional interaction characteristics; based on the directional interaction characteristics, carrying out relationship type discrimination and entity boundary joint prediction on the candidate entity pairs, and outputting entity relationship triples; The step of performing role distinguishing and directional interaction of the subject and the object on the feature by the entity perceived by the structure to generate a directional interaction feature comprises the following steps: Mapping the entity pair characteristics perceived by the structure to a subject characteristic space and a object characteristic space respectively to obtain a subject characterization and an object characterization; The object characterization is weighted and converged by taking the object characterization as a reference to obtain a subject side convergence feature, and the object characterization is weighted and converged by taking the object characterization as a reference to obtain an object side convergence feature; and fusing the subject characterization, the object characterization, the subject side convergence feature and the object side convergence feature to generate the directional interaction feature.
  2. 2. The method for entity-relationship joint extraction as set forth in claim 1, wherein said performing global semantic aggregation on the underlying semantic representation comprises: And performing multi-head attention operation on the channel dimension of the basic semantic representation to gather the span-span semantic cues within the whole sentence range and generating the semantic enhancement representation.
  3. 3. The method for joint extraction of entity relationships according to claim 2, wherein said performing multi-headed attention operations on the channel dimensions of the underlying semantic representation comprises: Converting the basic semantic representation into a channel priority representation; generating query, key and value features by using the dilation convolution; And calculating the attention weight in the channel dimension, carrying out weighted fusion on the attention weight, recovering the attention weight to be the sequence priority representation, and carrying out residual fusion and normalization on the attention weight and the input semantic representation to obtain the semantic enhancement representation.
  4. 4. The method for joint extraction of entity relationships according to claim 3, wherein said introducing geometric information between said candidate entity pairs comprises: Acquiring relative displacement between the main body position and the object position in the candidate entity pair, wherein the relative displacement comprises relative direction information and relative distance information; mapping the relative displacement to a learnable geometric modulation quantity; And adjusting the basic representation of the candidate entity pair by utilizing the geometric modulation quantity to generate the entity pair characteristics perceived by the structure.
  5. 5. The method for joint extraction of physical relationships according to claim 4, wherein said mapping said relative displacement to a learnable amount of geometric modulation comprises: barrel division mapping is carried out on the relative displacement, and continuous displacement values are discretized into barrel indexes; And inquiring a corresponding modulation vector from a learnable parameter table based on the bucket index to serve as the geometric modulation quantity.
  6. 6. The method for joint extraction of entity relationships according to claim 5, wherein said performing relationship type discrimination and joint prediction of entity boundaries on said candidate entity pairs based on said directional interaction features comprises: Mapping the directional interaction characteristics to a discrimination space under the relation condition aiming at each preset relation type; in the judging space, distributing a structure label for each candidate entity pair, wherein the structure label is used for simultaneously identifying the corner combination relation of the main body boundary and the object boundary; And decoding to obtain the entity relation triplet meeting the boundary closure constraint based on the prediction result of the structural label.
  7. 7. A system for entity-relationship joint extraction, comprising: the semantic representation construction module is used for acquiring semantic representations of the input text; The global semantic aggregation module is used for carrying out global semantic aggregation on the semantic representation to generate enhanced semantic representation; the geometric prior injection module is used for constructing candidate entity pairs based on the enhanced semantic representation, introducing geometric structure information between the candidate entity pairs and generating entity pair characteristics of structural perception; The main and guest body directional interaction module is used for distinguishing and directionally interacting roles of the main body and the guest body on the characteristics of the entity perceived by the structure to generate directional interaction characteristics; The joint prediction module is used for judging the relationship type of the candidate entity pair based on the directional interaction characteristics and performing joint prediction on the relationship type and the entity boundary, and outputting an entity relationship triplet; The step of performing role distinguishing and directional interaction of the subject and the object on the feature by the entity perceived by the structure to generate a directional interaction feature comprises the following steps: Mapping the entity pair characteristics perceived by the structure to a subject characteristic space and a object characteristic space respectively to obtain a subject characterization and an object characterization; The object characterization is weighted and converged by taking the object characterization as a reference to obtain a subject side convergence feature, and the object characterization is weighted and converged by taking the object characterization as a reference to obtain an object side convergence feature; and fusing the subject characterization, the object characterization, the subject side convergence feature and the object side convergence feature to generate the directional interaction feature.

Description

Entity relationship joint extraction method and system Technical Field The invention relates to the technical field of natural language processing, in particular to a method and a system for entity relationship joint extraction. Background The entity relationship joint extraction aims to complete entity boundary identification and relationship classification in the same flow, and is a basic link of application such as knowledge graph construction, intelligent retrieval, risk event analysis and the like. In actual text, sentence-based structures tend to present a high degree of complexity, with a large number of sentences containing multiple entities, multiple relational cues, and semantic dependencies across phrases, and even across clauses. The complex sentence pattern has the characteristics of long-distance semantic dependency, overlapping relation, obvious change of relative azimuth and span of an entity pair and the like, and the same entity often participates in a plurality of relation facts. Under the above conditions, the extraction system not only needs to identify local trigger words, but also must maintain the aggregate consistency of semantic cues within the full sentence range, while imposing effective constraints on the structural relationships of entity pairs. The existing joint extraction scheme is used for carrying out unified coding based on sequence characteristics, and then completing joint prediction of entities and relations on the representation. The scheme has the advantages that good effects can be achieved on simple sentence patterns, obvious defects exist in complex sentence pattern scenes, firstly, semantic information is gradually diffused in multi-layer feature transformation, semantic cues crossing long distances are difficult to maintain concentrated representation, prediction result fluctuation is increased, secondly, structural relations among entity pairs are processed implicitly, a system lacks explicit constraint on geometric elements such as relative directions and distances, entity pairing ambiguity is easy to occur in a scene where overlapping facts coexist with multiple entities, thirdly, the relation deduces character differences of a naturally-occurring subject and an object, but the existing method mostly adopts symmetrical information interaction or shared representation update, so that the subjects and the objects are difficult to maintain character division in the interaction process, and the problems of semantic mixing, host-guest interaction or pairing closure failure and the like are more likely to occur under the complex sentence patterns. The above drawbacks limit the engineering usability of existing methods in high-fact-density text. Disclosure of Invention Aiming at the defects existing in the prior art, the invention aims to provide a method and a system for entity relation joint extraction, which are used for solving the technical problems that the semantic clues are difficult to maintain centralized characterization, the structural relations among entities are more implicitly processed and the roles and the division of the host and the object are difficult to maintain in the interaction process in the prior art joint extraction scheme under a complex sentence type scene. In order to achieve the above purpose, the present invention adopts the following technical scheme: a method for entity relation joint extraction includes the steps: Acquiring basic semantic representation of an input text; Performing global semantic aggregation on the basic semantic representation to generate a semantic enhancement representation; constructing candidate entity pairs based on the semantic enhancement representation, introducing geometric structure information between the candidate entity pairs, and generating structure-aware entity pair characteristics; Performing role distinguishing and directional interaction of the subject and the object on the structural perceived entity pair characteristics to generate directional interaction characteristics; And based on the directional interaction characteristics, carrying out relationship type discrimination and entity boundary joint prediction on the candidate entity pairs, and outputting entity relationship triples. Further, the performing global semantic aggregation on the basic semantic representation includes: And performing multi-head attention operation on the channel dimension of the basic semantic representation to gather the span-span semantic cues within the whole sentence range and generating the semantic enhancement representation. Further, the performing a multi-headed attention operation on the channel dimension of the underlying semantic representation includes: Converting the basic semantic representation into a channel priority representation; generating query, key and value features by using the dilation convolution; And calculating the attention weight in the channel dimension, carrying out weighted fusion