The invention discloses a
knowledge graph construction method based on a long and
short term memory network introducing an attention mechanism, and the method specifically comprises the steps: S1, carrying out the
sentence segmentation and word segmentation preprocessing of a
data set, including the removal of
noise, special characters and stop words; s2, performing BIOES
label labeling on the data after word segmentation, and introducing a hierarchical relationship; s3, word vector representation is established, a BERT model is introduced to capture context information, and deep semantic understanding is provided for word vectors; s4, establishing a Bi-LSTM neural
network layer, obtaining a
score probability of each word corresponding to each tag by using the Bi-LSTM neural
network layer, adding an attention mechanism behind the Bi-LSTM layer, and capturing a long-distance dependency relationship; s5, establishing a CRF-GNN layer, and obtaining an output labeling sequence with the maximum probability; and S6, carrying out post-
processing on the extracted information. According to the method, the Bi-LSTM model and the CRF model are fused, corresponding constraints can be given to the tag sequence, and the problem that
information extraction output logic is disordered is solved.