The invention discloses a
diffusion enhancement relation-based triple extraction method, which comprises the following steps of: 1) inputting a Chinese text into a BERT model, and converting the Chinese text into a corresponding index to obtain
word embedding information; 2) inputting
word embedding information into a triple
diffusion model, and performing
noise addition,
feature fusion and de-noising
processing to obtain a predicted triple; 3) inputting
word embedding information into the character
feature extraction network model, learning
semantic information through a multi-layer
perceptron and a double-affine attention mechanism in combination with relative position coding and a multi-head attention module, relieving a
label imbalance problem by adopting a word embedding disturbance mechanism, and outputting a relation triple matrix; and 4) respectively decoding the triads obtained in the two steps, and taking union sets to obtain a final relation triad. According to the method, the boundary
diffusion information and the character-level
semantic information are fused, so that the problems that Chinese
semantics are complex, natural separators are lacked, small-
field data semantics extraction is insufficient, extraction of a traditional decoding method is incomplete, labels are unbalanced and the like are effectively solved, the accuracy and integrity of Chinese relation triple extraction and model stability are remarkably improved, and the method is suitable for large-scale popularization and application. The method is suitable for various
natural language processing application scenes such as information
questions and answers and
search engine optimization.