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

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

CN120636701BActive Publication Date: 2026-05-15BEIJING LIXIN INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Traditional psychological counseling systems lack flexibility and cannot effectively respond to users deviating from the preset path, leading to interruptions or repetitions in the dialogue, resulting in high security risks and a rather stiff dialogue effect.

Method used

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

Benefits of technology

It improves the accuracy and flexibility of psychological counseling dialogues, optimizes the user interaction experience, dynamically adapts to unexpected events and emotional fluctuations in the conversation, reduces security risks, expands application scenarios, and improves the fluency of the dialogue.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120636701B_ABST
    Figure CN120636701B_ABST
Patent Text Reader

Abstract

The application relates to a psychological counseling interaction method and device based on an autonomous psychological planning architecture. In the method, initial user data of a target user is acquired; a dynamic target graph of the target user is constructed through a three-layer nested target structure, and a matched personalized decision tree is preloaded; after real-time interaction data is received, real-time path reevaluation is performed based on the real-time interaction data to obtain a treatment value function of each intervention path; a Bayesian network and a Monte Carlo tree search algorithm are used to construct an intervention response prediction model, the priority and execution sequence of the intervention paths in the personalized decision tree are adjusted in combination with the treatment value function of each intervention path, a target intervention path matched with 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, conversation trajectory planning is performed based on the target intervention path, real-time interaction with the target user is realized, and the accuracy of intervention decision and the fluency of the conversation are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence, and in particular to a psychological counseling interaction method and device based on an autonomous psychological planning architecture. Background Technology

[0002] In related technologies, traditional psychological counseling systems are mostly linear conversational systems, typically using fixed dialogue flows with each step pre-set, lacking flexibility. When users deviate from the preset path, the system may fail to respond effectively, leading to dialogue interruptions or repetitions. For example, traditional decision trees usually only have a limited number of branch options, unable to handle complex multi-path situations, especially when users experience emotional fluctuations or high-risk situations. They cannot mobilize more complex branch structures to assess the current situation, resulting in higher safety risks and a somewhat rigid dialogue effect. Therefore, there is an urgent need to propose a novel technical solution to address at least one of the technical problems in related technologies. Summary of the Invention

[0003] This application addresses the technical problems existing in the prior art by providing a psychological counseling interaction method and device based on an autonomous psychological planning architecture, in order to solve at least one technical problem in the relevant technologies, such as lack of flexibility, high security risks, and relatively stiff dialogue effects.

[0004] In a first aspect, embodiments of this application provide a psychological counseling interaction method based on an autonomous psychological planning framework, the method comprising:

[0005] Acquire initial user data of the target user; the initial user data includes at least: initial conversation data and 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 matching the dynamic target graph; the three-layer nested target structure includes: a conversation macro-target layer, a stage target layer, and a micro-interaction target layer, with each layer of targets connected by a directed acyclic graph; multiple intervention paths are set in parallel based on each layer of targets in the personalized decision tree; the three-layer nested target structure is used to achieve multi-path parallel advancement of treatment goals; after receiving real-time interaction data from the target user, based on... Real-time path re-evaluation is performed on real-time interactive data to obtain the therapeutic value function of each intervention path; an intervention response prediction model is constructed using Bayesian networks and Monte Carlo tree search algorithms; based on the intervention response prediction model and the therapeutic value function of each intervention path, the priority and execution sequence of the intervention paths in the personalized decision tree are adjusted, and a target intervention path matching the real-time interactive data is selected from the adjusted intervention paths; the real-time interactive data is mapped to a multi-dimensional psychological state space as a conversation trajectory, and a state-goal 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] Secondly, embodiments of this application provide a psychological counseling 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 initial user data of the target user; the initial user data includes at least: initial conversation data and psychological scale data; the target hierarchical unit is 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 matching the dynamic target graph; the three-layer nested target structure includes: a conversation macro-target layer, a stage target layer, and a micro-interaction target layer, with each layer of targets connected by a directed acyclic graph; the personalized decision tree has multiple intervention paths set in parallel based on each layer of targets; the three-layer nested target structure is used to achieve multi-path parallel advancement of treatment goals; the evaluation unit is configured to receive real-time interaction data of the target user. Subsequently, based on real-time interaction data, a real-time path reassessment is performed to obtain the therapeutic value function of each intervention path. The intervention unit is configured to construct an intervention response prediction model using Bayesian networks and Monte Carlo tree search algorithms. Through the intervention response prediction model, combined with the therapeutic value function of each intervention path, the priority and execution sequence of the intervention paths in the personalized decision tree are adjusted, and a target intervention path matching the real-time interaction data is selected from the adjusted intervention paths. The interaction unit is configured to map the real-time interaction data into a multi-dimensional psychological state space as a conversation trajectory, and plan 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.

[0008] Thirdly, embodiments of this application provide an electronic device, the 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 invoke the computer program stored in the memory to execute the psychological counseling interaction method based on the autonomous psychological planning architecture of the first aspect.

[0009] The beneficial effects of this application are: it provides a psychological counseling interaction method and device based on an autonomous psychological planning architecture. In this technical solution, on the one hand, it can proactively plan a dynamic target graph for psychological counseling through a three-layer nested target structure, and then combine Bayesian networks and Monte Carlo tree search algorithms to construct an intervention response prediction model. This allows for the adjustment of personalized decision trees to confirm the target intervention path that matches real-time interaction data, greatly improving the accuracy of psychological counseling dialogue and the flexibility of strategy selection, thus optimizing the user interaction experience. On the other hand, through psychological state space transformation and conversation trajectory planning, it plans the optimal dialogue path in real time, improving the efficiency of interaction with users. Furthermore, it can dynamically adapt to unexpected events, emotional fluctuations, and topic changes that occur during the conversation, avoiding the mechanical feeling and lack of adaptability caused by fixed procedures, expanding the application scenarios of psychological counseling dialogue, reducing security risks, and improving the fluency of the dialogue. Attached Figure Description

[0010] Figure 1 This is a flowchart illustrating a psychological counseling interaction method based on an autonomous psychological planning architecture, according to an embodiment of this application.

[0011] Figure 2 This is a schematic diagram illustrating the principle of a psychological counseling interaction method based on an autonomous psychological planning architecture, according to an embodiment of this application.

[0012] Figure 3 This is a schematic diagram of the structure of a psychological counseling interaction device based on an autonomous psychological planning architecture, according to an embodiment of this application.

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

[0014] Figure 5 This is a schematic diagram of the structure of a medium according to an embodiment of this application. Detailed Implementation

[0015] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0016] To address at least one technical problem in the related technologies, embodiments of this application provide a psychological counseling interaction method and apparatus based on an autonomous psychological planning architecture.

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

[0018] Figure 1 A flowchart illustrating a psychological counseling interaction method based on an autonomous psychological planning framework, as provided in this application embodiment, is shown below. Figure 1 As shown, the method includes the following steps:

[0019] 101. Obtain the 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-level 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 reassessment based on the real-time interaction data to obtain the therapeutic value function of each intervention path;

[0022] 104. An intervention response prediction model was constructed using Bayesian networks and the Monte Carlo tree search algorithm;

[0023] 105. Using the intervention response prediction model and combining the treatment value function of each intervention path, the priority and execution sequence of the intervention paths in the personalized decision tree are adjusted, and the target intervention path that matches the real-time interactive data is selected from the adjusted intervention paths.

[0024] 106. Real-time interactive data is mapped into a multi-dimensional psychological state space as a conversation trajectory. A bidirectional navigation algorithm based on the target intervention path is used to plan the conversation trajectory, thereby realizing real-time interaction with the target user.

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

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

[0027] The initial conversation data comprises information conveyed by users during their first psychological counseling session through verbal expressions and nonverbal behaviors. This information includes descriptions of core problems, emotional states, background, and current concerns. For example, a user seeking help due to strained workplace relationships might mention in their initial conversation "frequent conflicts with colleagues, feeling anxious and sleepless, and doubting their communication skills," while also exhibiting outward emotional characteristics such as faster speech and frowning. This information is extracted through text analysis, voice emotion recognition, and video behavior capture (if applicable) to form an initial understanding of the user's main problems and emotional tone.

[0028] Psychological scale data are quantitative assessment results generated by users through standardized psychological measurement tools, used to scientifically characterize the specific dimensions and severity of a user's psychological state. Depression assessment scales include the Beck Depression Inventory-II (BDI-II) and the Patient Health Questionnaire-9 (PHQ-9). For example, a total score of 15 on the PHQ-9 indicates moderate depression. Anxiety assessment scales include the Generalized Anxiety Scale (GAD-7). A score of 3 on the item "Feeling tense, anxious, or impatient" (almost daily) reflects a high level of anxiety. Interpersonal Sensitivity Assessment Scales (ISI) measure tension and low self-esteem tendencies in social situations; a score of 4 on "Fear of others judging me" is considered a strong match. Cognitive Function Assessment Scales include the Cognitive Flexibility Questionnaire (CFQ), which assesses the degree of rigidity in thinking; a score of 5 on "Difficulty shifting attention away from negative events" is considered a perfect match.

[0029] In this way, the initial conversation data provides the problem scenario and emotional details, while the psychological scale data eliminates subjective description bias through standardized indicators, together forming the basis of the user's psychological profile. For example, in the initial conversation, a user stated that they "often experience inexplicable fear and dare not be alone." Combined with a GAD-7 score of 18 (severe anxiety) and an ISI score of 22 (high interpersonal sensitivity), the system can initially determine that their core problem is anxiety disorder accompanied by interpersonal avoidance. Therefore, when constructing the macro-goals for the conversation, priority can be given to setting directions such as "reducing the frequency of anxiety attacks" and "improving the sense of security when alone."

[0030] In this embodiment, the three-layer nested target structure includes: a conversational macro-target layer, a phased target layer, and a micro-interaction target layer, with each layer's targets connected by a directed acyclic graph. Further optionally, the personalized decision tree contains multiple intervention paths set in parallel based on the targets at each layer. Further optionally, the three-layer nested target structure is used to achieve multi-path parallel advancement of treatment goals.

[0031] Specifically, in this embodiment, the three-layer nested goal structure is a hierarchical goal management framework that simulates the clinical thinking of a psychological counselor. It breaks down abstract treatment goals into specific, actionable tasks and uses graph theory to achieve dynamic path planning. The structure forms a progressive hierarchy of "conversational macro-goal layer → phased goal layer → micro-interaction goal layer," with each layer's goals connected by a directed acyclic graph (DAG). This ensures both the logical order between goals and supports flexible multi-path transitions, avoiding the mechanical nature of traditional linear processes.

[0032] The macro-goals layer of the consultation, as the highest level of objectives, defines the overall strategic direction of the counseling. It typically includes 3-5 core therapeutic directions, generated based on initial user data and psychological theories (such as cognitive behavioral therapy and humanistic psychology), and is general and long-term in nature. For example, for a user experiencing insomnia and deteriorating interpersonal relationships due to work stress, the macro-goals might include "establishing a sustainable stress management model," "improving workplace communication effectiveness," and "restoring regular sleep patterns." These goals do not involve specific interventions but rather define the core areas of therapy.

[0033] At the stage of phased goals, each session's macro goal is broken down into 8-12 logically coherent mid-term tasks, clearly defining 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 correlation between stressors and physical responses," "mastering at least two immediate stress reduction techniques," and "developing a personalized stress log recording plan." Each goal corresponds to a specific psychological intervention path (such as behavioral activation and relaxation training) and sets quantifiable assessment criteria (such as "being able to reduce heart rate by 10% within 3 minutes through deep breathing").

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

[0035] The Directed Acyclic Graph (DAG) connection mechanism assigns dynamic relationships to goals at each level: each goal acts as a node in the graph, connected by weighted directed edges. Edge types include "preceding relationships" (e.g., "learning stress reduction techniques" requires "identifying stressors" beforehand), "complementary relationships" (e.g., "cognitive restructuring" and "relaxation training" can be pursued in parallel to enhance their effects), and "cross-level leap relationships" (e.g., a micro-interaction goal is directly linked to a non-directly related macro-goal, such as "mindfulness breathing exercises" directly supporting the macro-goal "restoring regular sleep"). Weight values ​​(0-1) indicate the degree of dependence or reinforcement between goals. For example, the connection weight between "identifying stressors" and "creating a stress log" is 0.9, indicating a strong dependency; while the weight between "relaxation training" and "social skills training" is 0.3, indicating a weak association that allows for independent progress.

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

[0037] The parallel advancement of multiple paths is achieved through the DAG topology, allowing the system to simultaneously activate multiple branches (such as synchronizing stress management and sleep improvement paths). It utilizes a "task priority queue" and "attention budget" mechanism to allocate session time and computational resources. For example, in a 50-minute session, the first 20 minutes focus on stressor identification (path A), and the following 30 minutes on relaxation training (path B). A "synchronization checkpoint" ensures coordinated progress of the two paths in the "emotion regulation ability" dimension. This mechanism enables the system to flexibly switch intervention directions based on the user's real-time state, avoiding the "one-size-fits-all" problem caused by fixed procedures. For instance, when a user suddenly mentions childhood trauma (a narrative turning point triggering a KPS score > 0.6), the system can temporarily activate the "trauma-related cognitive adjustment" micropath without interrupting the original treatment framework.

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

[0039] For example, Figure 2 The diagram presents a three-tiered directed acyclic graph (DAG) structure, used to illustrate the hierarchical framework and relationships of therapeutic goals in psychological counseling. The macro-goal (M1) is at the top, representing the overall strategic direction and setting the tone for the entire counseling process; it is the abstract core therapeutic direction. The intermediate goals (S1, S2, S3), located in the middle layer, are key mid-term milestones derived from the macro-goal and represent important stages in achieving the macro-goal. The micro-interaction goals (T1, T2, T3, T4), at the bottom layer, are specific, actionable tasks within daily counseling sessions, representing concrete action steps to achieve the intermediate goals.

[0040] Figure 2 Different styles and thicknesses of arrows represent different degrees of correlation between objectives. Strong dependency (>0.7), represented by a thick solid arrow, indicates a close sequential or strong correlation between the two objectives. For example, a weight of 0.9 between macro objective M1 and stage objective S1 means that S1 is crucial to the achievement of M1. Moderate dependency (0.3-0.7), represented by a thin solid arrow, indicates some correlation between objectives, but the degree of dependency is relatively weaker than a strong dependency. For example, a weight of 0.6 between stage objectives S2 and S3 indicates that they are related but not in an absolute sequential order. Weak correlation (<0.3), represented by a dashed arrow, indicates a weak correlation between objectives. For example, a weight of 0.2 between stage objective S1 and micro objective T2 means that the correlation between them is not strong.

[0041] In this way, the directed acyclic graph structure avoids the problem of circular dependencies between goals, ensuring that the treatment process proceeds according to a reasonable logic. At the same time, the multi-path association method allows for flexible adjustment of the treatment order and focus based on the user's actual situation, enabling parallel advancement of multiple paths and improving the targeting and effectiveness of psychological counseling. For example, if a user responds well to a specific path at a certain stage, the advancement of related goals can be strengthened based on the association weights; if the response is poor, treatment can be adjusted to other associated paths.

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

[0043] Specifically, in step 101, initial user data for the target user is acquired. The principle behind this is to comprehensively collect data reflecting the user's psychological state, problem characteristics, and background information, laying the foundation for precise planning and implementation of subsequent psychological counseling. Information such as the content expressed by the user during the initial conversation and their emotional state, as well as quantitative data obtained using professional psychological scales, are collected through various channels and methods. This data will serve as the basis for constructing a user psychological profile, helping the system understand user needs, problem severity, and potential psychological patterns, thereby supporting 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 professional seeking counseling due to recent frequent insomnia and accompanying anxiety. In the initial session, the user reports immense work pressure, daily anxiety about not being able to complete tasks, feelings of inadequacy, frequent difficulty falling asleep in the early hours of the morning, and frequent awakenings even when asleep. Simultaneously, the user's voice trembles and facial expressions reveal anxiety; these nonverbal cues captured through voice and video are also recorded. Furthermore, the user completes psychological scales such as the Beck Anxiety Scale (BAI) and the Athens Insomnia Scale (AIS). The Beck Anxiety Scale score indicates moderate anxiety, while the Athens Insomnia Scale score indicates severe insomnia. This initial session data and psychological scale data together constitute the user's initial user data.

[0045] By combining the subjective descriptions of the initial session with the objective quantification of psychological scales, the user's problems can be more accurately defined, avoiding potential biases from a single data source. In the example above, not only were the symptoms of the user's insomnia and anxiety identified, but the severity was also clarified through the scales, facilitating the precise formulation of subsequent treatment goals. Rich initial user data provides strong support for constructing a personalized three-layer nested goal structure and generating a personalized decision tree. Based on this data, customized treatment paths and intervention strategies can be planned for each user's unique psychological state and problems, improving the targeting and effectiveness of psychological counseling. The initial user data serves as baseline data, providing a reference for monitoring changes in the user's state and adjusting intervention plans during subsequent real-time interactions. As counseling progresses, by comparing initial and real-time data, the system can promptly identify the user's progress or new problems, thereby dynamically optimizing the treatment plan and achieving more effective psychological intervention.

[0046] In an optional embodiment, in step 102, based on initial user data, a dynamic target graph for the target user is constructed through a three-layer nested target structure. This includes: inputting the initial user data into a target decomposition engine, generating a conversational macro-target based on a cognitive classification module constructed according to a psychological theoretical framework; wherein the psychological theoretical framework includes at least: cognitive behavioral therapy and humanistic therapy; decomposing each conversational macro-target into multiple stage targets using a clinical pathway matching algorithm, and labeling the logical dependencies between the conversational macro-target and the stage targets, as well as the logical dependencies between different stage targets; dynamically generating multiple micro-interaction targets for each initiated single conversation; wherein the micro-interaction targets are respectively associated with intervention strategies and expected response indicators for the target user; constructing vertical connections from top to bottom from the conversational macro-target to the micro-interaction targets, and constructing horizontal connections between each target based on the synergistic and conflicting relationships of targets at the same level, so as to construct a dynamic target graph for the target user.

[0047] Specifically, in System 102, the principle of constructing a dynamic goal graph based on initial user data lies in using psychological theoretical frameworks and algorithmic models to break down the user's complex psychological problems into a manageable hierarchical goal system. By modeling the logical relationships between goals through a graph structure, the system achieves structured planning of treatment pathways. 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, i.e., conversational 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 psychological scales). For example, if a user seeks help due to "low self-esteem and insomnia caused by workplace interpersonal conflict," the cognitive classification module may generate conversational macro-goals such as "correcting negative self-cognition" and "improving conflict coping behavior" based on cognitive behavioral therapy, while simultaneously setting a macro-goal of "enhancing self-acceptance" in conjunction with humanistic therapy.

[0048] Subsequently, the clinical pathway matching algorithm decomposes each macro-objective into 8-12 phased objectives and labels logical dependencies. For example, the macro-objective of "correcting negative self-perception" can be decomposed into "identifying automatic negative thoughts" (preliminary phase objective), "challenging cognitive biases" (intermediate phase objective), and "establishing alternative positive cognitions" (late phase objective). Among these, "identification" is a prerequisite for "challenge" (strong dependency, weight 0.8). Meanwhile, the phase objective of "learning nonviolent communication skills" under the macro-objective of "improving conflict coping behavior" may have a complementary relationship with the phase objective of "establishing alternative positive cognitions" (weight 0.5), allowing for parallel progress.

[0049] At the single-session level, 5-8 micro-interaction goals are dynamically generated based on the current stage objective. Each micro-goal is associated with a specific intervention strategy (e.g., "guiding users to recall specific thoughts in conflict scenarios" corresponds to cognitive restructuring technology) and expected response indicators (e.g., "being able to list at least one example of negative thinking"). For example, for the stage objective of "identifying automatic negative thinking," micro-interaction goals might 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 scripts and effect evaluation criteria (e.g., whether the user can clearly describe the thought-emotion chain).

[0050] The connections between goals are achieved through vertical and horizontal connections: vertical connections reflect the 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, weight 0.6) or conflict (e.g., obsessive-compulsive thought intervention and social exposure may temporarily conflict, weight 0.2). The resulting dynamic goal graph is presented in the form of a directed acyclic graph (DAG), supporting parallel advancement of multiple paths. For example, while users improve their cognition, they also conduct behavioral training, and the system dynamically coordinates resource allocation through weights and priorities.

[0051] In this way, a goal system built upon mature psychological theories ensures the scientific rigor of interventions and avoids empirical bias. For example, the cognitive-behavioral-emotional triangle model of cognitive behavioral therapy guides the decomposition of macro-goals into stage goals, ensuring that each level of goal closely aligns with the core pathological mechanism. Through logical dependency labeling (e.g., strong dependency, complementarity, conflict), the system can adjust the order of goal progression based on real-time user responses. For instance, if a user experiences strong anxiety (emotional intensity > 0.7) regarding "exposure training," the system can temporarily delay this path, prioritizing the synergistic path of "relaxation training" and "cognitive reconstruction" (weight 0.6), and restarting the exposure intervention once the anxiety level decreases. Micro-interaction goals are linked to specific intervention strategies and expected indicators, making each session clearly executable and measurable. For example, the micro-goal of "recording immediate thoughts during conflict" can be evaluated in real-time through semantic analysis of the user's statements (e.g., negative word frequency), providing data support for subsequent goal adjustments. Horizontal connectivity supports synergistic interventions across macro-goals. For example, "enhancing self-acceptance" (a humanistic macro-goal) and "correcting negative self-cognition" (a cognitive-behavioral macro-goal) work together through complementary pathways (weight 0.5) to improve treatment efficiency. Simultaneously, conflict relationship modeling (e.g., the possibility that certain interventions may trigger traumatic responses) 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, maintaining the rigor of the theoretical framework while giving the system the ability to flexibly plan paths based on individual user characteristics, laying the foundation for subsequent real-time path reassessment and personalized decision tree generation.

[0053] Further optionally, the above steps, including preloading a personalized decision tree that matches the dynamic target graph, include: loading an initial decision tree associated with each target in the dynamic target graph from the basic decision tree; performing real-time path evaluation on the initial decision tree to obtain the treatment value function of each intervention path; selecting intervention paths whose treatment value function values ​​reach the set core path threshold, constructing them into a personalized decision tree, and pre-generating multiple emergency intervention paths to add to the personalized decision tree as emergency intervention strategies for responding to sudden critical events.

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

[0055] Taking a user seeking counseling due to "workplace burnout" as an example, a dynamic goal graph was constructed based on information from their initial session, such as "excessive workload, declining self-esteem, and frequent insomnia." A Directed Acyclic Graph (DAG) structure was used to advance three paths in parallel: "stressor analysis," "cognitive restructuring," and "behavioral activation." The evaluation dimensions are as follows: Expected effect coefficient: The historical success rate of the "cognitive restructuring + time management" combination in similar cases is 65%, therefore, this path is assigned an expected effect coefficient of 0.65. Time efficiency coefficient: The "stressor analysis" path is planned to be completed in 4 sessions; after the current 2 sessions, the goal completion rate is 50%, resulting in a time efficiency coefficient of 0.5 (progress per unit of time). Customer acceptance: The user actively shared specific action plans in the "behavioral activation" session, with a semantic similarity of 80% and no resistance; the acceptance rate, calculated through reverse correlation, is 0.8 (the lower the resistance, the higher the value). Risk factor: The "cognitive restructuring" path requires challenging core negative beliefs; historical data shows a 20% probability of emotional agitation 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 as follows: 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, with 40% of the session time allocated to the cognitive restructuring pathway with the highest value. Changes in risk factors are monitored to ensure the intervention is safe and effective.

[0056] Specifically, in an optional embodiment, the principle of preloading a personalized decision tree matched with a dynamic goal graph is based on constructing an executable intervention strategy network according to a hierarchical goal system, balancing stability and emergency response capabilities through dynamic evaluation and pre-generation mechanisms. Specifically, firstly, nodes and paths directly related to the goals at each level of the dynamic goal graph (such as the macro-goal "improving workplace interpersonal interaction patterns" and the phased goal "learning nonviolent 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 phased goal of "learning nonviolent communication skills," the initial decision tree may include a linear path of "observing emotional reactions in communication → identifying needs and feelings → practicing positive expression sentences," and a branch path of "role-playing to simulate conflict scenarios," with each path associated with the intervention-response probability predicted by a Bayesian network.

[0057] Next, real-time path evaluation is performed on the initial decision tree, quantifying the expected effect, time efficiency, client acceptance, and risk of each path using a treatment value function. For example, if the treatment value function of the "observing emotional reactions" path is 0.75 (high expected effect and low risk), while the "role-playing" path has an increased risk factor due to the client's past trauma history, with a treatment value function of 0.58, the former will be prioritized as the core path. By setting a core path threshold (e.g., treatment value function > 0.6), high-value paths are selected to construct a personalized decision tree, ensuring the effectiveness of the main path.

[0058] Simultaneously, multiple emergency intervention paths are pre-generated and embedded in decision trees to address sudden critical events (such as drastic fluctuations in customer emotions or unexpected shifts in topic to traumatic events). For example, if a customer suddenly experiences a panic attack (emotional intensity > 0.9) during the "identifying needs and feelings" stage, the pre-generated emergency path "guided mindful breathing → pause current topic → re-establish safety signals" will be activated. This path is constructed based on psychological first aid theory and its effectiveness has been validated through historical cases (e.g., a 78% probability of reducing anxiety levels by 40% in similar scenarios). The pre-generation of emergency paths relies on Bayesian networks to predict high-risk scenarios (e.g., automatically associating panic intervention templates with customer trauma history tags) and simulates the effect distribution of different emergency strategies through Monte Carlo Tree Search (MCTS) to ensure its feasibility.

[0059] Thus, the rapid loading mechanism based on the basic decision tree reduces real-time computation latency, while the real-time evaluation of the treatment value function ensures that path priorities align with individual client characteristics. For example, for clients with high cognitive flexibility, the "cognitive reconstruction" path has a higher weight for client acceptance, prioritizing it over behavioral intervention paths and shortening the treatment course. Pre-generated emergency paths combined with real-time deviation detection (such as a critical event identification mechanism with KPS>0.6) enable the system to quickly switch strategies when unexpected situations occur (such as client resistance or emotional breakdown), avoiding the risks of fixed procedures. For example, for clients at risk of suicide, a pre-loaded emergency path of "crisis assessment → safety plan development → resource linking" ensures immediate triggering upon identification of relevant cues (such as semantic analysis detecting keywords like "life is meaningless"), reducing intervention risks. The core path is customized based on a client-specific dynamic goal map, while the emergency path reuses mature intervention templates, ensuring both the targeted nature of the solution (such as the "gradual exposure + cognitive reconstruction" combination for clients with social anxiety) and improving the system's universality in handling common emergencies through standardized emergency strategies. Each pre-loading and path evaluation result is fed back to the basic decision tree template library. For example, if an emergency path demonstrates high effectiveness in multiple applications (such as the combination of "mindful breathing + safety signals" reducing the emotional intensity of 85% of clients to a moderate level), its related nodes will be prioritized and incorporated into the pre-generated path set for more scenarios, achieving iterative optimization of the system's intervention capabilities. Through this mechanism, personalized decision trees, while ensuring the scientific rigor of the treatment mainline, endow the system with the flexibility to cope with complex and dynamic scenarios, enabling the deployment of multi-level intervention strategies from a preset framework to real-time optimization and emergency reserves, thereby improving 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 can be performed on the personalized decision tree after executing a preset round of dialogue to update the path weights and the connection relationships between each intervention path and intervention node.

[0061] In an optional embodiment, the principle of optimizing the pre-loaded personalized decision tree structure is to continuously collect customer interaction data and dynamically adjust the tree structure to improve the accuracy of intervention strategies. Specifically, after executing a preset number of dialogue rounds (such as every 5 sessions or when a key milestone is reached), 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, improvement in cognitive indicators, and shifts in narrative themes), and adjusts the path weights (0-1) and node connections according to the evaluation results. For example, if the "mindfulness breathing training" micro-path shows high customer acceptance C=0.8 and significant symptom improvement E=0.7 in actual interaction under the macro goal of "establishing a stress management mechanism," its connection weight with the phase goal "learning basic stress reduction techniques" will increase from 0.6 to 0.9, strengthening the priority of this path; conversely, if the "progressive muscle relaxation" path has a V(p) below the threshold of 0.4 due to low customer willingness to perform C=0.3, the system will reduce its weight and reduce resource allocation, or even temporarily freeze this branch.

[0062] Structural optimization also involves dynamically adjusting the connections between intervention nodes. For example, if a client exhibits a narrative shift regarding childhood trauma during the "Stressor Identification" stage (narrative theme shift 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. This allows subsequent sessions to directly jump to the relevant intervention path, rather than proceeding along the original linear flow. Simultaneously, the potential effects of new connections are simulated using Monte Carlo Tree Search (MCTS) to ensure the rationality of structural adjustments. For instance, if the simulation results of a new path show an overall V(p) increase of 0.15, the tree structure is officially updated. If the simulation results are unsatisfactory, the adjustment is abandoned and recorded as empirical data.

[0063] For example, a client initially followed the "cognitive restructuring → behavioral activation" path in the decision tree. However, after three sessions, the system detected significant emotional fluctuations during the "cognitive restructuring" phase (e.g., DeltaE = 0.6), and the completion rate of the "behavioral activation" homework was only 40% (R = 0.6), indicating an increased risk factor. Through structural optimization, the system reconnected the "mindfulness-based stress reduction" path (original weight 0.3) with the "emotion regulation" node, increasing its weight to 0.7, and inserted an "emotional log recording" micro-node (linked to daily emotion monitoring intervention). After the adjustment, the client's emotional stability improved to DeltaE = 0.3 in subsequent sessions, and the behavioral activation completion rate increased to 70%, validating the effectiveness of the structural optimization.

[0064] This avoids the limitation of static decision trees in handling fluctuations in client states. For example, as the consultation progresses and the client transitions from a state of "high emotional intensity + low insight" to "moderate emotional intensity + high insight," the system automatically reduces the weight of supportive intervention paths and increases cognitive challenge paths to match the client's growth pace. By prioritizing the activation of high-value paths through weight adjustments, the system reduces resource consumption on ineffective branches. For instance, if a depressed client shows no significant improvement (V(p) = 0.45) after four "cognitive reconstruction" interventions, timely redirection of resources to the "Interpersonal Psychotherapy (IPT)" path (predicted value V(p) 0.68) shortens the symptom improvement period. Cross-layer connections and weight update mechanisms allow the decision tree to accommodate newly emerging client needs (such as concurrent anxiety symptoms), avoiding intervention gaps caused by rigid pre-set structures. Simultaneously, MCTS simulations validate adjustment plans, reducing trial-and-error risks and ensuring the clinical rationality of structural changes. Each structural optimization result is automatically imported into the system's knowledge base, forming a closed loop of "interactive data → evaluation → optimization → validation." For example, if multiple clients trigger cross-level connection needs in a "trauma intervention" scenario, this connection pattern will be incorporated into the basic decision tree template to improve the intervention efficiency for similar problems. Through this mechanism, personalized decision trees achieve an upgrade from a preset framework to dynamic evolution, enabling the psychological counseling system to continuously optimize strategies based on client feedback, just like a human counselor, thereby improving the accuracy of interventions and client fit, ultimately enhancing treatment effectiveness and user experience.

[0065] Optionally, in the real-time intervention correction mechanism of the psychological intervention decision tree generation system, the principle of detecting customer response deviation and implementing decision tree reconstruction lies in quantifying response differences through multi-dimensional data fusion and dynamically adjusting the intervention path based on the degree of deviation to ensure the adaptability of the consultation strategy. Specifically, the system first extracts key monitoring indicators through three modules: Semantic Understanding Deviation Index (SDI), Psychological Indicator Change Tracking (PMTS), and Interaction Behavior Pattern Analysis (IPA). For example, when analyzing customer text, SDI calculates semantic differences through topic matching degree (TM), concept matching degree (CM), and affective matching degree (SM). If a customer should be discussing "stress management" but frequently mentions "interpersonal conflict," the TM value drops to 0.4 (the preset threshold is 0.6), triggering an initial deviation warning. At the same time, PMTS detects an increase of 0.2 in the anxiety scale score (ΔS = 0.2), and 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, and the system determines that reconstruction needs to be initiated. Furthermore, the comprehensive deviation calculation model incorporates cross-terms to capture the synergistic effect between dimensions. An adaptive weight adjustment mechanism dynamically adjusts the weights of each dimension based on the consultation type and stage. Additionally, a deviation type classifier can be used to distinguish between positive, negative, and neutral deviations.

[0066] Furthermore, topic matching assesses the degree of overlap between the client's actual discussion topic and the expected topic; concept matching analyzes differences in semantic network structure through key concept map comparison; and sentiment matching measures the degree of matching in sentiment polarity, intensity, and complexity. For example, a bidirectional transformer model is used to extract contextual semantic representation vectors from the dialogue text, and cosine similarity is used to calculate the semantic distance to the expected response. An additional intent recognition module is introduced to specifically identify the client's implicit psychological needs and interaction purposes. For example, in the Psychological Metrics Tracking System (PMTS), the sentiment change vector includes changes in eight basic and complex emotions; cognitive pattern changes track changes in cognitive characteristics such as cognitive distortion and attribution style; behavioral intention changes monitor changes in the client's expressed behavioral intentions and plans; symptom intensity changes reflect changes in symptom presentation for specific psychological problems; and interpersonal response patterns reflect changes in the client's response to the counselor. Optionally, a mini-psychological assessment questionnaire system can be used, naturally embedding assessment items in the interaction; combining language model reasoning functions, clinically relevant indicators can be extracted from freely expressed text; and personalized baseline and trajectory models can be established.

[0067] For example, in Interaction Pattern Analysis (IPA), an anomaly detection system identifies abnormal interaction behaviors and performs weighted calculations on time-series indicators, response selectivity, engagement changes, and communication styles to obtain the IPA results. The time-series indicators analyze changes in response duration, thinking pauses, and interaction rhythm; response selectivity measures a customer's response to a specific topic versus avoidance tendencies; engagement changes track changes in response length, information richness, and initiative; and communication style analyzes the degree of formalization of language, openness, and emotional expression. Furthermore, a time-series pattern recognition algorithm is used to process the interaction time-series data; and natural language processing techniques are used to evaluate text functional characteristics. In addition, personalized customer interaction baselines can be established through interaction style fingerprinting technology.

[0068] When deviation occurs, a four-level reconstruction strategy is implemented based on the degree of deviation. For example, if the client shows slight resistance to the "cognitive reconstruction" intervention (emotional intensity 0.5, deviation threshold 0.35), a fine-tuning correction strategy is triggered. The main path remains unchanged, and the intervention parameters of the current node are adjusted, such as changing "challenging negative thinking" to "gradually identifying thinking patterns," and inserting an "empathic feedback" buffer node to maintain conversational coherence through soft transition techniques. If the degree of deviation escalates (e.g., emotional intensity suddenly rises to 0.8, and semantic deviation reaches 0.7), a branch replacement strategy is initiated. The "mindfulness breathing + narrative therapy" branch is activated from the alternative solution library. The connectivity assessment (semantic coherence 0.8) ensures that the new path connects with the historical dialogue, and 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 to 6 layers).

[0069] At the level of technical implementation, the three-level memory recovery system extracts key information from historical interactions (such as traumatic events 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 (client's refusal to role-play) 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, automatically increasing the learning rate η to 0.2 (normally 0.1) to accelerate convergence. Simultaneously, a smooth transition generation technology utilizes over 200 guiding phrase templates to naturally integrate path transitions into the dialogue, such as, "The emotional responses we just discussed are very important. Perhaps we can first stabilize our state through breathing exercises, and then look at the thoughts behind these feelings together?" This avoids the client perceiving a break in the process.

[0070] Thus, by integrating language, psychological indicators, and interactive behavior data, misjudgments based on a single dimension are avoided. For example, a client may appear cooperative (emotional intensity 0.4) but exhibit a 20% increase in the frequency of negative words in their text (SDI = 0.5). Combined with a decrease in proactive response in IPA (PS = 0.3), the system can identify implicit resistance early, preventing delayed intervention. The four-level strategy covers all scenarios, from minor adjustments to complete reconstruction, with an average response time controlled within 200ms. For instance, in simulation tests, the overall reconstruction time for severely deviated scenarios is reduced, shorter than traditional methods. After each reconstruction, the intervention-response model parameters are updated by an average of 15%, and the historical case library adds typical deviation samples, improving the system's prediction accuracy for similar problems. Through soft transition techniques and personalized rhetorical adjustments, the reconstruction process is less transparent to the client, meaning the user does not perceive the strategy switch, while simultaneously increasing consultation satisfaction. In summary, the real-time intervention correction mechanism, through a closed loop of "precise detection - hierarchical reconstruction - seamless transition - model evolution," enables the psychological counseling system to agilely adapt to the client's dynamic responses, significantly improving the scientific rigor of intervention and user experience.

[0071] In the special processing of psychological intervention data, considering the temporal dynamics and sparsity of the data, the psychological states of users (such as emotional fluctuations and cognitive patterns) during the intervention process exhibit significant time dependence, and cross-session data often show dynamic trends (e.g., anxiety levels gradually decrease with the number of interventions). To capture this temporal characteristic, a dynamic Bayesian network (DBN) structure is introduced to model cross-session variables (such as emotional scores in each session and the effectiveness of intervention strategies) as a probabilistic association network that evolves over time, clearly expressing the causal relationship between "current psychological state" and "historical state and intervention measures." For example, the "behavioral activation effect" of the third session depends on the "cognitive reconstruction progress" of the previous two sessions. Simultaneously, to highlight the impact of recent data on current decisions, a time decay mechanism is incorporated into parameter estimation: weights are automatically adjusted based on the proximity of the data collection time, with more recent data having higher weights and vice versa. For example, session data from within one week may have a weight of 100%, while data from three months ago will have a lower weight. The decay rate is optimized separately based on the characteristics of the psychological variables. Emotional variables (such as anxiety intensity) fluctuate rapidly, so a high decay rate is set (e.g., 50% decay per week). Cognitive variables (such as attribution style) are relatively stable, so a low decay rate is set (e.g., 20% decay per month) to ensure the model is sensitive to changes in the user's latest state.

[0072] For sparse data regions of specific psychological conditions (such as rare symptom combinations), psychological interventions often face the problem of data sparsity for specific symptom combinations (such as "post-traumatic stress disorder comorbid social anxiety") or niche intervention paths, directly leading to unstable model parameter estimation. To address this, parameter smoothing techniques are employed, using a Bayesian estimation framework to regularize the probability distribution in sparse regions. Specifically, when calculating conditional probabilities between variables, prior pseudo-counts are introduced to balance the impact of data sparsity. For core variables with high importance (such as suicide risk-related indicators), a lower prior pseudo-count (e.g., 0.1) is assigned to preserve the original data characteristics as much as possible; for auxiliary variables (such as demographic information), a higher prior pseudo-count (e.g., 1) is assigned to enhance the smoothing effect. For example, if a rare intervention strategy is implemented in only 5 users and is effective in 4, directly estimating the effective probability as 80% may lead to overfitting. Through smoothing (assuming α = 0.5), the effective 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 scenarios with scarce data, reducing the bias in intervention strategies caused by insufficient samples.

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

[0074] The above processing effectively addresses the challenges of temporal dynamism and sparsity in psychological intervention data, laying a data foundation for building accurate and reliable personalized response intervention models.

[0075] In one optional embodiment, after receiving the real-time interaction data of the target user, 103 performs a real-time path reassessment based on the real-time interaction data to obtain the therapeutic value function of each intervention path.

[0076] Specifically, the principle behind real-time path reassessment after receiving real-time interaction data from target users is to dynamically analyze current user feedback, quantify the actual value of different intervention paths, and flexibly adjust treatment strategies. First, real-time data from the user's conversation is collected, such as verbal content (e.g., emotional expression when mentioning stressful events), nonverbal behavior (e.g., increased speech rate, frowning), real-time feedback from psychological scales (e.g., changes in anxiety scale scores), and progress towards milestones (e.g., whether emotional log entries were completed on time). Next, this multi-dimensional data is integrated into a real-time psychological state profile of the user, compared with the expected effects of pre-planned intervention paths, and each path is evaluated in four core dimensions: effectiveness, efficiency, acceptability, and risk. For example, if a user frequently avoids key topics when attempting "cognitive restructuring" intervention, the system will determine that the client's acceptability of this path is low, and combined with potential risks predicted by Bayesian networks, the overall value score of this path will be reduced. Conversely, if the user responds positively to "mindfulness breathing" intervention (e.g., a significant decrease in emotional intensity), the priority of this path will be increased.

[0077] For example, a user suffering from insomnia due to workplace stress mentioned in the fourth session that they "tried the previously suggested breathing exercises, but couldn't concentrate on practicing them at the office," and the scale showed an increase in anxiety levels compared to the previous session. Analysis revealed that the original "instant coping with work-related stress" approach was inefficient due to environmental limitations and lacked user acceptance. Through real-time reassessment, the approach was adjusted to first establish a relaxation ritual at home and then gradually transition to the work environment, introducing a micro-habit cultivation intervention strategy. The new approach, tailored to the user's actual situation, improved feasibility, and the recalculated path value score increased.

[0078] This approach avoids the mechanical execution of fixed paths and allows for timely strategy switching based on real-time user responses. For example, for users experiencing high emotional fluctuations, the system prioritizes emotional reassurance rather than forcibly pushing cognitive interventions, thus improving intervention relevance. By capturing potential risks through real-time data (such as user resistance to an intervention), high-risk paths can be adjusted or paused promptly, reducing the possibility of psychological harm during intervention. For instance, when trauma-related avoidance behavior is identified, the system automatically switches to guiding the discussion with safe topics. Resources are prioritized for high-value paths, reducing ineffective attempts. For example, if a user shows significant progress in a behavioral activation path (such as increased social activity frequency), the system automatically increases the session time allocated to that path, shortening the overall treatment duration. Real-time user feedback is central to decision-making, enhancing user engagement and trust. For example, if a user proactively mentions a preference for narrative therapy, the weight of that path is increased, making the consultation more aligned with the user's subjective needs and improving satisfaction. Through a real-time path re-evaluation mechanism, the system shifts from a pre-set process-driven approach to a user-state-driven approach, ensuring that every intervention decision is based on the latest data, significantly improving the targeting 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 initial user data and real-time interaction data, a multidimensional psychological state vector is constructed. This vector includes at least: demographic variables, psychological scale feature vectors, real-time interaction behavior pattern indicators, and physiological response parameters. A Bayesian network for a personalized policy tree is constructed using a hybrid structure learning algorithm. This Bayesian network generates a conditional probability table containing the conditional probability distributions of each intervention path. The conditional probability distribution of each intervention path includes at least: the probability of the target user's positive expected effect on the intervention strategy within the intervention path. During the Bayesian network construction process, a constraint-based Peter-Clark algorithm is used to test the initial conditional independence, setting a maximum number of parent nodes and a significance threshold. The initial network is then filtered through the conditional independence test to eliminate redundancy. Causality was established; a score-based greedy search was used to fine-tune the initial network structure; for the core intervention paths, the K2 scoring function was applied to perform local optimization in the initial network; Bayesian estimation combined with the EM algorithm was used to update the conditional probability table in real time; during the simulation phase, the transition probabilities between each intervention path were calculated through the Bayesian network, a Markov decision process framework was constructed, the therapeutic value function of each intervention path was dynamically updated, and an intervention response prediction model was constructed to simulate the expected response effect of the target user to the intervention strategy through the Bayesian network; during the intervention path selection process in each session, an incremental learning mechanism of Monte Carlo tree search was used to construct new intervention paths based on real-time interaction data, and the conditional probability table in the Bayesian network was updated based on the new intervention paths.

[0081] Specifically, in 104, the principle of constructing the intervention response prediction model is to integrate multi-dimensional user data, combine Bayesian networks and Monte Carlo tree search algorithms, and dynamically predict the effects of different intervention strategies and optimize path selection. First, initial user data (such as age, occupation, and psychological scale scores) and real-time interaction data (such as dialogue content, response speed, and heart rate changes) are integrated into a multi-dimensional psychological state vector to comprehensively characterize the user's current state. Based on this vector, the system uses a hybrid structure learning algorithm to construct a Bayesian network: first, the Peter-Clark algorithm is used to perform conditional independence tests to identify causal relationships between variables and eliminate redundant associations such as "user gender" and "specific cognitive intervention effect"; then, a greedy search is used to fine-tune the network structure, applying the K2 scoring function for local optimization of core intervention paths (such as "cognitive reconstruction") 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 (such as the probability that "mindful breathing" will produce a positive effect in the current state).

[0082] During the simulation phase, the system uses a 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 exhibits excessive anxiety in "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" combined with user interests) based on newly generated interaction data, and feeds the effects of these paths back to the Bayesian network to update the conditional probability table, forming a closed-loop optimization of "prediction-practice-feedback."

[0083] For example, the initial model for a user with social anxiety showed a 65% probability of the expected effect of the "role-playing" intervention, but in actual application, the user exhibited significant avoidance (real-time interaction data showed a sharp increase in anxiety levels). Exploring alternative paths through Monte Carlo tree search helped improve the probability of the expected effect of "virtual scene exposure," so the intervention strategy was adjusted. Simultaneously, the Bayesian network updated the conditional probability table based on new data, strengthening the association between "high level of social anxiety" and "good virtual exposure effect," making subsequent predictions more closely reflect the user's actual situation.

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

[0085] As an optional embodiment, after constructing the intervention response prediction model using Bayesian networks and Monte Carlo tree search algorithm in step 104, an enhanced selection strategy of Monte Carlo tree search is also adopted in the intervention path selection process of each session. The improved UCB formula of Bayesian prior probability is integrated to obtain the intervention path with the highest probability of positive expected effect.

[0086] Specifically, after constructing the 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 UCB algorithm by incorporating Bayesian prior probabilities, achieving more accurate intervention path decisions. Specifically, at the start of each session, the system provides MCTS with prior knowledge based on the conditional probability table generated by the current Bayesian network (containing the expected probabilities of each intervention strategy), guiding the search direction. The improved MCTS not only considers the performance of historical paths (such as success rate and information gain) during simulation but also incorporates the probability distribution of the correlation between user state and intervention effect from the Bayesian prior, prioritizing the exploration of high-potential paths. For example, if the Bayesian network shows that a user has a 75% probability of responding to "narrative therapy" during a "period of emotional fluctuation," MCTS will increase the number of simulations for that path while dynamically adjusting the exploration intensity of other paths, balancing the relationship between "utilizing known effective paths" and "exploring potentially better paths."

[0087] For example, a depressed user experiencing slow progress during Cognitive Behavioral Therapy (CBT) found through Bayesian networks a strong correlation (68% prior probability) between their rumination tendency and the effectiveness of Mindfulness-Based Stress Reduction (MBSR). Based on this, the improved MCTS strategy enhances the simulation evaluation of the MBSR pathway, allocating 40% of computational resources in 1000 simulations (compared to only 20% in the conventional approach) to quickly verify the pathway's actual effectiveness. If the simulation results show a success rate of 72% (higher than CBT's 58%), the system will prioritize recommending MBSR as the next stage of intervention.

[0088] Thus, by guiding the search through Bayesian priors, ineffective exploration of low-probability paths is reduced, allowing decisions to focus more quickly on high-value intervention strategies. For example, in simulation tests, path selection time and convergence speed are shortened in complex psychological intervention scenarios. For users with rare psychological characteristics (such as patients with multiple personality disorder), Bayesian priors can leverage domain knowledge to compensate for insufficient samples, avoiding decision bias caused by data sparsity. When evaluating high-risk interventions (such as exposure therapy), the model can adjust the exploration strategy by incorporating risk probabilities (such as the probability of trauma recurrence) from Bayesian priors, reducing the incidence of adverse events. In practical applications, the safety factor of high-risk interventions is improved. After each session, the simulation results of MCTS 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 of 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 in complex psychological scenarios, demonstrating stronger decision-making stability and adaptability, and providing more reliable technical support for personalized psychological intervention.

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

[0090] Specifically, in 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 local reconstruction mechanism for the dynamic target map. Its core principle is to correct the intervention strategy through real-time feedback, ensuring the path matches the user's actual state. First, the deviation is calculated using multi-dimensional data such as semantic analysis, emotion monitoring, and behavioral pattern comparison. For example, if a user experiences unexpectedly strong emotional resistance during "exposure therapy" (e.g., a sudden 30% increase in anxiety and frequent topic avoidance), 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 that path and increases resource allocation for similar interventions, such as increasing the proportion of "mindful breathing" session time. For slight negative deviations (e.g., insufficient quality in completing "cognitive diary"), the parameters of the current node are adjusted, such as changing "daily record" to "3 records per week," and inserting a "motivational interview" node to improve participation. When there is a moderate deviation (such as the "social skills training" not achieving the expected results), the "narrative therapy" branch is activated from the alternative program library. Semantic coherence assessment is used to ensure that the new path connects with historical dialogue. For example, "reviewing childhood stories" can replace the original "role-playing" exercise. When there is a severe deviation (such as the user suddenly disclosing previously unmentioned traumatic history, causing the current program to fail), the target hierarchy is regenerated based on the latest status, and a new path including "trauma-focused therapy" is constructed, while retaining the relevant nodes of the established treatment alliance.

[0091] For example, in the real-time correction mechanism of the psychological intervention decision tree, the intervention path is dynamically adjusted through a four-level progressive reconstruction strategy based on the direction and degree of deviation from the client's response. When a positive deviation is detected (such as the client's response to mindfulness training being better than expected), a path reinforcement strategy is triggered. This involves improving the value function of the current path through a reinforcement learning algorithm (such as multiplying by a gain coefficient to amplify the positive effect), simultaneously adjusting intervention parameters (such as increasing the practice frequency), and updating the exploration weights of the Monte Carlo Tree Search (MCTS) to give similar effective branches a higher sampling probability, thereby accelerating the reinforcement of the positive path.

[0092] If a slight negative deviation occurs (such as insufficient quality of the client's "cognitive diary"), a fine-tuning correction strategy is initiated. While maintaining the main structure of the decision tree, the implementation parameters of the current node are adjusted (such as changing daily recording to three times a week). Buffer nodes such as "motivational interviews," "empathic feedback," and "clarification of issues" are inserted, and the original path is smoothly connected through "soft transition" language (such as "We can start with short records") to correct the deviation with minimal intervention cost.

[0093] When a moderate deviation occurs (such as "social skills training" failing to achieve the expected results), the branch replacement strategy is activated. A matching branch is selected from the pre-generated alternative solution library of the previous steps of the current node (such as switching to "narrative therapy"). Logical connection is ensured through semantic coherence assessment (such as checking the relevance of the new branch to the themes of the historical dialogue). 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 client's latest state parameters (such as anxiety level and cognitive openness) to achieve precise replacement of local paths.

[0094] If a significant deviation occurs (such as a client suddenly disclosing previously unmentioned traumatic history, rendering the existing plan ineffective), a comprehensive restructuring strategy is implemented. First, a rapid problem reassessment process is initiated, regenerating the intervention goal hierarchy based on the latest psychological state vector (e.g., shifting from "stress management" to "trauma repair"), constructing a new decision tree structure, while retaining key information from historical interactions (e.g., established therapeutic alliances). Through a "consultation retargeting framework" (e.g., "We need to temporarily adjust our direction and address the important experiences you mentioned first"), the conversation is naturally guided into a new path, ensuring the coherence of the intervention logic and the safety of treatment.

[0095] Through a progressive response mechanism, a full-dimensional coverage is achieved, from adjusting local parameters to updating the global structure. This ensures the system's sensitivity to subtle changes while also providing resilience in responding to sudden, significant deviations, ultimately enhancing the dynamic adaptability and clinical effectiveness of psychological interventions. The specific relationships between the aforementioned 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 0.6) during a "gradual exposure" intervention, immediately triggering a comprehensive restructuring. The exposure path was paused, and a new branch, "Easy Base Establishment + Basic Emotion Regulation Training," was initiated. The micro-interaction goals were restructured by inserting a "Mindfulness Anchoring Technique" node, and the phase goal was adjusted to "first establish emotional stability before gradual exposure." After restructuring, the user's anxiety level decreased within two sessions, validating the strategy's effectiveness.

[0099] In this way, through a tiered reconstruction mechanism, the system responds quickly to sudden deviations, avoiding rigid interventions. For example, the response speed to trauma-related deviations is faster than manual adjustments. Fine-tuning and branch replacement strategies maintain conversational coherence, reducing the user's perception of reconstruction. For example, a soft transition phrase like "We can start with an easier approach" naturally switches the path. The overall reconstruction mechanism effectively reduces the negative impact of high-risk deviations, such as improving the accuracy of intervention adjustments for suicide risk-related deviations. Each reconstruction data is automatically imported into the training set, improving 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 correction, the system is endowed with the flexible adjustment capabilities of a human therapist, significantly improving the safety and effectiveness of psychotherapy while ensuring intervention coherence.

[0100] The specific impacts of local reconstruction of the dynamic target map on intervention response prediction models are reflected in four aspects: model structure, parameter updates, prediction logic, and adaptive evolution, as follows:

[0101] First, local restructuring triggers structural updates to the intervention response prediction model. For example, when a system introduces a new intervention path (such as replacing "exposure therapy" with "narrative therapy") through a "branch replacement" strategy, the Bayesian network needs to add corresponding nodes (such as "narrative theme complexity" and "self-disclosure level") and their connections to existing nodes (such as "emotional stability" and "cognitive openness"). This adjustment changes the network's causal structure, for example, establishing a new causal chain of "narrative coherence → improved self-acceptance → decreased anxiety level," thereby optimizing the model's prediction logic for intervention effects. Simultaneously, the node space of the Monte Carlo Tree Search (MCTS) will have new branches, and the model needs to re-evaluate the state transition probabilities 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 interactive data (such as users' actual reactions to new interventions) is used to update the conditional probability table of the Bayesian network. For example, if "mindfulness anchoring" 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%, while adjusting relevant risk factors (such as reducing the "cognitive overload probability" from 15% to 8%). For MCTS, the simulation results of the new path (such as 42 successes out of 50 simulations) will update the number of visits to the node and the cumulative reward, making the model more inclined to choose high-value paths in subsequent decisions. For example, the exploration weight of "mindfulness anchoring" will be increased from 0.3 to 0.5, accelerating convergence to an effective strategy.

[0103] Third, local reconstruction corrects predictive biases in the model, especially when dealing with user responses 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," adjusting the original single logic of "direct exposure → anxiety relief" in the prediction. Simultaneously, the model dynamically adjusts the weight parameters of the treatment value function based on the effects of the reconstructed path. For instance, in trauma intervention scenarios, the weight of the risk factor is increased from 0.1 to 0.2 to prioritize the assessment of intervention safety. Furthermore, the model identifies potential intervention-response patterns through the new reconstructed data. For example, it discovers that the combination of "art therapy + mindfulness" is more effective than a single therapy for users with high emotional intensity, thereby optimizing the predictive logic of multi-path synergy.

[0104] Fourth, new data generated from each local reconstruction (such as the optimal intervention path in a specific deviation scenario) is incorporated into the model's training set, driving its continuous evolution. For example, when multiple users successfully alleviate anxiety in a "intense emotional fluctuation" scenario through a "fine-tuning" strategy, the model will adopt "prioritizing the insertion of buffer nodes when emotional intensity > 0.7" as a general rule, improving the prediction accuracy for similar scenarios. Furthermore, invalid paths discovered during the reconstruction process (such as an intervention performing poorly in all three reconstructions) are marked as low priority, reducing ineffective exploration in similar scenarios in the future; for example, the prior probability of the "immediate exposure under high pressure" path is reduced. This mechanism significantly improves the model's generalization ability, such as increasing the prediction accuracy of intervention strategies in the "unexpected trauma disclosure" scenario, and enabling it to adapt more quickly to individual differences among users.

[0105] In summary, the local reconstruction of the dynamic target map, through structural adjustment, parameter updates, logical correction, and data accumulation, enables the intervention response prediction model to evolve from "static preset" to "dynamic adaptive." This not only improves the accuracy of intervention for current users but also enhances the generalization ability to unknown scenarios through experience accumulation, ultimately forming a closed-loop evolutionary mechanism of "detecting deviations - correcting the model - optimizing predictions."

[0106] In an optional embodiment, in step 105, the priority and execution sequence of the intervention paths in the personalized decision tree are adjusted by combining the intervention response prediction model with the treatment value function of each intervention path, and a target intervention path matching the real-time interactive data is selected from the adjusted intervention paths, including:

[0107] The therapeutic value function of all intervention paths is monitored in real time. When the therapeutic value function value of any intervention path is detected to be lower than a set replacement threshold, intervention path replacement is triggered. From the parallel candidate intervention paths, those with a cosine similarity to the current psychological state vector greater than a set similarity threshold and a vertical dependency weight in the dynamic target graph greater than the parent node weight threshold are selected. Monte Carlo tree search is used to simulate the intervention response of the candidate intervention paths at a preset number of steps. The range of emotional intensity fluctuation is calculated based on the preset number of intervention responses. If the fluctuation range is greater than a set fluctuation threshold, a weight decay mode is entered to reduce the priority weight of the candidate intervention path and reduce its execution in the execution sequence. The system ranks the current session by position. If the session criticality score exceeds a set threshold, it enters acceleration mode, activates parallel execution channels, and allows multiple candidate intervention paths under the same stage goal to proceed simultaneously. Additional computing resources are allocated to the candidate intervention paths that are proceeding simultaneously. The system combines treatment value ranking and Monte Carlo search ranking to perform dual-channel decision fusion processing on the rearranged or simultaneously proceeding candidate intervention paths, resulting in dynamic adaptation results that match real-time interaction data. The system comprehensively verifies the candidate intervention paths indicated in the dynamic adaptation results based on interaction style adaptation, cross-layer path matching, semantic logic alignment, emotional fluctuation range, and treatment value enhancement, in order to obtain the final selected target intervention path.

[0108] Specifically, in 105, the principle of dynamically adjusting intervention paths through intervention response prediction models and therapeutic value functions is to monitor path effectiveness in real time and intelligently select the optimal strategy based on user status. Specifically, the system continuously monitors the therapeutic value function of all intervention paths. When the value of a path falls below a replacement threshold (e.g., 0.4), a path replacement mechanism is triggered. For example, if the value of the "cognitive restructuring" path drops to 0.38 due to user resistance, the system selects paths from parallel candidate paths that have a cosine similarity to the current psychological state vector higher than 0.6 (e.g., the similarity to "mindfulness-based stress reduction" is 0.72) and a vertical dependency weight exceeding the parent node threshold (e.g., 0.5). Next, the intervention response of the candidate path in the next three steps is simulated using Monte Carlo tree search. If the simulation shows that "mindfulness-based stress reduction" may cause emotional intensity fluctuations exceeding 0.3 (set threshold 0.25), the system enters a weight decay mode, reducing its priority from 2nd to 4th. If the critical score of the current session (such as emotional abrupt change + narrative transition) exceeds the 0.6 threshold, the system activates an acceleration mode, allowing "mindfulness-based stress reduction" and "breathing training" to proceed simultaneously, and allocating an additional 20% of computational resources to accelerate effect evaluation. Finally, the system integrates the therapeutic value ranking (such as the value of "behavioral activation" 0.65) and the Monte Carlo search ranking (such as the simulation success rate of 78%), and verifies it from five dimensions, including interaction style adaptation (such as user preference for guided intervention) and semantic logic alignment (such as the association between the current topic and "stress scenario analysis"), selecting the "behavioral activation + mindfulness-based stress reduction" combination as the target path.

[0109] For example, when the value of the "exposure therapy" path for an anxious user dropped to 0.35, the system triggered a replacement, selecting "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" might trigger an emotional fluctuation of 0.35 (exceeding the threshold), with its weight decaying to 0.4. "Relaxation training," with a fluctuation of 0.2, met the requirements, and its conversation criticality score of 0.7 triggered an acceleration mode, allowing it to proceed synchronously with "thought blocking." After dual-channel fusion, comprehensive verification showed that the interaction style fit of "relaxation training" reached 80%, and its therapeutic value increased by 0.2, ultimately leading to its selection as the target path and a decrease in the user's anxiety level in subsequent conversations.

[0110] In this way, real-time value monitoring and multi-dimensional screening ensure an improvement in the average efficiency of replacement paths, such as increasing the success rate after replacing low-value paths. Monte Carlo simulation and volatility threshold mechanisms reduce intervention risks; for example, high-volatility paths are promptly attenuated to prevent emotional breakdowns. Acceleration mode improves the efficiency of simultaneous multi-path advancement in critical sessions; for example, in crisis intervention scenarios, simultaneously executing "safety plans + emotion regulation" can shorten stabilization time. Dual-channel fusion and five-dimensional verification mechanisms improve the accuracy of path selection and reduce single-model bias; for example, combining interaction style and semantic logic significantly improves strategy adaptability. On-demand allocation of computing resources provides more support for high-potential paths and improves resource utilization in low-risk scenarios, avoiding computational waste. This mechanism, through an intelligent decision-making chain of "monitoring-screening-simulation-verification," achieves dynamic optimization and risk control of intervention paths, significantly improving the real-time nature, safety, and effectiveness of psychological counseling, especially demonstrating stronger adaptability in complex psychological states.

[0111] In an optional embodiment, in step 106, real-time interaction data is mapped to a multi-dimensional psychological state space as a conversation trajectory. 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. This includes: extracting multi-dimensional psychological state vectors from the real-time interaction data; mapping these vectors to a multi-dimensional psychological state space constructed based on hyperbolic space as psychological state feature points; calculating the spatial relationship between psychological state feature points using a non-Euclidean distance formula; constructing multiple corresponding conversation trajectories based on the calculation results; using a state-target bidirectional navigation algorithm to plan the conversation trajectory based on the target intervention path; and using an impedance probability distribution 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 multi-dimensional psychological state space; and 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 interactive data to 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, emotion indicators, and behavioral data, and mapped onto 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 differences in psychological states (e.g., when anxiety surges, the feature point rapidly moves away from the center point of the "calm state" in the space). Based on these distances, the system constructs multiple potential conversational trajectories. For example, a path from the current anxiety level of 0.8 to the target value of 0.4 might include "cognitive restructuring → relaxation training" or "narrative therapy → behavioral activation," etc.

[0113] The state-target bidirectional navigation algorithm simultaneously considers the location of the current psychological state's characteristic points and the location of the treatment target points to plan the shortest or safest trajectory. For example, if the user is in a high-anxiety state (a "high-risk area" where the characteristic points are near the spatial edge), the algorithm will preferentially choose a path that bypasses the high probability distribution of resistance. These high-risk areas are pre-marked by the radial distribution of resistance behaviors (such as avoidance and emotional outbursts) in historical data. Assuming that the "exposure therapy" path passes through the resistance risk radiation zone (probability > 70%), the algorithm will automatically adjust the trajectory, choosing a roundabout path of "mindfulness-based stress reduction → stepwise exposure" to reduce the intervention risk.

[0114] For example, when a user with post-traumatic stress disorder (PTSD) mentions a traumatic event during a conversation, the psychological state vector extracted from real-time interactive data shows an anxiety level of 0.9 and an avoidance tendency of 0.8, which maps to a "traumatic stress" risk area in the psychological state space. When the system plans a trajectory using a two-way navigation algorithm, it detects that a path directly discussing traumatic details would pass through an impedance risk radiation zone (impedance probability 85%). Therefore, the strategy is adjusted: first, the user is guided to move towards an "emotionally stable" area in the space using "safe base technology" (anxiety level drops to 0.6), and then the traumatic narrative is gradually introduced, avoiding high-risk paths. The cross-modal interaction engine generates interactive information based on this trajectory, such as first guiding breathing exercises with gentle voice (non-verbal interaction), and then exploring trauma-related cognitions through text interaction (verbal interaction), achieving safe and gradual intervention.

[0115] Understandably, hyperbolic space modeling transforms abstract psychological states into computable geometric relationships, improving the accuracy of navigation algorithms compared to traditional linear programming, for example, reducing trajectory planning errors in complex emotional scenarios. Path adjustment based on impedance probability distribution reduces the incidence of high-risk behaviors, such as decreasing the probability of emotional breakdowns in PTSD users during trauma discussions. The cross-modal engine switches interaction methods in real time based on the trajectory (e.g., voice reassurance + text guidance), increasing user acceptance of interventions, especially during periods of intense emotional fluctuation; the multimodal strategy reduces session interruption rates. The bidirectional navigation algorithm shortens the effective intervention path length; for example, the average number of sessions from a "high anxiety state" to a "target state" is significantly reduced, improving resource utilization efficiency. This mechanism, through geometric psychological states, intelligent trajectory planning, and multimodal interactive collaboration, provides an intuitive, safe, and efficient real-time interactive strategy generation method for psychological counseling, particularly suitable for psychological intervention scenarios with complex or high-risk emotions, significantly improving the operability of treatment and user experience.

[0116] It's worth noting that the core working principle of the intervention response prediction model is to construct an intelligent system capable of predicting user 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, multidimensional psychological state vectors are extracted from users' initial data (such as demographic information and psychological scale scores) and real-time interaction data (such as conversational text, emotion indicators, and behavioral feedback). These vectors cover core dimensions such as emotion intensity, cognitive patterns, and behavioral intentions. For example, for users with social anxiety, the vector might include features such as "anxiety level 0.7," "avoidance behavior frequency 4 times / week," and "self-negating statements accounting for 35%." These data are mapped to state points in a high-dimensional space, serving as the basis for model predictions.

[0118] Hybrid structured learning algorithms (such as the Peter-Clark algorithm combined with greedy search) are used to construct Bayesian networks to model the causal relationship between intervention strategies and user responses. Nodes in the network represent intervention strategies (such as "cognitive restructuring" and "exposure therapy") and user response variables (such as "anxiety reduction" and "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 with real-time data. For example, if it is found that the probability of a user's positive response to "virtual exposure" is 12% higher than that to "real exposure," the model automatically adjusts the probability values ​​of the corresponding paths, forming a dynamic probability distribution. MCTS simulates the potential effects of different intervention paths based on the prior probabilities of the Bayesian network through a four-stage process of "selection-expansion-simulation-backpropagation." For example, in the "social anxiety intervention" scenario, MCTS starts from the current state node and prioritizes exploring paths with higher predicted probabilities by the Bayesian network (such as "cognitive restructuring → identification of negative thoughts"), generating an effect distribution by simulating possible user responses (e.g., "can identify thoughts but no change in emotion" or "emotional improvement but resistance to subsequent practice"). After each simulation, the results are backpropagated to the tree structure, updating the number of visits to nodes and the cumulative reward, thereby optimizing path priority.

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

[0120] After each intervention, the actual response data is fed back to the Bayesian network and MCTS, updating the model parameters and simulation strategy. For example, if "art therapy" proves effective for users with high emotional intensity in multiple applications, the model will increase the prior probability of this path and prioritize its recommendation 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 can be dynamically adjusted to address individual differences. For example, the combination of "written expression + cognitive restructuring" is more suitable for introverted users, resulting in higher prediction accuracy than general models. By simulating and identifying high-risk paths in advance (such as "direct exposure" which may trigger traumatic reactions) and automatically switching to safer strategies, the incidence of risk events is reduced. Multi-path parallel simulation accelerates decision-making, shortening the time to generate intervention plans for complex cases to real-time response and improving session efficiency. Through the deep integration of probabilistic reasoning and dynamic simulation, this model achieves accurate prediction and strategy optimization of users' psychological intervention responses, providing core technical support for intelligent psychological counseling.

[0122] As an optional embodiment, in the above steps, after constructing multiple corresponding conversation trajectories based on the calculation results, the criticality scores of the multiple key conversation trajectories can be calculated based on the magnitude of emotion changes, the degree of cognitive perspective shifts, and narrative theme conversion indicators. Key conversation trajectory points that meet the set conditions are selected from the multiple conversation trajectories. The key conversation trajectory points are combined to trigger emergency intervention paths for handling 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 sudden critical events are implemented through branch intervention paths. The priority and execution sequence of the emergency intervention paths are associated with the degree of safety risk of the sudden critical events. The emergency intervention strategies are executed through a cross-modal interaction engine to generate second real-time interactive information for the target user.

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

[0124] Furthermore, emergency intervention paths are automatically matched based on the type of critical emergency (e.g., suicide risk is considered a high-risk event). For example, when suicidal thoughts are detected in a user, a preset "crisis intervention path" is immediately activated: first, a reassuring voice message is sent via a cross-modal interaction engine ("I understand you are feeling very bad right now, it's not your fault"), while simultaneously generating text to guide the user to describe their specific feelings, and triggering a safety risk assessment questionnaire. The priority of the emergency path is linked to the level 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 execute 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've prepared sleeping pills" during the 6th conversation (the narrative topic shifted to suicide-related), with an emotional change amplitude of 0.6 and no change in cognitive perspective (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 triggers the highest priority emergency path: first, maintaining real-time communication with the user via voice interaction, while simultaneously invoking the crisis intervention decision tree to guide the user to confirm their safety status, contact emergency contacts, and generate text information containing resource links. The entire process completes the path switching within 20 seconds. Other intervention modules are suspended during the emergency strategy execution to ensure resource concentration.

[0126] Therefore, by calculating key scores in real time, high-risk events can be identified and emergency response paths triggered in a short period of time. Compared with manual intervention, the response speed is improved, effectively reducing the risk of extreme events such as suicide. The priority of emergency response paths is dynamically adjusted according to the degree of risk. For example, for group safety risk events (such as violent tendencies), the system will simultaneously activate user reassurance and external early warning mechanisms to achieve a dual response of "internal intervention + external prevention and control," thereby improving the coverage of safety protection. The cross-modal engine integrates voice, text, video and other interaction methods. In crisis scenarios, empathy is conveyed through voice (improving the efficiency of emotional reassurance by 30%), while structured guidance (such as safety plan steps) is provided through text, avoiding information overload of a single modality and improving user acceptance. Pre-set emergency response path templates (such as crisis intervention procedures) ensure the professionalism and standardization of strategies, while allowing for fine-tuning according to individual user characteristics (such as adding gamified reassurance elements for teenagers), balancing efficiency and personalization, and ensuring that the effectiveness of emergency strategies meets relevant standards. By automating the entire process of "key node identification - risk classification response - multimodal emergency intervention", the system significantly improves the ability of psychological counseling systems to handle sudden safety events, provides users with 24 / 7 safety protection, and reduces the real-time decision-making pressure on counselors. It has important clinical value, especially in high-risk psychological intervention scenarios.

[0127] As an optional embodiment, the above steps employ a state-target bidirectional navigation algorithm to plan the session trajectory 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 each layer of the target. In the depth-first search, an improved A* algorithm is used, with the treatment value function in each intervention path as the priority criterion, expanding the number of candidate intervention paths by a preset number each time the search is performed. If a candidate intervention path is detected to be in a high-risk area where the impedance probability reaches a set threshold, a distance penalty is applied to 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, feasible historical intervention paths are traced back in reverse according to the target intervention path, and the fit and implementation risk coefficient of the historical intervention paths are calculated. During the reverse tracing process, the search weight of historical intervention paths is dynamically adjusted based on key scores, 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 candidate historical intervention path in the emotional outburst zone is retained. Combining the therapeutic value function value of the candidate intervention path, the suitability of the historical intervention path, and the implementation risk coefficient, the combination of intervention paths in the target intervention path is evaluated and fused in multiple dimensions to obtain the fused path. The fused path is optimized using cubic splines to ensure the smoothness of the state transition curve, and transitional nodes are added at the path inflection points in the fused path. The transitional nodes include at least: emotional confirmation nodes and / or cognitive clarification nodes.

[0129] Understandably, the state-goal bidirectional navigation algorithm constructs a smooth and safe conversation trajectory by combining forward planning and backward tracing. The specific implementation process is as follows: The system starts from a preset treatment goal node (e.g., "anxiety level ≤ 0.3") and performs a depth-first search along a three-layer nested goal structure (e.g., "cognition → emotion → behavior"). During each expansion, it prioritizes intervention paths with higher treatment value function values ​​(e.g., the "mindfulness-based stress reduction" path, with a value of 0.72, is preferred over "exposure therapy" with 0.58). If a high-risk area with an impedance probability exceeding a threshold (e.g., 0.6) is found (e.g., directly discussing trauma details), a distance penalty is imposed on that path (e.g., the actual search distance is doubled), reducing its selection probability.

[0130] Simultaneously, the system traces back historical intervention paths from the current psychological state node, assessing their suitability (e.g., "cognitive restructuring" has an 85% success rate in historical sessions) and risk coefficient (e.g., the potential to trigger emotional fluctuations is 0.4). During the reverse tracing, search weights are dynamically adjusted based on key scores. For example, a historical path may pose a risk of sudden emotional outburst (angle exceeding 60°), but it is still retained as a candidate because it involves a key theme (e.g., suicidal thoughts). The system multidimensionally integrates the therapeutic value of positive candidate paths, the suitability of reverse historical paths, and risk coefficients to generate an initial fused path. Finally, cubic spline optimization smooths the state transition curve, adding emotional confirmation nodes (e.g., "I understand this is difficult for you") or cognitive clarification nodes (e.g., "Could you explain what you specifically mean by 'it will never get better'?") at path turning points (e.g., from "emotional catharsis" to "problem-solving") to ensure a natural transition in intervention.

[0131] For example, a trauma patient's current anxiety level is 0.8, and the target node is 0.3. In the forward search, the "direct exposure therapy" path is penalized due to its resistance probability of 0.7, while the "progressive exposure + mindfulness" path (value 0.68) is prioritized for expansion. Backtracking reveals that the patient experienced emotional agitation during the "cognitive restructuring" intervention (risk coefficient 0.35), but this path has a long-term effect on reducing anxiety (fitness 0.8). The resulting fusion path is "mindfulness-based stress reduction → cognitive restructuring → progressive exposure." An emotional confirmation node is inserted at the transition point from "cognitive restructuring" to "exposure": "I notice you still have concerns about discussing trauma. How about we start with imagined exposure?"

[0132] In this way, the resistance 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 rate of historical intervention experience; for example, if a user responds well to "art therapy," the system prioritizes retaining relevant elements in the new path, improving treatment effectiveness. Spline optimization and transition nodes improve conversation fluency and increase user satisfaction with intervention transitions; for example, after intense emotional fluctuations, the emotional confirmation node reduces the interruption rate. Retaining alternative paths in emotional outburst zones improves the system's response speed to crisis events; for example, when discussing suicidal thoughts, it can quickly switch to a safe intervention mode, improving intervention effectiveness. Through bidirectional search, risk penalty, historical adaptation assessment, and path smoothing techniques, a safe and efficient conversation trajectory is constructed, especially suitable for complex psychological intervention scenarios, significantly improving user experience and safety while ensuring treatment effectiveness.

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

[0134] A logistic regression model is trained based on a historical consultation database. The model generates a three-dimensional impedance probability distribution in a multi-dimensional psychological state space in real time. The risk dimensions of the impedance probability distribution include at least: risk of emotional agitation, risk of cognitive overload, and risk of breakdown of the therapeutic alliance. 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. A risk tolerance threshold is dynamically set based on the target user's interaction patterns and psychological counseling needs. When the target intervention path traverses the highest-risk region in the three-dimensional impedance probability distribution, a preset number of alternative detour paths are generated to replace path segments in the target intervention path. Preparatory relaxation training is inserted at high-risk intervention nodes in the high-risk region to reduce the degree of risk.

[0135] For example, the principle of avoiding high-risk areas in the conversation trajectory is to train a logistic regression model using historical data to generate a visualized three-dimensional impedance probability distribution, dynamically guiding the intervention path to avoid high-risk areas. The system first uses a historical counseling database to train a logistic regression model, identifying psychological state characteristics (e.g., emotional intensity > 0.7, cognitive flexibility < 0.3) related to impedance behaviors (e.g., emotional intensity > 0.7, cognitive flexibility < 0.3). It then generates a three-dimensional impedance probability distribution in real time, including the risks of emotional agitation, cognitive overload, and breakdown of the therapeutic alliance, colored in hyperbolic space with a gradient of red, yellow, and green (red representing high-risk areas, green representing safe areas). For instance, when a user is in a state of "high anxiety + low cognitive flexibility," the model predicts a 75% risk of emotional agitation when entering the "cognitive restructuring" path, and the corresponding three-dimensional spatial area is marked as a red high-risk area.

[0136] The system dynamically adjusts the risk tolerance threshold 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 high-risk red zone (e.g., the "directly challenge negative beliefs" path), the system automatically generates three alternative detour paths, such as replacing the original path segment "direct challenge" with "mindfulness anchoring → stepwise challenge" or "narrative therapy → cognitive reconstruction." Simultaneously, for intervention nodes within the high-risk zone that cannot be completely avoided (e.g., necessary discussions of trauma details), preparatory relaxation training (e.g., 5 minutes of guided breathing exercises) is inserted to increase risk tolerance by reducing the user's emotional intensity (e.g., from 0.9 to 0.6), thus lowering 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 along the "direct confrontation conflict pattern" path (red high-risk zone). The system generated an alternative path: "empathic listening → emotion labeling → progressive confrontation," and inserted "emotion regulation skills review" preparatory training before the confrontation node. After adjustment, the risk area traversed by the path changed from red to yellow (risk coefficient 0.6). Simultaneously, by monitoring the user's emotional intensity in real time, the duration and frequency of the preparatory training were dynamically adjusted to ensure that the intervention remained within a safe threshold.

[0138] Understandably, the three-dimensional impedance distribution allows counselors to intuitively identify high-risk areas, improving the accuracy of risk assessment, such as reducing the misjudgment rate of "cognitive overload risk." The alternative detour path generation mechanism improves the efficiency of replacing high-risk paths; for example, in trauma intervention, path adjustment time is shortened from 10 minutes manual to real-time response, preventing users from withdrawing from counseling due to risk exposure. Preparatory training reduces the average risk level of high-risk nodes, such as the risk of emotional agitation, while simultaneously increasing user cooperation with the intervention and reducing the rate of session interruptions due to risk. Dynamic threshold settings allow the system to adapt 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, effective avoidance of high-risk areas in psychological intervention is achieved, providing safer treatment paths for users with high resistance or high vulnerability, while enhancing the system's adaptability to complex psychological states and the sustainability of intervention.

[0139] As an optional embodiment, after receiving the real-time interaction data of the target user, a real-time path reassessment is performed based on the real-time interaction data to obtain the therapeutic value function of each intervention path. Furthermore, the collaborative progress of multiple intervention paths can be detected to avoid excessive differences in the progress of parallel paths.

[0140] Specifically, the principle of detecting and balancing the collaborative progress of multiple intervention paths is to dynamically adjust resource allocation and intervention strategies by quantifying the progress differences between paths, ensuring coordinated progress of parallel paths. The system first defines progress difference thresholds for different levels of paths (e.g., a maximum progress difference of 20% is allowed at the stage target level, and 35% at the micro-interaction level), and calculates the progress balance between paths using a synchronization coefficient formula. For example, if a user is progressing in parallel on two stage target paths, "cognitive reconstruction" (70% completion) and "behavioral activation" (45% completion), 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 is reduced to 70% of its original weight, while the low-progress "behavioral activation" path receives an additional CPU core and 30% memory allocation. A "goal completion calibration" coordination node is also inserted to force synchronization of key milestones. Simultaneously, an acceleration mode is 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). For advanced paths, an extended "cognitive strategy transfer training" node is added to enhance the intervention effect. If parallel paths have logical conflicts (e.g., "exposure therapy" and "safe space creation" contradict each other at the behavioral level), the system calculates the conflict intensity using a semantic similarity model (e.g., 0.72 > 0.65 threshold), prioritizing the "safe space creation" path (68% success rate vs. 53% success rate) to ensure consistent intervention logic.

[0142] Thus, through threshold control and resource reallocation, the standard deviation of progress in parallel paths decreases, avoiding intervention gaps caused by excessive advancement or lag in any one path, such as improving the synergy of the "cognitive-behavioral" parallel path. The dynamic allocation mechanism concentrates computing resources on lagging paths, improving CPU utilization and reducing memory waste, while the design of extended nodes in high-progress paths avoids resource idleness. A three-level arbitration mechanism shortens the time for resolving path logic conflicts and improves the accuracy of conflict handling; for example, in trauma intervention, priority is given to the "stabilization-first" path that conforms to clinical guidelines. This shortens the overall goal achievement time, for example, reducing the comprehensive intervention course for patients with bipolar disorder, while progress synchronization enhances the synergistic gains of intervention effects. Heatmaps display path progress and dependencies in real time, allowing counselors to quickly locate discrepancies (such as red-highlighted areas of progress difference), improving the response speed of intervention adjustments and increasing user satisfaction with the treatment pace. Through data quantification, dynamic adjustment, and intelligent arbitration, the synergistic advancement of multi-path interventions is achieved, ensuring the comprehensiveness of treatment while avoiding resource conflicts and progress imbalances, significantly improving the systematic nature and efficiency of psychological counseling.

[0143] This application's technical solution overcomes the limitations of traditional psychological counseling systems that rely on pre-set processes through an autonomous psychological planning architecture. Its core technical principle lies in the deep coupling of a dynamically scalable three-layer goal network with an intelligent decision-making model: a three-layer nested structure of macro-goals, stage goals, and micro-interaction goals is generated based on initial user data, and multi-dimensional relationships between goals are established through a directed acyclic graph. Real-time analysis of user language, speech, and behavioral characteristics is performed using a Bayesian network, combined with Monte Carlo tree search to simulate multiple potential intervention paths, dynamically calculating the therapeutic value function for each path. This therapeutic value function comprehensively evaluates expected efficacy, time efficiency, user acceptance, and risk factors, completing path priority reordering within milliseconds. When encountering drastic emotional fluctuations or unexpected topic shifts, the system uses multi-dimensional psychological state space mapping technology to dynamically calibrate the current conversation trajectory with the treatment goals, planning the optimal dialogue path in real-time within a non-Euclidean psychological feature space, and simultaneously initiating a branch reconstruction mechanism to generate a new intervention sequence containing buffer nodes and transitional phrases.

[0144] In another embodiment of this application, a psychological counseling interactive device based on an autonomous psychological planning architecture is also provided. See also Figure 3 The device comprises the following units: an acquisition unit configured to acquire initial user data of the target user; the initial user data includes at least: initial conversation data and psychological scale data; a target hierarchical 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 matching the dynamic target graph; the three-layer nested target structure includes: a conversation macro-target layer, a stage target layer, and a micro-interaction target layer, with each layer of targets connected by a directed acyclic graph; the personalized decision tree has multiple intervention paths set in parallel based on each layer of targets; the three-layer nested target structure is used to achieve multi-path parallel advancement of treatment goals; and an evaluation unit configured to receive target data. After collecting real-time interaction data from users, a real-time path reassessment 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 construct an intervention response prediction model using Bayesian networks and Monte Carlo tree search algorithms. Through the intervention response prediction model, combined with the therapeutic value functions of each intervention path, the priority and execution sequence of the intervention paths in the personalized decision tree are adjusted, and a target intervention path matching the real-time interaction data is selected from the adjusted intervention paths. The interaction unit is configured to map the real-time interaction data into a multi-dimensional psychological state space as a conversation trajectory, and plan 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. The device can implement various steps in the above method embodiments, which will not be elaborated here.

[0145] Please see Figure 4 , Figure 4A schematic diagram illustrating an embodiment of the electronic device provided in this application. For example... Figure 4 As shown, this 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, it implements a psychological counseling interaction method based on an autonomous psychological planning architecture.

[0146] Please see Figure 5 , Figure 5 This is a schematic diagram illustrating an embodiment of a computer-readable storage medium provided in this application. For example... Figure 5 As shown, this embodiment provides a computer-readable storage medium 600 storing a computer program 611, which, when executed by a processor, implements a psychological counseling interaction method based on an autonomous psychological planning architecture. It should be noted that the descriptions of each embodiment in the above embodiments have different focuses; parts not described in detail in a certain embodiment can be referred to in the relevant descriptions of other embodiments. Those skilled in the art should understand that the embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Moreover, this application can 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-ROM, optical storage, etc.) containing computer-usable program code. Although preferred embodiments of this application have been described, those skilled in the art, once they understand the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this application. Obviously, those skilled in the art can make various alterations and variations to this application without departing from the spirit and scope of this application. Therefore, if these modifications and variations of this application fall within the scope of the claims of this application and their equivalents, this application also intends to include these modifications and variations.

Claims

1. A psychological counseling interaction method based on an autonomous psychological planning framework, characterized in that, The method includes: Obtain initial user data from the target users; initial user data includes: initial conversation 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 conversational macro target layer, a staged target layer, and a micro-interaction target layer, with each layer of targets connected by a directed acyclic graph. Multiple intervention paths are set in parallel based on each layer of targets in the personalized decision tree. The three-layer nested target structure is used to achieve multi-path parallel advancement of treatment goals. After receiving real-time interaction data from the target user, a real-time path reassessment is performed based on the real-time interaction data to obtain the therapeutic value function of each intervention path; An intervention response prediction model is constructed using Bayesian networks and Monte Carlo tree search algorithm. Based on the intervention response prediction model and the therapeutic value function of each intervention path, the priority and execution sequence of the intervention paths in the personalized decision tree are adjusted, and a target intervention path that matches the real-time interactive data is selected from the adjusted intervention paths. Real-time interaction data is mapped onto a multi-dimensional psychological state space as a conversation trajectory. 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. This includes: extracting multi-dimensional psychological state vectors from the real-time interaction data; mapping these vectors onto a multi-dimensional psychological state space constructed based on hyperbolic space as psychological state feature points; calculating the spatial relationship between these feature points using a non-Euclidean distance formula and constructing multiple corresponding conversation trajectories based on the calculation results; employing a state-target bidirectional navigation algorithm to plan the conversation trajectory based on the target intervention path, and avoiding high-risk areas in the conversation trajectory based on an impedance probability distribution 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 multi-dimensional psychological state space; and executing the real-time interaction strategy through a cross-modal interaction engine to generate first real-time interaction information for the target user. Among them, the state-target bidirectional navigation algorithm is improved through A The algorithm combines forward planning with backward tracing along the target intervention path, taking into account the location of the current psychological state feature points and the location of the treatment target points, to plan the shortest or safest conversation trajectory.

2. The psychological counseling interaction method based on an autonomous psychological planning framework according to claim 1, characterized in that, The process of constructing a dynamic target graph for a target user based on initial user data through a three-layer nested target structure includes: Initial user data is input into the goal decomposition engine, and conversational macro goals are generated based on a cognitive classification module constructed according to a psychological theoretical framework; the psychological theoretical framework includes: cognitive behavioral therapy and humanistic therapy; Using a clinical pathway matching algorithm, each session macro goal is decomposed into multiple stage goals, and the logical dependencies between session macro goals and stage goals, as well as the logical dependencies between different stage goals, are labeled. For each initiated single session, multiple micro-interaction goals are dynamically generated; each micro-interaction goal is associated with an intervention strategy and expected response indicators for the target user. Vertical connections are built from top to bottom, from macro-goals of the conversation to micro-interaction goals, and horizontal connections are built between various goals based on the collaborative and conflicting relationships of goals at the same level, so as to construct a dynamic goal graph for the target user.

3. The psychological counseling interaction method based on the autonomous psychological planning framework according to claim 2, characterized in that, The preloaded personalized decision tree matching the dynamic target graph includes: Load the initial decision tree associated with each objective in the dynamic objective graph from the base decision tree; Real-time path evaluation is performed on the initial decision tree to obtain the therapeutic value function of each intervention path; Intervention paths whose therapeutic value function values ​​reach the set core path threshold are selected, and a personalized decision tree is constructed. Multiple emergency intervention paths are pre-generated and added to the personalized decision tree as emergency intervention strategies to deal with sudden critical events. After preloading the personalized decision tree that matches the dynamic target graph, the following is also included: After executing a preset round of dialogue, the personalized decision tree is structurally optimized to update the path weights and the connections between each intervention path and intervention node.

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

5. The psychological counseling interaction method based on an autonomous psychological planning framework according to claim 1, characterized in that, The step involves using the intervention response prediction model, combined with the therapeutic value function of each intervention path, to adjust the priority and execution sequence of the intervention paths in the personalized decision tree, and selecting the target intervention path that matches the real-time interactive data from the adjusted intervention paths, including: The therapeutic value function of all intervention paths is monitored in real time. When the therapeutic value function value of any intervention path is detected to be lower than the set replacement threshold, the intervention path replacement is triggered. From the parallel candidate intervention paths, select those with a cosine similarity to the current psychological state vector greater than a set similarity threshold, and whose vertical dependency weight in the dynamic target graph is greater than the parent node weight threshold. The Monte Carlo tree search was used to simulate the intervention response of the candidate intervention path with a preset number of steps. The range of emotional intensity fluctuations 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 reduce 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, it enters the acceleration mode, activates the parallel execution channel, allows multiple candidate intervention paths under the same stage goal to advance simultaneously, and allocates additional computing resources to the candidate intervention paths that are advancing simultaneously. The comprehensive treatment value ranking and Monte Carlo search ranking are combined to perform dual-channel decision fusion processing on the rearranged or simultaneously advanced candidate intervention paths to obtain dynamic adaptation results that match real-time interactive data. The candidate intervention paths indicated in the dynamic adaptation results are comprehensively verified based on factors such as interaction style adaptability, cross-layer path matching degree, semantic logic alignment, range of emotional fluctuation, and enhancement of therapeutic value, so as to obtain the final selected target intervention path.

6. The psychological counseling interaction method based on an autonomous psychological planning framework according to claim 1, characterized in that, After constructing multiple corresponding session trajectories based on the calculation results, the process further includes: Based on the magnitude of emotional changes, the degree of shift in cognitive perspective, and the narrative theme conversion indicators, the criticality scores of multiple key conversation trajectories are calculated, and key conversation trajectory points that meet the set conditions are selected from multiple conversation trajectories. Emergency intervention paths for handling sudden critical events are triggered by key session trajectory points; sudden critical events include: sudden negative events, crisis events with user security risks, and high-risk events with group security risks; Emergency intervention strategies for sudden critical events through branch intervention paths; the priority and execution sequence of emergency intervention paths are related to the degree of security risk of sudden critical events; Emergency intervention strategies are executed through a cross-modal interaction engine, generating a second real-time interactive message for the target user.

7. The psychological counseling interaction method based on an autonomous psychological planning framework according to claim 6, characterized in that, The state-target bidirectional navigation algorithm, which plans the session trajectory based on the target intervention path, includes: 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 target at each layer; in the depth-first search, an improved A... The algorithm prioritizes the therapeutic value function in each intervention path and expands the number of candidate intervention paths by a preset number during each search. If a candidate intervention path is detected to be in a high-risk area where the impedance probability reaches a set threshold, a distance penalty is applied to the current candidate intervention path so that the actual search distance value of each intervention node in the current candidate intervention path is increased by a preset penalty multiple. Starting from the current psychological state node, feasible historical intervention paths are traced back according to the target intervention path. The suitability and implementation risk coefficient of the historical intervention paths are calculated. During the tracing back, the search weight of the historical intervention paths is dynamically adjusted in combination with the key 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 outburst zone is retained. By combining the therapeutic value function value of candidate intervention paths, the suitability of historical intervention paths, and the implementation risk coefficient, the combination of intervention paths in the target intervention path is evaluated and fused in multiple dimensions to obtain the fused path. The fusion path is optimized using cubic splines to ensure the smoothness of the state transition curve, and transitional nodes are added at the turning points of the fusion path; these transitional nodes include: emotional confirmation nodes and / or cognitive clarification nodes.

8. The psychological counseling interaction method based on the autonomous psychological planning framework according to claim 7, characterized in that, The high-risk areas in the session trajectory avoidance based on impedance probability distribution include: A logistic regression model was trained based on a historical information database. The three-dimensional impedance probability distribution in the multidimensional psychological state space is generated in real time using a logistic regression model. The risk dimensions of the impedance probability distribution include: risk of emotional agitation, risk of cognitive overload, and risk of breakdown of the therapeutic alliance. The three-dimensional impedance probability distribution is visualized as a gradient coloring area in hyperbolic space, with different colors used to mark the degree of risk. Dynamically set risk tolerance thresholds based on the interaction patterns and psychological counseling needs of target users; When the target intervention path crosses the 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. For high-risk intervention points in high-risk areas, preparatory relaxation training is inserted to reduce the level of risk.

9. A psychological counseling interactive device based on an autonomous psychological planning framework, characterized in that, The device includes the following units, wherein, The acquisition unit is configured to acquire initial user data of the target user; the initial user data includes: initial 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 conversational macro target layer, a staged target layer, and a micro-interaction target layer, with each layer of targets connected by a directed acyclic graph. The personalized decision tree has multiple intervention paths set in parallel based on each layer of targets. The three-layer nested target structure is used to achieve multi-path parallel advancement of treatment goals. The evaluation unit is configured to receive real-time interaction data from the target user, and then perform real-time path re-evaluation based on the real-time interaction data to obtain the therapeutic value function of 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; through the intervention response prediction model, combined with the therapeutic value function of each intervention path, the priority and execution sequence of the intervention paths in the personalized decision tree are adjusted, and a target intervention path matching the real-time interactive data is selected from the adjusted intervention paths. The interaction unit is configured to map real-time interaction data onto a multi-dimensional psychological state space as a conversation trajectory, and to plan the conversation trajectory based on the target intervention path through a state target bidirectional navigation algorithm, thereby realizing real-time interaction with the target user. Specifically, the interaction unit is configured to: extract multi-dimensional psychological state vectors from real-time interaction data; map these vectors onto a multi-dimensional psychological state space constructed based on hyperbolic space as psychological state feature points; calculate the spatial relationship between these feature points using a non-Euclidean distance formula; and construct multiple corresponding conversation trajectories based on the calculation results; employ a state-target bidirectional navigation algorithm to plan conversation trajectories based on the target intervention path; and avoid high-risk areas in the conversation trajectory based on impedance probability distribution 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 multi-dimensional psychological state space; and execute the real-time interaction strategy through a cross-modal interaction engine to generate first real-time interaction information for the target user. Among them, the state-target bidirectional navigation algorithm is improved through A The algorithm combines forward planning with backward tracing along the target intervention path, taking into account the location of the current psychological state feature points and the location of the treatment target points, to plan the shortest or safest conversation trajectory.