| Task-based human-machine dialogue has developed so far,and there are various ways to obtain information.Humans hope to have a more convenient way to directly obtain the information they need by chatting with machines.However,when the semantic information is too long in natural language generation,the generated results often do not answer what was asked,and the generated responses are often too rigid.Therefore,this paper proposes a new solution to the problem of human-machine dialogue semantic input and language generation.First,in order to solve the problem of semantic forgetting or semantic loss in human-machine dialogue language generation models,this thesis proposes a semantic input strategy based on domain knowledge graph.Through entity extraction and relation extraction of domain datasets,the method of constructing triples of domain semantic knowledge can enhance the effectiveness of the model.The domain knowledge spectrum is constructed according to the professional knowledge entities in the domain and the relationship between entities,and the Trans E model is used to train the entity relationship,so as to obtain the entity relationship vector representation,which is used as the basis for the semantic input of the subsequent language generation model.Second,LSTM-based language generation models also have problems such as poor semantic alignment and semantic forgetting,which make the semantics generated in multiple rounds of cross-domain dialogue inaccurate.Therefore,this thesis proposes a context encoder and introduces a hierarchical attention mechanism,so that the language generation model can perceive the context of the current moment,and further increase the model’s ability to control semantics,so that the model can generate a context that conforms to the context.Thirdly,the system question generation in traditional dialogue is mostly based on templates and rules.This method is similar to cloze when generating questions,but only fills in key information into the corresponding slots.The question statement is single and rigid,a template-based encoding and decoding method is proposed to generate the problem for this problem.Finally,effective experiments are conducted on the proposed knowledge graph-based language generation model on the Multi WOZ dataset,which is evaluated from two aspects,BLUE and ERR. |