Multi-agent-based intelligent dialogue method, system and equipment and medium

Through the intelligent dialogue method of multi-agent collaboration, the problem of limited dialogue support of traditional psychological companion robots has been solved, more flexible and professional psychological support has been achieved, and the user experience has been improved.

CN120745652APending Publication Date: 2025-10-03北京大学长沙计算与数字经济研究院
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510856889.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-25
Publication Date
2025-10-03

AI Technical Summary

Technical Problem

Traditional psychological companion robots use a single model or simple rule system, which results in limited psychological support provided during conversations and inability to flexibly respond to complex psychological counseling scenarios.

Method used

An intelligent dialogue method based on multiple agents is adopted, including the collaborative work of preliminary warning analysis, warning dialogue agent, recommendation agent and empathy dialogue agent, to provide more extensive psychological support through multimodal analysis and dynamic dialogue strategy generation.

Benefits of technology

It has significantly improved its intelligence and professionalism, and can flexibly respond to various complex psychological counseling scenarios and provide richer psychological support.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120745652A_ABST
    Figure CN120745652A_ABST
Patent Text Reader

Abstract

The invention relates to an intelligent dialogue method, system and device based on multiple agents and a medium. The method comprises the following steps: carrying out preliminary early warning analysis of mental health risks on dialogue information of a user; if the preliminary early warning analysis result is high risk, generating a subsequent dialogue strategy for the dialogue information through an early warning dialogue agent, and performing advanced early warning analysis for dialogue content acquired based on the dialogue strategy; if the preliminary early warning analysis result is not high risk and it is identified that the user has a recommendation demand, outputting a recommendation result through a recommendation agent; and if the preliminary early warning analysis result is not high risk and the user does not have a recommendation demand, predicting a target psychological scene and a target emotion based on the dialogue information, determining an emotional skill combination based on the target psychological scene and the target emotion through an emotional dialogue agent, and performing a subsequent dialogue based on the emotional skill combination. The method can improve the problem that psychological support provided for the user is too limited.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and in particular to a multi-agent-based intelligent dialogue method, system, device and medium. Background Art

[0002] With the rapid development of artificial intelligence technology, the application of intelligent robots is becoming more and more extensive. For example, intelligent robots in the field of mental health (which can be called psychological companion robots or psychological counseling robots) can provide psychological support and companionship to users.

[0003] Psychological companion robots typically provide psychological support through conversations. However, actual conversation scenarios are complex and diverse, and traditional psychological companion robots rely on a single model or simple rule system, resulting in limited and restricted psychological support for users during conversations. Summary of the Invention

[0004] Based on this, it is necessary to provide a multi-agent based intelligent dialogue method, system, computer equipment, computer-readable storage medium and computer program product to address the above technical problems, so as to improve the problem that the psychological support provided by psychological companion robots to users is too limited.

[0005] In a first aspect, the present application provides a multi-agent-based intelligent dialogue method, the method comprising:

[0006] Conduct preliminary early warning analysis of users' conversation information for mental health risks;

[0007] If the initial warning analysis result is high risk, the warning dialogue agent generates subsequent dialogue strategies based on the dialogue information and conducts advanced warning analysis on the dialogue content obtained based on the dialogue strategy;

[0008] If the preliminary warning analysis result is not high risk, and the user is identified to have a need for recommendation of mental health information based on the conversation information, the recommendation agent will output the recommendation result;

[0009] If the preliminary warning analysis result is not high risk and the user does not have a recommendation demand, the user's current target psychological scenario and target emotion expressed are predicted based on the conversation information, and the empathy dialogue agent determines the corresponding empathy skill combination based on the target psychological scenario and target emotion, and conducts subsequent conversations based on the empathy skill combination.

[0010] In one embodiment, the conversation information includes at least one modality of information selected from the group consisting of voice information, video information, picture information, and text information input by the user;

[0011] Conduct preliminary early warning analysis of user conversation information for mental health risks, including:

[0012] Analyzing the conversation information using a multimodal early warning analysis model based on at least one characteristic dimension of emotional state, potential risk behavior, or urgency of the potential risk behavior to obtain first characteristic information;

[0013] Generate preliminary warning analysis results based on the first characteristic information.

[0014] In one embodiment, the early warning dialogue agent generates a subsequent dialogue strategy based on the dialogue information, including:

[0015] guiding the user to conduct a first dialogue through the early warning dialogue agent, and identifying second feature information under a target feature type based on input information from the user in the first dialogue; the target feature type includes at least one of an emotional feature, a speech feature, or a behavioral feature;

[0016] Based on the second feature information, a subsequent dialogue strategy is dynamically generated for the dialogue information.

[0017] In one embodiment, after performing advanced warning analysis on the conversation content obtained based on the conversation strategy, the method further includes:

[0018] If the advanced warning analysis result indicates that there is a potential risk, a first assessment guidance message is generated to guide the user to complete a first assessment scale for the first risk; if the assessment result corresponding to the first assessment scale indicates a high risk, a crisis warning process is triggered;

[0019] and / or,

[0020] If the advanced warning analysis result shows that there is no potential risk and the user still shows significant emotional fluctuations, a second assessment guidance message is generated to guide the user to complete a second assessment scale for the second risk; if the assessment result corresponding to the second assessment scale shows a high risk, emotional warning processing is triggered.

[0021] In one embodiment, if the preliminary warning analysis result is not high risk and the user is identified as having a need for recommendation of mental health information based on the conversation information, before the recommendation agent outputs the recommendation result, the method further includes:

[0022] Based on the conversation intention recognition model, the conversation information is contextually analyzed to identify user intentions;

[0023] If the user does not need recommendations, it is determined that the user does not have any need for recommendations of mental health information;

[0024] In the case where the user intends to recommend only courses, only scales, or comprehensive recommendations, it is determined that there is a recommendation demand.

[0025] In one embodiment, outputting a recommendation result by a recommendation agent includes:

[0026] Guiding the user through a second conversation related to mental health information recommendations via a recommendation agent;

[0027] Analyze the conversation content in the second conversation, identify the content category to be recommended, and extract summary information, conversation topics, and psychological keywords in the second conversation; the content category includes at least one of a course category and a scale category;

[0028] Based on summary information, conversation topics, psychological keywords and content categories, matching recommendation results are determined and output to users.

[0029] In one embodiment, the second dialogue is a multi-round dialogue; a corresponding recommendation result is generated for each round of the second dialogue;

[0030] The method also includes:

[0031] After outputting the recommendation results of each round of the second dialogue, obtaining user feedback information regarding the recommendation results, and determining the accuracy of the recommendation results based on the feedback information;

[0032] If the accuracy is lower than a preset threshold, in the next round of the second conversation, the candidate recommendation results are re-ranked based on at least one factor: the user's selection behavior in the previous round of the second conversation, the context relevance in multiple rounds of the second conversation, or the similarity of the candidate content; where the candidate content similarity refers to the similarity between the candidate recommendation result and the feedback information;

[0033] Select the recommendation result for the next round of the second dialogue from the rearranged candidate recommendation results.

[0034] In one embodiment, before predicting the user's current target psychological scenario and target emotion based on the conversation information, the method further includes:

[0035] Obtain a pre-built association graph; the association graph includes scene nodes and emotion nodes, and edges are built between the associated scene nodes and emotion nodes;

[0036] Mining the co-occurrence relationship between scenes and emotions based on association graphs;

[0037] Based on the conversation information, predict the user's current target psychological scenario and target emotion, including:

[0038] Based on the conversation information, multiple candidate scene-emotion combinations are predicted; each candidate scene-emotion combination has a corresponding probability value;

[0039] The probability value is adjusted based on the co-occurrence relationship, and based on the adjusted and updated probability value, a target scene-emotion combination is selected from multiple candidate scene-emotion combinations; wherein the target scene-emotion combination includes a target psychological scene and a target emotion.

[0040] In a second aspect, the present application also provides a multi-agent based intelligent dialogue system, the system comprising:

[0041] A preliminary warning analysis unit, used to conduct preliminary warning analysis of the user's conversation information for mental health risks;

[0042] The early warning dialogue unit is used to generate subsequent dialogue strategies based on the dialogue information through the early warning dialogue agent if the initial early warning analysis result is high risk, and conduct advanced early warning analysis on the dialogue content obtained based on the dialogue strategy;

[0043] A recommendation unit, configured to output a recommendation result through a recommendation agent if the preliminary warning analysis result is not high risk and the user is identified to have a need for recommendation of mental health information based on the conversation information;

[0044] The empathy dialogue unit is used to predict the user's current target psychological scenario and target emotion based on the dialogue information if the preliminary warning analysis result is not high risk and the user does not have a recommendation demand. The empathy dialogue agent determines the corresponding empathy skill combination based on the target psychological scenario and target emotion, and conducts subsequent dialogue based on the empathy skill combination.

[0045] In a third aspect, the present application further provides a computer device, which includes a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of each embodiment of the present application when executing the computer program.

[0046] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of each embodiment of the present application when executed by a processor.

[0047] In a fifth aspect, the present application further provides a computer program product, which includes a computer program that implements the steps in each embodiment of the present application when executed by a processor.

[0048] Among the above-mentioned multi-agent-based intelligent dialogue methods, systems, computer equipment, storage media and computer program products, a psychological companion robot is constructed based on the multi-agent method. Through the collaborative work of intelligent agents such as early warning dialogue agents, recommendation agents, and empathy dialogue agents, it can flexibly respond to various complex psychological counseling scenarios, significantly improve the level of intelligence, safety and professionalism, and provide users with more psychological support. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] Figure 1 1 is a flow chart of a multi-agent-based intelligent dialogue method according to an embodiment;

[0050] Figure 2 A flowchart illustrating steps for determining an empathy skill combination in one embodiment;

[0051] Figure 3 is a schematic diagram illustrating the principle of a multi-agent-based intelligent dialogue method in one embodiment;

[0052] Figure 4 is a structural block diagram of a multi-agent based intelligent dialogue system in one embodiment;

[0053] Figure 5 is a structural block diagram of a multi-agent-based intelligent dialogue system in another embodiment;

[0054] Figure 6 FIG. 1 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0055] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0056] In some embodiments, a multi-agent intelligent dialogue method is provided for use in an intelligent dialogue system supported by a psychological companion robot. With the support of the intelligent dialogue system, the psychological companion robot can engage in intelligent dialogue with the user. The intelligent dialogue system in the embodiments of this application includes multiple agents. Through collaboration between the multiple agents, the psychological companion robot provides users with relatively extensive psychological support during conversations. The intelligent dialogue system runs on a computer device, which provides hardware support. The computer device can be a server.

[0057] like Figure 1 As shown, the above-mentioned multi-agent-based intelligent dialogue method specifically includes the following steps:

[0058] S11, conduct preliminary warning analysis of users’ conversation information for mental health risks.

[0059] For example, the intelligent dialogue system may include a warning judgment unit, which is used to perform a preliminary warning analysis on mental health risks. The preliminary warning analysis may also be called a preliminary warning judgment.

[0060] Specifically, during the conversation with the psychological companion robot, the user can enter conversation information in the dialog box. The intelligent dialogue system can perform a preliminary early warning analysis of the user's conversation information for psychological health risks based on the early warning judgment unit to obtain a preliminary early warning analysis result. The preliminary early warning analysis result is used to preliminarily determine whether the user has a psychological health risk. Exemplarily, the preliminary early warning analysis result may include low risk, medium risk, or high risk. That is, based on the three-level early warning risk label, the preliminary early warning analysis result is determined. If it is high risk, step S12 is executed; if it is low risk or medium risk (i.e., not high risk), step S13 is executed.

[0061] In some examples, the intelligent dialogue system can analyze the probability of a risk event based on the user's dialogue information by the early warning judgment unit and compare the probability of the risk event with a preset probability threshold. The preset probability threshold includes a first threshold and a second threshold, where the first threshold is greater than the second threshold. For example, the first threshold can be 0.95 and the second threshold can be 0.5.

[0062] If the probability of a risk event is greater than or equal to the first threshold, for example, the probability of a risk event is greater than or equal to 0.95, then the preliminary warning analysis result is high risk. It should be understood that the maximum probability of a risk event will not exceed 1 (ie, <= 1).

[0063] If the probability of a risk event occurring is less than the first threshold and greater than or equal to the second threshold, for example, the probability of a risk event occurring is greater than or equal to 0.5 and less than 0.95, then the preliminary warning analysis result is medium risk.

[0064] If the probability of a risk event occurring is lower than a second threshold, for example, if the probability of a risk event occurring is <0.5, then the preliminary warning analysis result is low risk. In some embodiments, the conversation information may be multimodal information, specifically including at least one of voice, video, image, or text information. In this embodiment, step S11 includes: using a multimodal warning analysis model, analyzing the conversation information on at least one characteristic dimension of emotional state, potential risk behavior, or the urgency of potential risk behavior to obtain first characteristic information; and generating a preliminary warning analysis result based on the first characteristic information.

[0065] Emotional state includes whether the emotion is negative and the degree of negativity. Potentially risky behavior refers to behavior that indicates a user is potentially at risk, such as self-harm, suicide, or seeking help. The urgency of a potentially risky behavior refers to the intensity or urgency with which the user expresses the potentially risky behavior. For example, a user's strong request for help indicates a high degree of urgency.

[0066] The intelligent dialogue system pre-deploys a multimodal early warning analysis model, which is used to perform preliminary early warning analysis based on multimodal information. Specifically, the intelligent dialogue system uses the multimodal early warning analysis model to analyze the multimodal dialogue information input by the user during the conversation based on at least one characteristic dimension: emotional state, potential risk behavior, or the urgency of the potential risk behavior. This generates first characteristic information, which is equivalent to extracting language and behavioral features from multimodal dialogue information (such as voice information / text information) in historical conversations (already generated conversations). Furthermore, a preliminary early warning analysis result is generated based on the first characteristic information. This is equivalent to estimating the probability of the extracted language and behavioral features associated with the risk event requiring early warning, thereby determining the risk level (such as high risk, medium risk, or low risk) and forming a preliminary early warning analysis result. For example, the intelligent dialogue system can analyze the probability of the risk event based on the first characteristic information, compare the probability of the risk event with a preset probability threshold, and then generate a preliminary early warning analysis result based on the comparison result.

[0067] For greater clarity, in the embodiments of the present application, "first", "second", etc. are used to distinguish and represent conversations or feature information generated at different times, and do not impose limitations on subordination, size, etc.

[0068] For example, a preliminary early warning analysis can be performed for each round of dialogue. If the preliminary early warning analysis result of the current round of dialogue is high risk, step S12 is executed to perform an advanced early warning analysis. Then, for the dialogues generated during the advanced early warning analysis phase, the preliminary early warning analysis can be discontinued. For example, if the subsequent advanced early warning analysis phase involves three rounds of dialogue, the preliminary early warning analysis (i.e., preliminary early warning judgment) will no longer be performed for these three rounds of dialogue. If the advanced early warning analysis phase ends, the preliminary early warning analysis can be restored to each round of dialogue.

[0069] S12: If the preliminary warning analysis result is high risk, the warning dialogue agent generates a subsequent dialogue strategy based on the dialogue information, and performs advanced warning analysis on the dialogue content obtained based on the dialogue strategy.

[0070] An intelligent agent is a module with intelligent dialogue capabilities, which can achieve intelligent dialogue through corresponding models. The intelligent dialogue system implemented in this application includes multiple agents, one of which is the early warning dialogue agent. The early warning dialogue agent is used to perform advanced early warning analysis based on the dialogue confirmation mechanism. That is, based on the initial early warning analysis, it confirms whether the user actually has psychological risks and thus determines whether early warning processing is necessary.

[0071] If the initial warning analysis result is high risk, it means that the user has a certain probability of psychological risk. Therefore, the warning dialogue agent can be used to dynamically generate subsequent dialogue strategies based on the dynamic warning dialogue confirmation mechanism, and conduct subsequent corresponding dialogues with the user based on the dialogue strategy. Furthermore, in the subsequent dialogue, the amount of information in the dialogue content expressed by the user is further obtained, and advanced warning analysis is performed to further confirm the user's risk level at the psychological risk level. It should be understood that the warning analysis of the dialogue content obtained based on the dynamically generated dialogue strategy is an advanced warning analysis. Since the advanced warning analysis is based on the dialogue content obtained in a targeted manner by the dialogue strategy and has a large amount of information to reconfirm whether the user really has psychological risks, the analysis result is more accurate, thereby improving the accuracy of the psychological risk warning.

[0072] In some embodiments, the early warning dialogue agent can identify target feature type features based on user input during the conversation and dynamically generate dialogue strategies based on the identified feature information. The target feature type includes at least one of emotional features, verbal features, or behavioral features. For example, frustration is an emotional feature, extreme language, repeated denial, and self-blame are verbal features, and lax behavior is a behavioral feature.

[0073] In some embodiments, the early warning dialogue agent can directly identify feature information under the target feature type based on the user's input information in historical dialogues (dialogues that have already occurred).

[0074] In other embodiments, the early warning dialogue agent may first guide the user through a preset number of dialogue rounds and then, based on the input information during the guided dialogue, identify feature information within a target feature type. The preset number of rounds may be greater than or equal to one. Specifically, the intelligent dialogue system may guide the user through a first dialogue through the early warning dialogue agent and, based on the user input information during the first dialogue, identify second feature information within a target feature type; the target feature type may include at least one of emotional features, speech features, or behavioral features. Based on the second feature information, a subsequent dialogue strategy may be dynamically generated for the dialogue information.

[0075] The dialogue strategy is generated dynamically, so the dialogue turns indicated by the dialogue strategy are not fixed, but are dynamically triggered and determined based on the significance of the combination of features such as emotions, speech and behavior.

[0076] In some embodiments, the dialogue strategy includes the number of dialogue turns and the type of dialogue. The dialogue type may include various types, such as clarification dialogues and confirmation dialogues. Clarification dialogues are more open-ended than confirmation dialogues. Specifically, the intelligent dialogue system may dynamically determine the number of dialogue turns and dialogue types in the dialogue strategy. For example, if the second feature information analysis indicates that the user only has mild negative emotions, the user may be guided to engage in a single round of clarification dialogue. If the second feature information analysis indicates that the user is experiencing strong despair and expresses clear intentions to self-harm, the user may be guided to engage in multiple rounds of confirmation dialogue.

[0077] When a dialogue strategy involves multiple rounds of conversation, user feedback from each round will influence the next round of advanced warning analysis, enabling dynamic adjustment of risk probabilities. Specifically, in the next round of conversation, the current round of advanced warning analysis can be combined with the user's conversation content (including user feedback) in the conversations already generated, as indicated by the dialogue strategy, to dynamically update the risk probabilities. This allows for more accurate advanced warning analysis by integrating the content of multiple rounds of conversation.

[0078] The early warning dialogue agent performs advanced early warning analysis through a pre-trained deep early warning analysis model.

[0079] In some embodiments, if the advanced warning analysis result indicates that there is no higher risk, the current warning process can be terminated. If the advanced warning analysis result indicates that there is a higher risk (such as a significant potential risk), the corresponding warning processing can be triggered directly, or a mental health-related scale can be output to the user first, and the user's mental health can be more accurately assessed based on the scale. If the mental health-related scale also assesses that there is no higher risk, the current warning process can be terminated. For example, if the risk probability in the advanced warning analysis result is greater than or equal to the third threshold, it is determined that there is a potential risk. If the risk probability in the advanced warning analysis result is less than the third threshold, it is determined that there is no potential risk. The size of the third threshold can be set according to actual needs and is not limited to this.

[0080] In some examples, if the result of the advanced warning analysis is that there is a potential risk, a first assessment guidance message is generated to guide the user to complete a first assessment scale for the first risk. Among them, the first risk refers to the risk that can cause external harm or loss, for example, the risk of suicide, self-harm, etc. is the first risk. If the assessment result corresponding to the first assessment scale shows a high risk, the crisis warning process is triggered. It should be understood that the assessment result corresponding to the first assessment scale can be directly described as whether there is a high risk. The assessment result corresponding to the first assessment scale can also be a quantitative value. If the quantitative value is greater than or equal to a preset threshold, the assessment result is determined to be a high risk. Conversely, if the quantitative value is less than the preset threshold, the assessment result is determined to show that there is no high risk. In the embodiment of the present application, there is no limitation on the method for determining whether the assessment result corresponding to the first assessment scale shows a high risk.

[0081] For example, the advanced warning analysis results of the model analysis and the assessment results corresponding to the first assessment scale can be combined to determine a final first target risk level. If the first target risk level is high, crisis warning processing is triggered. For example, the advanced warning analysis results and the assessment results corresponding to the first assessment scale are converted into corresponding scores, and the two scores are weighted and summed to obtain a comprehensive score. Based on a preset correspondence between scores and risk levels, the risk level corresponding to the comprehensive score is determined, which is the first target risk level.

[0082] For example, if the advanced warning analysis results obtained by the dynamic dialogue confirmation mechanism indicate the presence of a significant suicide risk tendency, the warning dialogue agent can display the link address of a preset standardized psychological assessment scale (i.e., the first assessment scale, equivalent to a psychological assessment tool) in the dialogue interface, and in response to the user's triggering operation on the link address, display the evaluation interface of the psychological assessment scale, thereby guiding the user to complete the preset standardized psychological assessment scale (i.e., fill in the corresponding evaluation items). This link is used to further quantify the risk level to facilitate subsequent crisis response. The warning dialogue agent can obtain the evaluation results corresponding to the psychological assessment scale. If the evaluation result shows that there is a high risk (i.e., the user has a higher risk of psychological problems), the crisis warning process can be triggered, and illustratively, the intervention process can also be entered. If there is no high risk, the current warning process can be exited.

[0083] In other examples, if the advanced warning analysis indicates no potential risk exists and the user still exhibits significant emotional fluctuations, a second assessment guidance message is generated to guide the user through a second assessment scale for a second risk. Secondary risk, also known as emotional risk, refers to risks inherent in one's thoughts or emotions. For example, anxiety or depression risk are examples of secondary risks. For example, if the user's emotional fluctuations exceed a preset threshold, significant emotional fluctuations are determined to be present.

[0084] If the assessment result corresponding to the second assessment scale indicates high risk, emotional warning processing is triggered. For example, the advanced warning analysis results of the model analysis can be combined with the assessment results corresponding to the second assessment scale to determine the final second target risk level. If the second target risk level is high risk, emotional warning processing is triggered. It should be understood that the method for determining whether the assessment result corresponding to the second assessment scale indicates high risk can be referred to the relevant processing for the first assessment scale above, and will not be repeated here.

[0085] For example, if there is no significant suicide risk, but the user still shows significant emotional fluctuations, the early warning dialogue agent can display the link address of the emotion assessment scale (i.e., the second assessment scale, used to assess whether there is a second risk, such as the anxiety / depression assessment scale) in the dialogue interface, respond to the user's trigger operation on the link address, and display the evaluation interface of the emotion assessment scale, thereby guiding the user to the emotion assessment scale (i.e., fill in the corresponding evaluation items). Furthermore, the user's current psychological state is determined by combining the advanced early warning analysis results and the evaluation results corresponding to the emotion assessment scale, that is, the user's current risk level is determined, so as to evaluate whether the emotional warning process needs to be triggered. Specifically, if it is a high risk, the emotional warning process is triggered; if it is not a high risk, the emotional warning process is not triggered, and the current early warning process can be exited.

[0086] The above solution can detect and intervene in potential risks in a timely and accurate manner.

[0087] Furthermore, after ending / exiting the current warning process, relevant content on mental health management can also be provided to the user, such as providing mental health advice, resource links or emotion regulation exercises to support the user's daily mental health management.

[0088] In some embodiments, in addition to the early warning dialogue agent, the intelligent dialogue system also includes a recommendation agent, an empathy dialogue agent, a knowledge retrieval agent, and a chat agent. Among them, the recommendation agent is used to recommend mental health-related information that is suitable for the user based on the dialogue when the user has a recommendation demand, so as to assist and support the user in improving and adjusting his or her mental health. The empathy dialogue agent is used to understand the user's current scene and emotions, match appropriate empathy skills, and thus have an empathic dialogue with the user to provide more accurate psychological support. The knowledge retrieval agent is used to provide professional and accurate mental health knowledge retrieval capabilities. The chat agent is used to provide relatively relaxed conversations when the user has no psychological counseling needs, and play a certain companionship role.

[0089] If the initial warning analysis result is not high risk, it indicates that the user is less likely to have psychological risks. In this case, we can determine whether the user has other needs (such as requests for mental health information recommendations or requests for mental health knowledge), and use the corresponding agent for more accurate analysis and processing. The specific processing will be described in more detail below.

[0090] S13: If the preliminary warning analysis result is not high risk, and based on the conversation information, it is identified that the user has a need for recommendation of mental health information, the recommendation result is output through the recommendation agent.

[0091] Exemplarily, the recommendation result includes at least one of a recommended mental health course or a mental health scale.

[0092] Specifically, if the preliminary warning analysis result is not high risk, it is possible to identify whether the user has a need for recommendation of mental health information based on the conversation information.

[0093] In some embodiments, the intelligent dialogue system can perform contextual analysis of dialogue information (i.e., analyzing the context of multiple rounds of user dialogue) based on a dialogue intent recognition model to identify user intent, which is equivalent to semantic modeling and classification of recommendation requirements. For example, the dialogue intent recognition model can be a model built based on the BERT text encoder for dialogue intent recognition.

[0094] User intent may include at least four categories: course recommendation only, scale recommendation only, comprehensive recommendation, and no recommendation required.

[0095] Comprehensive recommendation: This refers to users who want to recommend both a mental health course and a mental health scale. This means that users express interest in or willingness to take both the course and the psychological assessment.

[0096] Course recommendations only: This refers to users who only want to be recommended mental health courses. This means users are interested in gaining mental health-related knowledge and skills, such as courses on emotional coping, stress management, and sleep.

[0097] Scale recommendation only: This refers to users who only want to be recommended mental health scales. This means they are more interested in assessing and understanding their own mental state, such as using a scale to assess anxiety, depression, sleep, etc.

[0098] No recommendation needed: This means the user currently has no recommendation needs. For example, the user directly indicates that they do not need recommendations or rejects recommended content.

[0099] When the user's intention is that no recommendation is needed, it means that the user does not have any recommendation needs for mental health information.

[0100] If the user's intent is to recommend only courses, only scales, or a combination of these, this indicates a recommendation requirement. Specifically, the recommendation requirement includes at least one of a mental health course or a mental health scale. Consequently, corresponding recommendation results can be generated.

[0101] Recommendation results match recommendation requests. Specifically, if a recommendation request exists, the recommendation agent is invoked to generate the corresponding recommendation results. For example, if a user requests a mental health course, the recommendation results will include the recommended mental health course. Another example is if a user requests a mental health scale, the recommendation results will include the recommended mental health scale. If the user requests both of these types of information, the recommendation results will include the recommended mental health course or mental health scale.

[0102] In some embodiments, step S13 outputs the recommendation results through the recommendation agent, including: guiding the user to conduct a second conversation related to the recommendation of mental health information through the recommendation agent; analyzing the conversation content in the second conversation, identifying the content category to be recommended, and extracting summary information, conversation topics, and psychological keywords in the second conversation; the content category includes at least one of a course category or a scale category; based on the summary information, conversation topics, psychological keywords and content category, determining the matching recommendation results, and outputting the recommendation results to the user.

[0103] To make recommendations more accurately, the recommendation agent can guide the user into a second conversation related to mental health information recommendations and obtain the conversation content entered by the user in the second conversation. Furthermore, the recommendation agent can perform course classification, scale classification, and information extraction. Specifically, the recommendation agent can analyze the conversation content in the second conversation based on the large language model and identify at least one of the course categories or scale categories to be recommended. Furthermore, the recommendation agent can extract summary information, conversation topics, and psychological keywords from the second conversation based on the large language model.

[0104] Furthermore, the recommendation agent can initially match corresponding mental health courses and / or mental health scales from the database based on the summary information, conversation topic, psychological keywords, and content categories to obtain matching recommendation results and output the recommendation results to the user. For example, the recommendation agent can output and display the recommendation results in the conversation interface with the user.

[0105] The second dialogue can be a single-round dialogue or a two-round dialogue.

[0106] In some embodiments, when the second conversation is a multi-round conversation, corresponding recommendation results can be generated for each round of the second conversation. That is, after each round of the second conversation, the recommendation agent can generate corresponding recommendation results for the second conversation of the current round and output the recommendation results to the user. After outputting the recommendation results of each round of the second conversation, the user may respond to the recommendation results. The recommendation agent can obtain the user's feedback information on the recommendation results and determine the accuracy of the recommendation results based on the feedback information. Exemplarily, in addition to the feedback information, the recommendation agent can also combine multiple factors such as feedback information, user preference information, and response semantic similarity to comprehensively judge the accuracy of the recommendation results of the current round of the second conversation. Among them, the response semantic similarity refers to the semantic similarity between the recommendation results of the current round and the user's feedback information.

[0107] If the accuracy is lower than the preset threshold, in the next round of the second dialogue, the candidate recommendation results are re-ranked based on at least one factor: the user's selection behavior in the previous round (i.e., all previous rounds) of the second dialogue, the context relevance in multiple rounds of second dialogues, or the similarity of candidate content; wherein the candidate content similarity refers to the similarity between the candidate recommendation result and the feedback information. The selection behavior can be the behavior of selecting a candidate option for the selective question output by the recommendation agent in the dialogue interface. The selective question is a question related to the recommendation and is used to assist in determining the user's specific recommendation needs. The context relevance in multiple rounds of second dialogues can also assist in semantic understanding to a certain extent, thereby assisting the specific recommendation needs of specific users.

[0108] For example, the recommendation agent can re-rank and optimize each candidate recommendation result based on the learning to rank algorithm and multi-feature weighted strategy, taking into account the user's selection behavior in the previous round of the second conversation, the context relevance in multiple rounds of second conversations, and the similarity of candidate content, so as to improve the ranking quality and user satisfaction.

[0109] Furthermore, the recommendation agent can select the recommendation result for the next round of the second conversation from the re-ranked candidate recommendation results. Specifically, the recommendation result for the next round of the second conversation can be selected from the re-ranked candidate recommendation results in descending order. For example, the first candidate recommendation result after the re-ranking can be selected as the recommendation result for the next round of the second conversation.

[0110] The above solution aims to identify whether the user needs recommended content and what kind of recommended content the user needs through the recommendation agent, so as to improve the pertinence of the system recommendation, improve the accuracy and timeliness of the recommendation, and thus improve the user experience.

[0111] S14: If the preliminary warning analysis result is not high risk and the user does not have a recommendation demand, then based on the conversation information, predict the user's current target psychological scene and target emotion expressed, and determine the corresponding empathy skill combination based on the target psychological scene and target emotion through the empathy dialogue agent, and conduct subsequent conversations based on the empathy skill combination.

[0112] If the initial warning analysis result is not high risk and the user does not need recommendations related to mental health, then intrusive recommendations are avoided, and basic information support or a companion conversation can be provided. For example, if there is no recommendation need, an empathetic dialogue agent can be used to conduct dialogue processing to optimize subsequent companion conversations, enabling subsequent empathetic dialogue with the user and enhancing the empathy capabilities of the intelligent dialogue system.

[0113] Specifically, the intelligent dialogue system can predict the user's current target psychological scenario and target emotion based on the conversation information. For example, the intelligent dialogue system can input the conversation information into a pre-trained prediction model to predict the user's current target psychological scenario and target emotion.

[0114] For example, there are nine categories of common psychological scenes (i.e., nine major scenes), namely: academic pressure, peer relationships, parent-child relationships, daily life, intimate relationships, physical relationships, self-cognition, major events, and no obvious scenes. There are six categories of common emotions (i.e., six major emotions), namely: sadness, anger, fear, disgust, happiness, and no emotion. When training a prediction model, you can use conversation data containing nine major scene labels and six major emotion labels to train the model, so as to train a prediction model that can accurately predict the scene category and emotion category of the input text. This solution can effectively capture the contextual information of the text and improve the accuracy of identifying psychological scenes and corresponding emotions.

[0115] For example, when the conversation information is multimodal (e.g., text + voice), the prediction model can fuse the multimodal conversation information and, based on the fused conversation information, predict the target psychological scene and target emotion. Specifically, the prediction model can predict multiple candidate scene-emotion combinations based on the conversation information; each candidate scene-emotion combination has a corresponding probability value. Furthermore, based on the probability values ​​corresponding to each combination, the prediction model can select a target scene-emotion combination from the multiple candidate scene-emotion combinations, where the target scene-emotion combination includes a target psychological scene and a target emotion. The target emotion refers to the user's emotion in the target psychological scene.

[0116] Furthermore, after predicting the target psychological scene and target emotion (i.e., the target scene-emotion combination), the intelligent dialogue system can determine the corresponding empathy skill combination based on the target psychological scene and target emotion through the empathy dialogue agent, and conduct subsequent dialogue based on the empathy skill combination.

[0117] In some embodiments, empathy techniques may include at least one of: asking about the user's specific situation to understand their needs and background; asking about feelings (showing concern for the user's emotional state and caring about their feelings); asking about ideas (exploring the user's thoughts and opinions to promote in-depth communication); restatement (repeating the user's words to confirm understanding and express concern); identifying emotions or mental states (analyzing the user's language to identify their emotions or mental states); sympathy (expressing sympathy and understanding for the user's situation); perspective-taking (attempting to see things from the user's perspective and understand their position); affirmation (recognizing the user's feelings or opinions and providing positive feedback); or encouragement (encouraging the user to express themselves and boost their confidence). Introducing multiple empathy techniques can achieve more natural and heartwarming human-computer interaction dialogues.

[0118] The empathy skill combination is formed by combining at least part of the above empathy skills, and each empathy skill in the empathy skill combination has a corresponding weight ratio.

[0119] In some embodiments, there may be multiple target scene-emotion combinations, for example, including a main combination and a secondary combination. The target psychological scene and target emotion included in the main combination belong to the main label, and the target psychological scene and target emotion included in the secondary combination belong to the secondary label. In this case, the prediction model can be trained based on a multi-label multimodal joint modeling mechanism. It should be understood that multiple target scene-emotion combinations (such as main combinations and secondary combinations) are scene-emotion combinations predicted from different dimensions or angles. Based on the main combination and the secondary combination, a more appropriate empathy skill combination can be dynamically selected to ensure that the system's response can accurately match the user's psychological state. A weight distribution mechanism is adopted to allocate different empathy skill combinations in different psychological scenarios, so that the user's psychological state can be matched more accurately, thereby improving the empathy ability in subsequent conversations.

[0120] To help us understand the empathy skill combination, let's use an example. For example, a person using an intelligent dialogue system might express that their mother criticized them for poor grades, causing them to feel sad and resentful of her. The prediction model can then predict and identify two target scenario-emotion combinations: a primary combination and a secondary combination.

[0121] Target psychological scenario: academic pressure (target psychological scenario in the main combination) + parental relationship (target psychological scenario in the secondary combination);

[0122] Target emotions: Sadness (target emotion in the primary combination) + Fear (target emotion in the secondary combination).

[0123] The matching empathy skill combination is as follows:

[0124] 40% affirmation: First, affirm the other person's emotions, especially when facing academic pressure, emphasize that this anxiety is understandable, help the other person reduce guilt, and feel that their stress and emotions are normal.

[0125] 30% Express companionship: Provide emotional support and let them know they are not alone in this difficult situation and that you will be there to face these challenges together.

[0126] 20% Asking about feelings: Asking questions helps the other person better express their feelings, especially the specific reasons for the anxiety and sadness caused by academic pressure, so that they feel heard.

[0127] 10% Restatement: Restate the other person’s feelings so that they can confirm and validate their emotions. It can also help them organize their thoughts and reduce their emotional burden.

[0128] In some embodiments, the prediction model's prediction results fall into one of the following two situations: the first is that the target psychological scenario and target emotion are predicted; the second is that the user currently has no clear psychological counseling scenario. For example, if the intelligent dialogue system predicts a psychological scenario that exists in the nine scenarios described above based on the dialogue information, it means that the target psychological scenario has been predicted, that is, the target psychological scenario is within the nine scenarios. Otherwise, it means that the user currently has no clear psychological counseling scenario.

[0129] In the first case, the above steps can be followed. The empathic dialogue agent can determine the corresponding empathy skill combination based on the target psychological scenario and target emotion, and then conduct subsequent conversations based on this empathy skill combination. In the second case, the chat agent can be used to achieve a relaxed and friendly conversation, alleviating the user's loneliness and emotional stress.

[0130] The above solution builds a psychological companion robot based on a multi-agent approach. It can significantly improve the intelligence level and professionalism through the collaborative work of intelligent agents such as early warning dialogue agents, recommendation agents and empathy dialogue agents, provide users with more psychological support, and optimize user experience and emotional connection.

[0131] Secondly, each intelligent agent belongs to a different module and is responsible for its own corresponding functions. The modular design enhances the flexibility and scalability of the system.

[0132] In addition, only one psychological companion robot is needed to achieve multi-faceted and multi-functional mental health services, which reduces the cost and threshold of mental health services, promotes the popularization and standardization of services, provides important support for solving the shortage of mental health resources, and has broad social value and application prospects.

[0133] like Figure 2 As shown, in some embodiments, if the preliminary warning analysis result is not high risk and the user does not have a recommendation requirement, the empathy skill combination can be determined by the following steps:

[0134] S21, obtaining a pre-built association graph; the association graph includes scene nodes and emotion nodes, and edges are built between the associated scene nodes and emotion nodes.

[0135] Among them, building edges between associated scene nodes and emotion nodes means that scene nodes and emotion nodes with associated relationships are connected through edges.

[0136] S22, mining the co-occurrence relationship between scenes and emotions based on association graph.

[0137] S23, based on the dialogue information, predict multiple candidate scene-emotion combinations; each candidate scene-emotion combination has a corresponding probability value.

[0138] S24, adjusting the probability value based on the co-occurrence relationship, and selecting a target scene-emotion combination from multiple candidate scene-emotion combinations based on the adjusted and updated probability value; wherein the target scene-emotion combination includes a target psychological scene and a target emotion.

[0139] S25, through the empathy dialogue agent, determines the corresponding empathy skill combination based on the target psychological scene and target emotion, and conducts subsequent dialogue based on the empathy skill combination.

[0140] Since the prediction model is obtained based on model training, the characteristics of model training cannot guarantee that the prediction results are 100% accurate. Therefore, there may be invalid or contradictory scene-emotion combinations in the predicted candidate scene-emotion combinations. Therefore, in an embodiment of the present application, the co-occurrence relationship between scenes and emotions is mined based on the association graph, and the co-occurrence relationship can more accurately reflect the effectiveness of the scene-emotion combination. Therefore, by adjusting the updated probability value based on the co-occurrence relationship, invalid or contradictory scene-emotion combination outputs can be effectively avoided, thereby enhancing the accuracy and robustness of psychological scene (i.e., psychological state) recognition.

[0141] In some embodiments, a user may enter a mental health-related question and answer statement in a conversation. After obtaining the mental health-related question and answer statement, a knowledge retrieval agent may be invoked to retrieve professional mental health knowledge from a pre-built knowledge base as response information.

[0142] In some examples, the knowledge base may include a structured database and / or a text library. Specifically, the intelligent dialogue system can construct a structured database based on psychological common sense and self-awareness-related question-and-answer pairs to ensure data accuracy and comprehensiveness. The intelligent dialogue system can also collect literature, research reports, and other relevant materials in the field of psychology to build a text library, providing a rich source of knowledge for the intelligent agent.

[0143] In some examples, the knowledge retrieval agent can use natural language processing technology to quickly and accurately retrieve relevant mental health knowledge from the knowledge base. Based on vectorized representation and similarity calculation, it calculates the weight of the mental health knowledge retrieved initially, and recalls mental health knowledge with high relevance to the user's question and answer statement or query statement as candidate mental health knowledge. Then, based on the re-ranking strategy, the candidate mental health knowledge is sorted according to the relevance and importance of the candidate mental health knowledge, and the most relevant mental health knowledge is output (replied) to the user first.

[0144] In some embodiments, the knowledge retrieval agent can polish the retrieved answers (i.e., determine the output mental health knowledge) based on a large language model, and then output a reply to the user, thereby improving the fluency and naturalness of the reply.

[0145] In some embodiments, the intelligent dialogue system can use the contextual understanding capabilities of the language model to optimize the expression of the retrieved answers, thereby ensuring that the response can accurately grasp the user's intent and provide personalized answers.

[0146] In some embodiments, as Figure 3 As shown in the figure, the principle of the multi-agent intelligent dialogue method is briefly illustrated. Figure 3 First, a preliminary early warning judgment is made on the user's input information (i.e., preliminary early warning analysis). If it is determined that there is a high risk, the early warning dialogue agent is called to perform advanced early warning analysis. If there is no high risk, it is determined whether the user has a recommendation demand (i.e., whether there is a recommendation demand for mental health information). If so, the recommendation agent is called to determine the recommendation result. If not, it is determined whether to perform knowledge retrieval. If knowledge retrieval is performed, the knowledge retrieval agent is called to retrieve the corresponding mental health knowledge. If knowledge retrieval is not performed, the scene and emotion can be predicted. If any one or more of the nine scenarios are predicted, the empathy dialogue agent is called to generate the corresponding empathy skill combination, and subsequent dialogue is conducted based on the empathy skill combination. If no scenario is predicted (i.e., the user currently has no clear psychological counseling scenario), the chat agent is called to have a relaxed conversation with the user.

[0147] The method in the embodiments of the present application is committed to providing users with all-round, multi-level mental health support to help them better manage and improve their mental health levels in daily life.

[0148] Specifically, after obtaining user authorization, in the initial assessment phase, the user's basic situation and needs can be collected through natural dialogue to provide a basis for subsequent support, such as obtaining preliminary early warning analysis results. In the support phase, personalized psychological support can be provided based on the preliminary early warning analysis results to help users cope with current psychological challenges. For example, through the empathy dialogue agent, the corresponding empathy skill combination can be dynamically matched to provide personalized empathy dialogue in subsequent conversations. For example, when the user has a search need, the knowledge retrieval agent can be used to retrieve accurate mental health knowledge in a timely manner. In addition, in the resource connection phase, if it is identified that the user has a recommendation need, the recommendation agent can recommend professional resources (such as mental health courses) and self-help tools (such as mental health scales) to assist users in further improving their mental health. In the subsequent tracking phase, the user's progress is regularly checked, and the support strategy is adjusted based on feedback to ensure continuous and effective mental health management.

[0149] In some embodiments, the intelligent dialogue system has at least the following functions:

[0150] Daily psychological support functions include: stress management dialogue units (used to help users identify and manage stressors and provide coping strategies), mood diaries and reflection guidance (used to encourage users to record daily mood changes, promote self-reflection and emotional regulation), and cognitive restructuring exercise guidance (used to guide users to identify and challenge negative thinking and cultivate positive cognitive patterns). For example, empathic dialogue agents can provide these daily psychological support functions.

[0151] Professional resource connection functions: online / offline resource navigation (used to provide information on online courses, offline activities, and support groups related to mental health), crisis intervention fast track (used to provide emergency support and intervention measures when users encounter psychological crises). For example, after the early warning agent performs advanced early warning analysis and the advanced early warning analysis results indicate a high risk, it can use the crisis intervention fast track to intervene accordingly.

[0152] Psychological education functions: personalized mental health knowledge push (used to push relevant mental health knowledge based on user interests and needs), self-help skills training courses (used to provide self-help skills training, such as relaxation techniques and emotion management). For example, the recommendation agent can implement the above psychological education functions.

[0153] Growth tracking function: visualization of mental health indicators (used to show the changing trends of users' mental health indicators to help them understand their own conditions), progress milestone records (used to record users' important progress and achievements in their mental health journey and enhance their self-confidence).

[0154] Personalized growth report: used to regularly generate user growth reports, provide feedback and suggestions, and support their continuous development.

[0155] Based on the same inventive concept, the present application also provides a multi-agent intelligent dialogue system for implementing the multi-agent intelligent dialogue method described above. The solution provided by this system is similar to the solution described in the method described above. Therefore, the specific limitations of one or more multi-agent intelligent dialogue system embodiments provided below can be found in the above-mentioned limitations of the multi-agent intelligent dialogue method and will not be repeated here.

[0156] In one embodiment, Figure 4 As shown, a multi-agent based intelligent dialogue system is provided, which includes:

[0157] The preliminary warning analysis unit 401 is used to perform preliminary warning analysis on the user's conversation information for mental health risks.

[0158] The early warning dialogue unit 402 is used to generate subsequent dialogue strategies for the dialogue information through the early warning dialogue agent if the preliminary early warning analysis result is high risk, and perform advanced early warning analysis on the dialogue content obtained based on the dialogue strategy.

[0159] The recommendation unit 403 is used to output the recommendation result through the recommendation agent if the preliminary warning analysis result is not high risk and the user is identified to have a recommendation demand for mental health information based on the conversation information.

[0160] The empathy dialogue unit 404 is used to predict the user's current target psychological scene and target emotion expressed based on the dialogue information if the preliminary warning analysis result is not high risk and the user does not have a recommendation demand, and to determine the corresponding empathy skill combination based on the target psychological scene and target emotion through the empathy dialogue agent, and conduct subsequent dialogue based on the empathy skill combination.

[0161] In some embodiments, the conversation information includes at least one modality of user input: voice information, video information, image information, or text information. The preliminary warning analysis unit 401 is further configured to analyze the conversation information using a multimodal warning analysis model, using at least one characteristic dimension of emotional state, potential risk behavior, or the urgency of the potential risk behavior, to obtain first characteristic information; and generate a preliminary warning analysis result based on the first characteristic information.

[0162] In some embodiments, the early warning dialogue unit 402 is also used to guide the user to conduct a first dialogue through the early warning dialogue agent, and identify second feature information under the target feature type based on the user's input information in the first dialogue; the target feature type includes at least one of emotional features, speech features or behavioral features; based on the second feature information, a subsequent dialogue strategy is dynamically generated for the dialogue information.

[0163] In some embodiments, the system further comprises:

[0164] The first warning processing unit 405 is configured to generate first assessment guidance information to guide the user to complete a first assessment scale for the first risk if the advanced warning analysis result indicates that a potential risk exists; and trigger crisis warning processing if the assessment result corresponding to the first assessment scale indicates a high risk;

[0165] like Figure 5 As shown, in some embodiments, the system further includes: a first warning processing unit 405 and a second warning processing unit 406, wherein:

[0166] The second warning processing unit 406 is used to generate second assessment guidance information to guide the user to complete a second assessment scale for the second risk if the advanced warning analysis result shows that there is no potential risk and the user still shows significant emotional fluctuations; if the assessment result corresponding to the second assessment scale shows a high risk, emotional warning processing is triggered.

[0167] In some embodiments, the recommendation unit 403 is also used to perform context analysis on the conversation information based on the conversation intention recognition model to identify the user's intention; when the user's intention is not to require recommendation, it is determined that the user does not have a recommendation demand for mental health information; when the user's intention is any one of only course recommendation, only scale recommendation, or comprehensive recommendation, it is determined that there is a recommendation demand.

[0168] In some embodiments, the recommendation unit 403 is also used to guide the user to conduct a second conversation related to mental health information recommendation through the recommendation agent; analyze the conversation content in the second conversation, identify the content category to be recommended, and extract summary information, conversation topics, and psychological keywords in the second conversation; the content category includes at least one of a course category or a scale category; based on the summary information, conversation topics, psychological keywords and content category, determine the matching recommendation results, and output the recommendation results to the user.

[0169] In some embodiments, the second conversation is a multi-round conversation; corresponding recommendation results are generated for each round of the second conversation; the recommendation unit 403 is also used to obtain user feedback information on the recommendation results after outputting the recommendation results of each round of the second conversation, and determine the accuracy of the recommendation results based on the feedback information; when the accuracy is lower than a preset threshold, in the next round of the second conversation, the candidate recommendation results are rearranged according to at least one factor of the user's selection behavior in the previous round of the second conversation, the context relevance in multiple rounds of the second conversation, or the similarity of the candidate content; wherein the candidate content similarity refers to the similarity between the candidate recommendation results and the feedback information; the recommendation results for the next round of the second conversation are selected from the rearranged candidate recommendation results.

[0170] In some embodiments, the empathy dialogue unit 404 is also used to obtain a pre-constructed association graph; the association graph includes scene nodes and emotion nodes, and edges are built between associated scene nodes and emotion nodes; the co-occurrence relationship between scenes and emotions is mined based on the association graph; based on the dialogue information, multiple candidate scene-emotion combinations are predicted; each candidate scene-emotion combination has a corresponding probability value; the probability value is adjusted based on the co-occurrence relationship, and based on the adjusted and updated probability value, a target scene-emotion combination is selected from multiple candidate scene-emotion combinations; wherein the target scene-emotion combination includes a target psychological scene and a target emotion.

[0171] Each module or unit in the multi-agent-based intelligent dialogue system can be implemented in whole or in part through software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in the computer device in the form of software, so that the processor can call and execute the corresponding operations of each module or unit.

[0172] In one embodiment, a computer device is provided, whose internal structure diagram can be as follows: Figure 6 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, abbreviated as I / O) and a communication interface. The processor, memory and input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a multi-agent-based intelligent dialogue method is implemented.

[0173] Those skilled in the art will understand that Figure 6 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0174] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the steps in each embodiment of the present application are implemented.

[0175] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in each embodiment of the present application are implemented.

[0176] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in each embodiment of the present application when executed by a processor.

[0177] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions.

[0178] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, database or other media used in the embodiments provided in this application may include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory may include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in the various embodiments provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, distributed databases based on blockchains. The processor involved in the various embodiments provided in this application may be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, etc., but are not limited to these.

[0179] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0180] The above embodiments merely illustrate several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that a person skilled in the art may make various modifications and improvements without departing from the spirit of the present invention, all of which fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.

Claims

1. A multi-agent based intelligent dialogue method, characterized in that: The method comprises: Conduct preliminary early warning analysis of users' conversation information for mental health risks; If the initial warning analysis result is high risk, the warning dialogue agent generates a subsequent dialogue strategy based on the dialogue information, and performs advanced warning analysis on the dialogue content obtained based on the dialogue strategy; If the preliminary warning analysis result is not high risk, and based on the conversation information, it is identified that the user has a need for recommendation of mental health information, the recommendation agent outputs a recommendation result; If the preliminary warning analysis result is not high risk and the user does not have the recommendation demand, the target psychological scene and target emotion expressed by the user are predicted based on the conversation information, and the corresponding empathy skill combination is determined based on the target psychological scene and the target emotion through the empathy dialogue agent, and subsequent conversations are conducted based on the empathy skill combination.

2. The method according to claim 1, characterized in that The conversation information includes at least one modality of information among voice information, video information, picture information or text information input by the user; The preliminary early warning analysis of the user's conversation information for mental health risks includes: Analyzing the conversation information using a multimodal early warning analysis model based on at least one characteristic dimension of an emotional state, a potential risk behavior, or an urgency level of the potential risk behavior to obtain first characteristic information; A preliminary warning analysis result is generated based on the first feature information.

3. The method according to claim 1, characterized in that The generating of a subsequent dialogue strategy based on the dialogue information by the early warning dialogue agent includes: guiding the user to conduct a first dialogue through the early warning dialogue agent, and identifying second feature information under a target feature type based on input information of the user in the first dialogue; the target feature type includes at least one of an emotional feature, a speech feature, or a behavioral feature; A subsequent dialogue strategy is dynamically generated for the dialogue information according to the second feature information.

4. The method according to claim 1, wherein After performing the advanced warning analysis on the conversation content obtained based on the conversation strategy, the method further includes: If the advanced warning analysis result indicates that there is a potential risk, a first assessment guidance message is generated to guide the user to complete a first assessment scale for the first risk; if the assessment result corresponding to the first assessment scale indicates a high risk, a crisis warning process is triggered; and / or, If the advanced warning analysis result shows that there is no potential risk and the user still shows significant emotional fluctuations, a second assessment guidance information is generated to guide the user to complete a second assessment scale for the second risk; if the assessment result corresponding to the second assessment scale shows a high risk, emotional warning processing is triggered.

5. The method according to claim 1, wherein If the preliminary warning analysis result is not a high risk, and the user is identified as having a need for recommendation of mental health information based on the conversation information, before outputting a recommendation result through the recommendation agent, the method further includes: Based on a conversation intention recognition model, performing context analysis on the conversation information to identify the user intention; If the user intends not to require recommendation, determining that the user does not have the recommendation demand for mental health information; In the case where the user intends to recommend only courses, only scales, or comprehensive recommendations, it is determined that the recommendation demand exists.

6. The method according to claim 1, wherein Outputting the recommendation results through the recommendation agent includes: Guiding the user through a second conversation related to mental health information recommendations via a recommendation agent; Analyzing the conversation content in the second conversation, identifying the content category to be recommended, and extracting summary information, conversation topics, and psychological keywords in the second conversation; the content category includes at least one of a course category and a scale category; Based on the summary information, the conversation topic, the psychological keywords and the content category, a matching recommendation result is determined and the recommendation result is output to the user.

7. The method according to claim 6, characterized in that The second dialogue is a multi-round dialogue; a corresponding recommendation result is generated for each round of the second dialogue; The method further comprises: After outputting the recommendation results of each round of the second dialogue, obtaining feedback information from the user regarding the recommendation results, and determining the accuracy of the recommendation results based on the feedback information; If the accuracy is lower than a preset threshold, in the next round of the second conversation, the candidate recommendation results are re-ranked based on at least one factor of the user's selection behavior in the previous round of the second conversation, the context relevance across multiple rounds of the second conversation, or the similarity of candidate content; wherein the candidate content similarity refers to the similarity between the candidate recommendation result and the feedback information; Select the recommendation result of the second dialogue in the next round from the rearranged candidate recommendation results.

8. The method according to any one of claims 1 to 7, characterized in that Before predicting the target psychological scene and target emotion currently expressed by the user based on the conversation information, the method further includes: Obtain a pre-built association graph; the association graph includes scene nodes and emotion nodes, and edges are established between the associated scene nodes and emotion nodes; Mining the co-occurrence relationship between scenes and emotions based on the association graph; The predicting, based on the conversation information, the target psychological scene and target emotion currently expressed by the user includes: Predicting a plurality of candidate scene-emotion combinations based on the conversation information, wherein each candidate scene-emotion combination has a corresponding probability value; The probability value is adjusted based on the co-occurrence relationship, and based on the adjusted and updated probability value, a target scene-emotion combination is selected from the multiple candidate scene-emotion combinations; wherein the target scene-emotion combination includes the target psychological scene and the target emotion.

9. An intelligent dialogue system based on multi-agent, characterized in that: The system comprises: A preliminary warning analysis unit, used to conduct preliminary warning analysis of the user's conversation information for mental health risks; An early warning dialogue unit is used to generate a subsequent dialogue strategy based on the dialogue information through the early warning dialogue agent if the preliminary early warning analysis result is high risk, and to perform advanced early warning analysis on the dialogue content obtained based on the dialogue strategy; a recommendation unit, configured to output a recommendation result through a recommendation agent if the preliminary warning analysis result is not high risk and the user is identified to have a need for recommendation of mental health information based on the conversation information; The empathy dialogue unit is used to predict the user's current target psychological scene and target emotion based on the dialogue information if the preliminary warning analysis result is not high risk and the user does not have the recommendation demand, and determine the corresponding empathy skill combination based on the target psychological scene and the target emotion through the empathy dialogue agent, and conduct subsequent dialogue based on the empathy skill combination.

10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 8 are implemented.

Citation Information

Cited By

  • Dialogue generation method and device, electronic equipment, storage medium and product

    CN121388110A