Psychological healing method, device and equipment based on large model and workflow

Based on the psychological healing method based on large models and workflows, combined with scenes and emotional recognition, providing high -quality psychological professional responses to solve the problem of low accuracy in psychotherapy scenes, and realized timely and accurate timely and accurate timely and accurate , Personalized psychological support and efficient risk early warning intervention.

CN119380935AInactive Publication Date: 2025-01-28UNIV OF ELECTRONICS SCI & TECH OF CHINA
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411407830.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-10
Publication Date
2025-01-28
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing large models are difficult to provide high-quality responses in psychohealing scenarios, especially in the case of limited user question information, low response accuracy, inability to meet specific scenario needs, and low response accuracy in long-term consultations.

Method used

Through the psychological healing method based on large models and workflows, the user input information is obtained and processing through the comprehensive workflow of dialogue, including scene recognition, emotional recognition, knowledge retrieval, and HTTP request nodes. reply. At the same time, the healing risk warning large model identifies the user's input information, identifies the risk of suicide and sends it to a psychotherapist for review to ensure that users get timely and professional intervention.

Benefits of technology

Realize the provision of timely, accurate, and personalized psychological support, meet the user's response speed and professionalism of psychological health services, and ensure that timely intervention can be obtained when high -risk emotional fluctuations or behavior tendencies appear, and users can enhance the healing process of the healing process. Investment and participation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119380935A_ABST
    Figure CN119380935A_ABST
Patent Text Reader

Abstract

The invention provides a psychological healing method, device and equipment based on a large model and workflow. The method comprises the steps of obtaining a dialogue comprehensive workflow; analyzing the JSON file to generate an inference rule; sequentially executing according to the reasoning rule to generate a reasoning result; sending the workflow reasoning result to a user; the treatment healing risk early warning large model executes reasoning, and a risk result is sent to a psychotherapist; and the treatment healing note large model generates a treatment healing record as a long-term memory of the next session. The dialogue comprehensive workflow integrates a large model processing node, a classifier node, a knowledge retrieval node and an HTTP request node. Compared with the prior art, the method has the advantages that through the combination of the large model and the workflow, efficient, intelligent and personalized psychological healing experience is provided for the user. The user can obtain professional, deep and continuous healing service, and the system has wide application prospect and commercial value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of large model technology, and more specifically, relates to a psychological healing method, a psychological healing device, a computer device and a non-volatile computer-readable storage medium based on a large model and a workflow. Background Art

[0002] Psychological therapy is an important means to help individuals cope with psychological problems and relieve psychological stress. Traditional psychotherapy relies on the experience and skills of professional psychotherapists, with limited resources and limited efficiency. With the development of artificial intelligence technology, especially the emergence of big model technology, new possibilities have been provided for psychological therapy - online psychological therapy robots. After the big model is formed, the way the big model answers questions tends to answer questions in a one-question-one-answer manner, without specific fine-tuning. By default, the knowledge known will be given at one time according to the question to complete this round of dialogue.

[0003] However, the information provided by users when asking questions is limited, resulting in low accuracy of responses from large models, which often fail to meet users' consulting needs.

[0004] In addition, many psychological therapy scenarios require specific scenario knowledge. Currently, the knowledge learned by large models is mostly general knowledge, which cannot meet the needs of high-quality responses to specific scenario problems.

[0005] In addition, the large model has a very low response accuracy after multiple rounds of chats and cannot meet the users' long-term consultation needs. Summary of the invention

[0006] The psychological healing method, psychological healing device, computer equipment and non-volatile computer-readable storage medium based on the big model and workflow of the present application, after obtaining the current input information and the short-term memory information from the reasoning of the healing notes big model, execute the start node, big model processing node, classifier node, knowledge retrieval node, HTTP request node and end node according to the workflow settings, and output a professional psychological response based on scene and emotion matching, which can meet the user's needs for timely, accurate and personalized psychological support; after the professional response, when the reasoning result of the healing risk warning big model exceeds a certain value, the percentage of the reasoning result is sent to the psychotherapist for manual review and timely processing, which can meet the user's needs for the response speed and professionalism of mental health services, and ensure that when the user has high-risk emotional fluctuations or behavioral tendencies, he can get timely and professional intervention and support; finally, the healing notes big model summarizes the records of the user's healing process, and uses the healing summary as the conversation short-term memory to start a new healing conversation, which can meet the user's needs for continuity and personalized healing experience, and enhance the user's investment and participation in the healing process.

[0007] The psychological healing method based on the big model and workflow of the implementation mode of this application includes:

[0008] Obtaining a dialogue synthesis workflow; the dialogue synthesis workflow includes a string or a JSON file;

[0009] Parsing the JSON file to generate inference rules;

[0010] Perform reasoning according to the inference rules to generate inference results;

[0011] Sending the inference result to the user;

[0012] The large model for early warning of healing risks makes inferences about user inputs, and sends abnormal situations to psychotherapists;

[0013] The healing notes model infers the records of this round of conversation and generates healing records as long-term memory for the next round of conversation.

[0014] The dialogue comprehensive workflow includes six nodes, namely, a start node, a large model processing node, a classifier node, a knowledge retrieval node, an HTTP request node and an end node;

[0015] The start node, large model processing node, classifier node, knowledge retrieval node, HTTP request node and end node are connected into a multi-branch tree type;

[0016] The start node defines the initial parameters for starting a workflow process;

[0017] The large model processing node calls the large language model to answer questions or process natural language;

[0018] The classifier node defines the classification conditions of the user's questions, and LLM can define the progress of the dialogue based on the classification description;

[0019] The knowledge retrieval node allows querying text content related to user questions from the knowledge base;

[0020] The HTTP request node allows sending server requests via the HTTP protocol;

[0021] The end node defines the end and result type of a workflow process;

[0022] The large model processing nodes include a scene recognition large model, an emotion recognition large model and a psychological consultation large model:

[0023] The scene recognition model divides the user's input information into sixteen scenarios, such as "work", "study", "social", "love", "employment", "safety", "dream", etc.; different scenarios have unique scene knowledge bases.

[0024] The emotion recognition model identifies the user's input information into twenty-eight categories of emotions, such as "admiration", "worship", "appreciation", "jealousy", "excitement", "fear", "hatred", "sadness", "satisfaction", etc.; identifying the user's emotions helps to improve the content quality of the psychological counseling model output.

[0025] Before the psychological counseling big model is inferred, the scenario knowledge base or general knowledge base is loaded to obtain the output results of the emotion recognition big model. Use techniques such as support intention and challenge intention of psychological counseling to output high-quality healing content.

[0026] The knowledge retrieval node includes a scene knowledge vector library and a general knowledge vector library:

[0027] The scenario knowledge vector library has a total of 16 different scenario knowledge bases, each of which is named after the scenario, such as "work", "study", "social", "love", "employment", "safety", "dream", etc. This provides a solid knowledge foundation for generating professional responses. The general knowledge vector library has a knowledge base including cognitive behavioral therapy (CBT), dialectical behavioral therapy (DBT), interpersonal relationship therapy (IPT) and other related therapies.

[0028] The classifier node defines the scene classification conditions of the user's question and can execute different nodes according to the classification: obtain the output results of the scene recognition model and define the next step results of different classification results. When the scene classification result belongs to the sixteen categories of scenes, the next step node is defined as the scene knowledge vector library; when the scene classification result does not belong to the sixteen categories of scenes, the next step node is defined as the general knowledge vector library.

[0029] The steps of performing reasoning according to the inference rule and generating the inference result include:

[0030] The dialog integrated workflow is executed from the "start node" according to the connection relationship of the nodes, including:

[0031] When the node is a classifier node, the node executes the corresponding next node according to the classification name of the classifier node.

[0032] When the node is a large model processing node, a knowledge retrieval node or an HTTP request node, the nodes are executed serially according to the order, and the result of the previous node is used as the input of the next node.

[0033] When the node is an end node, the workflow ends and the workflow result is output;

[0034] The healing risk warning model recognizes the user input information and outputs the suicide risk percentage in json format. When the healing risk warning reasoning result exceeds a certain value, the reasoning result percentage is sent to the psychotherapist for manual review and processing.

[0035] The healing notes model summarizes the user's records during the healing process to form a healing note containing a theme and a brief description of the healing. At the same time, the healing summary is used as a short-term memory of the conversation to start a new healing.

[0036] The computer device of the present application includes a processor, a memory and a computer program, wherein the computer program is stored in the memory and executed by the processor, and the computer program includes instructions for executing the dialogue method described in any of the above embodiments.

[0037] The non-volatile computer-readable storage medium of the present application includes a computer program. When the computer program is executed by a processor, the processor executes the dialogue method described in any of the above-mentioned embodiments.

[0038] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be understood through the practice of the embodiments of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:

[0040] Figure 1 It is a schematic diagram of an application scenario of a psychological healing method in certain embodiments of the present application;

[0041] Figure 2 is a flowchart of a psychological healing method according to certain embodiments of the present application;

[0042] Figure 3 is a workflow reasoning flow diagram of a psychological healing method according to certain embodiments of the present application;

[0043] Figure 4 is a schematic diagram of a module of a psychological healing device according to certain embodiments of the present application;

[0044] Figure 5 is a schematic diagram of the structure of a computer device of certain embodiments of the present application;

[0045] Figure 6 It is a schematic diagram of the connection status of a non-volatile computer-readable storage medium and a processor in certain embodiments of the present application. DETAILED DESCRIPTION

[0046] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals represent the same or similar elements or elements having the same or similar functions from beginning to end. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the embodiments of the present application, and cannot be understood as limiting the embodiments of the present application.

[0047] To facilitate understanding of this application, the terms appearing in this application are explained below:

[0048] 1. Workflow is an abstract and general description of the business rules between the workflow and its operation steps. Workflow modeling is to express the logic and rules of how the work in the workflow is organized in a proper model in the computer and to calculate it. The main problem that workflow needs to solve is: to achieve a certain business goal, use computers to automatically transfer documents, information or tasks between multiple participants according to certain predetermined rules.

[0049] 2. Large model: A generative large model trained based on a large amount of data. It is mainly used to answer user questions through text generation. Due to the large amount of training data and model parameters, it can answer relevant questions based on knowledge in various fields. The large model currently supports actively intervening in its generated content by writing prompts, that is, different prompts will produce different answers for the same question.

[0050] With the rapid rise of large language models, the research community is keenly interested in how to enable these models to have effective memory functions and improve the quality of multi-round dialogues. Current research focuses on dealing with situations with long context information, especially when it exceeds the maximum processing capacity of large models. A common approach is to introduce additional knowledge base mechanisms to these large language models so that they can go back and use stored historical data to improve processing capabilities when necessary.

[0051] We face a series of challenges when applying the above methods to psychological healing robots. In order to provide efficient psychological healing services, the robot must have a deep understanding of the user's psychological condition, major psychological problems, and emotional fluctuations. However, existing models cannot identify users' problem scenarios and background knowledge, emotional states, and past confession events like human psychological counselors, which limits the effectiveness of robots in providing personalized healing services. In addition, since the user's psychological state may change over time, the robot needs to be able to capture and adapt to these changes in real time to avoid inappropriate responses during communication, thereby affecting the user experience. Finally, considering that the user's expression changes continuously when interacting with the robot, the robot needs to be able to summarize the information in the continuous conversation to ensure the focus of the conversation topic and provide users with more accurate psychological healing services.

[0052] In order to solve the above technical problems, an embodiment of the present application provides a psychological healing method.

[0053] The following first introduces the application scenarios of the technical solution of this application. Figure 1 As shown, it is a schematic diagram of an application scenario of a psychological healing method provided in an embodiment of the present application. The application scenario involves a terminal device 110 and a server 120, and the terminal device 110 can communicate with the server 120.

[0054] Figure 1 One terminal device 110 and one server 120 are shown by way of example, but other numbers of terminal devices and servers may actually be included, and this embodiment of the present application does not impose any limitation on this.

[0055] In some possible implementations, Figure 1 The server 120 may be an independent physical server, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud storage, and network services. This embodiment of the application does not limit this.

[0056] In some possible implementations, such as Figure 1 The terminal device 110 shown may be installed with an application client, and when the application client runs in the terminal device 110, data can be exchanged with the server 120. For example, the client here may specifically include: a mobile application APP, a browser client Html5, and a WeChat applet.

[0057] In one achievable manner, the server 120 and the terminal device 110 may interactively execute the psychological healing method provided in the embodiment of the present application, or the psychological healing method provided in the embodiment of the present application may be executed by the terminal device 110 or the server 120.

[0058] The psychological healing method of this application will be elaborated in detail below:

[0059] See also Figure 2 The embodiment of the present application provides a psychological healing method based on a large model and a workflow, and the psychological healing method includes:

[0060] Step 200: Obtaining user input information on the terminal device;

[0061] Specifically, the user can input the current input information through voice input or text box input. For example, after the user opens the psychological counseling service, he or she can speak and input the voice of the psychological problem that needs to be consulted, which is converted into text through voice recognition, and the text is the current input information. For another example, after the user opens the psychological counseling service, he or she can input text through a preset text box, and the text is the current input information.

[0062] Step 201: Obtain a comprehensive dialogue workflow, which is a set of predefined rules and steps in the form of a JSON configuration file, and is intended to optimize the dialogue process and improve the efficiency and effectiveness of psychological therapy.

[0063] Step 202: Initialize the psychological healing model according to the JSON configuration file. This step involves reading and parsing the configuration file in JSON format to initialize the parameters and behaviors of the psychological healing model.

[0064] The JSON configuration file contains key settings for the psychological healing model, including but not limited to:

[0065] Application information: application description, icon, background color, name, etc.

[0066] Model configuration: including proxy mode settings, comment reply enabling status, completion prompt configuration, etc.

[0067] Dataset configuration: defines enabled datasets, data retrieval models, and external data tools.

[0068] File upload settings: including image upload detail level, enablement status, quantity limit, and transfer method.

[0069] Model parameters: specifies the completion mode, model name, and provider.

[0070] Node parameters: There are six types of node parameters. The parameters of the start node are input field and next node; the parameters of the large model processing node are large model selection, context variables, system prompt words, output variables, and next node; the parameters of the classifier node are input variables, category 1 / category 2 / category 3..., output variables, and the next node corresponding to each category; the parameters of the knowledge retrieval node are query variables, knowledge base, output variables, and next node; the parameters of the HTTP request node are setting the URL of GET / POST, Headers, Params, Body (none form-datax-www-form-urlencoded rawtext, JSON), timeout setting, and next node; the parameter of the end node is the output variable.

[0071] Text-to-speech and Speech-to-text: Enabled status and related language and voice settings.

[0072] Sensitive word avoidance: Enable state and configuration.

[0073] Opening remarks: Welcome and introduction to the psychotherapy model.

[0074] The system will parse the JSON file, extract the configuration information, and set the initial state of the psychological healing model accordingly. For example, if a specific dataset ID is specified in the configuration file, the system will load the corresponding dataset to support the model's reasoning process.

[0075] During the parsing process, the system also checks and applies various settings in the model configuration, such as whether to enable proxy mode, whether to enable comment replies, etc. These settings will directly affect the behavior and interaction of the model.

[0076] In particular, the setting of the opening remarks will be used to define the welcome message when the psychological healing model interacts with the user for the first time, which helps to establish the initial connection between the user and the model and convey the function and purpose of the model.

[0077] After parsing the JSON file, the system will initialize the psychological healing model according to the configuration, ensuring that all parameters and behaviors conform to the preset configuration, laying a solid foundation for the subsequent dialogue and healing process.

[0078] Step 203: The system analyzes the information input by the user according to the generated reasoning rules to evaluate the user's psychological state and possible risks. If the system detects a high-risk signal, it will trigger the warning mechanism to remind the psychotherapist to intervene. It includes the following steps:

[0079] Step 203.1 Risk Factor Identification: The system identifies factors that may indicate psychological risks, such as extreme emotional expressions.

[0080] Step 203.2 Risk level determination: A specific large language model is used to understand and analyze the user's language expression through a small sample learning algorithm (Fewshot Learning), including direct suicidal remarks (such as "want to end life", "suicide", "cut wrists", etc.), metaphorical expressions (such as "I feel like I am in a dark tunnel" or "life is too heavy for me", "want to end it all", "want to disappear in the crowd", etc.) or other language patterns related to suicide (deep helplessness and despair, desire to end pain, fascination or curiosity about death, etc.). It can quickly learn and identify language features related to suicide risk from limited annotated data, and use probability models such as Bayesian Networks to determine the risk level, including low, medium, and high level classification.

[0081] Step 203.3 Early warning mechanism is triggered: If the system evaluation results show that the user's psychological state has high-risk signals, the early warning mechanism will be triggered.

[0082] Step 204: Send to a psychotherapist. If the system determines that a professional psychotherapist's intervention is needed, the reasoning results and related information are sent to the therapist so that they can provide more in-depth consultation and help.

[0083] Step 205: Psychological big model reasoning, this step is the core link in the psychological healing workflow, involving in-depth analysis and processing of user input information to generate appropriate responses. Figure 3 , including the following steps:

[0084] Step 205.1: Receive user input information 310-The system is initialized and ready to receive personal information provided by the user in various ways (such as text input, voice input, etc.). This step is the starting point of the entire workflow, ensuring that the user can communicate effectively with the system.

[0085] Step 205.2: Scene recognition big model reasoning 320-Using advanced scene recognition algorithms, the big model analyzes the text or voice input by the user to determine the specific scene or situation the user is in. The scene recognition big model divides the user's input information into sixteen categories of scenes, such as "work", "study", "social", "love", "employment", "safety", "dream", etc.; different scenes have unique scene knowledge bases. For example, if the user inputs the information, "I feel lost at work recently. I am full of anxiety and pressure about my work, and I feel like I am struggling in darkness every day. I have tried to find a solution, but I can't find a way out", the big model infers it as a "work" scene.

[0086] Step 205.3: Determine the scene to which the user belongs 330 - the system matches the result of scene recognition with the preset scene library. This process may involve complex pattern matching and classification algorithms to ensure accurate recognition of the user's specific needs.

[0087] Step 205.4: Read the corresponding scenario knowledge base 340-If the user input is identified as belonging to a scenario in the preset scenario library, the system will retrieve information from the relevant knowledge base. The knowledge base may contain psychological principles, healing strategies and case studies for specific scenarios. For example, the work scenario knowledge base has built-in real high-quality psychological healing cases common in work scenarios.

[0088] Step 205.5: Emotion Recognition Model Reasoning 360-Specific emotion recognition model analyzes the user's emotional state. The emotion recognition model recognizes the user's input information into 28 categories of emotions, such as "admiration", "worship", "appreciation", "jealousy", "excitement", "fear", "hate", "sadness", "satisfaction", etc.; identifying the user's emotions helps improve the quality of the content output by the psychological counseling model. For example, if the user inputs information, "I feel lost at work recently. I am full of anxiety and pressure about my work, and I feel like I am struggling in the dark every day. I have tried to find a solution, but I can't find a way out." The emotion recognition model can easily infer that the user's main emotions are "anxiety" and "confusion".

[0089] Step 205.6: Read the general knowledge vector library 350-If the scenario input by the user is not in the preset scenario library, the system will turn to load the general knowledge vector library, which is a wide range of psychological therapy resources, including cognitive behavioral therapy (CBT), dialectical behavioral therapy (DBT), interpersonal therapy (IPT) and other related therapies. The scenario knowledge vector library and the general knowledge vector library are stored in a vector database, including the knowledge base name, knowledge base description, permissions, index mode, Embedding model, vector retrieval parameters (Rerank model, Top K parameters, Score threshold) and other information.

[0090] Step 205.7: Comprehensive Reasoning of the Big Psychological Model 370-The Big Psychological Model first integrates the data obtained from scene recognition and emotion recognition to form a comprehensive user status profile. Using psychological healing techniques, the model identifies the user's intentionality, that is, the user's expressed wishes, needs, and goals, and looks for strategies to support these intentions. At the same time, it evaluates the user's challenging intentions, that is, unreasonable or harmful thinking patterns that may cause psychological distress or functional limitations, and looks for appropriate intervention points.

[0091] Step 205.8: Write to database 380 - Based on the inference results of the psychological big model, call the HTTP interface to write the inference results into the MySQL database.

[0092] Step 205.9: Output Response Content 390 - Based on the reasoning results of the psychological big model, the system generates and outputs response content. This may be a direct answer, a suggestion, an expression of emotional support, or instructions to guide the user to take the next step.

[0093] Step 206: The workflow reasoning result is sent to the user. The system will provide feedback to the user based on the result of the reasoning process, which may include emotional support, suggestions, further action guidelines, etc.

[0094] Step 207: The number of dialogue rounds P = P + 1. The system records the number of dialogue rounds. Each time a dialogue round is completed, the number of dialogue rounds P increases by 1 to track the progress of the dialogue.

[0095] Step 208: Is the number of conversation rounds P greater than N? The system checks whether the current number of conversation rounds has reached a preset threshold value N. If it has reached or exceeded N, it may be necessary to re-evaluate the user's mental state or end the current conversation cycle.

[0096] Step 209: The user confirms whether to start a new round of dialogue, and the system asks the user whether he wants to continue the dialogue to solve more problems or discuss in depth.

[0097] Step 210: The healing notes model generates a healing summary. If the user confirms to start a new round of dialogue, the system will use the healing notes model to generate a new healing summary to provide assistance to the user in the new round of dialogue.

[0098] Step 211: The healing summary is saved to short-term memory, ensuring that the big model can review and utilize the previous discussion content in the next round of conversation. This helps to establish a coherent healing process, allowing users to feel their own progress and changes, so as to provide more effective personalized guidance and support.

[0099] Step 212: Start a new round of dialogue. Restarting a new round of dialogue helps reduce the low-quality responses output by the large model, ensures that the new round of dialogue can be seamlessly connected, and maintains the continuity of psychological healing.

[0100] Step 213: If the number of conversation rounds P is less than N, the conversation short-term memory is recorded. The system will record the details of each conversation, the user's emotional changes, the therapist's feedback and other information in the short-term memory. This information is crucial for understanding the user's psychological state changes, evaluating the treatment effect and optimizing future conversation strategies.

[0101] Step 214: The healing notes model generates a healing summary. This step is the final stage of the entire psychological healing process. After the user completes one or more rounds of dialogue, the system will use the healing notes model to conduct an in-depth analysis and summary of the entire healing process.

[0102] At this stage, the healing notes model will comprehensively consider the following aspects:

[0103] User emotional changes: Analyze the user's emotional changes from the initial state to the final state, and identify the trend of emotional improvement or deterioration. Conversation content analysis: Review the key moments in the entire conversation process, including the key questions expressed by the user, the feedback from the psychotherapist, and the reasoning results provided by the system. User engagement: Analyze the user's engagement and feedback on the treatment process to understand the user's acceptance and satisfaction with the treatment method.

[0104] Based on the above analysis, the healing notes model will generate a comprehensive healing summary report, which may include:

[0105] Emotion Change Chart: Graphically display the fluctuations and trends of user emotions.

[0106] Key Conversation Summaries: Distill the key information in the conversation to help users and therapists quickly review the important content.

[0107] User Feedback Summary: Summarizes user feedback, including their views, feelings, and suggestions on the healing methods.

[0108] The healing summary report is designed to provide users with a clear review of the healing process, helping them better understand changes in their mental state and provide guidance for future mental health maintenance. At the same time, this report also provides valuable information for psychotherapists to help them evaluate healing effects, optimize treatment plans, and provide reference for future research and practice.

[0109] See also Figure 4 In order to better implement the dialogue method of the embodiment of the present application, the embodiment of the present application also provides a dialogue device 400, which is applied to the field of psychological healing based on large models and workflows. The dialogue device 400 includes an acquisition module 410 for acquiring current input information; a workflow reasoning module 420 for reasoning based on the acquired input information; a risk warning module 430 for risk assessment of the reasoning results; and a healing notes module 440 for recording and organizing the dialogue content.

[0110] The acquisition module 410 is used to receive text information input by a user as current input information.

[0111] The workflow reasoning module 420 further includes a parsing module for parsing the JSON file to generate reasoning rules; and a reasoning execution module for executing the reasoning rules in sequence to generate workflow reasoning results.

[0112] The risk warning module 430 performs healing risk warning reasoning based on the workflow reasoning results, and sends the reasoning results to the psychotherapist.

[0113] The healing notes module 440 is used to save the conversation content and generate a healing summary, and also generate a healing summary for reference by the user and the psychotherapist.

[0114] In the above text, the dialogue device 400 is described from the perspective of functional modules in conjunction with the accompanying drawings. The functional modules can be implemented in hardware form, can be implemented in software form, or can be implemented in combination with hardware and software modules. Specifically, the steps of the method embodiment in the embodiment of the present application can be completed by the hardware integrated logic circuit in the processor and / or the software form of instructions. The steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware coding processor to execute, or can be executed by a combination of hardware and software modules in the coding processor. Optionally, the software module can be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps in the above method embodiment in conjunction with its hardware.

[0115] See also Figure 5 The computer device 500 of the embodiment of the present application includes a processor 510, a memory 520 and a computer program, wherein the computer program is stored in the memory 520 and executed by the processor 510, and the computer program includes instructions for executing the dialogue method of any of the above-mentioned embodiments.

[0116] Optionally, the computer device 500 may be any device with image processing capabilities, such as a server or a terminal device (such as a mobile phone, a tablet computer, a display device, a laptop computer, etc.).

[0117] Optionally, the computer device 500 may also be a combination system of a terminal device and a server, wherein the terminal device is used to obtain the current input information, and the large model is deployed to the server. After obtaining the current input information, the terminal device sends it to the server, and then the large model in the server processes the current input information, outputs the target reply information, and sends it to the terminal device for display.

[0118] See also Figure 6 The embodiment of the present application also provides a computer-readable storage medium 600 on which a computer program 610 is stored. When the computer program 610 is executed by a processor 620, the steps of the dialogue method of any of the above-mentioned embodiments are implemented. For the sake of brevity, they are not repeated here.

Claims

1. A psychological healing method based on a large model and workflow, characterized in that: The method includes: Obtaining a dialogue synthesis workflow; the dialogue synthesis workflow includes a string or a JSON file; Parsing the JSON file to generate inference rules; Perform reasoning according to the inference rules to generate inference results; Sending the inference result to the user; The large model for early warning of treatment risks makes inferences about user inputs, and sends abnormal situations to psychotherapists; The healing notes model infers the records of this round of conversation and generates healing records as long-term memory for the next round of conversation.

2. The psychological healing method based on a large model and workflow according to claim 1, characterized in that: The dialogue synthesis workflow includes six nodes: a start node, a large model processing node, a classifier node, a knowledge retrieval node, an HTTP request node, and an end node; The start node, large model processing node, classifier node, knowledge retrieval node, HTTP request node and end node are connected into a multi-branch tree type; The start node defines the initial parameters for starting a workflow process; The large model processing node calls the large language model to answer questions or process natural language; The classifier node defines the classification conditions of the user's questions, and LLM can define the progress of the dialogue based on the classification description; The knowledge retrieval node allows querying text content related to user questions from the knowledge base; The HTTP request node allows sending server requests via the HTTP protocol; The end node defines the end and result type of a workflow process.

3. The psychological healing method based on large model and workflow according to claim 2 is characterized in that: The large model processing nodes include a scene recognition large model, an emotion recognition large model and a psychological consultation large model: The scene recognition model divides the user's input information into 16 categories of scenes, and different scenes have unique scene knowledge bases; The emotion recognition model recognizes the user's input information into twenty-eight categories of emotions; Before the psychological counseling big model is inferred, the scenario knowledge base or general knowledge base is loaded to obtain the output results of the emotion recognition big model. Use techniques such as support intention and challenge intention of psychological counseling to output high-quality healing content.

4. The psychological healing method based on large model and workflow according to claim 2 is characterized in that: The knowledge retrieval node includes a scene knowledge vector library and a general knowledge vector library: The scenario knowledge vector library has a total of sixteen different scenario knowledge bases, each of which is named after the scenario. The general knowledge vector library includes cognitive behavioral therapy, dialectical behavioral therapy, and interpersonal relationship therapy.

5. The psychological healing method based on large model and workflow according to claim 2 is characterized in that: The classifier node defines the scenario classification conditions of the user question and can execute different nodes according to the classification: Obtain the output result of the scene recognition large model and define the next step results of different classification results; when the scene classification result belongs to the sixteen categories of scenes, define the next step node as the scene knowledge vector library; when the scene classification result does not belong to the sixteen categories of scenes, define the next step node as the general knowledge vector library.

6. The psychological healing method based on large model and workflow according to claim 1 is characterized in that: The steps of performing reasoning according to the inference rule and generating the inference result include: The dialog integrated workflow is executed from the "start node" according to the connection relationship of the nodes, including: When the node is a classifier node, the node executes the corresponding next node according to the classification name of the classifier node; When the node is a large model processing node, a knowledge retrieval node or an HTTP request node, the nodes are executed serially according to the order, and the result of the previous node is used as the input of the next node; When the node is an end node, the workflow ends and the workflow result is output.

7. The psychological healing method based on large model and workflow according to claim 1 is characterized in that: The healing risk warning model recognizes user input information and outputs the suicide risk percentage in JSON format; when the healing risk warning reasoning result exceeds a certain value, the reasoning result percentage is sent to the psychotherapist for manual review and processing; The healing notes model summarizes the user's records during the healing process to form a healing note containing a theme and a brief description of the healing. At the same time, the healing summary is used as a short-term memory of the conversation to start a new healing.

8. A healing dialogue device, characterized in that: The device comprises: The acquisition module is used to obtain the current input information; A workflow reasoning model, used to generate target response information based on the scene recognition model, the emotion recognition model, the psychotherapy model, the classifier and the knowledge vector library; A risk warning module, which is used for the treatment risk warning model to recognize user input information and output the suicide risk percentage in JSON format. When the treatment risk warning reasoning result exceeds a certain value, the reasoning result percentage is sent to the psychotherapist for manual review and processing; The healing notes module is used to summarize the user's records during the healing process, forming a healing note that includes the theme and a brief description of the healing. At the same time, the healing summary is used as a short-term memory of the conversation to start a new healing.

9. A computer device, characterized in that: include: A processor, a memory, and a computer program; wherein the computer program is stored in the memory and executed by the processor, and the computer program includes instructions for executing the psychological therapy method described in any one of claims 1 to 7.

10. A non-volatile computer-readable storage medium containing a computer program, wherein when the computer program is executed by a processor, the processor executes the psychological healing method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Psychological counseling method and device based on controlled text generation and terminal equipment

    CN114661864A

  • Dialogue machine self-service psychological intervention system and method

    CN115482912A

  • AI reasoning workflow processing method and AI reasoning workflow engine system

    CN117495067A

  • Intelligent dialogue system in psychological field

    CN117609486A