The application discloses an
open domain dialogue method based on dialogue structure graph constraint, which comprises the following steps: after obtaining the dialogue
sentence vector representation of an
encoder, a new comparative learning
loss function is designed by using the features of dialogue sequence and correlation to further
train, so that dialogue
sentence vectors containing sufficient
semantics are obtained; the newly obtained dialogue
sentence vectors are clustered to obtain topic-level
sentence clustering; finally, the transfer of topics in the dialogue
data set is imitated by using
imitation learning to construct a topic-level dialogue structure graph, i.e., the transfer between clusters, and the
text generation of the autoregressive decoder is constrained by the dialogue structure graph. By using comparative learning to fully extract sentence meaning information and using
imitation learning to obtain a dialogue structure graph and predict the next round of dialogue topics, the correlation between generated dialogue and topics is well constrained, and the overall dialogue fluency is improved.