| In recent years,our country attaches great importance to the informatization development of sheep industry.The establishment of sheep breeding question and answer system can help farmers get information quickly and accurately,and promote the development of sheep breeding information.In order to help sheep farmers solve the problem of difficult query of breeding information,this paper established a sheep breeding knowledge database based on question answering pair,and studied the question classification algorithm and question similarity calculation algorithm using deep learning model.On this basis,a sheep breeding question answering system was designed and implemented.The main work of this paper is as follows:(1)Establish sheep breeding classification data set and question pair data set.2500 basic sheep raising questions were sorted out based on the question and answer books related to sheep breeding,and 12000 questions were obtained by crawler on this basis,which were sorted and classified to obtain the breeding classification data set,and the12000 sentences were matched to obtain 72260 question pair data set.(2)Study the classification algorithm of sheep breeding questions.In this study,BILSTM and CNN are combined to extract features from sentence word vector matrix,and then the extracted feature vectors are input into Softmax function to classify questions.By adjusting model parameters through experiments and comparing with CNN and LSTM classification methods,the F1 value of the proposed method is improved by 5.8% and 3.4%respectively,reaching 95.8%,which improves the classification effect of questions to a certain extent.(3)Study the similarity calculation method of sheep breeding questions.In this study,we analyzed sheep breeding questions,firstly extracted the editing distance,N-gram similarity,word frequency,Jaccard similarity,word vector similarity and other features of questions by traditional methods,and took the results of three deep learning-based question similarity calculation methods as features.The similarity calculation model was then trained by integrating all the multi-angle extracted features and Stacking algorithms.The experimental results show that the F1 value of the question similarity calculation algorithm reaches 98.6%,which improves the accuracy of similarity calculation to some extent.(4)Design and implement web-based sheep breeding question answering system.The system takes the self-constructed sheep breeding questions data set as the knowledge base and is stored in MYSQL database.The above questions classification model and question similarity model are taken as the core,and the Web end is developed by Flask framework.Users can use natural language to ask questions.The system will preprocess questions,classify questions,calculate the similarity between questions and questions in the same category in the knowledge base,sort the results,and then return the three questions with the highest similarity and their answers to users. |