| The progress of society and the fast pace of life cause people to bear pressure from many aspects.Mental health has a direct impact on people’s health.Due to the insufficient popularization of mental health knowledge and the imperfect development of the mental health service system,people lack the understanding of mental illness knowledge,and psychological problems cannot be well resolved.Therefore,it is of certain significance to build a mental health question answering system.The question answering system has the characteristics of convenience,concise answers,and reliability,and is a good choice for realizing mental health counseling services.As a better method for intelligently storing information at present,knowledge graph can provide a strong knowledge reserve for question answering system.Based on the knowledge graph construction technology,this paper designed a question answering system based on mental health,which allows users to describe problems in natural language,and can automatically analyze user questions,and finally return concise and reliable answers to users.The system can only give users some diagnostic opinions on mental health problems and help users understand the basic knowledge of relevant mental health,and cannot replace doctors for diagnosis.Starting from the diagnosis and treatment of mental diseases,in this paper,through the research and study of knowledge graph construction and question answering system design,a psychological question answering system through knowledge graph technology is constructed.The system can help counselors gain psychological knowledge in a timely and efficient manner.The main content of this article:Firstly,the construction of mental health domain knowledge map was realized.This paper collects mental health counseling corpus,and optimizes the BILSTM-CRF model to achieve knowledge extraction.In order to improve the efficiency of entity recognition,the mechanism of attention was added to the BILSTM-CRF model to assign word vector weights to capture more important semantic information.Using graph database Neo4 j to realize knowledge storage and visualization problems.The knowledge map constructed in this paper covers a large number of basic knowledge of mental illness,and provides a strong knowledge reserve for the question answering system.Secondly,the algorithm of question answering based on knowledge graph was designed.The realization of question answering system consists of three parts: question parsing,question classification and answer generation.In the problem analysis module,the entity extraction is completed by using the named entity recognition algorithm Bi LSTM-AttentionCRF of the knowledge graph building module.In the problem classification module,the support vector machine is used to complete the problem classification according to the designed problem type,and the AC multi-pattern matching algorithm is used to identify the problem entity.In the answer generation module,the entities and question category words in the obtained questions are encapsulated into a dictionary,converted into Cypher statements supported by Neo4 j to perform graph database query,and returned to the user’s desired answer.Thirdly,a question answering system for mental health counseling was implemented.Based on the realization of knowledge graph construction and related algorithms for question answering system design,this paper completes the design of mental health question answering system based on knowledge graph,and presents it in the form of web pages.Design a system test experiment to test the effect of the system answering questions.The experimental show that the system has high accuracy in answering psychological counseling questions,which proves the feasibility and practicability of the system. |