Psychological counseling interaction method and device based on autonomous psychological planning architecture

By building a personalized decision tree through the three-layer nested goal structure and algorithm of the autonomous psychological planning architecture, the problems of insufficient flexibility and high security risks of the traditional psychological counseling system are solved, and a more flexible and efficient psychological counseling dialogue is achieved.

CN120636701AActive Publication Date: 2025-09-12BEIJING LIXIN INTELLIGENT TECH CO LTD

Patent Information

Application Number
CN202510699894.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-28
Publication Date
2025-09-12
Estimated Expiration
2045-05-28

AI Technical Summary

Technical Problem

Traditional psychological counseling systems lack flexibility and cannot effectively deal with users deviating from the preset path, resulting in interrupted or repeated conversations, high security risks, and blunt results.

Method used

A method based on autonomous mental planning architecture is adopted to construct a personalized decision tree through a three-layer nested goal structure, Bayesian network, and Monte Carlo tree search algorithm to evaluate and adjust the intervention path in real time, realizing multi-path parallel advancement and conversation trajectory planning.

Benefits of technology

It improves the accuracy and flexibility of psychological counseling conversations, optimizes the user interaction experience, dynamically adapts to emergencies in conversations, reduces security risks, expands application scenarios, and improves conversation fluency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120636701A_ABST
    Figure CN120636701A_ABST
Patent Text Reader

Abstract

The invention relates to a psychological counseling interaction method and device based on an autonomous psychological planning architecture. The method comprises the following steps: acquiring initial user data of a target user; constructing a dynamic target map of a target user through a three-layer nested target structure, and pre-loading a matched personalized decision tree; after receiving the real-time interaction data, executing real-time path re-evaluation based on the real-time interaction data to obtain a treatment value function of each intervention path; constructing an intervention response prediction model by adopting a Bayesian network and a Monte Carlo tree search algorithm, adjusting the priority and the execution sequence of the intervention paths in the personalized decision-making tree in combination with the treatment value function of each intervention path, and selecting a target intervention path matched with the real-time interaction data from the adjusted intervention paths; the real-time interaction data is mapped into the multi-dimensional psychological state space to serve as the session trajectory, session trajectory planning is conducted based on the target intervention path, real-time interaction with the target user is achieved, and the accuracy of intervention decision making and the session fluency are improved.
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, and in particular to a psychological consultation interaction method and device based on an autonomous psychological planning architecture. Background Art

[0002] In related technologies, traditional psychological counseling systems are mostly linear conversational systems, typically using a fixed dialogue process with each step pre-set and lacking flexibility. When users deviate from the preset path, the system may not be able to respond effectively, resulting in interruptions or repetitions in the conversation. For example, traditional decision trees typically only have a limited number of branch options and cannot handle complex multi-path situations. This is especially true when users are experiencing emotional fluctuations or high-risk situations. More complex branch structures cannot be deployed to determine the current situation, resulting in high security risks and a stilted conversation. Therefore, there is an urgent need to propose a new technical solution to address at least one of the technical issues in related technologies. Summary of the Invention

[0003] In response to the technical problems existing in the prior art, this application provides a psychological consultation interaction method and device based on an autonomous psychological planning architecture to solve at least one technical problem existing in the related technology, namely, lack of flexibility, high security risks, and relatively stiff dialogue effects.

[0004] In a first aspect, an embodiment of the present application provides a psychological consultation interaction method based on an autonomous psychological planning framework, the method comprising:

[0005] Obtain the initial user data of the target user; the initial user data includes at least: first session data, psychological scale data; based on the initial user data, construct a dynamic target graph for the target user through a three-layer nested target structure, and preload a personalized decision tree that matches the dynamic target graph; the three-layer nested target structure includes: a session macro target layer, a phased target layer, and a micro-interaction target layer, and the targets of each layer are connected by a directed acyclic graph; multiple intervention paths are set in parallel in the personalized decision tree based on the targets of each layer; the three-layer nested target structure is used to achieve multi-path parallel advancement of the treatment target; after receiving the real-time interaction data of the target user, based on Real-time path re-evaluation is performed on real-time interaction data to obtain the therapeutic value function of each intervention path; an intervention response prediction model is constructed using a Bayesian network and a Monte Carlo tree search algorithm; through the intervention response prediction model, combined with the therapeutic value function of each intervention path, the priority and execution sequence of the intervention path in the personalized decision tree are adjusted, and a target intervention path that matches the real-time interaction data is selected from the adjusted intervention paths; the real-time interaction data is mapped into a multidimensional psychological state space as a conversation trajectory, and a state-target bidirectional navigation algorithm is used to plan the conversation trajectory based on the target intervention path to achieve real-time interaction with the target user.

[0006] In a second aspect, an embodiment of the present application provides a psychological consultation interaction device based on an autonomous psychological planning architecture, the device comprising at least the following units:

[0007] The acquisition unit is configured to acquire the initial user data of the target user; the initial user data includes at least: first session data, psychological scale data; the target stratification unit is configured to build a dynamic target map for the target user through a three-layer nested target structure based on the initial user data, and preload a personalized decision tree that matches the dynamic target map; the three-layer nested target structure includes: a session macro target layer, a stage target layer and a micro-interaction target layer, and the targets of each layer are connected by a directed acyclic graph; multiple intervention paths are set in parallel based on the targets of each layer in the personalized decision tree; the three-layer nested target structure is used to achieve multi-path parallel advancement of the treatment target; the evaluation unit is configured to receive the real-time interaction data of the target user Afterwards, real-time path re-evaluation is performed based on the real-time interaction data to obtain the therapeutic value function of each intervention path; the intervention unit is configured to use the Bayesian network and Monte Carlo tree search algorithm to construct an intervention response prediction model; through the intervention response prediction model, combined with the therapeutic value function of each intervention path, the priority and execution sequence of the intervention path in the personalized decision tree are adjusted, and the target intervention path that matches the real-time interaction data is selected from the adjusted intervention path; the interaction unit is configured to map the real-time interaction data into a multidimensional psychological state space as a conversation trajectory, and plan the conversation trajectory based on the target intervention path through the state-target bidirectional navigation algorithm to achieve real-time interaction with the target user.

[0008] In a third aspect, an embodiment of the present application provides an electronic device comprising: at least one processor, a memory, and an input / output unit; wherein the memory is used to store a computer program, and the processor is used to call the computer program stored in the memory to execute the first aspect of the psychological counseling interaction method based on the autonomous psychological planning architecture.

[0009] The beneficial effects of the present application are: providing a psychological counseling interaction method and device based on an autonomous psychological planning architecture. In this technical solution, on the one hand, it is possible to actively plan a dynamic target graph for psychological counseling through a three-layer nested target structure, and then combine the Bayesian network and the Monte Carlo tree search algorithm to build an intervention response prediction model, and adjust the personalized decision tree to confirm the target intervention path that matches the real-time interaction data, which greatly improves the accuracy of psychological counseling dialogues and the flexibility of strategy selection, and optimizes the user interaction experience. On the other hand, through the transformation of psychological state space and conversation trajectory planning, the optimal conversation path is planned in real time to improve the interaction efficiency with the user. On the other hand, it can dynamically adapt to emergencies, emotional fluctuations and topic changes that occur in the conversation, avoiding the mechanical sense and lack of adaptability caused by fixed processes, expanding the application scenarios of psychological counseling dialogues, reducing security risks, and improving conversation fluency. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] Figure 1 This is a flowchart of a psychological consultation interaction method based on an autonomous psychological planning framework according to an embodiment of the present application;

[0011] Figure 2 This is a schematic diagram of the principle of a psychological consultation interaction method based on an autonomous psychological planning framework in an embodiment of the present application;

[0012] Figure 3 This is a structural diagram of a psychological consultation interaction device based on an autonomous psychological planning architecture according to an embodiment of the present application;

[0013] Figure 4 This is a schematic structural diagram of an electronic device according to an embodiment of the present application;

[0014] Figure 5 It is a structural diagram of a medium in an embodiment of the present application. DETAILED DESCRIPTION

[0015] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without making creative efforts are within the scope of protection of this application.

[0016] In order to solve at least one technical problem in the related art, the embodiments of the present application provide a psychological consultation interaction method and device based on an autonomous psychological planning architecture.

[0017] The technical solution of the present application and the psychological consultation interaction solution based on the autonomous psychological planning architecture provided in the embodiments of the present application can also be executed by an electronic device, which can be a server, a server cluster, or a cloud server. The electronic device can also be a terminal device such as a mobile phone, a computer, a tablet computer, a wearable device, or a dedicated device. These electronic devices can also be equipped with the chip or other hardware processing unit introduced in the above embodiments. Alternatively, these electronic devices can also be installed with a service program for executing the psychological consultation interaction solution based on the autonomous psychological planning architecture.

[0018] Figure 1 A flowchart of a psychological consultation interaction method based on an autonomous psychological planning framework provided in an embodiment of the present application is shown as follows: Figure 1 As shown, the method includes the following steps:

[0019] 101, obtaining initial user data of the target user;

[0020] 102. Based on the initial user data, a dynamic target graph for the target user is constructed through a three-layer nested target structure, and a personalized decision tree matching the dynamic target graph is preloaded;

[0021] 103. After receiving the real-time interaction data of the target user, perform real-time path re-evaluation based on the real-time interaction data to obtain a treatment value function for each intervention path;

[0022] 104, Bayesian network and Monte Carlo tree search algorithm were used to construct an intervention response prediction model;

[0023] 105. Using the intervention response prediction model and combining the treatment value functions of each intervention path, adjust the priority and execution sequence of the intervention paths in the personalized decision tree, and select a target intervention path that matches the real-time interaction data from the adjusted intervention paths;

[0024] 106 , mapping the real-time interaction data into a multi-dimensional psychological state space as a conversation trajectory, and planning the conversation trajectory based on the target intervention path using a state-target bidirectional navigation algorithm to achieve real-time interaction with the target user.

[0025] In the embodiment of the present application, the initial user data includes at least: first session data and psychological scale data.

[0026] Specifically, in the embodiment of the present application, the initial user data refers to the basic data set that can reflect the user's psychological state, problem characteristics and background information obtained by the intelligent psychological counseling system through professional assessment means when establishing the first interaction with the target user. Its core function is to provide initial input and baseline reference for the subsequent three-layer nested goal construction and intervention plan design.

[0027] First-session data refers to the information conveyed by users through verbal expression and nonverbal behavior during their first psychological consultation. It covers core problem descriptions, emotional states, upbringing, and current concerns. For example, a user seeking help due to workplace interpersonal tensions may mention "frequent conflicts with colleagues, anxiety and insomnia, and doubts about their communication skills" in their first conversation, while also displaying overt emotional traits such as accelerated speech and frowning. This information is extracted through text analysis, voice emotion recognition, and video behavior capture (if available), forming a preliminary understanding of the user's primary issues and emotional tone.

[0028] Psychological scale data is a quantitative assessment result generated by users through standardized psychological measurement tools, which is used to scientifically characterize the specific dimensions and severity of the user's psychological state. Depression assessment scale, Beck Depression Inventory (BDI-II), Patient Health Questionnaire (PHQ-9), example scores such as PHQ-9 total score of 15 points indicate moderate depression. Anxiety assessment scale, Generalized Anxiety Scale (GAD-7), if the user scores 3 points (almost every day) on the item "feeling nervous, anxious or anxious", it reflects a high level of anxiety. Interpersonal sensitivity assessment scale, Interpersonal Sensitivity Scale (ISI), is used to measure tension and inferiority tendencies in social situations, such as "fear of others judging oneself" scored 4 points (quite consistent). Cognitive function assessment scale, Cognitive Flexibility Questionnaire (CFQ), assesses the degree of rigidity of thinking, such as "difficulty diverting attention from negative events" scored 5 points (completely consistent).

[0029] In this way, the first conversation data provides problematic scenarios and emotional details, while the psychological scale data eliminates subjective description bias through standardized indicators, together forming the foundation of the user's psychological profile. For example, in the first conversation, a user describes themselves as "often experiencing inexplicable fear and afraid to be alone." Combined with a GAD-7 score of 18 (severe anxiety) and an ISI score of 22 (high interpersonal sensitivity), the system can preliminarily determine that their core issue is anxiety disorder accompanied by interpersonal avoidance. When constructing conversation macro goals, it prioritizes goals such as "reducing the frequency of anxiety attacks" and "improving a sense of security when alone."

[0030] In this embodiment of the present application, the three-layer nested goal structure includes: a conversation macro goal layer, a phased goal layer, and a micro-interaction goal layer, with each layer of goals connected via a directed acyclic graph. Furthermore, optionally, multiple intervention paths are set up in parallel within the personalized decision tree based on each layer of goals. Furthermore, optionally, the three-layer nested goal structure is used to achieve multi-path parallel advancement of treatment goals.

[0031] Specifically, in the embodiment of this application, the three-layer nested goal structure is a hierarchical goal management framework that simulates the clinical thinking of a psychological counselor. By gradually breaking down abstract treatment goals into specific executable tasks, dynamic path planning is achieved by combining graph theory technology. This structure forms a progressive hierarchy of "session macro goal layer → stage goal layer → micro-interaction goal layer". The goals of each layer are connected by a directed acyclic graph (DAG), which not only ensures the logical order between goals, but also supports flexible multi-path jumps, avoiding the mechanical nature of traditional linear processes.

[0032] The conversation macro goal layer, at the highest level, defines the overall strategic direction of the consultation. These goals typically encompass three to five core treatment areas, generated based on the user's initial data and psychological theories (such as cognitive behavioral therapy and humanistic thinking). These goals are general and long-term. For example, for a user experiencing insomnia and deteriorating interpersonal relationships due to work stress, conversation macro goals might include "establishing a sustainable stress management model," "improving workplace communication effectiveness," and "restoring regular sleep." These goals don't address specific intervention methods, but rather define the core areas of treatment.

[0033] At the staged goal level, each session's macro goal is broken down into 8-12 logically coherent mid-term tasks, identifying key milestones in the treatment process. For example, the macro goal of "establishing a sustainable stress management model" can be broken down into phased goals such as "identifying the connection between stressors and bodily responses," "mastering at least two immediate stress reduction techniques," and "developing a personalized stress journaling plan." Each goal corresponds to a specific psychological intervention pathway (such as behavioral activation or relaxation training) and sets quantifiable evaluation criteria (such as "being able to reduce heart rate by 10% through deep breathing within 3 minutes").

[0034] The micro-interaction goal layer focuses on specific actions within a single session, further breaking down phased goals into 20-30 micro-steps, each corresponding to an immediately executable interactive action. For example, under the phased goal of "identifying the connection between stressors and physical reactions," micro-interaction goals for a single session might include "guiding users to recall three highly stressful events in the past week," "recording specific thoughts, emotional intensity (on a scale of 1-10), and physiological reactions (such as palpitations and sweating) during each event," and "analyzing the chain reaction between thoughts, emotions, and physiological reactions." These micro-goals are achieved through techniques such as open-ended questions and reenactments, ensuring that users achieve concrete progress in each session.

[0035] The directed acyclic graph (DAG) connection mechanism imbues each layer of goals with dynamic dependencies: each goal is a node in the graph, connected by weighted directed edges. Edge types include "pre-requisite" relationships (e.g., "learning stress relief techniques" requires "identifying stressors" to be completed first), "complementary" relationships (e.g., "cognitive restructuring" and "relaxation training" can be carried out in parallel to enhance effectiveness), and "cross-layer jump relationships" (e.g., a micro-interaction goal is directly linked to a non-direct macro goal, such as "mindful breathing exercises" directly supporting the macro goal of "restoring regular sleep"). Weight values ​​(0-1) indicate the degree of dependency or reinforcement between goals. For example, the connection weight of "identifying stressors" and "creating a stress log" is 0.9, indicating a strong dependency; while the weight of "relaxation training" and "social skills training" is 0.3, indicating a weak dependency that can be advanced independently.

[0036] The personalized decision tree is constructed based on three levels of goals, and multiple intervention paths are generated based on the nodes at each level. Each path corresponds to a different combination of treatment strategies. For example, for the macro goal of "improving workplace communication effectiveness", the decision tree may set up two parallel paths: Path A is "cognitive reconstruction (identifying negative automatic thoughts) → role-playing training (simulating conflict scenarios) → feedback correction", and Path B is "non-violent communication skills learning → daily communication scenario recording → group practice". The system dynamically adjusts the path priority by evaluating user reactions in real time (such as acceptance of role-playing and the completeness of communication records). For example, if the user shows resistance to role-playing (emotional intensity > 0.7), the weight of Path B will be increased and the resource allocation of Path A will be reduced.

[0037] Multi-path parallel advancement is achieved through the DAG topology. The system can activate multiple branches simultaneously (such as stress management and sleep improvement paths being carried out simultaneously), and use the "task priority queue" and "attention budget" mechanisms to allocate session time and computing resources. For example, in a 50-minute session, the first 20 minutes focus on stressor identification (path A), and the last 30 minutes are spent on relaxation training (path B). "Synchronous checkpoints" are used to ensure the coordinated progress of the two paths in the dimension of "emotional regulation ability." This mechanism enables the system to flexibly switch intervention directions based on the user's real-time status, avoiding the "one-size-fits-all" problem caused by fixed processes. For example, when a user suddenly mentions childhood trauma (narrative turning point triggers a KPS score > 0.6), the system can temporarily activate the "trauma-related cognitive adjustment" micropathway without interrupting the original treatment framework.

[0038] In summary, the three-layer nested target structure transforms abstract treatment goals into a computable and adjustable dynamic process through hierarchical decomposition, graph theory modeling and multi-path parallelization. It not only conforms to the clinical logic of psychological counseling, but also gives the system intelligent path planning capabilities, achieving precise intervention with "global strategic control and local flexible adaptation".

[0039] For example, Figure 2 The three-layer directed acyclic graph structure is used to illustrate the hierarchical structure and relationships of treatment goals in psychological counseling. The macro goal (M1) is at the top level and represents the overall strategic direction, setting the tone for the entire counseling process and serving as the abstract core treatment direction. The stage goals (S1, S2, S3), located in the middle layer, are the key mid-term milestones after breaking down the macro goal and are important stages in the process of achieving the macro goal. The micro-interaction goals (T1, T2, T3, T4), at the bottom layer, are specific, actionable tasks in daily counseling sessions and are the concrete action steps to achieve the stage goals.

[0040] Figure 2 Arrows of different styles and thicknesses represent different degrees of association between goals. Strong dependency (>0.7), represented by thick solid arrows, indicates that there is a close sequence or strong correlation between the two goals. For example, the weight between macro goal M1 and stage goal S1 is 0.9, which means that S1 is extremely critical to the realization of M1. Medium dependency (0.3-0.7), presented as thin solid arrows, indicates that there is a certain correlation between the goals, but the degree of dependence is relatively weaker than a strong dependency. For example, the weight between stage goals S2 and S3 is 0.6, indicating that the two have a certain connection but not an absolute sequence. Weak correlation (<0.3), represented by dotted arrows, indicates that the correlation between the goals is weak. For example, the weight between stage goal S1 and micro goal T2 is 0.2, which means that the two are not closely related.

[0041] This directed acyclic graph structure avoids the problem of circular dependencies between goals, ensuring that the treatment process proceeds logically. Furthermore, the multi-path association method allows for flexible adjustment of the treatment sequence and focus based on the user's specific situation, enabling parallel advancement of multiple paths and improving the relevance and effectiveness of psychological counseling. For example, if a user responds well to a specific path at a certain stage, advancement of the related goal can be strengthened based on the association weight. If the response is poor, treatment can be continued by switching to another associated path.

[0042] As an optional embodiment, in 101, initial user data of the target user is obtained.

[0043] Specifically, in step 101, the initial user data of the target user is obtained. The principle behind this is to comprehensively collect data that reflects the user's psychological state, problem characteristics, and background information, laying the foundation for the precise planning and implementation of subsequent psychological counseling. Through various channels and methods, information such as the content and emotional state expressed by the user during the initial conversation is collected, as well as quantitative data obtained using professional psychological scales. This data serves as the basis for constructing a user psychological profile, helping the system understand the user's needs, problem severity, and underlying psychological patterns. This in turn supports subsequent operations such as building dynamic target maps and generating personalized decision trees based on this data.

[0044] For example, suppose the target user is a working person who comes for consultation due to frequent insomnia and anxiety in recent times. In the first conversation, the user describes himself as under great work pressure, worried every day about not being able to complete work tasks, feeling inadequate in ability, often having difficulty falling asleep in the early morning, and easily waking up even when asleep. At the same time, the user's voice trembles and his facial expression is anxious when expressing himself. These non-verbal information captured by voice and video are also recorded. In addition, the user filled out psychological scales such as the Beck Anxiety Inventory (BAI) and the Athens Insomnia Scale (AIS). The Beck Anxiety Inventory score shows that he is at a moderate level of anxiety, and the Athens Insomnia Scale score indicates that his insomnia is more serious. These first conversation data and psychological scale data together constitute the initial user data of the user.

[0045] This combination of the subjective description of the initial conversation and the objective quantification of the psychological scale allows for a more accurate definition of the user's problem, avoiding the potential bias associated with a single data source. For example, in the example above, not only is the user's insomnia and anxiety symptoms understood, but the severity is also clarified through the scale, facilitating precise subsequent treatment goal setting. This rich initial user data provides strong support for constructing a personalized three-tiered nested goal structure and generating a personalized decision tree. This data can be used to plan tailored treatment pathways and intervention strategies tailored to the user's unique psychological state and issues, enhancing the relevance and effectiveness of psychological counseling. Initial user data serves as a baseline, providing a reference for monitoring changes in user status and adjusting intervention plans during subsequent real-time interactions. As counseling progresses, by comparing initial data with real-time data, the system can promptly identify the user's progress or emerging issues, dynamically optimizing treatment plans and achieving more effective psychological intervention.

[0046] As an optional embodiment, in 102, based on the initial user data, a dynamic goal graph for the target user is constructed through a three-layer nested goal structure, including: inputting the initial user data into the goal decomposition engine, and generating a session macro goal according to a cognitive classification module constructed based on a psychological theory framework; wherein the psychological theory framework includes at least: cognitive behavioral therapy and humanistic therapy; through a clinical pathway matching algorithm, each session macro goal is decomposed into multiple stage goals, and the logical dependency relationship between the session macro goal and the stage goal, as well as the logical dependency relationship between different stage goals are marked; for each single session initiated, multiple micro-interaction goals are dynamically generated; wherein the micro-interaction goals are respectively associated with the intervention strategy and expected response indicators for the target user; vertical connections are constructed from the session macro goal to the micro-interaction goal from top to bottom, and horizontal connections are constructed between each goal based on the collaborative relationship and conflict relationship of the same-layer goals, so as to construct a dynamic goal graph for the target user.

[0047] Specifically, in 102, the principle of constructing a dynamic goal graph based on the initial user data is to use the psychological theory framework and algorithm model to decompose the user's complex psychological problems into a manageable hierarchical goal system, and to achieve structured planning of the treatment path by modeling the logical relationship between the goals through the graph structure. Specifically, the system first uses the cognitive classification module of the goal decomposition engine, based on theories such as cognitive behavioral therapy and humanistic therapy, to extract 3-5 macro-treatment directions, namely conversation macro-goals, from the initial user data (such as the core problems expressed by the user in the first conversation, and the symptom dimensions reflected by the psychological scale). For example, if a user seeks help for "inferiority and insomnia caused by interpersonal conflicts in the workplace", the cognitive classification module may generate conversation macro-goals such as "correcting negative self-cognition" and "improving conflict coping behaviors" based on cognitive behavioral therapy, and at the same time set a macro-goal of "enhancing self-acceptance" in combination with humanistic therapy.

[0048] Subsequently, the clinical pathway matching algorithm decomposes each macro goal into 8-12 phased goals, annotating the logical dependencies. For example, the macro goal of "correcting negative self-perceptions" can be decomposed into "identifying automatic negative thoughts" (preliminary phase goal), "challenging cognitive biases" (mid-term phase goal), and "establishing alternative positive cognitions" (later phase goal). "Identification" is a prerequisite for "challenging" (strong dependency, weight 0.8). Furthermore, the phased goals of "learning nonviolent communication skills" and "establishing alternative positive cognitions" under the macro goal of "improving conflict coping behaviors" may be complementary (weight 0.5), allowing for parallel advancement.

[0049] At the level of a single conversation, 5-8 micro-interaction goals are dynamically generated based on the current stage goals. Each micro-goal is associated with a specific intervention strategy (such as "guiding users to recall specific thoughts in conflict scenarios" corresponding to cognitive reconstruction techniques) and an expected response indicator (such as "being able to list at least one example of negative thinking"). For example, for the stage goal of "identifying automatic negative thinking," micro-interaction goals may include "recalling three interpersonal conflict scenarios in the past week," "recording immediate thoughts during the conflict," and "assessing the correlation between thoughts and emotions." Each goal corresponds to specific dialogue guidance words and effect evaluation criteria (such as whether the user can clearly describe the thought-emotion chain).

[0050] Goals are connected through vertical and horizontal connections. Vertical connections reflect a top-down decomposition relationship (e.g., macro goal → stage goal → micro goal), while horizontal connections model the synergy (e.g., "learning relaxation techniques" and "cognitive restructuring" reinforce each other, weighted 0.6) or conflict (e.g., the potential temporary conflict between obsessive-compulsive thought intervention and social exposure, weighted 0.2) between goals at the same level. The resulting dynamic goal graph is presented as a directed acyclic graph (DAG), supporting multiple paths in parallel. For example, while users improve their cognition and conduct behavioral training simultaneously, the system dynamically coordinates resource allocation through weights and priorities.

[0051] In this way, building a goal system based on established psychological theories ensures the scientific nature of intervention direction and avoids empiricist bias. For example, the "cognition-behavior-emotion" triangle model of cognitive behavioral therapy guides the decomposition of macro goals into phased goals, ensuring that each level of goals closely aligns with the core pathological mechanism. By annotating logical dependencies (such as strong dependency, complementarity, and conflict), the system can adjust the order of goal advancement based on real-time user responses. For example, if a user experiences intense anxiety (emotional intensity > 0.7) during "exposure training," the system can temporarily delay that path and prioritize strengthening the synergistic paths of "relaxation training" and "cognitive restructuring" (weight 0.6), resuming the exposure intervention once anxiety levels subside. Micro-interaction goals are tied to specific intervention strategies and expected indicators, making each session clearly actionable and measurable. For example, the micro-goal of "recording immediate thoughts during a conflict" can be evaluated in real time through semantic analysis of user statements (such as the frequency of negative words), providing data support for subsequent goal adjustments. Horizontal connections support synergistic interventions across macro-goals. For example, "enhancing self-acceptance" (a humanistic macro-goal) and "correcting negative self-perceptions" (a cognitive-behavioral macro-goal) work together through complementary pathways (weighted 0.5) to enhance treatment effectiveness. Furthermore, modeling conflict relationships (e.g., the potential for certain interventions to trigger traumatic reactions) helps the system mitigate risks and ensure intervention safety.

[0052] Through the above mechanism, the dynamic target graph transforms abstract treatment concepts into a computable and adjustable structured process, which not only maintains the rigor of the theoretical framework, but also gives the system the ability to flexibly plan paths based on the user's individual characteristics, laying the foundation for subsequent real-time path reassessment and personalized decision tree generation.

[0053] Further optionally, in the above steps, a personalized decision tree matching the dynamic target graph is preloaded, including: loading an initial decision tree associated with each target in the dynamic target graph from a basic decision tree; performing real-time path evaluation on the initial decision tree to obtain a treatment value function for each intervention path; selecting an intervention path whose treatment value function value reaches a set core path threshold, constructing it into a personalized decision tree, and pre-generating multiple emergency intervention paths and adding them to the personalized decision tree as an emergency intervention strategy for responding to sudden critical events.

[0054] In the embodiment of the present application, the treatment value function provides a quantitative assessment of the intervention path through a multi-dimensional weighted calculation. The treatment value function includes a weighted calculation of the expected effect, treatment time efficiency, customer acceptance, and risk factors.

[0055] For example, a user seeking counseling for workplace burnout reported "excessive workload, declining self-esteem, and frequent insomnia" during their first session. A dynamic goal graph was constructed, using a DAG structure to parallelize the three paths of "Stressor Analysis," "Cognitive Restructuring," and "Behavioral Activation." Each dimension was evaluated as follows: Expected Effectiveness Coefficient: The historical success rate of the "Cognitive Restructuring + Time Management" combination in similar cases is 65%, so this path was assigned an expected effectiveness coefficient of 0.65. Time Efficiency Coefficient: The "Stressor Analysis" path was planned to be completed in four sessions. After the current two sessions, the goal completion rate reached 50%, resulting in a time efficiency coefficient of 0.5 (per unit time progress). Customer Acceptance: The user proactively shared a specific action plan during the "Behavioral Activation" session, with semantic similarity reaching 80% and no resistance. Acceptance was calculated using reverse correlation to be 0.8 (lower resistance indicates higher values). Risk Factor: The "Cognitive Restructuring" path requires challenging core negative beliefs. Historical data indicates a 20% probability of emotional irritation and a 15% probability of cognitive overload, resulting in a risk factor of 0.2 × 0.15 = 0.03. The comprehensive calculation of the therapeutic value function for this pathway is: V(p) = 0.65 (expected effect) × 0.4 + 0.5 (time efficiency) × 0.3 + 0.8 (acceptance) × 0.2 - 0.03 (risk factor) × 0.1 = 0.26 + 0.15 + 0.16 - 0.003 = 0.567. Based on this value, the pathway priority is dynamically adjusted, allocating 40% of the session time to the highest-value cognitive restructuring pathway. Changes in risk factors are monitored to ensure the safety and effectiveness of the intervention.

[0056] Specifically, in an optional embodiment, the principle of pre-loading a personalized decision tree that matches the dynamic target graph is to construct an executable intervention strategy network based on a hierarchical target system, and to balance stability and emergency response capabilities through dynamic evaluation and pre-generation mechanisms. Specifically, first, the nodes and paths directly related to the goals at each level in the dynamic target graph (such as the conversation macro goal of "improving interpersonal interaction patterns in the workplace" and the stage goal of "learning non-violent communication skills") are extracted from the basic decision tree (a standardized intervention template library built based on historical cases and psychological theories) to form an initial decision tree. For example, for the stage goal of "learning non-violent communication skills", the initial decision tree may contain a linear path of "observing emotional reactions in communication → identifying needs and feelings → practicing positive expression sentences", as well as a branch path of "role-playing to simulate conflict scenarios", and each path is associated with the intervention-response probability predicted by the Bayesian network.

[0057] Next, a real-time path evaluation is performed on the initial decision tree, quantifying each path's expected effectiveness, time efficiency, client acceptance, and risk using a therapeutic value function. For example, if the "Observe Emotional Response" path has a therapeutic value function of 0.75 (high expected effectiveness and low risk), while the "Role Play" path has a therapeutic value function of 0.58 due to the client's history of trauma, the former path will be prioritized as the core path. By setting a core path threshold (e.g., a therapeutic value function > 0.6), high-value paths are selected to construct a personalized decision tree, ensuring the effectiveness of the backbone path.

[0058] At the same time, multiple emergency intervention paths are pre-generated and embedded in decision trees to deal with sudden critical events (such as drastic fluctuations in the customer's emotions, and the topic jumps to unexpected traumatic events). For example, if the customer suddenly has a panic attack (emotional intensity > 0.9) during the "Identifying Needs and Feelings" stage, the pre-generated emergency path of "Guiding Mindfulness Breathing → Pausing the Current Topic → Rebuilding Safety Signals" will be activated. This path is constructed based on psychological first aid theory and its effectiveness has been verified through historical cases (such as the probability of reducing anxiety levels by 40% in similar scenarios is 78%). The pre-generation of emergency paths relies on the prediction of high-risk scenarios by the Bayesian network (such as automatically associating panic intervention templates with customer trauma history labels), and simulates the effect distribution of different emergency strategies through Monte Carlo Tree Search (MCTS) to ensure its feasibility.

[0059] Consequently, a fast loading mechanism based on the underlying decision tree reduces real-time computational latency, while real-time evaluation of the treatment value function ensures that path priorities are aligned with individual client characteristics. For example, for clients with high cognitive flexibility, the "cognitive restructuring" path is given a higher acceptance weight, prioritizing it over the behavioral intervention path and shortening the treatment duration. Pre-generated emergency pathways, combined with real-time deviation detection (e.g., a key event recognition mechanism with a KPS > 0.6), enable the system to rapidly switch strategies in the event of unexpected situations (such as client resistance or emotional breakdown), mitigating the risks of fixed processes. For example, for clients at risk of suicide, a pre-loaded emergency pathway of "crisis assessment → safety plan development → resource linkage" ensures immediate triggering upon identification of relevant clues (e.g., semantic analysis detecting keywords such as "life is meaningless"), mitigating intervention risks. The core pathway is customized based on a client-specific dynamic goal map, while the emergency pathway reuses established intervention templates. This ensures targeted solutions (e.g., the "gradual exposure + cognitive restructuring" combination for clients with social anxiety) while also enhancing the system's universality in handling common emergencies through standardized emergency strategies. The results of each preload and path evaluation are fed back into the basic decision tree template library. For example, if a specific emergency path demonstrates high effectiveness across multiple applications (e.g., the "mindful breathing + safety signal" combination reduces the emotional intensity of 85% of clients to a moderate level), its associated nodes will be prioritized and incorporated into a collection of pre-generated paths for more scenarios, enabling iterative optimization of the system's intervention capabilities. Through this mechanism, personalized decision trees ensure the scientific nature of the main treatment lines while giving the system the flexibility to cope with complex and dynamic scenarios. This allows for the deployment of multi-level intervention strategies, from pre-set frameworks to real-time optimization and emergency reserves, thereby enhancing the safety and effectiveness of psychological counseling.

[0060] Furthermore, in step 102 , after preloading the personalized decision tree that matches the dynamic target graph, structural optimization may be performed on the personalized decision tree after executing a preset round of dialogue to update the path weights and the connection relationships between the various intervention paths and intervention nodes.

[0061] In an optional embodiment, the principle of structural optimization of the preloaded personalized decision tree is to dynamically adjust the tree structure by continuously collecting customer interaction data to improve the accuracy of the intervention strategy. Specifically, after executing a predetermined number of conversation rounds (e.g., every five conversations or upon reaching a key milestone), the system re-evaluates the therapeutic value function V(p) of each path in the decision tree based on real-time interaction data (such as changes in customer emotional intensity, improvements in cognitive indicators, and narrative topic shifts). Based on the evaluation results, the path weight (0-1) and node connectivity are adjusted. For example, if the "Mindfulness Breathing Training" micropath under the "Establish Stress Management Mechanism" macro goal demonstrates high customer acceptance C=0.8 and significant symptom improvement E=0.7 in actual interactions, its connection weight with the phased goal "Learn Basic Stress Relief Techniques" will be increased from 0.6 to 0.9, strengthening the path's priority. Conversely, if the "Progressive Muscle Relaxation" path's V(p) falls below the threshold of 0.4 due to low customer willingness C=0.3, the system will lower its weight, reduce resource allocation, and even temporarily freeze the branch.

[0062] Structural optimization also involves dynamic adjustments to the connection relationships between intervention nodes. For example, if a client shows a narrative shift about childhood trauma during the "Identifying Stressors" stage (narrative theme transition index text{NT}=0.7), a cross-layer connection (weight 0.5) will be automatically established between the "Stressor Analysis" node and the "Trauma-Related Cognitive Adjustment" node, allowing subsequent conversations to jump directly to the relevant intervention path rather than proceeding according to the original linear process. At the same time, the potential effects of new connections are simulated through Monte Carlo Tree Search (MCTS) to ensure the rationality of structural adjustments. For example, if the simulation results of the newly added path show that it can increase the overall V(p) by 0.15, the tree structure will be officially updated. If the simulation effect is not good, the adjustment will be abandoned and recorded as empirical data.

[0063] For example, a client advances along the "cognitive reconstruction → behavioral activation" path in the initial decision tree, but after three sessions, the system finds that his mood fluctuates greatly in the "cognitive reconstruction" stage, for example, DeltaE = 0.6, and the completion rate of homework for "behavioral activation" is only 40% R = 0.6, indicating an increased risk factor. Through structural optimization, the system reconnects the "mindfulness stress reduction" path (original weight 0.3) with the "emotional regulation" node, increases the weight to 0.7, and inserts an "emotional log recording" micro-node (associated with daily emotion monitoring intervention). After the adjustment, the client's emotional stability in subsequent sessions increased by DeltaE = 0.3, and the completion rate of behavioral activation increased to 70%, verifying the effectiveness of the structural optimization.

[0064] This avoids the drawback of static decision trees that prevent them from adapting to fluctuating client states. For example, as a client progresses through a consultation, if their state shifts from "high emotional intensity + low insight" to "moderate emotional intensity + high insight," the system automatically downgrades the weight of supportive intervention pathways and increases cognitively challenging pathways to align with the client's growth cadence. This weight adjustment prioritizes high-value pathways and reduces resource consumption on ineffective pathways. For example, a depressed client experienced no significant improvement after four sessions of "cognitive restructuring" intervention (V(p) = 0.45). Promptly shifting resources to the "interpersonal psychotherapy (IPT)" pathway (V(p) estimated at 0.68) shortened the symptom improvement cycle. The cross-layer connections and weight update mechanism enable the decision tree to accommodate emerging client needs (such as concurrent anxiety symptoms), avoiding intervention gaps caused by rigid pre-set structures. Furthermore, adjustments are validated through MCTS simulations, reducing the risk of trial and error and ensuring the clinical rationale of structural changes. The results of each structural optimization are automatically integrated into the system's knowledge base, forming a closed loop of "interactive data → evaluation → optimization → verification." For example, if multiple clients trigger cross-layer connection needs in a "trauma intervention" scenario, this connection pattern will be incorporated into the basic decision tree template, improving the efficiency of intervention for similar issues. Through this mechanism, the personalized decision tree has been upgraded from a preset framework to a dynamic evolution. This enables the psychological counseling system to continuously optimize strategies based on client feedback, just like a human counselor, to improve the precision of intervention and client adaptability, ultimately enhancing treatment effectiveness and user experience.

[0065] Alternatively, within the real-time intervention correction mechanism of the psychological intervention decision tree generation system, the principle of detecting client response deviations and executing decision tree reconstruction is to quantify response differences through multi-dimensional data fusion and dynamically adjust the intervention path based on the degree of deviation, ensuring the adaptability of the counseling strategy. Specifically, the system first extracts key monitoring indicators through three modules: the Semantic Deviation Index (SDI), the Psychological Change Tracking (PMTS), and the Interactive Behavior Pattern Analysis (IPA). For example, when analyzing client texts, the SDI calculates semantic deviations using thematic match (TM), conceptual match (CM), and sentiment match (SM). If a client frequently mentions "interpersonal conflict" when they are supposed to discuss "stress management," the TM value drops to 0.4 (preset threshold of 0.6), triggering a preliminary deviation warning. Simultaneously, the PMTS detects a 0.2 increase in the anxiety scale score (ΔS = 0.2), and the IPA detects a 30% fluctuation in response time (TS = 0.7). The comprehensive deviation model calculates Total_Deviation = 0.42, exceeding the threshold of 0.35, prompting the system to initiate reconstruction. Furthermore, cross-terms are introduced into the comprehensive deviation calculation model to capture the synergistic effects between dimensions. An adaptive weight adjustment mechanism dynamically adjusts the weights of each dimension based on the consultation type and stage. Furthermore, a deviation type classifier can be used to distinguish between positive, negative, and neutral deviations.

[0066] Furthermore, topic match assesses the degree of overlap between the client's actual discussion topic and the expected topic. Concept match analyzes differences in semantic network structure by comparing key concept graphs. Emotion match measures the degree of matching in emotion polarity, intensity, and complexity. For example, a bidirectional transformer model is used to extract contextual semantic representation vectors from conversation text, and the semantic distance to the expected response is calculated using cosine similarity. An additional intent recognition module is introduced to specifically identify the client's implicit psychological needs and interaction purpose. For example, in the Psychological Metrics Tracking System (PMTS), emotion change vectors include changes in eight basic and complex emotions; cognitive pattern changes track changes in cognitive characteristics such as cognitive distortions and attribution styles; behavioral intention changes monitor changes in the client's expressed behavioral intentions and plans; symptom intensity changes reflect changes in symptom manifestations for specific psychological issues; and interpersonal response patterns reflect changes in the client's responses to the counselor. Alternatively, a mini-psychological assessment questionnaire system can be used to naturally embed assessment items into interactions. Combined with language model inference capabilities, clinically relevant indicators can be extracted from freely expressed text to establish personalized baseline and change trajectory models.

[0067] For example, during the Interaction Pattern Analysis (IPA), a detection system that identifies abnormal interaction behaviors performs weighted calculations on time series indicators, response selectivity, engagement changes, and communication styles to obtain the results of the interaction pattern analysis. Among them, time series indicators analyze the length of responses, pauses for thinking, and changes in interaction rhythm; response selectivity measures the customer's response to specific topics vs. avoidance tendencies; engagement changes track changes in response length, information richness, and initiative; and communication style analyzes the degree of language formalization, openness, and emotional expression. Furthermore, a time series pattern recognition algorithm is used to process interaction time series data; and natural language processing technology is used to evaluate text functional characteristics. In addition, a personalized customer interaction baseline can be established through interaction style fingerprint recognition technology.

[0068] When a deviation occurs, a four-level reframing strategy is implemented based on the degree of deviation. For example, if a client shows mild resistance to the "cognitive reframing" intervention (emotional intensity 0.5, deviation threshold 0.35), a fine-tuning correction strategy is triggered. The main path remains unchanged, but the intervention parameters of the current node are adjusted, such as changing "challenging negative thinking" to "gradually identifying thinking patterns." An "empathic feedback" buffer node is inserted, maintaining conversational coherence through soft transition techniques. If the deviation escalates (e.g., emotional intensity suddenly rises to 0.8 and semantic deviation reaches 0.7), a branch replacement strategy is initiated, activating the "mindful breathing + narrative therapy" branch from the alternative solution library. Connectivity assessment (semantic coherence 0.8) is used to ensure that the new path aligns with the historical conversation. The depth of the new branch is dynamically adjusted to the base depth + 0.8 × emotional intensity (i.e., D = 5 + 0.8 × 0.8 = 5.64, rounded up to 6 layers).

[0069] In terms of reconstruction technology implementation, the three-level memory recovery system extracts key information from historical interactions (such as traumatic events previously mentioned by the client) and combines it with the current state vector (anxiety = 0.8, avoidance = 0.7) to generate a high-dimensional representation, guiding the local update of the intervention-response model. For example, based on the difference between the actual response (the client refused the role-playing game) and the prediction (expected acceptance 0.6 vs. actual 0.3), the model adjusts the relevant parameters of "exposure therapy" through a gradient accumulation mechanism, and the learning rate η is automatically increased to 0.2 (normally 0.1) to accelerate convergence. At the same time, the smooth transition generation technology uses more than 200 guiding phrase templates to naturally integrate path switching into the conversation, such as "The emotional reactions we just discussed are important. Perhaps we can first stabilize the state through breathing exercises, and then look at the thoughts behind these feelings together?" to prevent the customer from perceiving a break in the process.

[0070] This system integrates language, psychological indicators, and interactive behavior data to avoid misjudgments based on a single dimension. For example, a client may appear cooperative (emotional intensity 0.4), but the frequency of negative vocabulary in their text has increased by 20% (SDI = 0.5). Combined with a decrease in proactive responses (PS = 0.3) in their IPA, the system can proactively identify implicit resistance and avoid delayed intervention. The four-level strategy covers a full range of scenarios, from minor adjustments to global reconstruction, with an average response time of under 200ms. For example, in simulation tests, overall reconstruction time was reduced in severe deviation scenarios, compared to traditional methods. After each reconstruction, the intervention-response model parameters were updated by an average of 15%, and typical deviation samples were added to the historical case library, improving the system's prediction accuracy for similar issues. Through soft transition technology and personalized rhetorical adjustments, the reconstruction process is less transparent to the client, meaning the client is unaware of the strategy switch, while simultaneously improving consultation satisfaction. In summary, the real-time intervention correction mechanism, through a closed loop of "precise detection - graded reconstruction - seamless transition - model evolution," enables the psychological counseling system to agilely adapt to the client's dynamic responses, significantly improving the scientific nature of intervention and user experience.

[0071] In the specialized processing of psychological intervention data, given the temporal dynamics and sparsity of data, during psychological intervention, users' psychological states (such as mood swings and cognitive patterns) exhibit significant time dependence. Cross-session data often exhibit dynamic trends (e.g., anxiety levels gradually decrease with the number of interventions). To capture this temporal nature, a dynamic Bayesian network (DBN) architecture is introduced. This model models cross-session variables (such as emotion scores across sessions and the effectiveness of intervention strategies) as a probabilistic association network that evolves over time. This clearly expresses the causal relationship between "current psychological state" and "historical states and intervention measures." For example, the "behavioral activation effect" of the third session depends on the "cognitive reconstruction progress" of the previous two sessions. Furthermore, to emphasize the influence of recent data on current decisions, a time decay mechanism is incorporated into parameter estimation: weights are automatically adjusted based on the time of data collection, with more recent data receiving a higher weight, while data from three months ago receives a lower weight. For example, session data from within a week might be weighted 100%, while data from three months ago would receive a lower weight. The decay rate is optimized individually based on the characteristics of the psychological variables. Emotional variables (such as anxiety intensity) fluctuate quickly, so the decay rate is set high (such as 50% decay per week). Cognitive variables (such as attribution style) are relatively stable, so the decay rate is set low (such as 20% decay per month) to ensure that the model is sensitive to the user's latest status changes.

[0072] Psychological interventions often face data sparsity issues for specific psychological conditions (e.g., rare symptom combinations) or niche intervention pathways, leading to unstable model parameter estimation. To address this issue, parameter smoothing techniques are employed to regularize the probability distribution of sparse regions within a Bayesian estimation framework. Specifically, prior pseudocounts are introduced when calculating conditional probabilities between variables to balance the impact of data sparsity. For core variables of high importance (e.g., suicide risk indicators), low prior pseudocounts (e.g., 0.1) are assigned to preserve the original data characteristics as much as possible; for auxiliary variables (e.g., demographic information), higher prior pseudocounts (e.g., 1) are assigned to enhance the smoothing effect. For example, if a rare intervention strategy was implemented in only five users and effective in four, a direct estimate of 80% effectiveness could risk overfitting. Using smoothing (assuming α = 0.5), the effectiveness probability is adjusted to (4 + 0.5) / (5 + 0.5) ≈ 81.8%, avoiding extreme values ​​while making reasonable use of limited data. This dynamic adjustment mechanism enables the model to output reliable probability estimates even in data-scarce scenarios, reducing intervention strategy biases caused by insufficient samples.

[0073] For example, through time decay and DBN modeling, the detection speed of users' short-term psychological fluctuations (such as sudden mood changes in crisis intervention) has increased by 40%, and the accuracy of cross-session intervention effect prediction has increased from 65%. In the evaluation of intervention effects of rare symptom combinations (incidence <5‰), the model's prediction accuracy has increased from the random level (50%) to 63%, effectively supporting the generation of personalized clinical strategies for niche needs. The decay rate and pseudo-counting mechanism designed for the characteristics of psychological data make the model more in line with clinical reality (such as recent intervention effects are more valuable for reference, and core symptoms need to retain data details). Compared with general data processing methods, the model stability in psychological intervention scenarios has been improved by more than.

[0074] Through the above processing, the challenges of temporal dynamics and sparsity of psychological intervention data are effectively solved, laying a data foundation for building an accurate and reliable personalized response intervention model.

[0075] As an optional embodiment, 103 , after receiving the real-time interaction data of the target user, a real-time path re-evaluation is performed based on the real-time interaction data to obtain a treatment value function of each intervention path.

[0076] Specifically, the principle behind real-time pathway reassessment, based on receiving real-time interaction data from target users, is to dynamically analyze current user feedback to quantify the actual value of different intervention pathways, thereby flexibly adjusting treatment strategies. First, real-time user data is collected during conversations, including language content (e.g., emotional expression when mentioning stressful events), nonverbal behavior (e.g., increased speech rate, frowning), real-time feedback on psychological scales (e.g., changes in anxiety scale scores), and progress toward milestone goals (e.g., whether emotional diaries are completed on time). Next, this multi-dimensional data is integrated into a real-time psychological profile of the user. This profile is then compared against the expected outcomes of pre-planned intervention pathways, and each pathway is evaluated across four core dimensions: effectiveness, efficiency, acceptability, and risk. For example, if a user frequently avoids key topics while attempting the "cognitive restructuring" intervention, the system will determine that the pathway's customer acceptance is low. Combined with the potential risks predicted by the Bayesian network, the pathway's value score will be lowered. Conversely, if a user responds positively to the "mindful breathing" intervention (e.g., a significant decrease in emotional intensity), the pathway's priority will be increased.

[0077] For example, a user suffering from insomnia due to workplace stress mentioned in their fourth session, "I tried the breathing exercises recommended previously, but couldn't concentrate in the office." The scale also indicated an increase in anxiety levels compared to the previous session. Analysis revealed that the original "Immediate Response to Workplace Stress" path was inefficient due to environmental constraints and lacked user acceptance. Through real-time reassessment, the path was adjusted to first establish a relaxation ritual at home and then gradually transition to the work setting. This, combined with the introduction of a micro-habit cultivation intervention strategy, improved feasibility by integrating with users' actual scenarios, resulting in a higher recalculated path value score.

[0078] This avoids the mechanical execution of fixed pathways and allows for timely strategy switching based on real-time user feedback. For example, for users experiencing high emotional volatility, the emotional soothing pathway is prioritized rather than forced cognitive intervention, improving intervention relevance. Real-time data captures potential risks (such as when a user experiences resistance to an intervention) and allows for timely adjustments or suspension of high-risk pathways, mitigating the potential for psychological harm during the intervention. For example, when trauma-related avoidance behaviors are identified, the system automatically switches to safe topic guidance. Resources are prioritized for high-value pathways, minimizing ineffective attempts. For example, if a user demonstrates significant progress in a behavioral activation pathway (e.g., increased frequency of social activity), the session time allocated to that pathway is automatically increased, shortening the overall treatment course. By leveraging real-time user feedback as the core of decision-making, engagement and trust are enhanced. For example, if a user proactively expresses a preference for narrative therapy, the weight of that pathway is increased, ensuring that the consultation better meets their subjective needs and improving satisfaction. Through a real-time pathway reassessment mechanism, the system transitions from being driven by pre-set processes to being driven by user status, ensuring that every intervention decision is based on the latest data, significantly improving the relevance and effectiveness of psychological counseling.

[0079] As an optional embodiment, in step 104, a Bayesian network and Monte Carlo tree search algorithm are used to construct an intervention response prediction model, including:

[0080] Based on the initial user data and real-time interaction data, a multidimensional psychological state vector is constructed; the multidimensional psychological state vector includes at least: demographic variables, psychological scale feature vectors, real-time interaction behavior pattern indicators, and physiological response parameters; a Bayesian network of a personalized strategy tree is constructed through a hybrid structure learning algorithm; wherein, the Bayesian network is used to generate a conditional probability table containing the conditional probability distribution of each intervention path; the conditional probability distribution of each intervention path includes at least: the target user's positive expected effect probability of the intervention strategy in the intervention path; in the process of constructing the Bayesian network, the constraint-based Peter-Clark algorithm is used to perform an initial conditional independence test, set the maximum number of parent nodes and the significance threshold, and screen the initial network through the conditional independence test to eliminate redundancy Causal relationship; score-based greedy search is used to fine-tune the network structure of the initial network; for the core intervention path, the K2 scoring function is applied to perform local optimization in the initial network; Bayesian estimation combined with the EM algorithm is used to update the conditional probability table in real time; in the simulation stage, the transition probability between each intervention path is calculated through the Bayesian network, a Markov decision process framework is constructed, the treatment value function of each intervention path is dynamically updated, and an intervention response prediction model is constructed to simulate the target user's expected response effect to the intervention strategy through the Bayesian network; in the intervention path selection process of each session, a new intervention path is constructed based on real-time interaction data through the incremental learning mechanism of Monte Carlo tree search, and the conditional probability table in the Bayesian network is updated based on the new intervention path.

[0081] Specifically, in 104, the intervention response prediction model is constructed by integrating multidimensional user data, combining Bayesian networks and Monte Carlo tree search algorithms, to dynamically predict the effects of different intervention strategies and optimize path selection. Initial user data (such as age, occupation, and psychological scale scores) is combined with real-time interaction data (such as conversation content, response speed, and heart rate changes) to form a multidimensional psychological state vector, comprehensively characterizing the user's current state. Based on this vector, the system constructs a Bayesian network using a hybrid structured learning algorithm. Conditional independence tests are first performed using the Peter-Clark algorithm to identify causal relationships between variables and eliminate redundant associations, such as "user gender" and "effects of specific cognitive interventions." Greedy search is then used to fine-tune the network structure. The K² scoring function is applied to core intervention pathways (such as "cognitive restructuring") for local optimization to ensure the rationality of the network structure. Subsequently, the system uses Bayesian estimation combined with the EM algorithm to update the conditional probability table using real-time data, dynamically adjusting the expected effect probability of each intervention strategy (e.g., the probability of "mindful breathing" having a positive effect in the current state).

[0082] During the simulation phase, the system uses the Bayesian network to calculate the transition probabilities between intervention paths, constructs a Markov decision process framework, dynamically updates the treatment value function, and simulates the expected effects of different intervention paths. For example, when a user shows excessive anxiety during "exposure therapy," the system predicts the potential benefits of switching to the "cognitive rehearsal" path. After each session, the Monte Carlo tree search algorithm uses an incremental learning mechanism to construct and evaluate new intervention paths (such as "art therapy" that combines user interests) based on newly generated interaction data, and feeds back the effects of these paths to the Bayesian network, updating the conditional probability table to form a closed-loop optimization of "prediction-practice-feedback."

[0083] For example, the initial model for a user with social anxiety indicated a 65% probability of the expected effect of a "role-playing" intervention, but in actual use, the user showed significant avoidance (real-time interaction data showed a sudden increase in anxiety levels). Monte Carlo tree search, exploring alternative paths, helped increase the probability of the expected effect of "virtual scene exposure," leading to adjustments to the intervention strategy. Simultaneously, the Bayesian network updated the conditional probability table based on the new data, strengthening the correlation between "high social anxiety" and "good virtual exposure effect," making subsequent predictions more accurate for the user.

[0084] Thus, through multidimensional mental state vectors and a dynamically updated Bayesian network, the model can capture individual user differences. For example, introverted users respond better to "written expression" interventions than "verbal sharing," improving intervention matching. Combining the EM algorithm and Monte Carlo tree search, the model can quickly respond to changes in user status during a conversation. For example, when a user suddenly mentions childhood trauma, the model automatically adjusts path priorities to reduce the risk of using trauma-sensitive interventions. The incremental learning mechanism allows the system to explore and incorporate new intervention pathways, such as introducing gamified cognitive training for young users to expand the diversity of treatment methods. The causal structure of the Bayesian network provides interpretability for intervention decisions, for example, showing how "improvement in emotion regulation ability" depends on "frequency of mindfulness practice," helping counselors understand the logical basis for recommended pathways. Through data-driven dynamic prediction and adaptive optimization, the model significantly improves the targetedness and effectiveness of psychological interventions, achieving a transition from general solutions to personalized customization, and providing users with more accurate and safe mental health services.

[0085] As an optional embodiment, after the Bayesian network and Monte Carlo tree search algorithm are used to construct the intervention response prediction model in 104, the enhanced selection strategy of Monte Carlo tree search is also used in the intervention path selection process of each session, integrating the improved UCB formula of Bayesian prior probability to obtain the intervention path with the highest probability of positive expected effect.

[0086] Specifically, after building an intervention response prediction model, the system employs an enhanced Monte Carlo Tree Search (MCTS) strategy during the path selection phase of each session. This strategy improves upon the traditional Unified Combination (UCB) algorithm by incorporating Bayesian prior probabilities, achieving more accurate intervention path decisions. Specifically, at the beginning of each session, the system provides MCTS with prior knowledge based on the conditional probability table (containing the expected efficacy probabilities of each intervention strategy) generated by the current Bayesian network, guiding its search direction. During simulation, the improved MCTS not only considers the performance of historical paths (such as success rate and information gain) but also incorporates the Bayesian prior's probability distribution linking user status to intervention efficacy, prioritizing exploration of high-potential paths. For example, if the Bayesian network indicates that a user has a 75% probability of responding to narrative therapy during a "period of emotional volatility," MCTS will increase the number of simulations for that path while dynamically adjusting the intensity of exploration of other paths, balancing the need to leverage known effective paths with the need to explore potentially more promising ones.

[0087] For example, a depressed user made slow progress in cognitive behavioral therapy (CBT). Using a Bayesian network, the system discovered a strong correlation between their tendency to ruminate and the effectiveness of mindfulness-based stress reduction (MBSR) (68% prior probability). The improved MCTS strategy used this information to enhance simulation evaluation of the MBSR pathway, allocating 40% of computing resources (compared to the typical 20%) across 1,000 simulations to rapidly verify the pathway's effectiveness. If the simulation results indicate a 72% success rate (higher than CBT's 58%), the system will prioritize MBSR as the next intervention option.

[0088] Thus, by guiding the search with Bayesian priors, ineffective exploration of low-probability paths is reduced, allowing decisions to more quickly focus on high-value intervention strategies. For example, in simulation tests, path selection time for complex psychological intervention scenarios was shortened and convergence speed was improved. For users with rare psychological characteristics (such as those with multiple personality disorder), Bayesian priors can leverage domain knowledge to compensate for insufficient samples and avoid decision bias caused by data sparsity. When evaluating high-risk interventions (such as exposure therapy), the model can incorporate risk probabilities (such as the possibility of trauma recurrence) from the Bayesian prior to adjust exploration strategies and reduce the incidence of adverse events. In practical applications, the safety factor of high-risk interventions is improved. After each session, the MCTS simulation results are fed back to the Bayesian network to update the prior probabilities, forming a closed loop of "prediction-practice-update." For example, if a user's response to "art therapy" is better than expected, the system will increase the weight of that path in the priors for similar users, enhancing the model's generalization ability. By integrating the advantages of Bayesian probabilistic reasoning and Monte Carlo tree search, the intelligence and safety of intervention path selection are significantly improved, especially showing stronger decision-making stability and adaptability in complex psychological scenarios, providing more reliable technical support for personalized psychological intervention.

[0089] As an optional embodiment, in 104, after constructing the intervention response prediction model using the Bayesian network and Monte Carlo tree search algorithm, if the deviation between the target user's real-time interaction information and the expected response information is greater than the set deviation threshold, the local reconstruction of the dynamic target graph is triggered; wherein the local reconstruction includes at least: path reinforcement, fine-tuning correction, branch replacement, and overall reconstruction.

[0090] Specifically, in step 104, when the deviation between the target user's real-time interaction information and the expected response exceeds a set threshold, the system triggers a partial reconstruction mechanism of the dynamic target graph. The core principle is to use real-time feedback to modify the intervention strategy, ensuring that the path matches the user's actual state. First, the deviation is calculated through multi-dimensional data such as semantic analysis, emotion monitoring, and behavioral pattern comparison. For example, if a user experiences unexpected strong emotional resistance during "exposure therapy" (e.g., a sudden 30% increase in anxiety and frequent avoidance of topics), and the deviation exceeds a preset threshold (e.g., 0.35), a four-level reconstruction strategy is initiated based on the degree of deviation. If the deviation is positive (e.g., the user's response to "mindfulness practice" is better than expected), the system increases the weight of the path and allocates more resources to similar interventions, such as increasing the proportion of session time devoted to "mindful breathing." For minor negative deviations (e.g., insufficient completion of the "cognitive diary"), the current node parameters are adjusted, such as changing "daily record" to "three times a week record" and inserting a "motivational interviewing" node to improve engagement. In the event of moderate deviation (e.g., if "social skills training" does not meet expectations), the "narrative therapy" branch is activated from the alternative solution library, and semantic coherence assessment is used to ensure that the new path is connected to the historical dialogue, for example, replacing the original "role-playing" exercise with "review of growth stories." In the event of severe deviation (e.g., if the user suddenly discloses an unmentioned trauma history, causing the current solution to fail), the goal hierarchy is regenerated based on the latest status, and a new path is constructed that includes "trauma-focused therapy," while retaining the nodes related to the established therapeutic alliance.

[0091] For example, in the real-time correction mechanism of the psychological intervention decision tree, a four-level progressive reconstruction strategy is used to dynamically adjust the intervention path based on the direction and degree of deviation in the client's response. When a positive deviation is detected (e.g., the client's response to mindfulness training is better than expected), the path reinforcement strategy is triggered. The reinforcement learning algorithm improves the value function of the current path (e.g., multiplying the gain coefficient to amplify the positive effect), simultaneously adjusts the intervention parameters (e.g., increasing the frequency of practice), and updates the exploration weight of the Monte Carlo Tree Search (MCTS) to increase the sampling probability of similar effective branches, accelerating the reinforcement of the positive path.

[0092] If there is a slight negative deviation (such as the customer's insufficient completion quality of the "cognitive diary"), the fine-tuning correction strategy will be initiated. While keeping the main structure of the decision tree unchanged, the implementation parameters of the current node will be adjusted (such as changing daily records to three times a week), and buffer nodes such as "motivational interviews", "empathetic feedback", and "clarification questions" will be inserted. The original path will be smoothly connected through "soft transition" language (such as "We can start with a short record") to correct the deviation with minimal intervention cost.

[0093] When a moderate deviation occurs (such as "social skills training" does not achieve the expected results), the branch replacement strategy is activated, and a matching branch is selected from the library of alternative solutions pre-generated in the previous step of the current node (such as switching to "narrative therapy"). The logical connection is ensured through semantic coherence evaluation (such as checking the thematic relevance of the new branch with historical conversations), and a smooth transition generator is applied to create customized connection nodes (such as "exploring social patterns from growth stories"). The depth of the new branch is dynamically adjusted according to the customer's latest status parameters (such as anxiety level, cognitive openness) to achieve accurate replacement of local paths.

[0094] If a serious deviation occurs (e.g., a client suddenly discloses an unmentioned traumatic history, rendering the existing plan ineffective), a holistic reconstruction strategy is implemented. First, a rapid problem reassessment process is initiated. Based on the latest psychological state vector, the intervention target hierarchy is regenerated (e.g., shifting from "stress management" to "trauma repair"), and a new decision tree structure is constructed. Key information from historical interactions (e.g., the established therapeutic alliance) is retained. A "consultation redirection framework" (e.g., "We need to temporarily adjust our direction and address the important experience you mentioned") is used to naturally guide the conversation onto a new path, ensuring the consistency of the intervention logic and the safety of the treatment.

[0095] Through a progressive response mechanism, we achieve full-dimensional coverage, from local parameter adjustments to global structural updates. This ensures the system's sensitivity to subtle changes while also providing resilience to sudden, significant deviations, ultimately enhancing the dynamic adaptability and clinical effectiveness of psychological interventions. The detailed relationships between deviation levels, deviation types, reconstruction strategies, and triggering conditions are shown in the table below.

[0096] Table 1

[0097]

[0098] For example, a user with social anxiety experienced a panic attack (deviation of 0.6) during a "gradual exposure" intervention, triggering an immediate overall restructuring. The exposure path was paused, and a new branch, "Safety Base Establishment + Basic Emotion Regulation Training," was initiated. The micro-interaction goals were restructured by inserting a "Mindfulness Anchoring Technique" node, and the phase objective was adjusted to "First, Build Emotional Stability, Then Gradually Expose." After this restructuring, the user's anxiety level decreased within two sessions, validating the effectiveness of the strategy.

[0099] In this way, through a hierarchical reconstruction mechanism, the system responds to sudden deviations in a short period of time, avoiding intervention rigidity. For example, the response speed to trauma-related deviations is faster than manual adjustments. Fine-tuning corrections and branch replacement strategies maintain conversation coherence, reducing the user's perception of reconstruction. For example, through the soft transition dialogue "We can start with an easier way to try it first," the path is naturally switched. The overall reconstruction mechanism effectively reduces the negative impact of high-risk deviations. For example, the accuracy of intervention adjustments for suicide risk-related deviations is improved. Each reconstruction data is automatically imported into the training set, which improves the system's prediction accuracy for similar deviations. For example, the success rate of subsequent intervention plans in the "undisclosed trauma" scenario is improved. Through data-driven real-time corrections, the system is given flexible adjustment capabilities similar to those of human counselors, significantly improving the safety and effectiveness of psychotherapy while ensuring intervention coherence.

[0100] The specific impact of the local reconstruction of the dynamic target graph on the intervention response prediction model is reflected in four aspects: model structure, parameter update, prediction logic, and adaptive evolution.

[0101] First, local reconstruction will trigger a structural update of the intervention response prediction model. For example, when the system introduces a new intervention path through the "branch replacement" strategy (such as replacing "exposure therapy" with "narrative therapy"), the Bayesian network needs to add corresponding nodes (such as "narrative theme complexity" and "self-disclosure level") and their connection edges with the original nodes (such as "emotional stability" and "cognitive openness"). This adjustment will change the causal structure of the network, such as establishing a new causal chain of "narrative coherence → improved self-acceptance → decreased anxiety level", thereby optimizing the model's prediction logic for the effect of the intervention. At the same time, new branches will be added to the node space of the Monte Carlo Tree Search (MCTS), and the model needs to re-evaluate the state transition probability of the new path, such as simulating the diversity of user responses in the "narrative therapy" path and updating the state transition matrix of the Markov decision process.

[0102] Secondly, during the reconstruction process, real-time interaction data (such as the user's actual response to the new intervention) will be used to update the conditional probability table of the Bayesian network. For example, if the "mindfulness anchoring technology" reduces the anxiety level of 80% of users after reconstruction, the system will increase the "positive effect probability" corresponding to the intervention from the model's preset 65% to 78%, and at the same time adjust the relevant risk factors (such as the "cognitive overload probability" from 15% to 8%). For MCTS, the simulation results of the newly added path (such as 42 successes in 50 simulations) will update the number of node visits and cumulative rewards, making the model more inclined to choose high-value paths in subsequent decision-making, such as increasing the exploration weight of "mindfulness anchoring" from 0.3 to 0.5 to accelerate convergence to an effective strategy.

[0103] Third, local reconstruction will correct the model's prediction bias, especially when dealing with user reactions that deviate from expectations. For example, when "holistic reconstruction" introduces "trauma-focused therapy", the model needs to relearn the association pattern of "trauma disclosure → emotional catharsis → cognitive reconstruction" and adjust the single logic of "direct exposure → anxiety relief" in the original prediction. At the same time, the model will dynamically adjust the weight parameters of the treatment value function based on the effect of the reconstructed path. For example, in the trauma intervention scenario, the weight of the risk factor is increased from 0.1 to 0.2 to prioritize the safety of the intervention. In addition, the model will identify potential intervention-response patterns through the new reconstructed data. For example, it was found that the combination of "art therapy + mindfulness" is better than a single therapy for users with high emotional intensity, thereby optimizing the prediction logic of multi-path collaboration.

[0104] Fourthly, the new data generated by each local reconstruction (such as the optimal intervention path under a specific deviation scenario) will be incorporated into the training set of the model to drive its continuous evolution. For example, when multiple users successfully alleviate anxiety through the "fine-tuning correction" strategy in the "intense emotional fluctuations" scenario, the model will use "prioritize the insertion of buffer nodes when the emotional intensity is >0.7" as a general rule to improve the prediction accuracy of similar scenarios. In addition, invalid paths discovered during the reconstruction process (such as an intervention that performed poorly in three reconstructions) will be marked as low priority to reduce invalid exploration of similar scenarios in the future, such as reducing the prior probability of the "immediate exposure under high-pressure environment" path. This mechanism significantly improves the generalization ability of the model, for example, the prediction accuracy of the intervention strategy for the "unexpected trauma disclosure" scenario is improved, and it can adapt to the individual differences of different users more quickly.

[0105] In summary, the local reconstruction of the dynamic target graph enables the intervention response prediction model to evolve from "static preset" to "dynamic adaptation" through structural adjustment, parameter update, logic correction and data accumulation. It not only improves the intervention accuracy for the current user, but also enhances the generalization ability for unknown scenarios through experience accumulation, and ultimately forms a closed-loop evolutionary mechanism of "detection deviation-correction model-optimization prediction".

[0106] As an optional embodiment, in step 105, the intervention response prediction model is used in combination with the treatment value function of each intervention path to adjust the priority and execution sequence of the intervention paths in the personalized decision tree, and a target intervention path that matches the real-time interaction data is selected from the adjusted intervention paths, including:

[0107] Monitor the therapeutic value functions of all intervention paths in real time. When it is detected that the therapeutic value function value of any intervention path is lower than the set replacement threshold, the intervention path replacement is triggered. From the parallel candidate intervention paths, screen the candidate intervention paths whose cosine similarity with the current psychological state vector is greater than the set similarity threshold and whose vertical dependency weight in the dynamic target graph is greater than the parent node weight threshold. Through Monte Carlo tree search, simulate the preset step intervention response of the candidate intervention path. Calculate the emotional intensity fluctuation range based on the preset step intervention response. If the fluctuation range is greater than the set fluctuation threshold, enter the weight decay mode to reduce the priority weight of the candidate intervention path and reduce the execution of the candidate intervention path in the execution sequence. row ranking; if the session criticality score of the current session exceeds the set score threshold, it enters the acceleration mode, activates the parallel execution channel, allows multiple candidate intervention paths under the same stage goal to be promoted simultaneously, and allocates additional computing resources to the candidate intervention paths promoted simultaneously; comprehensive treatment value ranking and Monte Carlo search ranking are used to perform dual-channel decision fusion processing on the rearranged or synchronously promoted candidate intervention paths to obtain dynamic adaptation results that match the real-time interaction data; comprehensively verify the candidate intervention paths indicated in the dynamic adaptation results from the perspectives of interaction style adaptation, cross-layer path matching, semantic logic alignment, emotional fluctuation range, and treatment value improvement to obtain the final selected target intervention path.

[0108] Specifically, in 105, the principle of dynamically adjusting the intervention path through the intervention response prediction model and the treatment value function is to monitor the path effectiveness in real time and intelligently screen the optimal strategy based on the user status. Specifically, the system continuously monitors the treatment value function of all intervention paths. When the value of a path falls below the replacement threshold (such as 0.4), the path replacement mechanism is triggered. For example, if the value of the "cognitive reconstruction" path drops to 0.38 due to user resistance, the system will screen out paths from the parallel candidate paths whose cosine similarity with the current psychological state vector is higher than 0.6 (such as the similarity of "mindfulness-based stress reduction" is 0.72) and whose vertical dependency weight exceeds the parent node threshold (such as 0.5). Next, a Monte Carlo tree search was used to simulate the intervention response for the next three steps of the candidate pathway. If the simulation indicated that "mindfulness-based stress reduction" could cause an emotional intensity fluctuation exceeding 0.3 (with a set threshold of 0.25), the system entered weight decay mode, reducing its priority from second to fourth. If the criticality score of the current session (e.g., sudden emotional changes + narrative transitions) exceeded the 0.6 threshold, the system activated acceleration mode, allowing "mindfulness-based stress reduction" and "breathing training" to proceed simultaneously and allocating an additional 20% of computing resources to accelerate effect evaluation. Ultimately, the system integrated treatment value ranking (e.g., "behavioral activation" value of 0.65) and Monte Carlo search ranking (e.g., simulation success rate of 78%), and verified it from five dimensions, including interaction style adaptation (e.g., user preference for guided intervention) and semantic logic alignment (e.g., the current topic's association with "stress scenario analysis"), to select the "behavioral activation + mindfulness-based stress reduction" combination as the target pathway.

[0109] For example, the path value of "exposure therapy" for an anxious user dropped to 0.35, and the system triggered a replacement, screening out "cognitive reconstruction" (similarity 0.68, dependency weight 0.6) and "relaxation training" (similarity 0.75, dependency weight 0.55) as candidates. Monte Carlo simulation showed that "cognitive reconstruction" could trigger an emotional fluctuation of 0.35 (superthreshold), and the weight decayed to 0.4. The fluctuation of 0.2 in "relaxation training" met the requirements, and the conversation criticality score of 0.7 triggered the acceleration mode, allowing it to proceed simultaneously with the "thought blocking method". After the dual-channel fusion, the comprehensive verification of the "relaxation training" interaction style adaptability reached 80%, and the therapeutic value increased by 0.2. It was eventually selected as the target path, which reduced the user's anxiety level in subsequent sessions.

[0110] In this way, through real-time value monitoring and multi-dimensional screening, the average effectiveness of replacement paths is improved, for example, the success rate of replacing low-value paths increases. Monte Carlo simulation and a volatility threshold mechanism reduce intervention risk. For example, high-volatility paths are promptly weighted down to avoid emotional breakdowns. Acceleration mode improves the efficiency of simultaneous multi-path advancement in critical conversations. For example, in crisis intervention scenarios, the simultaneous implementation of "safety planning + emotional regulation" can shorten stabilization time. Dual-channel fusion and a five-dimensional verification mechanism enhance path selection accuracy and reduce bias in single models. For example, by combining interaction style and semantic logic, strategy adaptability is significantly improved. On-demand allocation of computing resources ensures greater support for high-potential paths, improves resource utilization in low-risk scenarios, and avoids computational waste. Through an intelligent decision-making chain of "monitoring-screening-simulation-verification," this mechanism achieves dynamic optimization and risk control of intervention paths, significantly improving the real-time, safety, and effectiveness of psychological counseling, and demonstrating greater adaptability to complex psychological conditions.

[0111] As an optional embodiment, in 106, real-time interaction data is mapped into a multidimensional psychological state space as a conversation trajectory, and conversation trajectory planning is performed based on the target intervention path through a state-target bidirectional navigation algorithm to achieve real-time interaction with the target user, including: extracting a multidimensional psychological state vector from the real-time interaction data, and mapping the multidimensional psychological state vector into a multidimensional psychological state space constructed based on a hyperbolic space as a psychological state feature point; calculating the spatial position relationship between the psychological state feature points through a non-Euclidean distance formula, and constructing corresponding multiple conversation trajectories based on the calculation results; using a state-target bidirectional navigation algorithm, conversation trajectory planning is performed based on the target intervention path, and impedance probability distribution is used to avoid high-risk areas in the conversation trajectory to obtain a real-time interaction strategy for the target user; the impedance probability distribution is extracted from the radial distribution of the impedance risk area in the multidimensional psychological state space; executing the real-time interaction strategy through a cross-modal interaction engine to generate first real-time interaction information for the target user.

[0112] Specifically, in step 106, the principle of mapping real-time interaction data into a multidimensional psychological state space and performing trajectory planning is to achieve visualization and dynamic navigation of psychological states through geometric modeling. First, multidimensional psychological state vectors (such as anxiety level, cognitive flexibility, avoidance tendency, etc.) are extracted from the user's language content, emotional indicators, and behavioral data, and mapped into a psychological state space constructed based on hyperbolic space. Each vector corresponds to a feature point in the space, and the non-Euclidean distance between points reflects the difference in psychological state (for example, when anxiety surges, the feature point quickly moves away from the center point of the "calm state" in space). The system constructs multiple potential conversation trajectories based on these distances. For example, the path from the current anxiety level of 0.8 to the target value of 0.4 may include "cognitive reconstruction → relaxation training" or "narrative therapy → behavioral activation".

[0113] Through the state-target bidirectional navigation algorithm, the shortest or safest trajectory is planned by taking into account the location of the current psychological state feature point and the location of the treatment target point. For example, if the user is in a high anxiety state (a "high-risk area" where the feature point is close to the edge of the space), the path that bypasses the high impedance probability distribution will be preferred. These high-risk areas are pre-marked by the radial distribution of impedance behaviors (such as avoidance and emotional outbursts) in historical data. Assuming that the "exposure therapy" path passes through the impedance risk radiation zone (probability > 70%), the algorithm will automatically adjust the trajectory and select the circuitous path of "mindfulness stress reduction → gradual exposure" to reduce the risk of intervention.

[0114] For example, when a user with post-traumatic stress disorder (PTSD) mentioned a traumatic event during a conversation, the psychological state vector extracted from real-time interaction data showed an anxiety level of 0.9 and an avoidance tendency of 0.8, mapping to a risk zone near "traumatic stress" in the psychological state space. When the system planned the trajectory using a bidirectional navigation algorithm, it detected that a path directly discussing the trauma details would pass through a radiation zone of resistance risk (with an 85% resistance probability). It then adjusted its strategy: first guiding the user toward the "emotionally stable" zone in the space (where anxiety levels dropped to 0.6) through a "safe base technique" before gradually introducing trauma narratives to avoid high-risk paths. The cross-modal interaction engine generates interaction information based on this trajectory, such as first using gentle voice guidance for breathing exercises (non-verbal interaction) and then exploring trauma-related cognitions through text interaction (verbal interaction), achieving safe and gradual intervention.

[0115] As can be understood, hyperbolic space modeling transforms abstract mental states into computable geometric relationships, resulting in improved navigation algorithm accuracy compared to traditional linear programming. For example, trajectory planning errors are reduced in complex, mixed-emotion scenarios. Path adjustment based on impedance probability distribution reduces the incidence of high-risk behaviors, such as the likelihood of emotional breakdowns among PTSD users during trauma discussions. A cross-modal engine switches interaction modes (e.g., voice reassurance combined with text guidance) in real time based on the trajectory, increasing user acceptance of interventions. This multimodal strategy reduces session interruptions, particularly during periods of intense emotional fluctuations. A bidirectional navigation algorithm shortens the effective intervention path, significantly reducing the average number of sessions from a "high anxiety state" to a "target state," thereby improving resource utilization. This mechanism, through geometric mental state modeling, intelligent trajectory planning, and multimodal interaction synergy, provides an intuitive, secure, and efficient method for generating real-time interaction strategies for psychological counseling. This approach is particularly suitable for interventions involving complex or high-risk scenarios, significantly improving treatment operability and user experience.

[0116] It's worth noting that the core working principle of the intervention response prediction model is to build an intelligent system that can predict users' responses to different intervention strategies in real time by integrating the probabilistic reasoning capabilities of Bayesian networks with the dynamic simulation capabilities of Monte Carlo Tree Search (MCTS). The specific process is as follows:

[0117] First, a multidimensional psychological state vector is extracted from the user's initial data (such as demographic information and psychological scale scores) and real-time interaction data (such as conversation text, emotional indicators, and behavioral feedback). This vector covers core dimensions such as emotional intensity, cognitive patterns, and behavioral intentions. For example, for a user with social anxiety, the vector might include features such as "anxiety level 0.7," "avoidance behavior frequency 4 times / week," and "self-denial statements 35% of the time." This data is mapped into state points in a high-dimensional space, which serves as the basis for model predictions.

[0118] A Bayesian network is constructed using a hybrid structured learning algorithm (such as the Peter-Clark algorithm combined with greedy search) to model the causal relationship between intervention strategies and user responses. Nodes in the network represent intervention strategies (e.g., "cognitive restructuring," "exposure therapy") and user response variables (e.g., "anxiety reduction," "resistance behavior"), while edge weights represent conditional probabilities (e.g., the probability of "exposure therapy → anxiety reduction" is 65%). The conditional probability table is updated using real-time data. For example, if a user's probability of a positive response to "virtual exposure" is 12% higher than that of "real exposure," the model automatically adjusts the probability values ​​for the corresponding path, forming a dynamic probability distribution. MCTS uses a four-stage process of "selection-expansion-simulation-backpropagation" to simulate the potential effects of different intervention paths based on the prior probabilities of the Bayesian network. For example, in the "social anxiety intervention" scenario, MCTS starts from the current state node and prioritizes paths predicted by the Bayesian network to have a higher probability (e.g., "cognitive restructuring → identification of negative thoughts"). This results in an effect distribution by simulating possible user responses (e.g., "identifying thoughts but no change in mood" or "improved mood but resistance to subsequent practice"). After each simulation, the results are back-propagated to the tree structure to update the number of node visits and cumulative rewards, thereby optimizing the path priority.

[0119] Combining the probabilistic priors of the Bayesian network with the real-time simulation results of MCTS, the therapeutic value of each intervention path (such as expected effect, time efficiency, and risk) is calculated, and the path priority is dynamically adjusted. For example, if "Mindfulness-Based Stress Reduction" is shown in the simulation to reduce the anxiety level of 80% of users by 0.2 and has a low risk, the model will increase its execution order; conversely, if the simulation success rate of a certain path is less than 40%, it will be marked as low priority. In addition, the model will trigger path reconstruction or strategy adjustment based on the deviation of the user's real-time response from the expected level (such as emotional fluctuations exceeding a threshold) to ensure that the intervention is always in line with the user's state.

[0120] After each intervention, actual response data is fed back into the Bayesian network and MCTS to update model parameters and simulation strategies. For example, if "art therapy" proves effective for users with high emotional intensity over multiple applications, the model will strengthen the prior probability of that path and prioritize it in similar scenarios. Through this closed loop of "data-prediction-practice-feedback," the model continuously evolves, gradually improving its prediction accuracy for new users or complex scenarios.

[0121] In this way, strategies are dynamically adjusted based on individual differences. For example, introverted users are more suitable for the combination of "written expression + cognitive reconstruction", and the prediction accuracy is higher than that of the general model. Through simulation, high-risk paths (such as "direct exposure" that may trigger traumatic reactions) are identified in advance, and safe strategies are automatically switched to, reducing the incidence of risk events. Multi-path parallel simulation accelerates decision-making, and the time to generate intervention plans for complex cases is shortened to real-time response, improving conversation efficiency. Through the deep integration of probabilistic reasoning and dynamic simulation, the model achieves accurate prediction of users' psychological intervention responses and strategy optimization, providing core technical support for intelligent psychological counseling.

[0122] As an optional embodiment, in the above steps, after constructing the corresponding multiple conversation trajectories according to the calculation results, the critical scores of the key multiple conversation trajectories can also be calculated based on the amplitude of emotion changes, the degree of cognitive perspective change, and the narrative theme conversion index, and key conversation trajectory points whose critical scores meet the set conditions are selected from the multiple conversation trajectories; emergency intervention paths for handling sudden critical events are triggered in combination with key conversation trajectory points; sudden critical events include at least: sudden negative events, crisis events with user safety risks, and high-risk events with group safety risks; emergency intervention strategies for sudden critical events are implemented through branch intervention paths; the priority and execution sequence of the emergency intervention path are associated with the safety risk level of the sudden critical event; the emergency intervention strategy is executed through the cross-modal interaction engine to generate second real-time interaction information for the target user.

[0123] Specifically, the principle behind calculating a criticality score based on conversation trajectories and triggering emergency intervention is to identify key nodes in a conversation using multi-dimensional indicators and dynamically activate emergency strategies based on security risk assessment. The system first calculates a criticality score (KPS) for each node in the conversation trajectory based on the magnitude of emotional change (e.g., a sudden increase in anxiety level by 0.4), the degree of cognitive perspective shift (e.g., a shift from "absolute thinking" to "possible thinking"), and the narrative theme shift indicator (e.g., a sudden shift from "daily stress" to "suicidal thoughts"). A higher score indicates a node's greater likelihood of triggering a sudden critical event. For example, if a user suddenly mentions "life is meaningless" (narrative theme shift indicator of 0.8) while discussing work pressure, and the emotional intensity surges from 0.5 to 0.9 (emotional change magnitude of 0.4), the calculated KPS is 0.4 × 0.4 + 0.35 × 0 + 0.25 × 0.8 = 0.36, exceeding the set threshold of 0.3 and identifying it as a critical conversation trajectory point, triggering the emergency intervention process.

[0124] Furthermore, the emergency intervention path is automatically matched according to the type of sudden critical event (such as suicide risk, which is a high-risk event). For example, when a user is detected to have suicidal thoughts, the preset "crisis intervention path" is immediately activated: first, a soothing voice is sent through the cross-modal interaction engine ("I understand that you are feeling very uncomfortable now, and this is not your fault"), while text is generated to guide the user to describe their specific feelings, and a security risk assessment questionnaire is triggered simultaneously. The priority of the emergency path is linked to the degree of risk: high-risk events (such as suicide) have the highest priority, interrupting all current non-emergency interventions and allocating 100% of computing resources to perform crisis intervention; medium-risk events (such as severe emotional breakdown) insert buffer nodes into the current path, such as "mindfulness breathing exercises."

[0125] For example, a depressed user suddenly mentioned "I have prepared sleeping pills" in the 6th session (the narrative theme shifted to suicide-related), the emotional change amplitude reached 0.6, the cognitive perspective did not show a change (score 0), KPS = 0.4×0.6+0.35×0+0.25×1=0.49 (exceeding the high-risk threshold of 0.4). The system immediately triggered the highest priority emergency path: first, maintain real-time communication with the user through voice interaction, and at the same time call the crisis intervention decision tree to guide the user to confirm the safety status, contact emergency contacts, and generate a text message containing resource links. The entire process completes the path switching within 20 seconds. Other intervention modules are suspended during the execution of the emergency strategy to ensure resource concentration.

[0126] By calculating real-time criticality scores, high-risk events can be identified and emergency response paths triggered in a short period of time, significantly improving response speed compared to manual intervention and effectively reducing the risk of extreme events such as suicide. Emergency response paths are dynamically prioritized based on risk. For example, in the event of a group safety risk (such as violent tendencies), the system simultaneously activates user reassurance and external warning mechanisms, achieving a dual response of "internal intervention + external prevention and control" and improving safety protection coverage. A cross-modal engine integrates voice, text, and video interaction methods, using voice to convey empathy in crisis scenarios (increasing emotional reassurance efficiency by 30%) while simultaneously providing structured guidance (such as safety plan steps) through text, avoiding single-modal information overload and improving user acceptance. Pre-set emergency response path templates (such as the crisis intervention process) ensure professional and standardized strategies while allowing for fine-tuning based on individual user characteristics (such as adding gamified reassurance elements for adolescents). This balances efficiency and personalization, ensuring that emergency response strategies meet relevant standards. Through the full process automation of "key node identification-risk classification response-multimodal emergency intervention", the psychological counseling system's ability to handle sudden security incidents is significantly improved, providing users with all-weather security protection, while reducing the real-time decision-making pressure of counselors, which has important clinical value, especially in high-risk psychological intervention scenarios.

[0127] As an optional embodiment, in the above steps, a state-target bidirectional navigation algorithm is used to perform conversation trajectory planning based on the target intervention path, including:

[0128] Starting from the preset treatment target node in the target intervention path, a depth-first search is performed along the three-layer nested target structure according to the targets of each layer; in the depth-first search, an improved A* algorithm is used, with the treatment value function in each intervention path as the priority criterion, and a preset number of candidate intervention paths are expanded each time the search is performed; if it is detected that the candidate intervention path is in a high-risk area where the impedance probability reaches a set threshold, a distance penalty is imposed on the current candidate intervention path, so that the actual search distance value of each intervention node in the current candidate intervention path increases by a preset penalty multiple; starting from the current psychological state node, the feasible historical intervention paths are traced back according to the target intervention path, and the fitness and implementation risk coefficient of the historical intervention path are calculated. ; In the reverse tracing process, the search weight of the historical intervention path is dynamically adjusted in combination with the critical score, and the angle between the historical intervention path and the psychological state vector corresponding to the current psychological state node is calculated. If the angle exceeds the preset degree threshold, the alternative historical intervention path in the emotional outbreak zone is retained; combined with the therapeutic value function value of the candidate intervention path, the fitness of the historical intervention path and the implementation risk coefficient, the intervention path combination in the target intervention path is multi-dimensionally evaluated and fused to obtain a fusion path; the fusion path is optimized with cubic spline to ensure the smoothness of the state transfer curve, and transition nodes are added at the path turning points in the fusion path; wherein the transition nodes include at least: emotional confirmation nodes, and / or cognitive clarification nodes.

[0129] It is understandable that the state-goal bidirectional navigation algorithm constructs a smooth and secure conversation trajectory by combining forward planning with backward tracing. The specific implementation process is as follows: the system starts from the preset treatment target node (such as "anxiety level ≤ 0.3") and performs a depth-first search along the three-layer nested target structure (such as "cognition → emotion → behavior"). Each time it expands, it gives priority to intervention paths with high treatment value function values ​​(such as the "mindfulness-based stress reduction" path value of 0.72 takes precedence over "exposure therapy" 0.58). If a high-risk area (such as directly discussing trauma details) with an impedance probability exceeding a threshold (such as 0.6) is found, a distance penalty is imposed on the path (such as doubling the actual search distance) to reduce its probability of being selected.

[0130] Simultaneously, historical intervention pathways are traced back from the current psychological state node, assessing their fitness (e.g., "cognitive restructuring" had an 85% success rate in historical conversations) and risk factor (e.g., the potential to trigger emotional fluctuations of 0.4). During this backward tracing, search weights are dynamically adjusted based on criticality scores. For example, a historical pathway, while posing a risk of emotional outbursts (an angle exceeding 60°), is retained as a candidate because it addresses critical themes (e.g., suicidal thoughts). The system multidimensionally integrates the therapeutic value of the forward candidate pathway, the fitness of the reverse historical pathway, and the risk factor to generate an initial fused pathway. Finally, the state transition curve is smoothed using cubic spline optimization. At pathway turning points (e.g., the transition from "emotional catharsis" to "problem solving"), emotional confirmation nodes (e.g., "I understand this is difficult for you") or cognitive clarification nodes (e.g., "Can you explain what you mean by 'never getting better'?") are added to ensure a natural transition between interventions.

[0131] For example, the current anxiety level of a trauma patient is 0.8, and the target node is 0.3. In the forward search, the "direct exposure therapy" path is penalized due to the impedance probability of 0.7, while the "gradual exposure + mindfulness" path (value 0.68) is preferentially expanded. Backward tracing found that the patient had experienced emotional agitation (risk coefficient 0.35) during the "cognitive reconstruction" intervention, but this path had a long-term effect on reducing anxiety (fitness 0.8). After fusion, the path of "mindfulness stress reduction → cognitive reconstruction → progressive exposure" was generated, and an emotional confirmation node was inserted at the turning point from "cognitive reconstruction" to "exposure": "I noticed that you still have concerns about discussing trauma. We can start with imaginary exposure. What do you think?"

[0132] In this way, the impedance penalty mechanism reduces the probability of selecting high-risk paths, such as the "direct trauma discussion" path, significantly improving intervention safety. The reverse tracing mechanism increases the utilization of historical intervention experience. For example, if a user responds well to "art therapy," the system prioritizes relevant elements in the new path, improving treatment effectiveness. Spline optimization and transition nodes enhance conversation fluency and increase user satisfaction with intervention transitions. For example, after intense emotional fluctuations, the emotional confirmation node reduces interruption rates. Retaining alternative paths in emotionally charged areas speeds up the system's response to crisis events. For example, when discussing suicidal thoughts, it allows for a quick switch to a safe intervention mode, enhancing intervention effectiveness. Through bidirectional search, risk penalty, historical adaptation evaluation, and path smoothing techniques, a secure and efficient conversation trajectory is constructed, particularly suitable for complex psychological intervention scenarios. This significantly improves user experience and safety while ensuring treatment effectiveness.

[0133] As an optional embodiment, in the above steps, the impedance probability distribution avoids high-risk areas in the conversation trace, including:

[0134] A logistic regression model is trained based on a historical consultation database; a three-dimensional impedance probability distribution in a multidimensional psychological state space is generated in real time through the logistic regression model; the risk dimensions of the impedance probability distribution include at least: emotional irritation risk, cognitive overload risk, and therapeutic alliance breakdown risk; the three-dimensional impedance probability distribution is visualized as a gradient colored area in a hyperbolic space, with different colors used to mark the risk levels; a risk tolerance threshold is dynamically set based on the target user's interactive behavior pattern and psychological consultation needs; when the target intervention path passes through a high-risk area with the highest risk level in the three-dimensional impedance probability distribution, a preset number of alternative detour paths are generated to replace the path segments in the target intervention path; preparatory relaxation training is inserted into high-risk intervention nodes in the high-risk area to reduce the risk level.

[0135] For example, the principle of avoiding high-risk areas in conversation trajectories is to train a logistic regression model with historical data to generate a visual three-dimensional impedance probability distribution, dynamically guiding the intervention path to avoid high-risk areas. The system first uses the historical consultation database to train a logistic regression model to identify psychological state characteristics related to impedance behavior (such as emotional outbursts and cognitive resistance) (such as emotional intensity > 0.7, cognitive flexibility < 0.3), and generates a three-dimensional impedance probability distribution that includes the risks of emotional irritation, cognitive overload, and therapeutic alliance breakdown in real time. It is colored in red, yellow, and green in hyperbolic space (red is a high-risk area and green is a safe area). For example, when a user is in a state of "high anxiety + low cognitive flexibility", the model predicts that the risk of emotional irritation entering the "cognitive reconstruction" path is 75%, and the corresponding three-dimensional space area is marked as a red high-risk area.

[0136] The risk tolerance threshold is dynamically adjusted based on the user's specific needs and interaction patterns (e.g., the risk tolerance threshold for trauma patients is set at 0.2, lower than the 0.4 for ordinary users). If the target intervention path crosses a red high-risk zone (e.g., the "directly challenge negative beliefs" path), the system automatically generates three alternative detour paths. For example, the original path segment "direct challenge" is replaced with "mindfulness anchoring → gradual challenge" or "narrative therapy → cognitive reconstruction." At the same time, for intervention nodes that cannot be completely avoided within the high-risk zone (e.g., discussions of trauma details that must be addressed), preparatory relaxation training (e.g., 5-minute guided breathing exercises) is inserted. This reduces the user's emotional intensity (e.g., from 0.9 to 0.6) to increase risk tolerance, reducing the path risk coefficient from 0.8 to 0.5.

[0137] For example, when a user with borderline personality disorder discussed interpersonal relationships, the three-dimensional impedance distribution showed an 80% risk of therapeutic alliance breakdown for the "direct confrontation conflict mode" path (red high-risk zone). The system generated an alternative path: "empathic listening → emotional labeling → progressive confrontation," and inserted a preparatory training session called "emotional regulation skills review" before the confrontation node. After this adjustment, the risk zone traversed by the path changed from red to yellow (risk factor 0.6). Simultaneously, by monitoring the user's emotional intensity in real time, the duration and frequency of preparatory training sessions were dynamically adjusted to ensure that intervention remained within a safe threshold.

[0138] As can be seen, the three-dimensional impedance distribution allows counselors to intuitively identify high-risk areas, improving the accuracy of risk assessments. For example, the misjudgment rate for "cognitive overload risk" is reduced. The alternative detour path generation mechanism improves the efficiency of high-risk path replacement. For example, in trauma interventions, the path adjustment time is reduced from 10 minutes manually to real-time response, preventing users from dropping out of the consultation due to risk exposure. The insertion of preparatory training reduces the average risk level of high-risk nodes, such as the risk of emotional agitation. This also improves user compliance with interventions and reduces the rate of risk-induced session interruptions. Dynamic threshold settings adapt the system to the risk tolerance of different users. For example, a stricter risk avoidance strategy is implemented for patients with acute stress disorder, reducing the probability of traversing high-risk paths and significantly improving treatment safety. Through data-driven risk modeling, visual navigation, and real-time path adjustment, high-risk areas in psychological interventions are effectively avoided, providing safer treatment pathways for users with high resistance or high vulnerability. This also enhances the system's adaptability to complex psychological states and the sustainability of interventions.

[0139] As an optional embodiment, after receiving the real-time interaction data of the target user, real-time path re-evaluation is performed based on the real-time interaction data. After obtaining the treatment value function of each intervention path, the coordinated progress of multiple intervention paths can also be detected to avoid excessive progress gaps in parallel paths.

[0140] Specifically, the principle of detecting and balancing the coordinated progress of multiple intervention paths is to quantify the progress differences between paths, dynamically adjust resource allocation and intervention strategies, and ensure the coordinated advancement of parallel paths. The system first defines the progress difference thresholds for paths at different levels (e.g., the maximum progress difference allowed at the stage goal layer is 20%, and at the micro-interaction layer is 35%), and calculates the progress balance between paths using the synchronization coefficient formula. For example, if a user advances two stage goal paths, "cognitive reconstruction" (70% completion) and "behavioral activation" (45% completion) in parallel, and the progress difference exceeds the threshold, the synchronization coefficient Ssync = 1-(70%-45%) / 20% = 0.75 < 0.8, triggering the progress balancing mechanism.

[0141] Specifically, the time budget for the high-progress "Cognitive Restructuring" path was reduced to 70% of its original weight, while the slow-progress "Behavioral Activation" path was increased by one CPU core and 30% of its memory quota. A "Goal Completion Calibration" coordination node was inserted to force synchronization of key milestones. Simultaneously, an acceleration mode was activated for lagging paths, such as shortening the micro-interaction interval for "Behavioral Activation" from 10 minutes to 5 minutes and enabling rapid intervention templates (e.g., three consecutive "Immediate Action Practice" nodes). A "Cognitive Strategy Transfer Training" extension node was added to the advanced path to deepen the intervention effect. If there is a logical conflict between parallel paths (e.g., "Exposure Therapy" and "Safe Space Creation" conflict at the behavioral level), the system calculates the conflict intensity using a semantic similarity model (e.g., a threshold of 0.72 > 0.65) and prioritizes the "Safe Space Creation" path, which has a higher historical success rate (68% success rate vs. 53% for Exposure Therapy), to ensure consistency in intervention logic.

[0142] Through threshold control and resource reallocation, the standard deviation of progress across parallel pathways is reduced, avoiding intervention gaps caused by excessive advancement or lag in one pathway. For example, this improves the synergy of the "cognitive-behavioral" parallel pathway. A dynamic allocation mechanism focuses computing resources on lagging pathways, improving CPU utilization and reducing memory waste. Furthermore, the extended node design for high-progress pathways prevents resource idleness. A three-level arbitration mechanism shortens the time it takes to resolve path logic conflicts and improves conflict resolution accuracy. For example, in trauma intervention, the "stabilization-first" pathway, which complies with clinical guidelines, is prioritized. This shortens the time it takes to achieve overall goals, such as reducing the duration of comprehensive interventions for bipolar disorder patients. Simultaneous progress synchronization enhances the synergistic gains of intervention effects. A heat map displays pathway progress and dependencies in real time, allowing counselors to quickly identify discrepancies (such as areas of poor progress highlighted in red). This speeds up intervention adjustments and increases patient satisfaction with the treatment pace. Through data quantification, dynamic adjustments, and intelligent arbitration, the coordinated advancement of multi-path interventions is achieved, ensuring comprehensive treatment while avoiding resource conflicts and progress imbalances, significantly improving the systematic nature and efficiency of psychological counseling.

[0143] The technical solution of this application breaks through the limitations of traditional psychological counseling systems that rely on preset processes through an autonomous psychological planning architecture. Its core technical principle lies in the deep coupling of a dynamically scalable three-layer target network and an intelligent decision-making model: a three-layer nested structure of macro goals, stage goals, and micro-interaction goals is generated based on the user's initial data, and multi-dimensional associations between goals are established through a directed acyclic graph. The user's language, voice, and behavioral characteristics are analyzed in real time through a Bayesian network, and a Monte Carlo tree search is combined to simulate multiple potential intervention paths, and the treatment value function of each path is dynamically calculated. This treatment value function comprehensively evaluates the expected efficacy, time efficiency, user acceptance, and risk factors, and completes the path priority re-arrangement within milliseconds. When encountering drastic emotional fluctuations or unexpected topic changes, the system uses multi-dimensional psychological state space mapping technology to dynamically calibrate the current conversation trajectory with the treatment goal in a two-way manner, plan the optimal conversation path in real time in the non-Euclidean psychological feature space, and simultaneously activate the branch reconstruction mechanism to generate a new intervention sequence containing buffer nodes and transition words.

[0144] In another embodiment of the present application, a psychological consultation interactive device based on an autonomous psychological planning framework is also provided. Figure 3 The device comprises the following units: an acquisition unit configured to acquire initial user data of a target user; the initial user data comprises at least first session data and psychological scale data; a target stratification unit configured to construct a dynamic target graph for the target user based on the initial user data through a three-layer nested target structure, and preload a personalized decision tree that matches the dynamic target graph; the three-layer nested target structure comprises a session macro target layer, a phased target layer and a micro-interaction target layer, and the targets of each layer are connected through a directed acyclic graph; a plurality of intervention paths are set in parallel in the personalized decision tree based on the targets of each layer; the three-layer nested target structure is used to achieve multi-path parallel advancement of the treatment target; an evaluation unit configured to receive the target user After collecting the real-time interaction data of the user, a real-time path re-evaluation is performed based on the real-time interaction data to obtain the therapeutic value function of each intervention path; the intervention unit is configured to use the Bayesian network and Monte Carlo tree search algorithm to build an intervention response prediction model; through the intervention response prediction model, combined with the therapeutic value function of each intervention path, the priority and execution sequence of the intervention path in the personalized decision tree are adjusted, and the target intervention path that matches the real-time interaction data is selected from the adjusted intervention path; the interaction unit is configured to map the real-time interaction data into a multidimensional psychological state space as a conversation trajectory, and perform conversation trajectory planning based on the target intervention path through the state-target bidirectional navigation algorithm to achieve real-time interaction with the target user. The device can implement various steps in the above method embodiment, which will not be expanded here.

[0145] See also Figure 4 , Figure 4This is a schematic diagram of an embodiment of an electronic device provided in an embodiment of the present application. Figure 4 As shown, an embodiment of the present application provides an electronic device 500, including a memory 510, a processor 520, and program information 511 stored in the memory 510 and executable on the processor 520. When the processor 520 executes the program information 511, a psychological counseling interaction method based on an autonomous psychological planning architecture is implemented.

[0146] See also Figure 5 , Figure 5 This is a schematic diagram of an embodiment of a computer-readable storage medium provided in an embodiment of the present application. Figure 5 As shown, this embodiment provides a computer-readable storage medium 600 storing a computer program 611. When executed by a processor, this computer program 611 implements a psychological counseling interaction method based on an autonomous psychological planning architecture. It should be noted that in the above embodiments, the descriptions of each embodiment have different focuses. For portions not described in detail in a particular embodiment, reference should be made to the relevant descriptions of other embodiments. Those skilled in the art will appreciate that the embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, this application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROMs, optical storage devices, etc.) containing computer-usable program code. Although preferred embodiments of this application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they understand the basic inventive concepts. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of this application. Clearly, those skilled in the art may make various changes and modifications to this application without departing from the spirit and scope of this application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalent technologies, the present application is also intended to include these modifications and variations.

Claims

1. A psychological consultation interaction method based on an autonomous psychological planning framework, characterized in that: The method comprises: Obtain the initial user data of the target user; the initial user data at least includes: first session data and psychological scale data; Based on initial user data, a dynamic target graph for the target user is constructed through a three-layer nested target structure, and a personalized decision tree matching the dynamic target graph is preloaded. The three-layer nested target structure includes a session macro-target layer, a phased target layer, and a micro-interaction target layer, with each layer of targets connected via a directed acyclic graph. Multiple intervention paths are set up in parallel within the personalized decision tree based on each layer of targets. The three-layer nested target structure is used to achieve multi-path parallel advancement of treatment goals. After receiving the real-time interaction data of the target user, a real-time path re-evaluation is performed based on the real-time interaction data to obtain the treatment value function of each intervention path; An intervention response prediction model is constructed using a Bayesian network and Monte Carlo tree search algorithm. The intervention response prediction model is combined with the treatment value function of each intervention path to adjust the priority and execution sequence of the intervention paths in the personalized decision tree, and a target intervention path that matches the real-time interaction data is selected from the adjusted intervention paths. The real-time interaction data is mapped into a multi-dimensional psychological state space as a conversation trajectory, and the conversation trajectory is planned based on the target intervention path through a state-target bidirectional navigation algorithm to achieve real-time interaction with the target user.

2. The psychological consultation interaction method based on the autonomous psychological planning framework according to claim 1 is characterized in that: The method of constructing a dynamic target graph for target users based on the initial user data through a three-layer nested target structure includes: Input the initial user data into the goal decomposition engine, and generate conversation macro goals based on the cognitive classification module constructed according to the psychological theory framework; the psychological theory framework includes at least: cognitive behavioral therapy and humanistic therapy; Through the clinical pathway matching algorithm, each session macro goal is decomposed into multiple phase goals, and the logical dependencies between the session macro goals and phase goals, as well as the logical dependencies between different phase goals, are marked; For each single session initiated, multiple micro-interaction goals are dynamically generated; these micro-interaction goals are associated with intervention strategies and expected response indicators for target users. Build vertical connections from conversation macro goals to micro-interaction goals from top to bottom, and build horizontal connections between goals based on the collaborative and conflicting relationships of goals at the same level to construct a dynamic goal graph for target users.

3. The psychological consultation interaction method based on the autonomous psychological planning framework according to claim 2 is characterized in that: The pre-loaded personalized decision tree matching the dynamic target graph includes: Load the initial decision trees associated with each goal in the dynamic goal graph from the base decision tree; Perform real-time path evaluation on the initial decision tree to obtain the treatment value function of each intervention path; Select intervention paths whose treatment value function reaches the set core path threshold and construct them into a personalized decision tree. Pre-generate multiple emergency intervention paths and add them to the personalized decision tree as emergency intervention strategies for dealing with sudden critical events. After preloading the personalized decision tree that matches the dynamic target graph, the method further includes: After executing the preset rounds of dialogue, the personalized decision tree is optimized to update the path weights and the connection relationships between each intervention path and intervention nodes.

4. The psychological consultation interaction method based on the autonomous psychological planning framework according to claim 1 is characterized in that: The Bayesian network and Monte Carlo tree search algorithm are used to construct an intervention response prediction model, including: Construct a multidimensional psychological state vector based on initial user data and real-time interaction data; the multidimensional psychological state vector includes at least: demographic variables, psychological scale feature vectors, real-time interaction behavior pattern indicators, and physiological response parameters; A Bayesian network of personalized strategy trees is constructed using a hybrid structured learning algorithm. The Bayesian network is used to generate a conditional probability table containing the conditional probability distribution of each intervention path. The conditional probability distribution of each intervention path includes at least the target user's expected probability of a positive effect of the intervention strategy in the intervention path. During the Bayesian network construction process, the constraint-based Peter-Clark algorithm was used to test the initial conditional independence. The maximum number of parent nodes and the significance threshold were set. The initial network was screened through the conditional independence test to eliminate redundant causal relationships. A score-based greedy search was used to fine-tune the network structure of the initial network. The K2 scoring function was applied to perform local optimization in the initial network for the core intervention pathway. Bayesian estimation combined with the EM algorithm was used to update the conditional probability table in real time. In the simulation phase, the transition probabilities between intervention pathways are calculated through a Bayesian network, a Markov decision process framework is constructed, the treatment value function of each intervention pathway is dynamically updated, and an intervention response prediction model is constructed to simulate the target user's expected response to the intervention strategy through the Bayesian network. During the intervention path selection process of each session, a new intervention path is constructed based on real-time interaction data through the incremental learning mechanism of Monte Carlo tree search, and the conditional probability table in the Bayesian network is updated based on the new intervention path.

5. The psychological consultation interaction method based on the autonomous psychological planning framework according to claim 1 is characterized in that: The intervention response prediction model is combined with the treatment value function of each intervention path to adjust the priority and execution sequence of the intervention paths in the personalized decision tree, and a target intervention path that matches the real-time interaction data is selected from the adjusted intervention paths, including: Monitor the treatment value functions of all intervention paths in real time. When it is detected that the treatment value function value of any intervention path is lower than the set replacement threshold, the intervention path replacement is triggered. From the parallel candidate intervention paths, screen candidate intervention paths whose cosine similarity with the current mental state vector is greater than the set similarity threshold and whose vertical dependency weight in the dynamic target graph is greater than the parent node weight threshold; Through Monte Carlo tree search, the intervention response of the preset number of steps of the candidate intervention path is simulated; The emotional intensity fluctuation range is calculated based on the preset number of intervention responses. If the fluctuation range is greater than the set fluctuation threshold, the weight decay mode is entered to reduce the priority weight of the candidate intervention path and lower the execution position of the candidate intervention path in the execution sequence; If the session criticality score of the current session exceeds the set score threshold, the system enters accelerated mode, activating parallel execution channels to allow multiple candidate intervention paths under the same stage goal to advance simultaneously, and allocating additional computing resources to the candidate intervention paths that advance simultaneously. Comprehensive treatment value ranking and Monte Carlo search ranking are used to perform dual-channel decision fusion processing on the rearranged or synchronously promoted candidate intervention pathways to obtain dynamic adaptation results that match real-time interactive data; The candidate intervention paths indicated in the dynamic adaptation results are comprehensively verified from the perspectives of interaction style adaptation, cross-layer path matching, semantic logic alignment, emotional fluctuation range, and therapeutic value improvement to obtain the final selected target intervention path.

6. The psychological consultation interaction method based on the autonomous psychological planning framework according to claim 1 is characterized in that: The real-time interaction data is mapped into a multi-dimensional psychological state space as a conversation trajectory, and the conversation trajectory is planned based on the target intervention path by a state-target bidirectional navigation algorithm to achieve real-time interaction with the target user, including: Extract multidimensional mental state vectors from real-time interaction data and map them to a multidimensional mental state space constructed based on hyperbolic space as mental state feature points. Calculate the spatial positional relationship between the mental state feature points using a non-Euclidean distance formula, and construct multiple corresponding conversation trajectories based on the calculation results. A state-target bidirectional navigation algorithm is used to plan conversation trajectories based on the target intervention path, and an impedance probability distribution is used to avoid high-risk areas in the conversation trajectory to obtain a real-time interaction strategy for the target user. The impedance probability distribution is extracted from the radial distribution of impedance risk areas in the multidimensional psychological state space. The real-time interaction strategy is executed through the cross-modal interaction engine to generate first real-time interaction information for the target user.

7. The psychological consultation interaction method based on the autonomous psychological planning framework according to claim 6 is characterized in that: After constructing the corresponding multiple conversation traces according to the calculation results, the method further includes: Based on the amplitude of emotional changes, the degree of cognitive perspective change, and the narrative theme conversion index, the key scores of multiple conversation trajectories are calculated, and the key conversation trajectory points whose key scores meet the set conditions are selected from the multiple conversation trajectories; Combined with key conversation trajectory points, emergency intervention paths are triggered to handle sudden critical events. Sudden critical events include at least: sudden negative events, crisis events with user safety risks, and high-risk events with group safety risks. Emergency intervention strategies for critical incidents through branch intervention paths; the priority and execution sequence of emergency intervention paths are associated with the safety risk level of critical incidents; The emergency intervention strategy is executed through the cross-modal interaction engine to generate second real-time interaction information for the target user.

8. The psychological consultation interaction method based on the autonomous psychological planning framework according to claim 7 is characterized in that: The state-target bidirectional navigation algorithm is used to plan the conversation trajectory based on the target intervention path, including: Starting from a preset treatment target node in the target intervention path, a depth-first search is performed along the three-layer nested target structure according to the targets at each layer; in the depth-first search, an improved A* algorithm is used, with the treatment value function in each intervention path as the priority criterion, and a preset number of candidate intervention paths are expanded each time the search is performed; If it is detected that the candidate intervention path is in a high-risk area where the impedance probability reaches the set threshold, a distance penalty is imposed on the current candidate intervention path, so that the actual search distance value of each intervention node in the current candidate intervention path increases by a preset penalty multiple; Starting from the current psychological state node, the target intervention path is followed to reversely trace feasible historical intervention paths, and the fitness and implementation risk coefficient of the historical intervention paths are calculated. During the reverse tracing process, the search weight of the historical intervention paths is dynamically adjusted based on the criticality score, and the angle between the historical intervention path and the psychological state vector corresponding to the current psychological state node is calculated. If the angle exceeds a preset degree threshold, the alternative historical intervention path in the emotional burst zone is retained. Combining the treatment value function value of the candidate intervention pathway, the fitness of the historical intervention pathway, and the implementation risk coefficient, a multi-dimensional evaluation and fusion processing is performed on the intervention pathway combination in the target intervention pathway to obtain a fusion pathway; The fusion path is optimized using cubic spline to ensure the smoothness of the state transfer curve, and transition nodes are added at the turning points in the fusion path; wherein the transition nodes include at least: an emotion confirmation node and / or a cognitive clarification node.

9. The psychological consultation interaction method based on the autonomous psychological planning framework according to claim 8 is characterized in that: The impedance probability distribution avoids high-risk areas in the conversation trace, including: Training a logistic regression model based on a historical consulting database; A three-dimensional impedance probability distribution in a multidimensional psychological state space is generated in real time using a logistic regression model. The risk dimensions of the impedance probability distribution include at least the risk of emotional irritation, cognitive overload, and therapeutic alliance breakdown. The three-dimensional impedance probability distribution is visualized as a gradient-colored region in a hyperbolic space, with different colors used to mark the degree of risk. Dynamically set risk tolerance thresholds based on target users’ interactive behavior patterns and psychological counseling needs; When the target intervention path passes through a high-risk area with the highest risk level in the three-dimensional impedance probability distribution, generating a preset number of alternative detour paths to replace the path segments in the target intervention path; For high-risk intervention nodes in high-risk areas, preparatory relaxation training is inserted to reduce the risk level.

10. A psychological consultation interactive device based on an autonomous psychological planning framework, characterized in that: The device comprises the following units, wherein: An acquisition unit is configured to acquire initial user data of a target user; the initial user data includes at least: first session data and psychological scale data; The target hierarchical unit is configured to construct a dynamic target graph for the target user based on initial user data through a three-layer nested target structure, and preload a personalized decision tree that matches the dynamic target graph. The three-layer nested target structure includes a session macro-target layer, a stage-by-stage target layer, and a micro-interaction target layer, with the targets at each layer connected by a directed acyclic graph. The personalized decision tree includes multiple intervention paths based on the targets at each layer. The three-layer nested target structure is used to achieve multi-path parallel advancement of treatment goals. an evaluation unit configured to receive real-time interaction data of a target user and then perform real-time path re-evaluation based on the real-time interaction data to obtain a treatment value function for each intervention path; The intervention unit is configured to construct an intervention response prediction model using a Bayesian network and a Monte Carlo tree search algorithm; adjust the priority and execution sequence of intervention paths in the personalized decision tree using the intervention response prediction model in combination with the treatment value function of each intervention path, and select a target intervention path that matches the real-time interaction data from the adjusted intervention paths; The interaction unit is configured to map real-time interaction data into a multidimensional psychological state space as a conversation trajectory, and plan the conversation trajectory based on the target intervention path through a state-target bidirectional navigation algorithm to achieve real-time interaction with the target user.

Citation Information

Patent Citations

  • Intelligent interaction system for psychological counseling of children and teenagers

    CN115376656A

  • Reproductive health management system based on cloud data

    CN117894476A

  • Pension service optimization method and system based on big data

    CN118035870A

  • Psychological counseling dialogue generation method based on psychological theory driving large model

    CN119069080A

  • Wearable device assisted remote rehabilitation monitoring and intervention method

    CN119274743A

Cited By

  • Conversation-based multi-modal feature analysis method and electronic equipment

    CN121144772A

  • Conversation-based multi-modal feature analysis method and electronic device

    CN121144772B

  • Multivariate evidence correlation analysis method in judicial field

    CN121328694A

  • Intelligent treatment suggestion pushing system for psychological assessment

    CN121839035A

  • Psychological intervention method and system based on dynamic intention routing and thinking chain reasoning

    CN122174998A