| With the increasing pressure of people’s lives and the increase in their concern for their own health,mental health has increasingly become the focus of attention.The data on the psychological side of the Internet is also becoming more and more abundant,but in the face of this massive amount of data,it is difficult for people to obtain correct and useful information from it.In the face of this situation,through knowledge graph technology,it can help people effectively integrate massive mental illness data.On the basis of the knowledge graph,by building a question answering system,timely feedback of users’ questions,and using the method of knowledge graph visualization,it has certain theoretical and practical value.In this paper,a knowledge graph is constructed for the field of mental illness,and then a question answering system based on the knowledge graph is designed,and finally the question and answer system is implemented and the knowledge graph visualization function is provided.The main research contents of this paper are as follows:(1)Construction of knowledge graph in the field of mental illness.First,crawl data from mental illness professional websites through crawler technology;Then,according to the characteristics of the data,determine the required entities and relationships,and extract them from the website data;Finally,the extracted data is stored in the Neo4 j graph database.(2)Design of question answering system based on knowledge graph.The question answering system consists of three parts: the extraction of entities in the user question,the classification of intent,and the output of answers.The entity extraction in the user questionnaire mainly adopts the Bi LSTM-CRF model based on word frequency.For the intention classification of question sentences,the classification method based on feature words and Softmax is mainly adopted.For answer retrieval,according to the entities and intentions obtained in the previous two steps,create a Cypher statement and query the answer in the Neo4 j graph database.(3)The realization of the psychological counseling question and answer system platform.The Vue framework is combined with D3 visualization tools to visualize the knowledge graph in the front-end,supplemented by displaying information in the form of tables.The psychological question answering function uses the lightweight Flask framework to build a question answering system platform and display the user’s answers to the user’s questions in the form of text.In summary,this paper designs and implements a psychological question answering system based on knowledge graph,which can timely feedback users’ questions,and display the answers to questions in the form of text,and at the same time,through the visualization of knowledge graph,the relevant information of mental illness is displayed to users,which meets the needs of users and has certain practical value and significance. |