| With the new medical reform policy rolled out and implemented,our country’s basic medical and health system has gradually covered urban and rural residents.However,medical resources are still scarce.It is urgent to provide residents with effective,safe,convenient and cheap health care services.In order to save precious medical resources and offer patients effective treatment,we should develop the inquiry system.The inquiry system has important theoretical significance and wide application value.The dialogue model is the key of the inquiry system.In order to build the system,this thesis studies collection and training of corpus,optimization of the dialogue model and neural network,improvement of Brain Storm Optimization algorithm.The main contents of this paper are as follows:Firstly,we write programs to get and deal with training corpus which are needed in the dialogue model to solve the lack of corpus.Next,we study difficulties and problems in Chinese word segmentation.We choose to use jieba after comparing several common word segmentation algorithms.It is difficult to distinguish medical professional terms from other words accurately.To solve this problem,a professional term dictionary of medical terms is needed to be built.The experimental results show that using the self-defined professional term dictionary helps improve the accuracy of word segmentation.Secondly,the dialogue model is studied and a program is written to realize an inquiry system.The basic seq2 seq model generates replies dynamically according to users’ input.These replies can be either long or short.In this paper,each unit structure of the dialogue model is LSTM neural network,and Glo Ve model is used to train words.Moreover,attention algorithm is integrated into the model to extract more important key information,and beam search is added in to improve the efficiency of generating replies.Most of results are accurate,however,some results are not very well when there are new words in the question.To solve this problem,using the same reply when many new words in questions,improving accuracy of model’s training and getting more training corpuses these methods are put forward.Thirdly,when studying the neural network structure in the dialog model,we find that different initialized parameters will affect efficiency and accuracy of LSTM’s training.We consider using BSO Algorithm to optimize initialized parameters of LSTM to improve the efficiency of the model.Aiming at the problem that BSO algorithm is easy to fall into local optimum,we come up with and apply an improved BSO algorithm based on Cauchy Variation and Adaptive Weight.The simulation results show that the efficiency and accuracy of the new algorithm are both increased.Finally,on the basis of above,an inquiry system is built.This system provides main function of consultation and basic functions of navigation,registration,login,detecting new words,and saving the dialogue content.This inquiry system can be used in many hospitals. |