Method for constructing cognitive chain enhanced college student group mental health dialogue system

CN119785979BActive Publication Date: 2026-09-18NORTHWESTERN POLYTECHNICAL UNIV
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411956569.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-29
Publication Date
2026-09-18
Estimated Expiration
2044-12-29

AI Technical Summary

Technical Problem

[0005]本发明实施例提供认知链增强的大学生群体心理健康对话系统的构建方法,以至少解决现有的大语言模型缺乏心智理论的技术问题

Benefits of technology

1、数据集构建与模型微调:通过构建专门针对大学生的数据集,并结合大型语言模型的指令微调技术,本发明成功构建了一个能够生成自然流畅且情感上支持性强的大学生心理健康大模型。该模型能够更好地理解大学生的心理状态和情感需求,为他们提供更加精准和个性化的支持。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119785979B_ABST
    Figure CN119785979B_ABST
Patent Text Reader

Abstract

This invention discloses a method for constructing a cognitive chain-enhanced dialogue system for the mental health of university students. The method includes: acquiring a target dataset; collecting several dialogues from the target dataset, using each dialogue as a seed dialogue; acquiring cue words about university students and mental health professionals, wherein the cue words include topics related to university students; inputting the cue words and a seed dialogue into a ChatGPT model to generate a set of self-talk dialogues about the cue words; generating multiple sets of self-talk dialogues about different university student topics in the cue words by repeatedly changing the university student topics in the cue words and each seed dialogue in the ChatGPT model; and fine-tuning the ChatGLM-6b model based on multiple sets of self-talk dialogues about different university student topics in the cue words using a target algorithm to obtain a mental health model for university students. This invention solves the technical problem of existing large language models lacking a theory of mind.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of dialogue technology for college students' mental health, and more specifically, to a method for constructing a dialogue system for college students' mental health that enhances cognitive chains. Background Technology

[0002] In today's rapidly developing society, university students face numerous pressures and challenges related to academics, interpersonal relationships, and future planning. These factors often lead to mental health issues such as mood swings, anxiety, and depression. Therefore, providing effective and timely emotional support and mental health counseling for university students is particularly important.

[0003] The goal of this study is to develop an emotional support dialogue system for university students to address mental health challenges such as academic stress, interpersonal relationships, and emotional distress. Utilizing advanced natural language processing technology and psychological principles, the system provides personalized and precise emotional support and mental health counseling to help students better understand and regulate their emotional states, thereby improving their overall mental well-being.

[0004] However, applying large language models (LLMs) to the field of mental health faces many challenges: First, the sensitivity and complexity of mental health dialogues require language models to have the ability to generate natural and fluent language, deep empathy and emotional understanding, and to provide personalized interaction and support for the individual differences in the psychological and emotional needs of college students; Second, large language models need to have a theory of mind (ToM) to understand the situation and predict responses and provide responses that meet the needs, but one of the largest language models today (GPT-4) still lacks a theory of mind. Summary of the Invention

[0005] This invention provides a method for constructing a cognitive chain-enhanced dialogue system for the mental health of university students, in order to at least address the technical problem of existing large language models lacking a theory of mind.

[0006] According to one aspect of the present invention, a method for constructing a cognitive chain-enhanced dialogue system for the mental health of college students is provided. The method may include: acquiring a target dataset; collecting several dialogues from the target dataset and using each dialogue as a seed dialogue; acquiring cue words about college students and mental health professionals, wherein the cue words include topics related to college students; inputting the cue words and a seed dialogue into a ChatGPT model to generate a set of self-talk dialogues about the cue words; generating multiple sets of self-talk dialogues about different college student topics in the cue words by repeatedly changing the college student topics in the cue words and each seed dialogue in the ChatGPT model; fine-tuning the ChatGLM-6b model based on multiple sets of self-talk dialogues about different college student topics in the cue words using a target algorithm to obtain a mental health model for the college student group; constructing a mental cognitive chain library for the college student group based on several initial mental cognitive chains and multiple college student topics; acquiring a question; retrieving three semantically related target mental cognitive chains from the mental cognitive chain library for the college student group based on the question; inputting the question and the three target mental cognitive chains into the mental health model for the college student group to obtain a set of target responses about the question and each target mental cognitive chain, wherein one question and one target mental chain correspond to one target response.

[0007] Optionally, the process of fine-tuning the ChatGLM-6b model based on multiple sets of self-chat dialogues about different topics among college students using prompt words, to obtain a mental health model for the college student group, is as follows:

[0008] in, This is the original parameter matrix of the ChatGLM-6b model. , The parameter matrix added when training the ChatGLM-6b model for any self-chat dialogue on different topics among college students. This is the parameter matrix for a mental health model of university students.

[0009] Optionally, the expression for the parameter tuning matrix is:

[0010] in, , , , To determine the rank of the parameter matrix, This is the first low-rank matrix. It is the second low-rank matrix.

[0011] Optionally, the step of constructing a mental cognitive chain library for college students based on several initial mental cognitive chains and multiple college student topics includes: inputting an initial mental cognitive chain and its corresponding college student topic into the ChatGPT model to obtain a mental cognitive chain about the college student topic; for an initial mental cognitive chain, traversing all college student topics corresponding to the initial mental cognitive chain to obtain all mental cognitive chains corresponding to the initial mental cognitive chain; traversing all initial mental cognitive chains to obtain all mental cognitive chains corresponding to all initial mental cognitive chains; and constructing a mental cognitive chain library for college students based on all mental cognitive chains.

[0012] Optionally, the mental cognitive chain includes five nodes: context, cue, thought, action, and emotion.

[0013] Optionally, the mental cognition chain includes four nodes: context, cue, thought, and action plus emotion.

[0014] The beneficial effects of this invention are: 1. Dataset Construction and Model Fine-tuning: By constructing a dataset specifically for university students and combining it with instruction fine-tuning techniques for large-scale language models, this invention successfully built a large-scale model for university students' mental health that can generate natural, fluent, and emotionally supportive information. This model can better understand the psychological state and emotional needs of university students, providing them with more accurate and personalized support.

[0015] 2. Formalization and Application of Theory of Mind: This invention innovatively formalizes the Theory of Mind (ToM) into a cognitive chain specifically for college students and integrates it into an AI system. This enables the system to not only understand the literal meaning of texts but also to deeply understand the psychological and emotional states of college students. This advancement significantly enhances the system's ability to understand college students' cognition, provide targeted assistance, and generate personalized content. Attached Figure Description

[0016] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings: Figure 1 This is a flowchart of a method for constructing a cognitive chain-enhanced dialogue system for the mental health of college students according to an embodiment of the present invention. Detailed Implementation

[0017] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0018] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and to describe a specific order or sequence. It should be understood that such terms can be used interchangeably where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0019] Example 1 According to embodiments of the present invention, a method for constructing a cognitive chain-enhanced dialogue system for the mental health of college students is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system containing at least one set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0020] Figure 1 This is a flowchart illustrating a method for constructing a cognitive chain-enhanced dialogue system for the mental health of university students according to an embodiment of the present invention. Figure 1 As shown, the method includes the following steps: Step S101: Obtain the target dataset, collect several dialogues from the target dataset, and use each dialogue as a seed dialogue.

[0021] In this embodiment, a target dataset is obtained, wherein the target dataset consists of ESConv and ETMHS. Several dialogues are collected from the target dataset, and each dialogue is used as a seed dialogue.

[0022] Step S102: Obtain prompts about college students and mental health doctors, where the prompts include topics related to college students.

[0023] In this embodiment, for example, the prompt word could be: "Please help me generate a chat dialogue between a college student and a mental health doctor. The college student's topic is that his pet has died and he needs the mental health doctor to comfort and counsel him. Please refer to the following example: Seed Dialogue."

[0024] Step S103: Input the prompt word and a seed dialogue into the ChatGPT model to generate a set of self-chat dialogues about the prompt word. In the ChatGPT model, by changing the college student topic in the prompt word and each seed dialogue multiple times, multiple sets of self-chat dialogues about different college student topics in the prompt word are generated.

[0025] In this embodiment, for example, the prompt word could be: "Please help me generate a chat dialogue." The two parties are a college student and a mental health doctor. The college student's topic is that his pet has died and he needs the mental health doctor to comfort and counsel him. Please refer to the following example: Seed dialogue. The prompt word and seed dialogue are input into the ChatGPT model to generate a set of self-chat dialogues about the prompt word. The college student's topic and seed dialogue are changed multiple times to generate multiple sets of self-chat dialogues about different topics of the college student in the prompt word. This is only an example and is not a specific limitation.

[0026] Step S104: Based on multiple sets of self-chat dialogues about different topics among college students in the prompt words, the ChatGLM-6b model is fine-tuned using a target algorithm to obtain a mental health model for college student groups.

[0027] In this embodiment, the parameters of the ChatGLM-6b model are fine-tuned using the LoRA method based on multiple sets of self-chat dialogues about different college students' topics in the prompt words, to obtain a mental health model of college students. The LoRA method optimizes the rank decomposition matrix of the dense layer during the adjustment process, so that specific dense layers in the neural network can be trained indirectly without changing the pre-trained weights.

[0028] Step S105: Based on several initial cognitive chains and multiple topics for college students, construct a cognitive chain library for the college student group.

[0029] In this embodiment, a mental cognition chain library for college students is constructed based on several initial mental cognition chains and multiple topics for college students.

[0030] Step S106: Obtain a question information and retrieve three semantically related target mental cognitive chains from the mental cognitive chain library of college students based on the question information.

[0031] In this embodiment, a question is obtained, such as "My pet has died." Based on this question, three semantically related target cognitive chains are retrieved from the cognitive chain database of college students.

[0032] Step S107: Input a question and three target mental cognitive chains into the college student group mental health model to obtain a set of target responses about a question and each target mental cognitive chain, wherein a question and a target mental chain correspond to a target response.

[0033] In this embodiment, the question information and each target mental cognitive chain are input into the college student group mental health model to obtain a set of target responses about a question information and each target mental cognitive chain, wherein a question information and a target mental chain correspond to a target response.

[0034] The method described in this embodiment will be further described below.

[0035] As an optional embodiment, step S104, the process of fine-tuning the ChatGLM-6b model based on multiple sets of self-chat dialogues about different topics among college students in the prompt words, to obtain a mental health model for the college student group, is as follows:

[0036] in, This is the original parameter matrix of the ChatGLM-6b model. , The parameter matrix added when training the ChatGLM-6b model for any self-chat dialogue on different topics among college students. This is the parameter matrix for a mental health model of university students.

[0037] In this embodiment, the parameters of the ChatGLM-6b model are fine-tuned using the LoRA method based on multiple sets of self-chat dialogues about different topics among college students in the prompt words, resulting in a parameter-tuned mental health model for the college student group.

[0038] As an optional embodiment, the expression for the parameter tuning matrix is:

[0039] in, , , , To determine the rank of the parameter matrix, This is the first low-rank matrix. It is the second low-rank matrix.

[0040] As an optional embodiment, step S105, which involves constructing a mental cognitive chain library for the university student group based on several initial mental cognitive chains and multiple university student topics, includes: inputting an initial mental cognitive chain and its corresponding university student topic into the ChatGPT model to obtain a mental cognitive chain related to the university student topic; for an initial mental cognitive chain, traversing all corresponding university student topics to obtain all mental cognitive chains corresponding to the initial mental cognitive chain; traversing all initial mental cognitive chains to obtain all mental cognitive chains corresponding to all initial mental cognitive chains; and constructing a mental cognitive chain library for the university student group based on all mental cognitive chains.

[0041] In this embodiment, for example, the human thought process—what is the situation, what are the clues, what are the thoughts, what are the actions, and what are the emotions—is input into the ChatGPT model when faced with a topic, resulting in a mental cognitive chain for that college student topic. For an initial mental cognitive chain, all corresponding college student topics are traversed to obtain all mental cognitive chains corresponding to the initial mental cognitive chain. This process is repeated for all initial mental cognitive chains to obtain all mental cognitive chains corresponding to all initial mental cognitive chains. Based on all mental cognitive chains, a mental cognitive chain library for the college student group is obtained.

[0042] As an optional embodiment, the mental cognitive chain includes five nodes: context, cue, thought, action, and emotion.

[0043] In this embodiment, for example, the scenario is: I don't want to hand in my homework, so I won't hand it in this time; the clue is: My teacher is very nice and won't make things difficult for students; the thought is: I can skip handing in my homework this time; the action is: I will skip handing in my homework this time; and the feeling is: I am very happy.

[0044] As an optional embodiment, the mental cognition chain includes four nodes: context, cue, thought, and action plus emotion.

[0045] In this embodiment, for example, the scenario is: I don't want to hand in my homework, so I won't hand it in this time; the clue is: My teacher is very nice and won't make things difficult for students; the thought is: I can skip handing in my homework this time; the action plus emotion is: I am very happy that I won't hand in my homework this time.

[0046] In this embodiment of the invention, a target dataset is acquired, and several dialogues are collected from it, with each dialogue serving as a seed dialogue. Cue words related to college students and mental health professionals are obtained, including topics related to college students. The cue words and a seed dialogue are input into the ChatGPT model to generate a set of self-talk dialogues about the cue words. Multiple sets of self-talk dialogues about different college student topics in the cue words are generated by repeatedly changing the college student topics in the cue words and each seed dialogue within the ChatGPT model. Based on these multiple sets of self-talk dialogues about different college student topics in the cue words, the ChatGLM-6b model is fine-tuned using a target algorithm to obtain a mental health model for the college student population. Based on several initial cognitive chains and multiple college student topics, a [further details are needed for a complete translation]. This paper presents a cognitive chain database for university students. It obtains a question and retrieves three semantically relevant target cognitive chains from this database. The question and the three target cognitive chains are then input into a university student mental health model to generate a set of target responses for each question and each target cognitive chain. Each question and each target cognitive chain corresponds to a target response. This approach addresses the technical problem of existing large language models lacking a theory of mind, achieving the goal of constructing a high-quality mental health dialogue dataset covering multiple emotional states. It also trains a large-scale language model focused on university student mental health and innovatively integrates university student cognitive chains into the dialogue system, enhancing the personalization and accuracy of the dialogue.

[0047] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0048] In the above embodiments of the present invention, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0049] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual couplings, direct couplings, or communication connections may be through some interfaces; indirect couplings or communication connections between units or modules may be electrical or other forms.

[0050] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0051] Furthermore, in the various embodiments of the present invention, the functional units can be integrated into a first processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0052] The above are merely preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A method for constructing a cognitive chain-enhanced dialogue system for the mental health of university students, characterized in that: include: Obtain the target dataset, collect several dialogues from the target dataset, and use each dialogue as a seed dialogue; Get prompts about college students and mental health professionals, including topics related to college students; Input a prompt word and a seed dialogue into the ChatGPT model to generate a set of self-chat dialogues about the prompt word. In the ChatGPT model, by changing the college student topic in the prompt word and each seed dialogue multiple times, multiple sets of self-chat dialogues about different college student topics in the prompt word are generated. Based on multiple sets of self-chat dialogues about different topics among college students using prompt words, the ChatGLM-6b model was fine-tuned using a target algorithm to obtain a mental health model for the college student population. in, This is the original parameter matrix of the ChatGLM-6b model. , The parameter matrix added when training the ChatGLM-6b model for any self-chat dialogue on different topics among college students. The parameter matrix for a psychological health model of college students; The expression for the parameter tuning matrix is: in, , , , To determine the rank of the parameter matrix, This is the first low-rank matrix. It is the second low-rank matrix; Based on several initial cognitive chains and multiple topics for college students, a cognitive chain library for college students is constructed; wherein, the cognitive chain is a sequence containing multiple cognitive nodes for formalizing the Theory of Mind (ToM), and the cognitive nodes include context, cue, thought and emotion; Get a question information, and based on the question information, retrieve three semantically related target mental cognitive chains from the mental cognitive chain database of college students; Inputting a question and three target mental chains into a college student group mental health model yields a set of target responses for a question and each target mental chain, where one question and one target mental chain correspond to one target response. The aforementioned method constructs a cognitive chain library for university students based on several initial cognitive chains and multiple topics related to university students, including: An initial mental cognition chain and its corresponding college student topic are input into the ChatGPT model to obtain a mental cognition chain about the college student topic. Given an initial cognitive chain, traverse all college student topics corresponding to the initial cognitive chain to obtain all cognitive chains corresponding to the initial cognitive chain. Traverse all initial mental cognitive chains to obtain all mental cognitive chains corresponding to all initial mental cognitive chains; A database of mental cognitive chains for university students was constructed based on all mental cognitive chains.

2. The method according to claim 1, characterized in that, The mental cognition chain consists of four nodes: context, cue, thought, and action plus emotion.

3. A computer system, characterized in that... include: One or more processors, a computer-readable storage medium for storing one or more programs, wherein, when the one or more programs are executed by the one or more processors, the one or more processors cause the one or more processors to implement the method of claim 1.

4. A computer-readable storage medium, characterized in that... The device stores computer-executable instructions, which, when executed, are used to implement the method of claim 1.

5. A computer program product, characterized in that... It includes computer-executable instructions, which, when executed, are used to implement the method of claim 1.

Citation Information

Patent Citations

  • Psychological field data generation method and device, psychological field model training method and device and storage medium

    CN117828063A