CN117932041A - Emotion support dialogue generation method, system and device based on thinking chain reasoning - Google Patents

Emotion support dialogue generation method, system and device based on thinking chain reasoning Download PDF

Info

Publication number
CN117932041A
CN117932041A CN202410328088.3A CN202410328088A CN117932041A CN 117932041 A CN117932041 A CN 117932041A CN 202410328088 A CN202410328088 A CN 202410328088A CN 117932041 A CN117932041 A CN 117932041A
Authority
CN
China
Prior art keywords
reasoning
emotion
dialogue
user
template
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202410328088.3A
Other languages
Chinese (zh)
Other versions
CN117932041B (en
Inventor
马廷淮
桑晨扬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nanjing University of Information Science and Technology
Original Assignee
Nanjing University of Information Science and Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nanjing University of Information Science and Technology filed Critical Nanjing University of Information Science and Technology
Priority to CN202410328088.3A priority Critical patent/CN117932041B/en
Publication of CN117932041A publication Critical patent/CN117932041A/en
Application granted granted Critical
Publication of CN117932041B publication Critical patent/CN117932041B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Machine Translation (AREA)

Abstract

The invention provides a emotion support dialogue generation method, system and device based on thinking chain reasoning, and relates to the fields of emotion calculation and dialogue generation. The method comprises the following steps: the method comprises the steps of obtaining dialogue history information, inputting the dialogue history information into an emotion thinking chain reasoning frame, and obtaining emotion state reasoning information of a user; formatting and storing the user emotion state reasoning information to obtain complete information of the user emotion state; inputting dialogue history information and user emotion state complete information into a strategy thinking chain reasoning frame to obtain dialogue strategies; and constructing a final campt text, and inputting the final campt text into a large language model to generate a reply. The method adopts a prompt driving method, avoids the adjustment of model parameters, and reduces the model training cost; meanwhile, the end-to-end generation problem is converted into a gradual reasoning problem, so that the reply effect is optimized, and the interpretability of emotion support dialogue generation is improved.

Description

Emotion support dialogue generation method, system and device based on thinking chain reasoning
Technical Field
The invention relates to the technical field of emotion calculation and dialogue generation, in particular to an emotion support dialogue generation method, an emotion support dialogue generation system and an emotion support dialogue generation device based on thinking chain reasoning.
Background
In modern society, people face increasingly complex pressures and challenges. Psychological health problems such as anxiety and depression are in an ascending trend, and social separation and feeling of autism are also important factors for influencing psychological health of people. Faced with mental health challenges, it is desirable to have a privacy-safe dialog system that is readily available. Traditional psychological counseling services may have time and place limitations, and individuals want to be able to get emotional support as soon as needed.
Emotion-supported dialog is a branch of emotion dialog generation tasks that aim to give the dialog system human emotion so that it can perceive human emotion and generate a response with co-emotion effects that can understand human. Unlike a general emotion dialogue generation task, the emotion support dialogue generation task needs to take a corresponding dialogue strategy according to the current state of a user, omit exploring emotion problems of the user, understand the user and pacify the user, so that emotion puzzles of the user are reduced. Today, where mental health problems are increasingly common, this task is of profound importance. Most of the existing methods adopt an end-to-end generation mode, namely, a given dialogue history directly generates replies. Researchers have focused on designing efficient encoders, integrating decoder structures with external knowledge, capturing behavioral features in conversation history, emotional features, etc., generating emotional support replies under specific strategy tags. Such methods fail to model user emotion at a fine granularity, while weakening the causality between user emotional states and policy choices, thus making the dialog system lack of interpretability.
Recently, large Language Models (LLMs) exhibit strong language understanding and generating capabilities, however, existing researches are focused on designing prompt strategies such as thought chains, thought diagrams, etc. to excite the capability of large language models to solve complex problems such as mathematical reasoning, common sense reasoning, etc., and these researches have not been widely used in the field of dialog generation. For emotion-supported conversations, there are two main classes of existing methods using large language models: in the first category, a prompt template with simple design is input into a large language model in combination with given content, and replies are obtained at one time. Such a method is easy to make the language model generate a lengthy reply, and deviate from the human intention to some extent, and cannot achieve the effect of emotion support. Secondly, training a large language model through field data to enable the large language model to adapt to a current task, and the method consumes a large amount of computing resources and is difficult to train.
Disclosure of Invention
(One) solving the technical problems
Aiming at the defects of the prior art, the invention provides a emotion support dialogue generation method, a system and a device based on thinking chain reasoning, which avoid the adjustment of model parameters by using a prompt driving method and reduce model training expenditure; meanwhile, the end-to-end generation problem is converted into a gradual reasoning problem, so that the reply effect is optimized, and the interpretability of emotion support dialogue generation is improved.
(II) technical scheme
In order to achieve the above purpose, the invention is realized by the following technical scheme:
In a first aspect, there is provided a emotion-supported dialogue generation method based on thought-chain reasoning, including:
Acquiring dialogue history information, wherein the dialogue history information comprises input of a previous user, response of a system and interaction information in the whole dialogue process;
Inputting dialogue history information into a pre-constructed emotion thinking chain reasoning frame to obtain user emotion state reasoning information;
formatting and storing the user emotion state reasoning information to obtain complete information of the user emotion state;
Inputting dialogue history information and user emotion state complete information into a pre-constructed strategy thinking chain reasoning frame to obtain dialogue strategies;
and constructing a final campt text by using the dialogue history, the obtained complete information of the user emotion state and the dialogue strategy, and inputting the final campt text into a pre-constructed large language model to generate a reply.
Preferably, the construction of the emotion thinking chain reasoning framework comprises the following steps:
the emotion inference thinking flow is constructed, an inference chain is constructed according to the sequence of the event, the emotion and the intention, the emotion of the user is modeled, and the inference chain according to the sequence of the event, the emotion and the intention is expressed in a formal manner as follows:
wherein, Representing events,/>Representing emotion,/>Representing intent; the event represents the situation faced by the user, the emotion represents the mood of the user in the current situation, and the intention represents the internal expectations of the user in the process of complaining with the system;
the construction of the policy thinking chain reasoning framework comprises the following steps:
and constructing a strategy reasoning thinking flow, constructing a reasoning chain from an action stage to a dialogue strategy according to the existing emotion support theory, and performing strategy selection, wherein the reasoning chain from the action stage to the dialogue strategy is expressed in a formalized manner as follows:
wherein, Representing the action phase/>Representing a dialogue strategy; the action stage is exploration, pacifying and action required by emotion support dialogue defined by psychologists and related researchers; the dialog strategy is the dialog skill corresponding to the action stage.
Preferably, the method further comprises: constructing a template for interaction with the large language model to obtain user emotion state reasoning information; the template comprises an event template, an emotion template, an intention template, an action stage template and a dialogue strategy template.
Preferably, the specific process of obtaining the user emotion state reasoning information is as follows:
filling dialogue history information into an event template to construct a first template text, and inputting the first template text into a large language model to obtain a reply, wherein the formula is as follows:
wherein, For dialogue history,/>Event information obtained through large language model reasoning;
will dialogue history information Combining newly acquired event information/>Filling in emotion template to construct second template text, and inputting the second template text into large language model to infer user emotion/>The formula is as follows:
will dialogue history information Binding event/>User emotion/>Constructing a third template text, and inputting the third template to the large language model to infer user intention/>The formula is as follows:
Preferably, the specific process of obtaining the complete information of the emotional state of the user is as follows:
Acquiring an intermediate reasoning result and final output in user emotion state reasoning information, integrating event, emotion and intention information, and fully describing the user emotion state
And (3) carrying out structured storage on the complete information of the user emotion state, wherein the storage form can be json storage or database storage.
Preferably, the dialogue history information and the complete information of the user emotion state are input into a pre-constructed strategy thinking chain reasoning frame to obtain a dialogue strategy, and the specific process is as follows:
Complete information of user emotion state As the reasoning basis of dialogue strategy;
will dialogue history information Complete information on emotional state of user/>Filling a action stage template to construct a fourth template, inputting the fourth template into a large language model to obtain a current action stage reasoning result, and expressing the formula as follows:
Combining the action stage reasoning result with the existing dialogue history information Complete information of user emotion stateFilling a dialogue strategy template to construct a fifth template text, and inputting the fifth template text into a large language model to obtain a dialogue strategy, wherein the formula is expressed as follows:
In a second aspect, there is provided a emotion-supported dialog generation system based on thought-chain reasoning, the system comprising:
The language model management module is used for deploying a large language model and managing interfaces of the large language model;
the promt management module is used for constructing, storing and maintaining a promt template;
The memory module is used for storing dialogue history information;
the emotion state management module is used for storing and maintaining user state information obtained by reasoning in the conversation process;
and the interaction module is used for coordinating and orchestrating the modules and smoothly interacting with the user.
Preferably, the language model management module is used for providing an interface for reasoning and replying in the dialogue, and the large language model is GPT series, chatGLM series or LLaMA series.
Preferably, the template management module is used for constructing a template required by the generation of thinking chain reasoning and final reply, and acquiring corresponding templates at different stages of reasoning and generation to construct corresponding template texts;
And the interaction module acquires user input in the interaction process, records the input to the memory module, acquires a corresponding template from the template management module to construct a template text, and uses the language model management module to input the template text to the corresponding large language model to interact with the large language model to acquire a generation result of the large language model, and the interaction module is responsible for hiding the intermediate reasoning process from the user and displaying the final reply content.
In a third aspect, there is provided an emotion-supported dialogue generation device based on thought-chain reasoning, including:
An acquisition module configured to acquire dialog history information including previous user inputs, system responses, and interaction information throughout the dialog;
The information extraction module is configured to input dialogue history information into a pre-constructed emotion thinking chain reasoning frame to obtain user emotion state reasoning information;
The information perfecting module is configured to format and store the user emotion state reasoning information to obtain complete information of the user emotion state;
The strategy production module is configured to input dialogue history information and user emotion state complete information into a pre-constructed strategy thinking chain reasoning framework to obtain dialogue strategies;
and the reply generation module is configured to construct a final campt text by using the user emotion state complete information and the dialogue strategy, and input the final campt text into a pre-constructed large language model to generate a reply.
(III) beneficial effects
(1) According to the emotion support dialogue generation method based on thinking chain reasoning, a large language model is driven by using the prompt, so that the reasoning and generation capacity of the large language model is effectively utilized, the fine tuning process in the traditional technology is avoided, and a large amount of model training expenditure is saved.
(2) According to the emotion support dialogue generation method based on the thinking chain reasoning, two thinking chain reasoning frameworks are designed, the emotion states of the user can be modeled in a fine granularity mode, and meanwhile, the accuracy of dialogue strategy selection is improved.
(3) According to the emotion support dialogue generation method based on thinking chain reasoning, the end-to-end generation problem in the traditional technology is converted into a gradual reasoning process, and the interpretability of generated replies is improved.
Drawings
FIG. 1 is a flow chart of a emotion-supported dialogue generation method based on thought-chain reasoning of the present invention;
fig. 2 is a block diagram of an emotion-supported dialog generation system based on thought-chain reasoning in accordance with the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
As shown in fig. 1, an embodiment of the present invention provides a method for generating emotion-supported dialogue based on thought-chain reasoning, including:
Acquiring dialogue history information, wherein the dialogue history information comprises input of a previous user, response of a system and interaction information in the whole dialogue process;
Inputting dialogue history information into a pre-constructed emotion thinking chain reasoning frame to obtain user emotion state reasoning information;
formatting and storing the user emotion state reasoning information to obtain complete information of the user emotion state;
Inputting dialogue history information and user emotion state complete information into a pre-constructed strategy thinking chain reasoning frame to obtain dialogue strategies;
and constructing a final campt text by using the user emotion state complete information and the dialogue strategy, and inputting the final campt text into a pre-constructed large language model to generate a reply.
Further, the construction of the emotion thinking chain reasoning framework comprises the following steps:
the emotion inference thinking flow is constructed, an inference chain is constructed according to the sequence of the event, the emotion and the intention, the emotion of the user is modeled, and the inference chain according to the sequence of the event, the emotion and the intention is expressed in a formal manner as follows:
wherein, Representing events,/>Representing emotion,/>Representing intent; the event represents the situation faced by the user, the emotion represents the mood of the user in the current situation, and the intention represents the internal expectations of the user in the process of complaining with the system;
The construction of the policy thinking chain reasoning framework comprises the following steps:
the method comprises the steps of constructing a strategy reasoning thinking flow, constructing a reasoning chain from an action stage to a dialogue strategy according to the existing emotion support theory, and carrying out strategy selection, wherein the reasoning chain from the action stage to the dialogue strategy is expressed in a formalized mode as follows:
wherein, Representing the action phase/>Representing a dialogue strategy; the action stage is the exploration, pacifying and action required by emotion support dialogue defined by psychologists and related researchers; the dialog strategy is the dialog skill corresponding to the action stage.
Further, the method further comprises the following steps: constructing a template for interaction with the large language model to obtain user emotion state reasoning information; the template includes an event template, an emotion template, an intention template, an action phase template, and a dialogue strategy template. The promtt template is essentially a string with parameters that simplify the process of constructing and processing the hint words. In this example, taking an event template as an example, the content of the template is: "dialog history is: { dialogue _history }, please analyze the user's situation based on a given dialog history: the content framed by "{ }" is the parameter to be received, and the corresponding result can be obtained by acquiring the content corresponding to the parameter and inputting the content into the large language model. The emotion template and intention template have similar structures to the above examples.
Further, the specific process of obtaining the user emotion state reasoning information is as follows:
Filling dialogue history information into an event template, constructing a first template text, and inputting the first template text into a large language model to obtain a reply, wherein the formula is as follows:
wherein, For dialogue history,/>Event information obtained through large language model reasoning;
will dialogue history information Combining newly acquired event information/>Filling in emotion template to construct second template text, and inputting the second template text into large language model to infer user emotion/>The formula is as follows:
will dialogue history information Binding event/>User emotion/>Constructing a third template text, and inputting the third template to the large language model to infer user intention/>The formula is as follows:
further, the specific process of obtaining the complete information of the emotional state of the user is as follows:
Acquiring an intermediate reasoning result and final output in user emotion state reasoning information, integrating event, emotion and intention information, and fully describing the user emotion state
And (3) carrying out structured storage on the complete information of the user emotion state, wherein the storage form can be json storage or database storage. The purpose of the storage is on the one hand to facilitate information acquisition at the next stage of reasoning and on the other hand to optimize the long-term memory capacity of the dialog system.
Further, the dialogue history information and the complete information of the user emotion state are input into a pre-constructed strategy thinking chain reasoning frame to obtain a dialogue strategy, and the specific process is as follows:
Complete information of user emotion state As the reasoning basis of dialogue strategy;
will dialogue history information Complete information on emotional state of user/>Filling a action stage template to construct a fourth template, inputting the fourth template into a large language model to obtain a current action stage reasoning result, and expressing the formula as follows:
combining action phase reasoning results with existing conversation history information Complete information of user emotional state/>Filling a dialogue strategy template to construct a fifth template text, and inputting the fifth template text into a large language model to obtain a dialogue strategy, wherein the formula is expressed as follows:
Further, the final prompt is constructed by using the dialogue history, the user emotion states obtained by reasoning and the dialogue strategies and is input into the large language model, so that the large language model fully considers the perceived user emotion states, and the dialogue strategies to be adopted are defined, so that high-quality emotion support replies are generated. The template adopted by the template may be: "dialog history { dialogue _history }, user emotional state: { conversation_state }, please reply with { strategy } emotion-supported dialogue strategy according to dialogue history and analyzed user emotion state.
In a second aspect, there is provided an emotion-supported dialog generation system based on thought-chain reasoning, the system comprising:
The language model management module is used for deploying a large language model and managing interfaces of the large language model;
the promt management module is used for constructing, storing and maintaining a promt template;
The memory module is used for storing dialogue history information;
the emotion state management module is used for storing and maintaining user state information obtained by reasoning in the conversation process;
and the interaction module is used for coordinating and orchestrating the modules and smoothly interacting with the user.
Further, the language model management module is used for providing interfaces for reasoning and reply generation in the dialogue, and the large language model is GPT series, chatGLM series or LLaMA series.
Further, the template management module is used for constructing a template required by the generation of thinking chain reasoning and final reply, and acquiring corresponding templates at different stages of reasoning and generation to construct corresponding template texts;
The interaction module acquires user input in the interaction process, records the input to the memory module, acquires a corresponding template from the template management module to construct a template text, and uses the language model management module to input the template text to the corresponding large language model to interact with the large language model to acquire a generation result of the large language model, and the interaction module is responsible for hiding the intermediate reasoning process from the user and displaying the final reply content.
In a third aspect, there is provided an emotion-supported dialogue generation device based on thought-chain reasoning, including:
An acquisition module configured to acquire dialogue history information including previous user inputs, system responses, and interaction information throughout the dialogue;
The information extraction module is configured to input dialogue history information into a pre-constructed emotion thinking chain reasoning frame to obtain user emotion state reasoning information;
The information perfecting module is configured to format and store the user emotion state reasoning information to obtain complete information of the user emotion state;
The strategy production module is configured to input dialogue history information and user emotion state complete information into a pre-constructed strategy thinking chain reasoning framework to obtain dialogue strategies;
and the reply generation module is configured to construct a final campt text by using the user emotion state complete information and the dialogue strategy, and input the final campt text into a pre-constructed large language model to generate a reply.
Embodiments of the present application may be provided as a method or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein. The scheme in the embodiment of the application can be realized by adopting various computer languages, such as object-oriented programming language Java, an transliteration script language JavaScript and the like.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.

Claims (10)

1. An emotion support dialogue generation method based on thought chain reasoning, comprising:
Acquiring dialogue history information, wherein the dialogue history information comprises input of a previous user, response of a system and interaction information in the whole dialogue process;
Inputting dialogue history information into a pre-constructed emotion thinking chain reasoning frame to obtain user emotion state reasoning information;
formatting and storing the user emotion state reasoning information to obtain complete information of the user emotion state;
Inputting dialogue history information and user emotion state complete information into a pre-constructed strategy thinking chain reasoning frame to obtain dialogue strategies;
And constructing a final campt text by using dialogue history information, user emotion state complete information and dialogue strategies, and inputting the final campt text into a pre-constructed large language model to generate a reply.
2. The emotion support session generation method based on mind-chain reasoning as claimed in claim 1, wherein: the construction of the emotion thinking chain reasoning framework comprises the following steps:
the emotion inference thinking flow is constructed, an inference chain is constructed according to the sequence of the event, the emotion and the intention, the emotion of the user is modeled, and the inference chain according to the sequence of the event, the emotion and the intention is expressed in a formal manner as follows:
wherein, Representing events,/>Representing emotion,/>Representing intent; the event represents the situation faced by the user, the emotion represents the mood of the user in the current situation, and the intention represents the internal expectations of the user in the process of complaining with the system;
the construction of the policy thinking chain reasoning framework comprises the following steps:
and constructing a strategy reasoning thinking flow, constructing a reasoning chain from an action stage to a dialogue strategy according to the existing emotion support theory, and performing strategy selection, wherein the reasoning chain from the action stage to the dialogue strategy is expressed in a formalized manner as follows:
wherein, Representing the action phase/>Representing a dialogue strategy; the action stage is exploration, pacifying and action required by emotion support dialogue defined by psychologists and related researchers; the dialog strategy is the dialog skill corresponding to the action stage.
3. The emotion support session generation method based on mind-chain reasoning as claimed in claim 1, further comprising: constructing a template for interaction with the large language model to obtain user emotion state reasoning information; the template comprises an event template, an emotion template, an intention template, an action stage template and a dialogue strategy template.
4. A method for emotion-supported dialogue generation based on thought-chain reasoning as claimed in claim 3, characterized in that: the specific process for obtaining the user emotion state reasoning information is as follows:
filling dialogue history information into an event template to construct a first template text, and inputting the first template text into a large language model to obtain a reply, wherein the formula is as follows:
wherein, For dialogue history,/>Event information obtained through large language model reasoning;
will dialogue history information Combining newly acquired event information/>Filling in emotion template to construct second template text, and inputting the second template text into large language model to infer user emotion/>The formula is as follows:
will dialogue history information Binding event/>User emotion/>Constructing a third template text, and inputting the third template to the large language model to infer user intention/>The formula is as follows:
5. The emotion support session generation method based on mind-chain reasoning as claimed in claim 4, wherein: the specific process for obtaining the complete information of the emotional state of the user is as follows:
Acquiring an intermediate reasoning result and final output in user emotion state reasoning information, integrating event, emotion and intention information, and fully describing the user emotion state
And (3) carrying out structured storage on the complete information of the user emotion state, wherein the storage form can be json storage or database storage.
6. The emotion support session generation method based on mind-chain reasoning as claimed in claim 5, wherein: the dialogue history information and the complete information of the user emotion state are input into a pre-constructed strategy thinking chain reasoning frame to obtain dialogue strategies, and the specific process is as follows:
Complete information of user emotion state As the reasoning basis of dialogue strategy;
will dialogue history information Complete information on emotional state of user/>Filling a action stage template to construct a fourth template, inputting the fourth template into a large language model to obtain a current action stage reasoning result, and expressing the formula as follows:
Combining the action stage reasoning result with the existing dialogue history information Complete information of user emotional state/>Filling a dialogue strategy template to construct a fifth template text, and inputting the fifth template text into a large language model to obtain a dialogue strategy, wherein the formula is expressed as follows:
7. an emotion-supported dialog generation system based on thought-chain reasoning, the system comprising:
The language model management module is used for deploying a large language model and managing interfaces of the large language model;
the promt management module is used for constructing, storing and maintaining a promt template;
The memory module is used for storing dialogue history information;
the emotion state management module is used for storing and maintaining user state information obtained by reasoning in the conversation process;
and the interaction module is used for coordinating and orchestrating the modules and smoothly interacting with the user.
8. The emotion-supported session generation system based on mind-chain reasoning as claimed in claim 7, wherein: the language model management module is used for providing interfaces for reasoning and replying generation in the dialogue, and the large language model is GPT series, chatGLM series or LLaMA series.
9. The emotion-supported session generation system based on mind-chain reasoning as claimed in claim 7, wherein: the template management module is used for constructing a template required by the generation of thinking chain reasoning and final reply, and acquiring corresponding templates at different stages of reasoning and generation to construct corresponding template texts;
And the interaction module acquires user input in the interaction process, records the input to the memory module, acquires a corresponding template from the template management module to construct a template text, and uses the language model management module to input the template text to the corresponding large language model to interact with the large language model to acquire a generation result of the large language model, and the interaction module is responsible for hiding the intermediate reasoning process from the user and displaying the final reply content.
10. An emotion-supported dialogue generation device based on thought-chain reasoning, comprising:
An acquisition module configured to acquire dialog history information including previous user inputs, system responses, and interaction information throughout the dialog;
The information extraction module is configured to input dialogue history information into a pre-constructed emotion thinking chain reasoning frame to obtain user emotion state reasoning information;
The information perfecting module is configured to format and store the user emotion state reasoning information to obtain complete information of the user emotion state;
The strategy production module is configured to input dialogue history information and user emotion state complete information into a pre-constructed strategy thinking chain reasoning framework to obtain dialogue strategies;
and the reply generation module is configured to construct a final campt text by using the user emotion state complete information and the dialogue strategy, and input the final campt text into a pre-constructed large language model to generate a reply.
CN202410328088.3A 2024-03-21 2024-03-21 Emotion support dialogue generation method, system and device based on thinking chain reasoning Active CN117932041B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410328088.3A CN117932041B (en) 2024-03-21 2024-03-21 Emotion support dialogue generation method, system and device based on thinking chain reasoning

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410328088.3A CN117932041B (en) 2024-03-21 2024-03-21 Emotion support dialogue generation method, system and device based on thinking chain reasoning

Publications (2)

Publication Number Publication Date
CN117932041A true CN117932041A (en) 2024-04-26
CN117932041B CN117932041B (en) 2024-06-11

Family

ID=90770576

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410328088.3A Active CN117932041B (en) 2024-03-21 2024-03-21 Emotion support dialogue generation method, system and device based on thinking chain reasoning

Country Status (1)

Country Link
CN (1) CN117932041B (en)

Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112083806A (en) * 2020-09-16 2020-12-15 华南理工大学 Self-learning emotion interaction method based on multi-modal recognition
CN113780012A (en) * 2021-09-30 2021-12-10 东南大学 Depression interview conversation generation method based on pre-training language model
CN115269796A (en) * 2022-07-22 2022-11-01 南京灵语智能科技有限公司 Novel psychological conversation robot and method based on Beck T-shaped model
CN116415596A (en) * 2023-04-04 2023-07-11 山东师范大学 Emotion support man-machine conversation method and system based on emotion strategy matching
CN116440383A (en) * 2023-03-27 2023-07-18 华南理工大学 Portable psychological accompanying robot system and emotion supporting method
CN116936037A (en) * 2023-08-04 2023-10-24 广州格心科技有限公司 Online psychological consultation method and system based on artificial intelligence
CN116955618A (en) * 2023-07-25 2023-10-27 山东新一代信息产业技术研究院有限公司 Dialog system intention recognition method and tool based on large language model
CN117093679A (en) * 2023-06-19 2023-11-21 无码科技(杭州)有限公司 Large language model intelligent inquiry dialogue method, system, equipment and medium
CN117093696A (en) * 2023-10-16 2023-11-21 浙江同花顺智能科技有限公司 Question text generation method, device, equipment and medium of large language model
CN117438047A (en) * 2023-10-23 2024-01-23 科大讯飞股份有限公司 Psychological consultation model training and psychological consultation processing method and device and electronic equipment
CN117493529A (en) * 2023-12-26 2024-02-02 苏州元脑智能科技有限公司 Anthropomorphic dialogue method and device based on natural language model and electronic equipment
CN117577305A (en) * 2023-11-22 2024-02-20 北京工业大学 Chinese multi-round dialogue medical system, device and storage medium based on Prompt language model
CN117591648A (en) * 2023-11-21 2024-02-23 国网江苏省电力有限公司镇江供电分公司 Power grid customer service co-emotion dialogue reply generation method based on emotion fine perception
CN117609449A (en) * 2023-11-22 2024-02-27 中国电信股份有限公司 Task type dialogue response method and device
CN117609486A (en) * 2024-01-10 2024-02-27 广东数业智能科技有限公司 Intelligent dialogue system in psychological field

Patent Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112083806A (en) * 2020-09-16 2020-12-15 华南理工大学 Self-learning emotion interaction method based on multi-modal recognition
CN113780012A (en) * 2021-09-30 2021-12-10 东南大学 Depression interview conversation generation method based on pre-training language model
CN115269796A (en) * 2022-07-22 2022-11-01 南京灵语智能科技有限公司 Novel psychological conversation robot and method based on Beck T-shaped model
CN116440383A (en) * 2023-03-27 2023-07-18 华南理工大学 Portable psychological accompanying robot system and emotion supporting method
CN116415596A (en) * 2023-04-04 2023-07-11 山东师范大学 Emotion support man-machine conversation method and system based on emotion strategy matching
CN117093679A (en) * 2023-06-19 2023-11-21 无码科技(杭州)有限公司 Large language model intelligent inquiry dialogue method, system, equipment and medium
CN116955618A (en) * 2023-07-25 2023-10-27 山东新一代信息产业技术研究院有限公司 Dialog system intention recognition method and tool based on large language model
CN116936037A (en) * 2023-08-04 2023-10-24 广州格心科技有限公司 Online psychological consultation method and system based on artificial intelligence
CN117093696A (en) * 2023-10-16 2023-11-21 浙江同花顺智能科技有限公司 Question text generation method, device, equipment and medium of large language model
CN117438047A (en) * 2023-10-23 2024-01-23 科大讯飞股份有限公司 Psychological consultation model training and psychological consultation processing method and device and electronic equipment
CN117591648A (en) * 2023-11-21 2024-02-23 国网江苏省电力有限公司镇江供电分公司 Power grid customer service co-emotion dialogue reply generation method based on emotion fine perception
CN117577305A (en) * 2023-11-22 2024-02-20 北京工业大学 Chinese multi-round dialogue medical system, device and storage medium based on Prompt language model
CN117609449A (en) * 2023-11-22 2024-02-27 中国电信股份有限公司 Task type dialogue response method and device
CN117493529A (en) * 2023-12-26 2024-02-02 苏州元脑智能科技有限公司 Anthropomorphic dialogue method and device based on natural language model and electronic equipment
CN117609486A (en) * 2024-01-10 2024-02-27 广东数业智能科技有限公司 Intelligent dialogue system in psychological field

Also Published As

Publication number Publication date
CN117932041B (en) 2024-06-11

Similar Documents

Publication Publication Date Title
Paolone et al. Automatic code generation of MVC web applications
Dibia LIDA: A tool for automatic generation of grammar-agnostic visualizations and infographics using large language models
CN105843381A (en) Data processing method for realizing multi-modal interaction and multi-modal interaction system
US10379817B2 (en) Computer-applied method for displaying software-type applications based on design specifications
Bauer A peculiar intuition: Kant's conceptualist account of perception
CN110929094A (en) Video title processing method and device
Born The social and the aesthetic: Methodological principles in the study of cultural production
WO2019094891A1 (en) Knowledge process modeling and automation
Pastor Conceptual modeling of life: beyond the homo sapiens
Shahar et al. Semi-automated entry of clinical temporal-abstraction knowledge
Garofoli RECkoning with representational apriorism in evolutionary cognitive archaeology
Palagin et al. OntoChatGPT information system: Ontology-driven structured prompts for ChatGPT meta-learning
Schuler et al. Towards automatically generating graphical user interfaces from openEHR archetypes
US20160335549A1 (en) Knowledge process modeling and automation
CN117932041B (en) Emotion support dialogue generation method, system and device based on thinking chain reasoning
Sherief et al. Modelling users feedback in crowd-based requirements engineering: An empirical study
Olaso et al. A Multi-lingual evaluation of the vAssist spoken dialog system. Comparing Disco and RavenClaw
Bowen et al. Creating formal models from informal design artefacts
JP2017058681A (en) Providing context to question
Stöckl Natural language interface for data visualization with deep learning based language models
CN112307269B (en) Intelligent analysis system and method for human-object relationship in novel
Soare Formalism and intuition in computability
Schweizer Cognitive computation sans representation
Brass et al. Standardized and flexible health data management with an archetype driven EHR system (EHRflex)
EP3246855A1 (en) Knowledge process modeling and automation

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant