| Natural language processing(NLP)is a new discipline integrating computer technology,programming linguistics and computer technology.Natural language processing refers to various theories and methods that computer system can effectively communicate with people in natural language after artificial processing.By using natural language processing,humans can perform many more complex tasks,such as speech recognition,machine translation,text recognition,automatic summarization,and so on.In recent years,natural language processing to dialogue generated field,focuses on the customer service robots for task-based and chatting type intelligent voice assistant,customer service robots by receiving user instructions to accomplish a specific task,and the development of apple’s smart Siri voice assistant,not only can chat with users,can also receive the task-based instruction,It has greatly facilitated People’s Daily life.In this paper,SGA session model is studied and proposed.SGA model is based on sequence to sequence model(Seq2Seq),using the gated loop module(GRU)in deep learning as encoder and decoder,and combining the Attention mechanism and Beam Search algorithm.An open domain generated chatbot is implemented by training a dialogue corpus with a small yellow chicken.In the experiment,the data is preprocessed firstly to remove long sentences and words with low frequency and form sentence pairs.After word segmentation,the dictionary is constructed.Secondly,the model is designed.The similarity score between the implicit state of each time node and the output of the encoder is calculated,and the weight probability is output after the softmax function is calculated.The word with the highest probability is selected as the input of the next moment with Beam Search algorithm,and the final output is restored to the text,and the evaluation indicators are obtained and compared.The experimental results show that the dialogue generation model based on the combination of GRU and attention mechanism is better than the traditional single model,and the confusion degree is reduced from 35.36 to 11.58.Bleu-1 was raised from 0.367 to 0.75,Bleu-2 from0.122 to 0.158,Ble U-3 from 0.055 to 0.110,and Ble U-4 from 0.028 to 0.106.The readability of the robot’s reply and the coherence of the context of the dialogue were improved,and the robot’s answers were more vivid and emotional,which fully verified the superiority of the model. |